C# Class Business.EditPlaylistBusiness

Show file Open project: mysteryx93/NaturalGroundingPlayer Class Usage Examples

Public Methods

Method Description
AutoBindFilesAsync ( ) : Task

Automatically binds files in the playlist and load missing info.

EditPlaylistBusiness ( ) : System
GetRatingCategoriesAsync ( bool addSpecial ) : Task>

Loads the list of rating categories for the search interface.

GetRatingInitials ( string text ) : string

Returns the 3 first letters of a rating category or the first letter of each word.

GetSortedPlaylist ( string search, string orderBy, ListSortDirection orderDirection ) : List
LoadBuyListAsync ( SearchSettings settings, BuyProductType productType, bool showAllFiles ) : Task
LoadCategoriesAsync ( SearchSettings settings, SearchFilterEnum groupType ) : Task>

Loads the list of artists.

LoadFiles ( ) : void

Loads all orphan files in the Natural Grounding folder as a list of strings.

LoadMediaInfoAsync ( IProgress progress ) : Task

Loops through the Media table to set the FileName, Length, Width and Height fields.

LoadPlaylistAsync ( SearchSettings settings ) : Task

Loads the playlist from the database with specified filter conditions.

LoadPlaylistAsync ( SearchSettings settings, bool forceScanFolder ) : Task

Loads the playlist from the database with specified filter conditions.

RefreshPlaylist ( Media video, string oldFileName ) : void
UpdateFileName ( System.Guid videoId, string fileName ) : bool
UpdateFileName ( DataAccess.VideoListItem item, string fileName ) : bool

Private Methods

Method Description
MergePlaylist ( SearchSettings settings ) : void

Merges the list of files in the folder with the data coming from the database.

OrphanMatchesConditions ( DataAccess.MediaType mediaType, string fileName, SearchSettings settings ) : bool
RefreshFilesCache ( string fileName, bool isInDatabase ) : void

Method Details

AutoBindFilesAsync() public static method

Automatically binds files in the playlist and load missing info.
public static AutoBindFilesAsync ( ) : Task
return Task

EditPlaylistBusiness() public method

public EditPlaylistBusiness ( ) : System
return System

GetRatingCategoriesAsync() public method

Loads the list of rating categories for the search interface.
public GetRatingCategoriesAsync ( bool addSpecial ) : Task>
addSpecial bool
return Task>

GetRatingInitials() public method

Returns the 3 first letters of a rating category or the first letter of each word.
public GetRatingInitials ( string text ) : string
text string
return string

GetSortedPlaylist() public method

public GetSortedPlaylist ( string search, string orderBy, ListSortDirection orderDirection ) : List
search string
orderBy string
orderDirection ListSortDirection
return List

LoadBuyListAsync() public method

public LoadBuyListAsync ( SearchSettings settings, BuyProductType productType, bool showAllFiles ) : Task
settings DataAccess.SearchSettings
productType BuyProductType
showAllFiles bool
return Task

LoadCategoriesAsync() public method

Loads the list of artists.
public LoadCategoriesAsync ( SearchSettings settings, SearchFilterEnum groupType ) : Task>
settings DataAccess.SearchSettings The filters to apply to the data.
groupType SearchFilterEnum
return Task>

LoadFiles() public method

Loads all orphan files in the Natural Grounding folder as a list of strings.
public LoadFiles ( ) : void
return void

LoadMediaInfoAsync() public method

Loops through the Media table to set the FileName, Length, Width and Height fields.
public LoadMediaInfoAsync ( IProgress progress ) : Task
progress IProgress Reports the progress of the operation. First report is the amount of files to process, then subsequent reports represent the quantity done.
return Task

LoadPlaylistAsync() public method

Loads the playlist from the database with specified filter conditions.
public LoadPlaylistAsync ( SearchSettings settings ) : Task
settings DataAccess.SearchSettings The filters to apply to the data.
return Task

LoadPlaylistAsync() public method

Loads the playlist from the database with specified filter conditions.
public LoadPlaylistAsync ( SearchSettings settings, bool forceScanFolder ) : Task
settings DataAccess.SearchSettings The filters to apply to the data.
forceScanFolder bool Whether to scan files in folder to set FileExists.
return Task

RefreshPlaylist() public method

public RefreshPlaylist ( Media video, string oldFileName ) : void
video Media
oldFileName string
return void

UpdateFileName() public method

public UpdateFileName ( System.Guid videoId, string fileName ) : bool
videoId System.Guid
fileName string
return bool

UpdateFileName() public method

public UpdateFileName ( DataAccess.VideoListItem item, string fileName ) : bool
item DataAccess.VideoListItem
fileName string
return bool