bitmagnet-io / bitmagnet

A self-hosted BitTorrent indexer, DHT crawler, content classifier and torrent search engine with web UI, GraphQL API and Servarr stack integration.
https://bitmagnet.io/
MIT License
2.42k stars 97 forks source link

Find out why Gorm is swapping the torrent_contents.id field for the torrent_contents.content_id field #29

Closed daschiller closed 3 days ago

daschiller commented 1 year ago

When doing imdbid based queries over the torznab API, the returned guids are all identical. This has the effect of having Prowlarr only process the first item from the query results, because it considers the rest to be duplicates.

mgdigital commented 1 year ago

That is very strange; the IDs seem to be coming from the Gorm ORM like that, but those short IDs are definitely not the ones in the DB, where it's the info hash concatenated with the TMDB ID.

For the moment I'm going to set it to the info hash, which is working properly. Technically that's not unique per result, although multi-film torrents isn't implemented yet in Bitmagnet (and maybe not in the *arr apps AFAIK).

I'm just doing a few hotfixes and will include this. Lets leave this issue open though as I wanna know when I get time why the IDs coming out of Gorm are not the ones in the DB, or seem to be taken from the content_id field instead of the id field.

See https://github.com/bitmagnet-io/bitmagnet/pull/30

mgdigital commented 3 days ago

This should be fixed now