C# Class TVSorter.Files.ScanManager

Handles the scanning of files.
Show file Open project: a-jackson/tvsorter Class Usage Examples

Public Methods

Method Description
Refresh ( string subDirectory ) : List

Refresh the specified sub directory.

RefreshFileCounts ( ) : void

Searches for files in the output directory to set the file counts.

ResetShow ( FileResult result, TvShow show ) : void

Resets the show of the specified result.

Private Methods

Method Description
GetFirstMatch ( IFileInfo file ) : List

Gets the first match for the specified file.

MatchShow ( string fileName, int matchIndex, string &showName, bool ignoreShowUpdate ) : TvShow

Attempts to match the file name to to a show in storage.

ProcessDirectory ( IDirectoryInfo directory, bool overrideRecurse = false, bool ignoreShowUpdate = false ) : IEnumerable

Processes the specified directory looking for episodes.

ProcessEpisode ( Match match, TvShow show ) : IEnumerable

Gets the necessary info from the file name and return the episode object

ProcessFile ( IFileInfo file, bool ignoreShowUpdate ) : FileResult

Processes the specified file, overriding the show and episode search.

ProcessResult ( string showName, TvShow result ) : TvShow

Processes a TVShow result

Refresh ( IDirectoryInfo directoryInfo ) : List

Refresh the specified directory.

RefreshFileCounts ( IEnumerable directories ) : void

Searches for files in specified directories to set the file counts.

ScanManager ( IStorageProvider storageProvider, IDataProvider dataProvider ) : System

Initializes a new instance of the ScanManager class.

SearchDestinationFolder ( IDirectoryInfo destination ) : IEnumerable

Searches a destination folder for files. This is intended to be called by the file manager.

SearchNewShows ( IStorageProvider storageProvider, IDataProvider dataProvider, IEnumerable directories ) : List>.Dictionary

Searches for new TVShows.

Method Details

Refresh() public method

Refresh the specified sub directory.
public Refresh ( string subDirectory ) : List
subDirectory string /// The sub directory to refresh. ///
return List

RefreshFileCounts() public method

Searches for files in the output directory to set the file counts.
public RefreshFileCounts ( ) : void
return void

ResetShow() public method

Resets the show of the specified result.
public ResetShow ( FileResult result, TvShow show ) : void
result TVSorter.Model.FileResult /// The result to modify. ///
show TvShow /// The show to set the result to. ///
return void