예제 #1
0
        private void NewTracksToDownload(IList <Track> allSongs, List <Track> tracksToDownload)
        {
            var          manifestPath = ManifestUtil.DetermineManifestPath();
            List <Track> manifest;

            if (File.Exists(manifestPath))
            {
                manifest = ManifestUtil.LoadManifestFromFile();

                //all who's id is not in the manifest
                tracksToDownload.AddRange(allSongs.Where(c => manifest.All(d => c.id != d.id)).ToList());
            }
            else
            {
                tracksToDownload.AddRange(allSongs);
            }
        }
예제 #2
0
        public bool[] CreateSimpleM3U()
        {
            var completed = new bool[5];
            var manifest  = _manifestUtil.LoadManifestFromFile();

            if (manifest.Count < 1)
            {
                return(completed);
            }
            string manifestDirectoryFullName = _manifestUtil.FileSystemUtil.Directory.FullName;

            WriteM3UtoFile(
                new List <string>(SortOnMostLiked(manifest)),
                Path.Combine(manifestDirectoryFullName, "Most Liked (SC Downloader).m3u8"),
                out completed[0]
                );

            WriteM3UtoFile(
                new List <string>(SortOnMostPlayed(manifest)),
                Path.Combine(manifestDirectoryFullName, "Most Played (SC Downloader).m3u8"),
                out completed[1]
                );

            WriteM3UtoFile(
                new List <string>(RecentlyChanged(manifest)),
                Path.Combine(manifestDirectoryFullName, "Recently Changed (SC Downloader).m3u8"),
                out completed[2]
                );

            WriteM3UtoFile(
                new List <string>(RecentlyAdded(manifest)),
                Path.Combine(manifestDirectoryFullName, "Recently Downloaded (SC Downloader).m3u8"),
                out completed[3]
                );

            WriteM3UtoFile(
                new List <string>(SortOnSoundcloudIndexes(manifest)),
                Path.Combine(manifestDirectoryFullName, "Ordered by SoundCloud (SC Downloader).m3u8"),
                out completed[4]
                );

            return(completed);
        }
예제 #3
0
        public bool[] CreateSimpleM3U()
        {
            var completed = new bool[5];
            var manifest  = _manifestUtil.LoadManifestFromFile();

            if (manifest.Count < 1)
            {
                return(completed);
            }
            string manifestDirectoryFullName = _manifestUtil.FileSystemUtil.Directory.FullName;

            WriteM3UtoFile(
                new List <string>(SortOnMostLiked(manifest)),
                Path.Combine(manifestDirectoryFullName, LanguageManager.Language["STR_PLISTUTIL_M3U_ML"] + ".m3u8"),
                out completed[0]
                );

            WriteM3UtoFile(
                new List <string>(SortOnMostPlayed(manifest)),
                Path.Combine(manifestDirectoryFullName, LanguageManager.Language["STR_PLISTUTIL_M3U_MP"] + ".m3u8"),
                out completed[1]
                );

            WriteM3UtoFile(
                new List <string>(RecentlyChanged(manifest)),
                Path.Combine(manifestDirectoryFullName, LanguageManager.Language["STR_PLISTUTIL_M3U_RC"] + ".m3u8"),
                out completed[2]
                );

            WriteM3UtoFile(
                new List <string>(RecentlyAdded(manifest)),
                Path.Combine(manifestDirectoryFullName, LanguageManager.Language["STR_PLISTUTIL_M3U_RD"] + ".m3u8"),
                out completed[3]
                );

            WriteM3UtoFile(
                new List <string>(SortOnSoundcloudIndexes(manifest)),
                Path.Combine(manifestDirectoryFullName, LanguageManager.Language["STR_PLISTUTIL_M3U_OBS"] + ".m3u8"),
                out completed[4]
                );

            return(completed);
        }