Пример #1
0
 /// <summary>
 /// Export a single Episode to the specified path with the specified
 /// filename format.
 /// </summary>
 /// <param name="e">Episode to export</param>
 /// <param name="exportPath">Path to save Episode</param>
 /// <param name="nameFormat">Filename format to use</param>
 private void ExportEpisodeTo(Episode e, string exportPath, string nameFormat, FileOperation fo)
 {
     FileInfo fi = new FileInfo(Path.Combine(_settings.RawFilesDirectory, e.Filename));
       fo.QueueFileCopy(fi, exportPath, SanitizeFilename(string.Format(nameFormat, e.Season.Show.Title, e.Name, e.FirstAired, e.Season.Number, e.Number)) + fi.Extension);
 }
Пример #2
0
 /// <summary>
 /// Export all Episodes of the specified Show with readable filenames to
 /// the specified path with the specified filename format.
 /// </summary>
 /// <param name="s">Show containing the Episodes to export</param>
 /// <param name="exportPath">Path to save exported episodes</param>
 /// <param name="nameFormat">Name format for exported episodes</param>
 private void ExportShowEpisodes(Show s, string exportPath, string nameFormat)
 {
     using(FileOperation fo = new FileOperation())
     foreach(Season season in s.Seasons)
       foreach(Episode e in season.Episodes)
     ExportEpisodeTo(e, exportPath, nameFormat, fo);
 }
Пример #3
0
 /// <summary>
 /// Export the specified Episode with a readable filename to the specified
 /// path with the specified filename format.
 /// </summary>
 /// <param name="e">Episode to export</param>
 /// <param name="exportPath">Path to save exported episode</param>
 /// <param name="nameFormat">Name format for exported episode</param>
 private void ExportEpisode(Episode e, string exportPath, string nameFormat)
 {
     using(FileOperation fo = new FileOperation())
     ExportEpisodeTo(e, exportPath, nameFormat, fo);
 }