Examples of Episode


Examples of unify.data.Episode

              LOGGER.info("Found new season (" + seasonInt + ") of " + show.getTitle());
              show.setCurSeason(seasonInt);
            }
            for(Episode rssEpisode : rssSeason.getEpisodes()) {
              int episodeInt = rssEpisode.getNumber();
              Episode episode = null;
              if(season!=null) {
                episode = season.findEpisode(episodeInt);
              }
              if(show.getLastEpisode()<episodeInt && episode==null) {
                if(season==null) {
                  season = show.addSeason(seasonInt);
                }
                for(int m=show.getLastEpisode()+1;m<episodeInt;m++) {
                  LOGGER.info("Found new episode (" + m + ") of " + show.getTitle() + " in season " + seasonInt);
                  season.addEpisode(m, " ", " ");
                  pendingNotice(show.getTitle() + " (" + seasonInt + "x" + m + ") is now available.");              
                }
                LOGGER.info("Found new episode (" + episodeInt + ") of " + show.getTitle() + " in season " + seasonInt);
                season.addEpisode(episodeInt, rssEpisode.getLink(), rssEpisode.getLinkLabel());
                pendingNotice(show.getTitle() + " (" + seasonInt + "x" + episodeInt + ") is now available.");
                show.setLastEpisode(episodeInt);
              }
              if(episode!=null) {
                int newPriority = Settings.getInstance().getFeedPriority(rssEpisode.getLinkLabel());
                int oldPriority = Settings.getInstance().getFeedPriority(episode.getLinkLabel());
                if (newPriority>oldPriority) {
                  LOGGER.info("Found higher priority link for " + show.getTitle() + " (" + seasonInt + "x" + episodeInt + "), updating from " + episode.getLinkLabel() + " to " + rssEpisode.getLinkLabel());         
                  episode.setLink(rssEpisode.getLink());
                  episode.setLinkLabel(rssEpisode.getLinkLabel());
                  pendingNotice(show.getTitle() + " (" + seasonInt + "x" + episode.getNumber() + ") is now available on " + rssEpisode.getLinkLabel() + ".");
                }
              }
            }
          }
        }
View Full Code Here

Examples of unify.data.Episode

  private void checkNewShows(ArrayList<Show> rssShows) {
    for(int i=0;i<rssShows.size();i++) {
      Show rssShow = rssShows.get(i);
      if(getShow(this.shows, rssShow.getTitle())==null && getShow(this.newShows, rssShow.getTitle())==null && getShow(this.ignoredShows, rssShow.getTitle())==null) {
        Season season = rssShow.getSeason();
        Episode episode = season.getEpisode();
        if(season.getNumber()==1 && episode.getNumber() == 1) {
          Show show = new Show(rssShow.getTitle());
          Season newSeason = show.addSeason(1);
          newSeason.addEpisode(1, episode.getLink(), episode.getLinkLabel());
          show.setCurSeason(1);
          show.setLastEpisode(1);
          this.newShows.add(show);
          this.ignoredShows.add(show);
          LOGGER.info("Found new show: " + show.getTitle());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.