Skip to content

Instantly share code, notes, and snippets.

@tremby
Created May 15, 2018 23:23
Show Gist options
  • Save tremby/5cb4e1538f49fec807b3efb53a32dc4c to your computer and use it in GitHub Desktop.
Save tremby/5cb4e1538f49fec807b3efb53a32dc4c to your computer and use it in GitHub Desktop.
Find duplicate episodes in Kodi database
select
tvshow.c00 show,
episode.c12 s,
episode.c13 e,
episode.c00 title,
count(*) num,
group_concat(path.strPath || files.strFilename) locations
from files
join episode on episode.idFile = files.idFile
join path on files.idPath = path.idPath
join tvshow on episode.idShow = tvshow.idShow
group by episode.idShow, s, e having num > 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment