Use Filebot to delete lower quality duplicates?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Jock
Posts: 2
Joined: 07 Jun 2019, 23:02

Use Filebot to delete lower quality duplicates?

Post by Jock »

Is there a way to rename all of the files in my folder and then have it delete the duplicates that are crappier quality? For example, I previously had most of my files from Yify until I recently started replacing files, manually, with much higher bitrate files. Yify averaged 1.5mbps while most files I have now are a minimum of 4.5Mbps.

Thank you everyone so much for the help in advance!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Use Filebot to delete lower quality duplicates?

Post by rednoah »

Yes, there's command-line tools for that:

:arrow: Find Duplicate Movie or Episode Files


:idea: You can also use --conflict auto to override the lower quality file with the better quality file when doing -rename calls. (NOTE: if you're using MediaInfo bindings such as vf, vc, af, ac, etc in your format then --conflict auto won't work since there won't be any file path conflicts)
:idea: Please read the FAQ and How to Request Help.
Jock
Posts: 2
Joined: 07 Jun 2019, 23:02

Re: Use Filebot to delete lower quality duplicates?

Post by Jock »

HI Rednoah,

That's awesome! In terms of command-line, is this via the filebot software or using the command prompt?

Sorry about that, I'm an extra noob but I love what you've done with creating this software.

So based on reading the other link you provided, I first have to rename all of the files first using Filebot to generate the xattr metadata and then run the script?

For the --conflict auto, would it make sense first to use a generic rename first to get it to delete the lower quality files, then re-run it so it names the way I want it to?

Currently I'm using the following naming script:

Code: Select all

{ny}/{fn.upper() =~ /3D|EXTENDED|UNCUT|DIRECTORS.CUT|UNRATED/ ? fn.match(/3D|EXTENDED|UNCUT|DIRECTORS.CUT|UNRATED/).lower().upperInitial() + ' Version (' + vf + ', ' + mbps + ')-other' : ny +' [' + vf + ', ' + vc + ', ' + ac + ', ' + mbps + ']'}{'.' + lang}
So I figure if I just use {ny} first + conflict auto to get rid of low quality duplicates and then use the script above to name it the way I want it? Does that make sense?

Thank you very much!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Use Filebot to delete lower quality duplicates?

Post by rednoah »

Yes, calling filebot from the command-prompt would be the easiest solution here. After you've already named your files with the GUI.


Step 1: Check for duplicates:

Code: Select all

filebot -script fn:duplicates /path/to/files
Step 2: If you're happy with what you see in Step 1, then add --action delete and re-run:

Code: Select all

filebot -script fn:duplicates /path/to/files --action delete

:idea: If you're using the GUI, then I imagine somehow adding a -rename --conflict auto to your workflow would be very cumbersome. Best to just use the duplicates script on demand.
:idea: Please read the FAQ and How to Request Help.
Post Reply