Skip to content

Commit b8ce022

Browse files
committed
Plex Xattr Agent (prototype via filebot command for now, since direct xattr access is tricky with Python)
1 parent 9be9ed6 commit b8ce022

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plex/Xattr.bundle/Contents/Code/filebot.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22

33

44
class FileBotCommand:
5-
executabe = '/usr/local/bin/filebot'
5+
executable = '/usr/local/bin/filebot'
6+
7+
def metadata(self, file):
8+
args = ['-mediainfo', file, '--format', '{json}', '--log', 'OFF']
9+
return self.execute(args)
610

711
def version(self):
812
args = ['-version']
913
return self.execute(args).strip()
1014

1115
def execute(self, args):
12-
command = [self.executabe]
16+
command = [self.executable]
1317
command.extend(args)
1418
return subprocess.check_output(command)
1519

0 commit comments

Comments
 (0)