Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added command: LOAD #2142

Merged
merged 3 commits into from
Sep 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions picard/tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ def __init__(self, method_name, help_text=None, help_args=None):
"handle_command_fingerprint",
help_text="Calculate acoustic fingerprints for all (matched) files in the album pane.",
),
"LOAD": RemoteCommand(
"handle_command_load",
help_text="Load 1 or more files/MBIDs/URLs to Picard.",
help_args="[supported MBID/URL or absolute path to a file]",
),
"LOOKUP": RemoteCommand(
"handle_command_lookup",
help_text="Lookup all clusters in the cluster pane.",
Expand Down Expand Up @@ -480,6 +485,13 @@ def handle_command_fingerprint(self, argstring):
for album_name in self.albums:
self.analyze(self.albums[album_name].iterfiles())

def handle_command_load(self, argstring):
if argstring.startswith("command://"):
log.error("Cannot LOAD a command: %s", argstring)
return

self.load_to_picard((argstring,))

def handle_command_lookup(self, argstring):
self.autotag(self.unclustered_files.files)

Expand Down