Fix playlist update

This commit is contained in:
Laura Hausmann 2023-06-18 21:34:22 +02:00
parent 0ab8565dbf
commit a0f3da27b6
Signed by: zotan
GPG key ID: D044E84C5BE01605

View file

@ -58,7 +58,19 @@ internal static class AutoTag {
break;
}
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());
uint i = 1;
@ -100,12 +112,6 @@ internal static class AutoTag {
Console.WriteLine();
}
}
break;
}
default: throw new ArgumentOutOfRangeException();
}
}
}
internal class Folder {