Had an issue where “Mark as watched” did not actually mark a show as watched as seen on the “in progress shows” page, probably because I’ve removed/moved files since beginning to watch a show.
1. replace XX with the showId from tvshow table. gist here
select episode.idEpisode from tvshow, episode where episode.idShow = tvshow.idShow AND tvshow.idShow = XX into outfile '/tmp/alleps'; select episode.idEpisode from tvshow, episode, files where episode.idShow = tvshow.idShow AND files.idFile = episode.idFile AND tvshow.idShow = XX into outfile '/tmp/watchedeps';
diff /tmp/alleps /tmp/watchedeps
DELETE FROM episode WHERE episode.idEpisode = YY, where YY is the episodeId from the diff