Page 1 of 1

Overwrite based on codec?

Posted: 05 Mar 2021, 17:57
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}'

Re: Overwrite based on codec?

Posted: 05 Mar 2021, 18:27
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.

Re: Overwrite based on codec?

Posted: 06 Mar 2021, 21:35
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.

Re: Overwrite based on codec?

Posted: 07 Mar 2021, 05:01
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.