After recent parser changes (which presumably discard some torrents after files end up in the files table), I found my addon erroring on certain IMDB queries.
It turns out the sequelize query which assembles the stream results performs a LEFT OUTER JOIN between the files table and the torrents table. Consequently, if theres' an infoHash in the files table which doesn't exist in the torrents table, the query will return NULL for all of the torrent fields, including seeders, title, etc.
I'm not sure why this happened, but it seems safer to use an INNER JOIN, such that only data which exists in both the files and torrents table is returned.
This PR simply effects this change, such that null results are no longer returned, and the addon doesn't error.
After recent parser changes (which presumably discard some torrents after files end up in the files table), I found my addon erroring on certain IMDB queries.
It turns out the sequelize query which assembles the stream results performs a
LEFT OUTER JOIN
between the files table and the torrents table. Consequently, if theres' an infoHash in the files table which doesn't exist in the torrents table, the query will returnNULL
for all of the torrent fields, includingseeders
,title
, etc.I'm not sure why this happened, but it seems safer to use an
INNER JOIN
, such that only data which exists in both the files and torrents table is returned.This PR simply effects this change, such that null results are no longer returned, and the addon doesn't error.