pymedusa / Medusa

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
https://pymedusa.com
GNU General Public License v3.0
1.77k stars 275 forks source link

Ambiguous dupekey generated for tvmaze or tmdb shows #8735

Open tigtigtigtig opened 3 years ago

tigtigtigtig commented 3 years ago

Describe the bug When adding a episodes to nzbget, Medusa generates an incomplete and thus ambiguous dupekey for tvmaze or tmdb shows.

To Reproduce Steps to reproduce the behavior:

  1. Add a show using tvmaze
  2. check the dupekey in nzbget for downloaded episodes

Expected behavior A unique dupekey being passed to nzbget

Details In clients/nzb/nzbget.py line 108-112 it is evident that correct dupekeys are only created for thetvdb or tvrage shows

for cur_ep in nzb.episodes:
        if dupekey == '':
            if cur_ep.series.indexer == 1:
                dupekey = 'Medusa-' + text_type(cur_ep.series.indexerid)
            elif cur_ep.series.indexer == 2:
                dupekey = 'Medusa-tvr' + text_type(cur_ep.series.indexerid)
        dupekey += '-' + text_type(cur_ep.season) + '.' + text_type(cur_ep.episode)

Medusa (please complete the following information):

p0psicles commented 3 years ago

@tigtigtigtig i'm looking at this now. But do we want to have this dupekey at all? I'm not a nzbget user myself. But this would result in the following scenario right? You download release x for show-season-ep, but then decide that you want a different release after. But then nzbget stamps it as duplicate? So it won't download the next?

sunn0 commented 3 years ago

You download release x for show-season-ep, but then decide that you want a different release after. But then nzbget stamps it as duplicate? So it won't download the next?

There is also an additional dupe score, which takes the quality into account. So in your case it would mark a release with the same or a lower quality as dupe. Personally I found the the feature to be rather annoying, like when switching WEB-DL to WEBRip.

p0psicles commented 3 years ago

So can you disable the dupekey in nzbget. As tht en it's not an issue us providing it

sunn0 commented 3 years ago

I found it to be annoying when using it in combination with a DVR. I have some custom rss feeds running, and for those the dupe key system works as intended. That aside, the main issue here is that for shows not using TVDB the dupe key does not include any show identifier, thus matching season+episode for completely different shows.

p0psicles commented 3 years ago

Yeah Ive already fixed that in one of the pull requests