Ejemplo n.º 1
0
            public static void updateSpecialPlaylists(SpecialPlaylists playlists = SpecialPlaylists.All)
            {
                var allPlaylists = getPlaylistPathsAsStrings();

                if (playlists == SpecialPlaylists.Recents || playlists == SpecialPlaylists.All)
                {
                    List <FileInfo> infos = new List <FileInfo>();

                    foreach (string playlist in allPlaylists)
                    {
                        infos.AddRange(getSongPathsAsFileInfos(playlist));
                    }

                    recentsFI = new List <FileInfo>(infos.OrderByDescending(f => f.LastWriteTime).Take(20));
                }
            }
Ejemplo n.º 2
0
            public static List <DetailedPlaylist> getSpecialPlaylists(SpecialPlaylists playlists = SpecialPlaylists.All)
            {
                List <DetailedPlaylist> list = new List <DetailedPlaylist>();

                if (playlists == SpecialPlaylists.Recents || playlists == SpecialPlaylists.All)
                {
                    DetailedPlaylist t = new DetailedPlaylist();
                    t.tags        = getTagsOfPlaylist(recentsFI.ToArray()).ToArray();
                    t.name        = "Breaking";
                    t.description = "your 20 newest tracks";
                    t.date        = DateTime.Now.ToString("d MMM yyyy");
                    list.Add(t);
                }

                return(list);
            }