knightcrawler-stremio / knightcrawler

A selfhosted Stremio addon
Apache License 2.0
265 stars 38 forks source link

Change SQL command to insert all movies and tv categories + skip duplicates #78

Closed NebKi closed 8 months ago

NebKi commented 8 months ago

The rarbg dump contains multiple movies and tv categories which are unique entries. The current insert command only grabs the categories "movies" and "tv" but not the multiple movies*** and tv*** categories.

This command will also skip duplicates, so the SQL command won't error out and can be run on an existing database. Duplicate check is based on the hash of the specific torrent.

In a recent PR this part of the command: "createdAt", "updatedAt") was changed for \"createdAt\", \"updatedAt\"). For me this new command will error out on this change, but maybe it works for others. In this PR I've reverted this change since that has been working before.

funkypenguin commented 8 months ago

Ooh, nice catch on the extra categories, I didn't notice them!

Gabisonfire commented 8 months ago

Thank you @NebKi , also thanks @funkypenguin for testing!