Example #1
0
        /// <summary>
        /// maps a json response to a list of music items
        /// </summary>
        /// <param name="response">the fetched data</param>
        private List <MusicItem> Itemize(FoldersPimpResponse response)
        {
            var ret = new List <MusicItem>();

            foreach (var folder in response.folders)
            {
                ret.Add(AudioConversions.FolderToMusicItem(folder));
            }
            foreach (var track in response.tracks)
            {
                ret.Add(AudioConversions.PimpTrackToMusicItem(track));
            }
            return(ret);
        }
Example #2
0
        /// <summary>
        /// maps a json response to a list of music items
        /// </summary>
        /// <param name="response">the fetched data</param>
        private List <MusicItem> Itemize(FoldersPimpResponse response)
        {
            var ret = new List <MusicItem>();

            foreach (var folder in response.folders)
            {
                ret.Add(AudioConversions.FolderToMusicItem(folder));
            }
            foreach (var track in response.tracks)
            {
                var uri = session.PlaybackUriFor(track.id);
                ret.Add(TrackToMusicItem(track, uri));
            }
            return(ret);
        }