C# Class OnlineVideos.Sites.Updater

Exibir arquivo Open project: offbyoneBB/mp-onlinevideos2

Public Methods

Method Description
GetRemoteOverviews ( bool force = false ) : bool

Refreshes the OnlineSites and OnlineDlls from the webservice every ten minutes.

GetRemoteSite ( string siteName, OnlineVideosService ws = null ) : SiteSettings
UpdateSites ( ProgressReport progressCallback = null, List onlineSitesToUpdate = null, bool onlyUpdateNoAdd = true, bool skipCategories = false ) : bool?

This method will update the local xml with sites retrieved from the global webservice. It will also download icons, banner and updated dlls. Make sure the local sites are loaded and all paths (OnlineVideoSettings.DllsDir, OnlineVideoSettings.ConfigDir, OnlineVideoSettings.ThumbsDir) are set before calling.

Private Methods

Method Description
CopyDlls ( string sourceDir, string targetDir ) : void
DownloadDll ( string dllName, string localPath ) : bool

Method Details

GetRemoteOverviews() public static method

Refreshes the OnlineSites and OnlineDlls from the webservice every ten minutes.
public static GetRemoteOverviews ( bool force = false ) : bool
force bool forces the refresh, ignoring the ten minutes refresh interval
return bool

GetRemoteSite() public static method

public static GetRemoteSite ( string siteName, OnlineVideosService ws = null ) : SiteSettings
siteName string
ws OnlineVideosService
return SiteSettings

UpdateSites() public static method

This method will update the local xml with sites retrieved from the global webservice. It will also download icons, banner and updated dlls. Make sure the local sites are loaded and all paths (OnlineVideoSettings.DllsDir, OnlineVideoSettings.ConfigDir, OnlineVideoSettings.ThumbsDir) are set before calling.
public static UpdateSites ( ProgressReport progressCallback = null, List onlineSitesToUpdate = null, bool onlyUpdateNoAdd = true, bool skipCategories = false ) : bool?
progressCallback ProgressReport pointer to the delegate that will receive progress information
onlineSitesToUpdate List update the local sites from this list of online sites, if null (default) the complete global list is retrieved
onlyUpdateNoAdd bool true (default) -> only update already existing local sites, false -> update and add sites from the online list
skipCategories bool do not update the categories of existing local sites if true (default is false so categories will also be updated)
return bool?