Page 1 of 1

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

Posted: 24 Mar 2022, 17:44
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 }

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

Posted: 25 Mar 2022, 08:11
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."

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

Posted: 26 Mar 2022, 20:28
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

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

Posted: 27 Mar 2022, 02:05
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'

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

Posted: 27 Mar 2022, 09:40
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!