Running FileBot from the console, Groovy scripting, shell scripts, etc
-
iampaulh
- Power User
- Posts: 22
- Joined: 24 Jan 2013, 12:12
Post
by iampaulh »
How do I use this with the utorrent-postprocess.pyw?
Can I just replace
Code: Select all
# custom formats (use / instead of \ as directory separator)
movieFormat = '''{plex}'''
With
Code: Select all
movieFormat = { hd =~ /UHD/ ? 'Movies' : 'Movies 4K' }/{ plex.name }
-
rednoah
- The Source
- Posts: 23930
- Joined: 16 Nov 2011, 08:59
- Location: Taipei
-
Contact:
Post
by rednoah »
e.g.
Code: Select all
movieFormat = '''{ hd =~ /UHD/ ? 'Movies' : 'Movies 4K' }/{ plex.tail }'''

Python Interpreter says "Don't forget the triple quotes '''...''' that delimit the String value that is our custom format."
-
iampaulh
- Power User
- Posts: 22
- Joined: 24 Jan 2013, 12:12
Post
by iampaulh »
Thanks!
What does filebot use to detect if a movie is 4k?
I tested with a movie that contains 2160p and HDR in the filename, but it copied to the regular movies folder
-
rednoah
- The Source
- Posts: 23930
- Joined: 16 Nov 2011, 08:59
- Location: Taipei
-
Contact:
Post
by rednoah »
What's the video resolution? UHD requires
3840x2160 or higher.
You can check for other properties that better fit your needs and files you have:
Code: Select all
height <= 1080 ? 'Movies' : 'Movies 4K'
-
iampaulh
- Power User
- Posts: 22
- Joined: 24 Jan 2013, 12:12
Post
by iampaulh »
The resolution was 3840x2067 - so looks like filebot reads the metadata of the file,rather than using the filename?
The new code worked perfectly, thanks!