How do I use a custom movie format in utorrent-postprocess.pyw?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
iampaulh
Power User
Posts: 22
Joined: 24 Jan 2013, 12:12

How do I use a custom movie format in utorrent-postprocess.pyw?

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 }
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How do I use a custom movie format in utorrent-postprocess.pyw?

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."
:idea: Please read the FAQ and How to Request Help.
iampaulh
Power User
Posts: 22
Joined: 24 Jan 2013, 12:12

Re: How do I use a custom movie format in utorrent-postprocess.pyw?

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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How do I use a custom movie format in utorrent-postprocess.pyw?

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'
:idea: Please read the FAQ and How to Request Help.
iampaulh
Power User
Posts: 22
Joined: 24 Jan 2013, 12:12

Re: How do I use a custom movie format in utorrent-postprocess.pyw?

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!
Post Reply