Fix playlist update
This commit is contained in:
parent
0ab8565dbf
commit
a0f3da27b6
|
@ -58,7 +58,19 @@ internal static class AutoTag {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case FolderType.Playlists: {
|
case FolderType.Playlists: {
|
||||||
foreach (var playlist in Directory.GetDirectories(inputDir.Path)) {
|
if (inputDir.Path == outputDir)
|
||||||
|
ProcessPlaylist(inputDir.Path, inputDir, outputDir);
|
||||||
|
else
|
||||||
|
foreach (var playlist in Directory.GetDirectories(inputDir.Path))
|
||||||
|
ProcessPlaylist(playlist, inputDir, outputDir);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ProcessPlaylist(string playlist, Folder inputDir, string outputDir) {
|
||||||
var tracks = Directory.EnumerateFiles(playlist, "*.*", SearchOption.AllDirectories).Where(IsAllowed).OrderBy(s => s, new AlphanumComparator());
|
var tracks = Directory.EnumerateFiles(playlist, "*.*", SearchOption.AllDirectories).Where(IsAllowed).OrderBy(s => s, new AlphanumComparator());
|
||||||
|
|
||||||
uint i = 1;
|
uint i = 1;
|
||||||
|
@ -100,12 +112,6 @@ internal static class AutoTag {
|
||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: throw new ArgumentOutOfRangeException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class Folder {
|
internal class Folder {
|
||||||
|
|
Loading…
Reference in a new issue