本文整理汇总了C#中Playlist.Load方法的典型用法代码示例。如果您正苦于以下问题:C# Playlist.Load方法的具体用法?C# Playlist.Load怎么用?C# Playlist.Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Playlist
的用法示例。
在下文中一共展示了Playlist.Load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadStation
private void LoadStation(string file)
{
Playlist playlist = new Playlist();
playlist.Load(file);
MetaEntry helix_meta = playlist.FindMetaEntry("/BansheeXSPF:helix_required");
if(!helix_meta.Equals(MetaEntry.Zero) && !AlwaysShowHelixStationsSchema.Get()) {
bool have_helix = false;
foreach(Banshee.MediaEngine.PlayerEngine engine in PlayerEngineCore.Engines) {
if(engine.Id == "helix-remote") {
have_helix = true;
break;
}
}
if(!have_helix) {
return;
}
}
total_stations += playlist.Tracks.Count;
station_groups.Add(playlist);
}
示例2: CheckForUpdates
private void CheckForUpdates(bool force)
{
if(!force && LastUpdateCheck - (DateTime.Now - check_timeout) > TimeSpan.Zero) {
return;
}
Playlist playlist = new Playlist();
playlist.Load(CreateXspfWebStream(master_xspf_uri));
DateTime master_last_modified = DateTime.MinValue;
MetaEntry meta = playlist.FindMetaEntry("/BansheeXSPF:last_modified");
if(!meta.Equals(MetaEntry.Zero)) {
master_last_modified = W3CDateTime.Parse(meta.Value).LocalTime;
}
if(!force && master_last_modified <= LastUpdated) {
return;
}
try {
Directory.CreateDirectory(stations_path);
foreach(string xspf_file in Directory.GetFiles(stations_path, "*.xspf")) {
File.Delete(xspf_file);
}
} catch {
}
foreach(Track station in playlist.Tracks) {
DownloadStation(station.Locations[0]);
}
LastUpdated = master_last_modified;
LastUpdateCheck = DateTime.Now;
}