WIP playlist sync

This commit is contained in:
2026-05-02 23:56:33 +02:00
parent 54d2195b76
commit 44a486aa46
5 changed files with 416 additions and 0 deletions

View File

@@ -16,6 +16,10 @@ type SortCmd struct {
Path string `arg:"positional,required"`
}
type SyncPlaylists struct {
Url string `arg:"positional,required"`
}
type FixCommentCmd struct {
Path string `arg:"positional,required"`
}
@@ -24,6 +28,7 @@ type args struct {
Info *InfoCmd `arg:"subcommand:info"`
Sort *SortCmd `arg:"subcommand:sort"`
FixCommentTag *FixCommentCmd `arg:"subcommand:fix-comment"`
SyncPlaylists *SyncPlaylists `arg:"subcommand:spotify"`
Verbose bool `arg:"-v" default:"false"`
DryRun bool `arg:"--dry-run" default:"false"`
}
@@ -43,6 +48,8 @@ func Run() {
ripsort.Sort(args.Sort.Dst, args.Sort.Path)
case args.FixCommentTag != nil:
ripsort.FixComment(args.FixCommentTag.Path, args.DryRun)
case args.SyncPlaylists != nil:
ripsort.SyncPlaylists(args.SyncPlaylists.Url)
default:
p.Fail("Must specify command")
}