C# Class Business.DownloadPlaylistBusiness

Scans the playlist for videos with higher resolution available, or for broken links, and downloads those videos.
Show file Open project: mysteryx93/NaturalGroundingPlayer

Public Properties

Property Type Description
DownloadManager DownloadBusiness

Public Methods

Method Description
DownloadPlaylistBusiness ( ) : System
IsHigherQualityAvailable ( string localFile, BestFormatInfo serverFile ) : Task

Returns whether the local file should be replaced by the YouTube version.

LoadStatusFromCache ( List list ) : void

Restores the Status and StatusText fields from the cache into specified data list.

SetStatus ( DataAccess.VideoListItem item, VideoListItemStatusEnum status ) : void
SetStatus ( DataAccess.VideoListItem item, VideoListItemStatusEnum status, string statusText ) : void
StartDownload ( List selection, bool upgradeAudio ) : Task
StartScan ( List selection, CancellationToken cancel ) : Task

Private Methods

Method Description
DownloadFile ( DataAccess.VideoListItem item, bool upgradeAudio ) : Task

Method Details

DownloadPlaylistBusiness() public method

public DownloadPlaylistBusiness ( ) : System
return System

IsHigherQualityAvailable() public method

Returns whether the local file should be replaced by the YouTube version.
public IsHigherQualityAvailable ( string localFile, BestFormatInfo serverFile ) : Task
localFile string A path to the local file.
serverFile BestFormatInfo The information of the available server file.
return Task

LoadStatusFromCache() public method

Restores the Status and StatusText fields from the cache into specified data list.
public LoadStatusFromCache ( List list ) : void
list List The list of data to restore cached data into.
return void

SetStatus() public method

public SetStatus ( DataAccess.VideoListItem item, VideoListItemStatusEnum status ) : void
item DataAccess.VideoListItem
status VideoListItemStatusEnum
return void

SetStatus() public method

public SetStatus ( DataAccess.VideoListItem item, VideoListItemStatusEnum status, string statusText ) : void
item DataAccess.VideoListItem
status VideoListItemStatusEnum
statusText string
return void

StartDownload() public method

public StartDownload ( List selection, bool upgradeAudio ) : Task
selection List
upgradeAudio bool
return Task

StartScan() public method

public StartScan ( List selection, CancellationToken cancel ) : Task
selection List
cancel System.Threading.CancellationToken
return Task

Property Details

DownloadManager public property

public DownloadBusiness,Business DownloadManager
return DownloadBusiness