Kodi Community Forum
v16 What's the best way to find duplicate movies? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: v16 What's the best way to find duplicate movies? (/showthread.php?tid=311530)

Pages: 1 2


RE: What's the best way to find duplicate movies? - NeoDuck - 2017-12-18

@zerocool_ie Thanks, that works!  Blush

Is there a way to have it show the file locations?  I found this:

http://kodi.wiki/view/Databases

But, I don't know mySQL.

UPDATE:  Nevermind, I figured it out!

sql:
SELECT c00, dateadded AS DateAdded,
         'Dupe Movie' AS description,
 strfilename AS FILE, 
 strPath AS FILE
FROM movie_view a
JOIN (
SELECT uniqueid_value
FROM movie_view
GROUP BY uniqueid_value
HAVING COUNT(*) > 1) b ON a.uniqueid_value = b.uniqueid_value
ORDER BY strfilename ASC;



RE: What's the best way to find duplicate movies? - menno - 2018-03-30

This is really cool, thanks, I did some queries of my own got some output but this looks great.
  Now is there a way to nicely clean return of this command (aka the duplicates) from the database.
For me finding them is step 1, now how to clean them, and clean them from all tables?
Simply replace select with delete?


RE: What's the best way to find duplicate movies? - zerocool_ie - 2018-03-30

(2018-03-30, 13:10)menno Wrote:   Now is there a way to nicely clean return of this command (aka the duplicates) from the database.
For me finding them is step 1, now how to clean them, and clean them from all tables?
Simply replace select with delete?

Delete the files from your drive, then use the Clean Library function in Kodi.

I would recommend against cleaning using a query.


RE: What's the best way to find duplicate movies? - sksbir - 2021-03-24

(2017-04-07, 23:55)zerocool_ie Wrote: if you're SQL-savvy, this is what I use for Krypton dupe finding
Code:
SELECT c00 as 'Title',
strPath AS 'Path',
strfilename AS 'File'
FROM movie_view a
JOIN (
SELECT uniqueid_value
FROM movie_view
GROUP BY uniqueid_value
HAVING COUNT(*) > 1) b ON a.uniqueid_value = b.uniqueid_value
ORDER BY strfilename ASC;

Hi
Thank you for your sql resquest. Using it with success to request duplicates on Kodi 19 from "phpmyadmin" gui interface.
Changed only "order by" : stfilename ==> c00 to order by title, and then select manually which line I wanted to remove in order to keep best quality.


RE: What's the best way to find duplicate movies? - Lunatixz - 2021-03-24

https://forum.kodi.tv/showthread.php?tid=331996


RE: What's the best way to find duplicate movies? - ManilaByNight - 2024-06-10

It would be really nice if someone could develop an add-on for this. WOuld be specially helpful for non techies like me.