[Addendum] Find Duplicate Movie or Episode Files

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
User avatar
rednoah
The Source
Posts: 23449
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

[Addendum] Find Duplicate Movie or Episode Files

Post by rednoah »

The Find Duplicate Movie or Episode Files script requires xattr metadata to instantly and reliably identify files, so that it can then find Movie and Episode duplicates:
rednoah wrote: 14 Sep 2016, 05:33 In --mode logical, this script will not parse or guess any information from the filename. Files that do not have xattr metadata will be ignored. Please read the addendum for details.


1. Process files with FileBot:

Console Output: Select all

$ filebot -rename  *.mp4 --db TheMovieDB --output . --format '{ plex.id % { " [$vf]" } }' --log INFO
[MOVE] from [Avatar (2009) [2160p].mp4] to [Movies/Avatar (2009) {tmdb-19995}/Avatar (2009) [2160p].mp4]
[MOVE] from [Avatar (2009) [480p].mp4] to [Movies/Avatar (2009) {tmdb-19995}/Avatar (2009) [480p].mp4]


2. Confirm that FileBot has stored xattr metadata so that we can identify files instantly and reliably later:

Console Output: Select all

$ filebot -script fn:xattr .
Movies/Avatar (2009) {tmdb-19995}/Avatar (2009) [480p].mp4
	net.filebot.filename: Avatar (2009) [480p].mp4
	net.filebot.metadata: {"@type":"Movie","year":2009,"imdbId":499549,"tmdbId":19995,"language":"en-US","id":19995,"name":"Avatar","aliasNames":[]}
Movies/Avatar (2009) {tmdb-19995}/Avatar (2009) [2160p].mp4
	net.filebot.filename: Avatar (2009) [2160p].mp4
	net.filebot.metadata: {"@type":"Movie","year":2009,"imdbId":499549,"tmdbId":19995,"language":"en-US","id":19995,"name":"Avatar","aliasNames":[]}


3. Find Movie or Episode duplicates based on xattr metadata information:

Console Output: Select all

$ filebot -script fn:duplicates .
[*] Avatar (2009)
[+] 1. Movies/Avatar (2009) {tmdb-19995}/Avatar (2009) [2160p].mp4
[-] 2. Movies/Avatar (2009) {tmdb-19995}/Avatar (2009) [480p].mp4
1 duplicates
:idea: Please read the FAQ and How to Request Help.
Post Reply