public static List<List<Episode>> compareEpisodes(List<Episode> localEpisodes,List<Episode> serverEpisodes){
  Map<String,Episode> localEpisodeMap=convertListToMap(localEpisodes);
  Map<String,Episode> serverEpisodeMap=convertListToMap(serverEpisodes);
  List<Episode> episodesToAdd=getNewEpisodes(localEpisodeMap,serverEpisodeMap);
  List<Episode> episodesToUpdate=getAlteredEpisodes(localEpisodeMap,serverEpisodeMap);
  List<List<Episode>> episodeComparison=new ArrayList<>();
  Log.d(TAG,"Number of channels to update: " + episodesToUpdate.size());
  episodeComparison.add(UPDATE,episodesToUpdate);
  Log.d(TAG,"Number of channels to add: " + episodesToAdd.size());
  episodeComparison.add(ADD,episodesToAdd);
  return episodeComparison;
}

public static List < List < Episode > > compareEpisodes ( List < Episode > localEpisodes , List < Episode > serverEpisodes ) { Map < String , Episode > localEpisodeMap = convertListToMap ( localEpisodes ) ; Map < String , Episode > serverEpisodeMap = convertListToMap ( serverEpisodes ) ; List < Episode > episodesToAdd = getNewEpisodes ( localEpisodeMap , serverEpisodeMap ) ; List < Episode > episodesToUpdate = getAlteredEpisodes ( localEpisodeMap , serverEpisodeMap ) ; List < List < Episode > > episodeComparison = new ArrayList < > ( ) ; Log . d ( TAG , "Number of channels to update: " + episodesToUpdate . size ( ) ) ; episodeComparison . add ( UPDATE , episodesToUpdate ) ; Log . d ( TAG , "Number of channels to add: " + episodesToAdd . size ( ) ) ; episodeComparison . add ( ADD , episodesToAdd ) ; return episodeComparison ; }
compares episodes stored locally to episodes from the server , and returns whats new & whats changed
