예제 #1
0
파일: TrackMapper.cs 프로젝트: Jc54/PlayMe
 public Track Map(Model.Track track, SoundCloudMusicProvider musicProvider, string user, bool mapArtists = false)
 {
     var trackLink = track.id;
     var trackResult = new Track
     {
         Link = trackLink.ToString(CultureInfo.InvariantCulture),
         Name = track.title,
         IsAvailable = track.streamable,
         Duration = new TimeSpan(0,0,0,0,track.duration),
         DurationMilliseconds = track.duration,   
         MusicProvider = musicProvider.Descriptor,
         TrackArtworkUrl = track.artwork_url ?? "content/styles/Images/soundcloud-icon.png",
         ExternalLink = new Uri(track.permalink_url)
     };
     alreadyQueuedHelper.ResetAlreadyQueued((trackResult),user);
     
     return trackResult;
 }
예제 #2
0
        public Track Map(Model.Track track, SoundCloudMusicProvider musicProvider, string user, bool mapArtists = false)
        {
            var trackLink   = track.id;
            var trackResult = new Track
            {
                Link                 = trackLink.ToString(CultureInfo.InvariantCulture),
                Name                 = track.title,
                IsAvailable          = track.streamable,
                Duration             = new TimeSpan(0, 0, 0, 0, track.duration),
                DurationMilliseconds = track.duration,
                MusicProvider        = musicProvider.Descriptor,
                TrackArtworkUrl      = track.artwork_url ?? "content/styles/Images/soundcloud-icon.png",
                ExternalLink         = new Uri(track.permalink_url)
            };

            alreadyQueuedHelper.ResetAlreadyQueued((trackResult), user);

            return(trackResult);
        }