C# Class SDownload.Framework.Streams.SCTrackStream

Represents a Song file downloaded from SoundCloud
Inheritance: BaseStream
显示文件 Open project: brkastner/SDownload Class Usage Examples

Public Properties

Property Type Description
Genre String

Public Methods

Method Description
Download ( bool ignoreExtras = false ) : Task

Downloads the necessary files and handles any exceptions

Finish ( bool close = true ) : bool

Updates the ID3 tags for the song file, then moves it into iTunes if the setting is enabled.

SCTrackStream ( String url, InfoReportProxy view ) : System

Gather and prepare all the necessary information for downloading the actual remote resource

SCTrackStream ( String url, InfoReportProxy view, SCTrackData trackData ) : System

Gather and prepare all the necessary information for downloading the actual remote resource

Validate ( ) : Task

Confirms the file tags can actually be read, proving the file is valid. TODO: Possibly find a better way to validate more file types quicker TODO: perhaps by reading the resolved url ending rather than assuming mp3 immediately

Private Methods

Method Description
AddToiTunes ( ) : void

Add the song to iTunes

GetDownloadUrl ( ) : String

Gets the download url for the main resource

RetryDownload ( ) : Task
UpdateId3Tags ( ) : void

Update the ID3 tags

Method Details

Download() public method

Downloads the necessary files and handles any exceptions
public Download ( bool ignoreExtras = false ) : Task
ignoreExtras bool If the extra files associated with the main resource should be skipped
return Task

Finish() public method

Updates the ID3 tags for the song file, then moves it into iTunes if the setting is enabled.
public Finish ( bool close = true ) : bool
close bool
return bool

SCTrackStream() public method

Gather and prepare all the necessary information for downloading the actual remote resource
public SCTrackStream ( String url, InfoReportProxy view ) : System
url String The URL to the individual song
view InfoReportProxy The proxy to report information back to
return System

SCTrackStream() public method

Gather and prepare all the necessary information for downloading the actual remote resource
public SCTrackStream ( String url, InfoReportProxy view, SCTrackData trackData ) : System
url String The URL to the individual song
view InfoReportProxy The proxy to report information back to
trackData SDownload.Framework.Models.SCTrackData The track's metadata retrieved from SoundCloud
return System

Validate() public method

Confirms the file tags can actually be read, proving the file is valid. TODO: Possibly find a better way to validate more file types quicker TODO: perhaps by reading the resolved url ending rather than assuming mp3 immediately
public Validate ( ) : Task
return Task

Property Details

Genre public_oe property

The genre of the song
public String Genre
return String