Overwrite based on codec?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
cruzanhtpc
Posts: 3
Joined: 09 Jul 2019, 06:52

Overwrite based on codec?

Post by cruzanhtpc »

Is there a way for the script to overwrite new files not only based on quality but based on codec? ie i know --conflict auto , will overwrite 720 to 1080 , and 1080 to 2160p. but say i downloaded two of the same files but different codec, Tv.s01e01 -1080p x264 and a second version Tv.s01e01 -1080p x265 , whichever one i downloaded first would stay since auto sees 1080p, is there an argument to say overwrite x264 with x265 if the resolution is the same?
below is the code i use to run it currently. Any help would be appreciated! Thanks!

Code: Select all

filebot -script 'fn:amc' /volume1/Media/Downloading/TV --output '/volume1/Media/TV Shows' --action move -non-strict --conflict auto --lang en --def 'clean=y' 'skipExtract=y' 'pushbullet=xxxxx' 'seriesFormat={n}/{'\''Season '\''+s}/{n}.{s00e00}.{t}'
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Overwrite based on codec?

Post by rednoah »

Unfortunately, this particular use case is not supported.


:idea: You could keep both files and sort out the one you want / don't want later.
:idea: Please read the FAQ and How to Request Help.
cruzanhtpc
Posts: 3
Joined: 09 Jul 2019, 06:52

Re: Overwrite based on codec?

Post by cruzanhtpc »

Appreciate the response. thank you. I do that for my movies, i have it set to look for both formats and then we i see a duplicate i manually delete the x264, but that is about once a week. Tv shows however have a ton more episodes. Thank you for the confirmation.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Overwrite based on codec?

Post by rednoah »

My recommended technique would be to use a format such as this so you get a unique file path for each unique file:

Code: Select all

{plex.derive{" [$vf, $vc, $ac]"}}

The duplicate script can then be used to sort out duplicates:
viewtopic.php?p=23171#p23171


However, to sort out duplicate by codec, you would have to create your own duplicates script and rewrite the "sort files by quality" code to fit your needs:
https://github.com/filebot/scripts/blob ... groovy#L57


:idea: The latter will probably require continuous maintenance for years to a come as you fine-tune exactly what constitutes better for all the ambiguous corner cases.
:idea: Please read the FAQ and How to Request Help.
Post Reply