Last active
March 15, 2026 13:35
-
-
Save FMCorz/a298298c1be9742a219a462779d2b058 to your computer and use it in GitHub Desktop.
Find duplicate movies in Kodi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Find the file ~/.kodi/userdata/MyVideosXX.db | |
| -- Open with sqlite3 | |
| -- Run the following statement: | |
| SELECT | |
| m.c00, -- Movie name | |
| p.strPath, -- Path | |
| f.strFilename -- File name | |
| FROM movie m | |
| JOIN movie m2 -- Join on self to find duplicates | |
| ON m.c09 = m2.c09 -- Map on IMDB ID | |
| AND m.idMovie != m2.idMovie -- Only if not same entry | |
| JOIN files f -- Join file information | |
| ON f.idFile = m.idFile | |
| JOIN path p -- Join path information | |
| ON p.idPath = f.idPath; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of 03/2026, database contents seem to have changed slightly: field
m.c09now stores some sort of unique ID which does not seem to be of much use when trying to identify duplicates (see https://kodi.wiki/view/Databases/MyVideos#movie).However, relying on movie name/title + release date instead worked for me:
Save the SQL statement above to file
find-duplicates.sqland then run:sqlite3 --readonly ~/.kodi/userdata/MyVideosXXX.db < find-duplicates.sql