private void PlayCore() { ServiceManager.PlayerEngine.EndSynthesizeContacting(this, false); if (track != null) { TrackTitle = track.Title; ArtistName = track.Creator; } AlbumTitle = null; Duration = TimeSpan.Zero; lock (stream_uris) { if (stream_uris.Count > 0) { Uri = stream_uris[stream_index]; Log.Debug("Playing Radio Stream", Uri.AbsoluteUri); if (Uri.IsFile) { try { using (var file = StreamTagger.ProcessUri(Uri)) { StreamTagger.TrackInfoMerge(this, file, true); } } catch (Exception e) { Log.Warning(String.Format("Failed to update metadata for {0}", this), e.GetType().ToString(), false); } } ServiceManager.PlayerEngine.OpenPlay(this); } } trying_to_play = false; }
public static void TrackInfoMerge(TrackInfo track, SafeUri uri) { track.Uri = uri; TagLib.File file = StreamTagger.ProcessUri(uri); TrackInfoMerge(track, file); if (file == null) { track.TrackTitle = uri.AbsoluteUri; } }