public void Handle(AudioTrackEdited message) { AudioObj fromBackgroundAudio = this.GetCurrentTrackFromBackgroundAudio(); if (fromBackgroundAudio != null && message.OwnerId == fromBackgroundAudio.owner_id && message.Id == fromBackgroundAudio.id) { fromBackgroundAudio.artist = message.Artist; fromBackgroundAudio.title = message.Title; } AudioTrack track = BGAudioPlayerWrapper.Instance.Track; long? nullable1 = track != null ? new long?(track.GetTagOwnerId()) : new long?(); string str = track != null?track.GetTagId() : null; if (str != null && ((IEnumerable <char>)str).Contains <char>('_')) { str = str.Substring(str.IndexOf('_') + 1); } if (track != null) { long?nullable2 = nullable1; long valueOrDefault = nullable2.GetValueOrDefault(); if ((message.OwnerId == valueOrDefault ? (nullable2.HasValue ? 1 : 0) : 0) != 0 && message.Id.ToString() == str) { track.BeginEdit(); track.Artist = message.Artist; track.Title = message.Title; track.EndEdit(); } } this.NotifyPropertyChanged <string>((Expression <Func <string> >)(() => this.ArtistName)); this.NotifyPropertyChanged <string>((Expression <Func <string> >)(() => this.TrackName)); this.NotifyPropertyChanged <string>((Expression <Func <string> >)(() => this.CurrentTrackStr)); }
public void Handle(AudioTrackEdited message) { if (message.OwnerId != this.Track.owner_id || message.Id != this.Track.id) { return; } this.Track.artist = message.Artist; this.Track.title = message.Title; this.NotifyPropertyChanged <string>(() => this.Artist); this.NotifyPropertyChanged <string>(() => this.Title); }