private void addTvShowSeason(TvShowSeason season,TvShow tvShow){
  if (nodeMap.get(season) != null) {
    return;
  }
  TvShowTreeNode parent=(TvShowTreeNode)nodeMap.get(tvShow);
  TvShowSeasonTreeNode child=new TvShowSeasonTreeNode(season);
  if (parent != null) {
    parent.add(child);
    nodeMap.put(season,child);
    int index=getIndexOfChild(parent,child);
    if (index > -1) {
      TreeModelEvent event=new TreeModelEvent(this,parent.getPath(),new int[]{index},new Object[]{child});
      for (      TreeModelListener listener : listeners) {
        try {
          listener.treeNodesInserted(event);
        }
 catch (        NullPointerException|ArrayIndexOutOfBoundsException ignored) {
        }
      }
    }
    TreeModelEvent event=new TreeModelEvent(this,root.getPath(),null,null);
    for (    TreeModelListener listener : listeners) {
      try {
        listener.treeNodesChanged(event);
      }
 catch (      NullPointerException|ArrayIndexOutOfBoundsException ignored) {
      }
    }
  }
}

private void addTvShowSeason ( TvShowSeason season , TvShow tvShow ) { if ( nodeMap . get ( season ) != null ) { return ; } TvShowTreeNode parent = ( TvShowTreeNode ) nodeMap . get ( tvShow ) ; TvShowSeasonTreeNode child = new TvShowSeasonTreeNode ( season ) ; if ( parent != null ) { parent . add ( child ) ; nodeMap . put ( season , child ) ; int index = getIndexOfChild ( parent , child ) ; if ( index > - 1 ) { TreeModelEvent event = new TreeModelEvent ( this , parent . getPath ( ) , new int [ ] { index } , new Object [ ] { child } ) ; for ( TreeModelListener listener : listeners ) { try { listener . treeNodesInserted ( event ) ; } catch ( NullPointerException | ArrayIndexOutOfBoundsException ignored ) { } } } TreeModelEvent event = new TreeModelEvent ( this , root . getPath ( ) , null , null ) ; for ( TreeModelListener listener : listeners ) { try { listener . treeNodesChanged ( event ) ; } catch ( NullPointerException | ArrayIndexOutOfBoundsException ignored ) { } } } }
adds the tv show season .
