FMCorz
6/30/2016 - 4:37 PM

Find duplicate movies in Kodi

Find duplicate movies in Kodi

-- 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;