Exemple #1
0
 public override ItemList ProcessEpisode(ProcessedEpisode dbep, FileInfo filo, bool forceRefresh)
 {
     if (TVSettings.Instance.EpTBNs)
     {
         ItemList theActionList = new ItemList();
         if (dbep.Type == ProcessedEpisode.ProcessedEpisodeType.merged)
         {
             //We have a merged episode, so we'll also download the images for the episodes had they been separate.
             foreach (Episode sourceEp in dbep.SourceEpisodes)
             {
                 string foldername     = filo.DirectoryName;
                 string filename       = TVSettings.Instance.FilenameFriendly(dbep.Show, sourceEp);
                 ActionDownloadImage b = DoEpisode(dbep.Show, sourceEp, new FileInfo(foldername + "/" + filename), ".jpg", forceRefresh);
                 if (b != null)
                 {
                     theActionList.Add(b);
                 }
             }
         }
         else
         {
             ActionDownloadImage a = DoEpisode(dbep.Show, dbep, filo, ".tbn", forceRefresh);
             if (a != null)
             {
                 theActionList.Add(a);
             }
         }
         return(theActionList);
     }
     return(base.ProcessEpisode(dbep, filo, forceRefresh));
 }
Exemple #2
0
 private static int TypeNumber(Item a)
 {
     return(a switch
     {
         ShowItemMissing _ => 1,
         MovieItemMissing _ => 2,
         ActionCopyMoveRename _ => 3,
         ActionMoveRenameDirectory _ => 4,
         ActionTDownload _ => 5,
         ActionDownloadImage _ => 6,
         ActionMede8erViewXML _ => 7,
         ActionMede8erXML _ => 8,
         ActionNfo _ => 9,
         ActionPyTivoMeta _ => 10,
         ActionWdtvMeta _ => 11,
         ItemDownloading _ => 12,
         ActionDeleteFile _ => 13,
         ActionDeleteDirectory _ => 14,
         ActionDateTouchEpisode _ => 15,
         ActionDateTouchSeason _ => 16,
         ActionDateTouchMedia _ => 17,
         ActionDateTouchMovie _ => 18,
         ActionTRemove _ => 19,
         _ => throw new NotSupportedException()
     });