private void LoadChildrenImpl(string parentId, Result result)
        {
            var mediaItems = new JavaList <MediaBrowser.MediaItem>();

            if (HierarchyHelper.PodcastRoot == parentId)
            {
                Logger.Debug("Load ROOT");
                mediaItems.Add(new MediaBrowser.MediaItem(
                                   new MediaDescription.Builder()
                                   .SetMediaId(HierarchyHelper.PodcastsByMonth)
                                   .SetTitle("All Playlists")
                                   .SetIconUri(Android.Net.Uri.Parse("android.resource://com.henry.mypodcast/drawable/ic_by_genre"))
                                   .SetSubtitle("Bursts By Playlist")
                                   .Build(), MediaItemFlags.Browsable));
            }
            else if (HierarchyHelper.PodcastsByMonth == parentId)
            {
                Logger.Debug("Load BYMONTH List");
                foreach (var playlist in _musicProvider._playlists)
                {
                    var item = new MediaBrowser.MediaItem(
                        new MediaDescription.Builder()
                        .SetMediaId(HierarchyHelper.PodcastsByMonth + HierarchyHelper.CategorySeparator + playlist.Id.ToString())
                        .SetTitle(playlist.Name)
                        .SetSubtitle($"{playlist.Name} Bursts")
                        .Build(), MediaItemFlags.Browsable);
                    mediaItems.Add(item);
                }
            }
            else if (parentId.StartsWith(HierarchyHelper.PodcastsByMonth))
            {
                var playlistId = int.Parse(HierarchyHelper.GetHierarchy(parentId)[1]);
                Logger.Debug("Load List of Podcasts for Month");
                foreach (var track in _musicProvider.GetMusicsByPlaylist(playlistId))
                {
                    var hierarchyAwareMediaID = HierarchyHelper.EncodeMediaID(
                        track.Description.MediaId, HierarchyHelper.PodcastsByMonth, playlistId.ToString());
                    var trackCopy = new MediaMetadata.Builder(track)
                                    .PutString(MediaMetadata.MetadataKeyMediaId, hierarchyAwareMediaID)
                                    .Build();
                    var bItem = new MediaBrowser.MediaItem(
                        trackCopy.Description, MediaItemFlags.Playable);
                    mediaItems.Add(bItem);
                }
            }
            result.SendResult(mediaItems);
        }
        private List <MediaSession.QueueItem> ConvertToQueue(IEnumerable <MediaMetadata> tracks, params string[] categories)
        {
            var queue = new List <MediaSession.QueueItem>();
            int count = 0;

            foreach (var track in tracks)
            {
                string        hierarchyAwareMediaID = HierarchyHelper.EncodeMediaID(track.Description.MediaId, categories);
                MediaMetadata trackCopy             = new MediaMetadata.Builder(track)
                                                      .PutString(MediaMetadata.MetadataKeyMediaId, hierarchyAwareMediaID)
                                                      .Build();

                var item = new MediaSession.QueueItem(trackCopy.Description, count++);
                queue.Add(item);
            }
            return(queue);
        }