[DOCS] Find files where online metadata has changed

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

[DOCS] Find files where online metadata has changed

Post by rednoah »

e.g. find movie files where xattr metadata does not exactly match the online movie information:

Shell: Select all

filebot -mediainfo -r "/path/to/Movies" \
	--file-filter "f.video" \
	--filter "movie && none{ n == info.name && y == info.released.year }" \
	--format "{n} | {y} | { info.name } | { info.released.year } | {f}"
** this code will only check for changes in movie name and movie year


e.g. find episode files where xattr metadata does not exactly match the online episode information:

Shell: Select all

filebot -mediainfo -r "/path/to/TV Shows" \
	--file-filter "f.video" \
	--filter "episode && none{ episode as String == episodelist.find{ it.episode == episode }.episode as String }" \
	--format "{episode} | {episodelist.find{ it.episode == episode }.episode} | {f}"
** this code will only check for changes in series name and season / episode numbers and episode title


:idea: find-movie-metadata-changes.sh and find-episode-metadata-changes.sh are available on GitHub:

Shell: Select all

# Fetch shell script files
curl --output-dir ~/bin -O 'https://raw.githubusercontent.com/filebot/plugins/master/bash/find-movie-metadata-changes.sh'
curl --output-dir ~/bin -O 'https://raw.githubusercontent.com/filebot/plugins/master/bash/find-episode-metadata-changes.sh'
# Make shell script files executable
chmod +x ~/bin/*.sh
# Find files where metadata has changed
~/bin/find-movie-metadata-changes.sh "/path/to/Movies"
~/bin/find-episode-metadata-changes.sh "/path/to/TV Shows"

:idea: The miss script (i.e. find missing episodes) can be used to find episodes that are listed online but not in the local file system as per xattr metadata.


:!: DO NOT run these scripts more than once per month if you run them on a large library of files. Checking for changes requires complete movie and series / episode information for all files and thus causes excessive load on 3rd party databases.
:idea: Please read the FAQ and How to Request Help.
Post Reply