plex_debrid icon indicating copy to clipboard operation
plex_debrid copied to clipboard

Reoccurrence of Issue #478: Single Episode Downloads Not Functioning Correctly

Open gyCfjSnO opened this issue 2 years ago • 9 comments

Hello,

I'm experiencing a problem similar to the one reported in issue #478, where the system is not correctly downloading single episode releases despite the resolution implemented in v2.93.

Issue Description: Like the original poster, I wish to download only single-episode releases. However, when I run the script, it either goes into an endless retrying state for episodes beyond the first of a season or fails to fetch subsequent single-episode releases even when available.

Steps to Reproduce:

  1. Run the script with settings intended to download single-episode releases.
  2. Observe the script downloading the first episode correctly.
  3. Note the script entering a retry loop for subsequent episodes.

Expected Behavior: The script should download each single episode release without entering a retry loop.

Actual Behavior: The script downloads the first episode but fails to download further episodes, repeatedly entering a retry state.

Environment:

  • Version: v2.95
  • Scraper source(s): torrentio, Jackett

Log:

[06/11/23 09:45:37] [overseerr] found new overseerr request by user "gyCfjSnO".
[06/11/23 09:45:37] [overseerr] matching overseerr requests to service content.services.plex ... done
[06/11/23 09:45:38] [plex] getting plex library section/s "Movies","Movies 4K","TV Shows","TV Shows 4K" ... done
[06/11/23 09:45:38] [plex] getting metadata for 1 collected movies/shows ... done
[06/11/23 09:45:38] checking new content ... done
[06/11/23 09:45:38] scraping sources [torrentio] for query "90.day.fiance.the.other.way.S05" ... done - found 8 releases
[06/11/23 09:45:39] scraping sources [torrentio] for IMDB ID "tt9170070" ... done - found 8 releases
[06/11/23 09:45:44] checking cache status for scraped releases on: [Real Debrid] ... done
[06/11/23 09:45:45] sorting releases for version [1080p] ... done - found 14 releases
[06/11/23 09:45:47] [realdebrid] adding cached release: 90.Day.Fiance.The.Other.Way.S05E01.Far.Trek.The.Next.Generation.1080p.AMZN.WEB-DL.DDP2.0.H.264-NTb
[06/11/23 09:45:47] sorting releases for version [4K] ... done - found 4 releases
[06/11/23 09:45:50] [realdebrid] adding cached release: 90.Day.Fiance.The.Other.Way.S05E01.Far.Trek.The.Next.Generation.1080p.AMZN.WEB-DL.DDP2.0.H.264-NTb
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E02. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E03. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E04. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E05. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E06. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E07. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E08. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E09. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E10. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E11. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E12. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E13. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E14. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E15. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E16. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E17. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] retrying download in 30min for item: 90.day.fiance.the.other.way.S05E18. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:45:50] took 11.93s
[06/11/23 09:45:50] [overserr] marking request as available
[06/11/23 09:45:52] [plex] refreshing show library section/s: "TV Shows","TV Shows 4K"
[06/11/23 09:46:29] [overseerr] found new overseerr request by user "gyCfjSnO".
[06/11/23 09:46:29] [overseerr] matching overseerr requests to service content.services.plex ... done
[06/11/23 09:46:30] [plex] getting plex library section/s "Movies","Movies 4K","TV Shows","TV Shows 4K" ... done
[06/11/23 09:46:30] [plex] getting metadata for 1 collected movies/shows ... done
[06/11/23 09:46:30] checking new content ... done
[06/11/23 09:46:30] scraping sources [torrentio] for query "90.day.fiance.S10" ... done - found 6 releases
[06/11/23 09:46:31] scraping sources [torrentio] for IMDB ID "tt3469050" ... done - found 6 releases
[06/11/23 09:46:36] checking cache status for scraped releases on: [Real Debrid] ... done
[06/11/23 09:46:37] sorting releases for version [1080p] ... done - found 12 releases
[06/11/23 09:46:40] [realdebrid] adding cached release: 90.Day.Fiance.S10E01.Dearly.Beloved.1080p.AMZN.WEB-DL.DDP2.0.H.264-NTb
[06/11/23 09:46:40] sorting releases for version [4K] ... done - found 4 releases
[06/11/23 09:46:42] [realdebrid] adding cached release: 90.Day.Fiance.S10E01.Dearly.Beloved.1080p.AMZN.WEB-DL.DDP2.0.H.264-NTb
[06/11/23 09:46:42] retrying download in 30min for item: 90.day.fiance.S10E02. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:46:42] retrying download in 30min for item: 90.day.fiance.S10E03. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:46:42] retrying download in 30min for item: 90.day.fiance.S10E04. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:46:42] retrying download in 30min for item: 90.day.fiance.S10E05. - version/s [1080p],[4K] - attempt 1/48
[06/11/23 09:46:42] took 11.57s
[06/11/23 09:46:42] [overserr] marking request as available
[06/11/23 09:46:44] [plex] refreshing show library section/s: "TV Shows","TV Shows 4K"

I've tried using Jackett, but the issue persists.

Could you please look into this?

Thank you for your assistance.

gyCfjSnO avatar Nov 06 '23 08:11 gyCfjSnO

Just wanted to add I am also facing the issue. I have tried with the default 1080 SDR profile, I have tried with a different version setup whinch included the extra line for making sure the episode name was included from issue #478. I am running the current latest versin as I only set this up this week, so I should whatever fixes you mentioend you implemented in the other issue. I have also tested without all the extra scrapers and using only torrentio which you mentioned in the other issue, but none of this has made any difference. It still fails to pull down individual episodes even though I can manually use the scraper to grab them with no problem. This is the only thing unfortunately breaking this for me, so it would be great tog et this fixed.

image

slunat avatar Nov 10 '23 09:11 slunat

I have the same issue although more referring to a current airing season, it will get for example s22e01 but then get stuck retrying the other episodes just as above.

I add for example season 22 of a current airing series, there are currently 6 aired episodes so no season pack.

scraping sources [orionoid,torrentio] for query "show.name.S22"

it scrapes, finds results, grabs e01 then gets stuck retrying e02-6 When it comes to attempt 2/48 it still scrapes for show.name.s22. If i run a manual scrape for show.name.s22, the results show s22e01 only, I found by manually scraping episodes one by one and restarting plex_debrid in between, it would continue with the search term

scraping sources [orionoid,torrentio] for query "show.name.S22"

up until the last 2 episodes, where it would then change its search term to the actual episode number.

scraping sources [orionoid,torrentio] for query "show.name.S22E05." ... done accepting titles that regex match "[^A-Za-z0-9]*((show.name............... and scraping sources [orionoid,torrentio] for query "show.name.S22E06." ... done accepting titles that regex match "[^A-Za-z0-9]*((show.name...............

I tried this with 2 different shows and got the same results, Maybe this helps pinpoint the issue.

Makrit avatar Nov 24 '23 18:11 Makrit

Same problem...is there a workaround or fix?

vvhillo avatar Dec 01 '23 22:12 vvhillo

A temporary fix for this is to edit plex_debrid\content\classes.py: (As of v2.9.5, around line 1366)

# If there is more than one episode
            if len(self.Episodes) > 2:

Change the 2 to a very high number so that the IF statement never gets triggered. Something like 9999. When that evaluates to true and runs, that's when the error happens when grabbing anything after the first episode.

I don't know how this change will affect series where the show has ended, I just needed it to work for currently airing shows that don't have packs yet.

It was originally modified for 2.9.3 release, Commit f38cedea955594feec56be68ef5f07be263946b2 when mentioned as a fix here https://github.com/itsToggle/plex_debrid/issues/478#issuecomment-1643154916.

DebugDax avatar Dec 05 '23 19:12 DebugDax

A temporary fix for this is to edit plex_debrid\content\classes.py: (As of v2.9.5, around line 1366)

# If there is more than one episode
            if len(self.Episodes) > 2:

Change the 2 to a very high number so that the IF statement never gets triggered. Something like 9999. When that evaluates to true and runs, that's when the error happens when grabbing anything after the first episode.

I don't know how this change will affect series where the show has ended, I just needed it to work for currently airing shows that don't have packs yet.

It was originally modified for 2.9.3 release, Commit f38cede when mentioned as a fix here #478 (comment).

Thank you for this, it seems to work in fixing the issue with pd not downloading seasons that are still airing, but with seasons in the same show that have finished airing (i.e. previous season to current etc..) it fails now because of trying single episodes instead of full packs I assume, switching the 9999 back to 2 fixes that which downloads the full pack and then changing back to 9999 allows seasons to download that are still airing, for me at least.

Not sure if this is useful info, but figured I'd post my experience with it.

Pretty much when I'm downloading a season that is still airing I just am gonna switch that to 9999 and when downloading seasons that are over back to 2 seems to make it all work. Everything else works great tho, thanks @itsToggle & @DebugDax

Info: Version: v2.95 Scraper source(s): torrentio OS: Windows 10

vCybah avatar Jan 06 '24 10:01 vCybah

I also struggle with this issue, tried with Reacher s02 and it stops at episode 3, then retrying download in 30min for item:

Blodskjegg avatar Jan 13 '24 14:01 Blodskjegg

Same issue here. This workaround works for me but only for seasons that are still airing In the same show.

# If there is more than one episode
            if len(self.Episodes) > 9999:

Edit: I have been looking into the code a little deeper and I think the only way to fix this properly is to create a placeholder that determines if the season is still ongoing and use that in the code, like:

# If there is more than one episode
if len(self.Episodes) > 1:
    season_pack_exists = self.season_pack(scraped_releases)
    # Check if the season is ongoing
    if is_ongoing(self.season):
        # If the season is ongoing, download individual episodes
        for episode in self.Episodes:
            debrid_downloaded, retry = self.debrid_download(episode)

Disclaimer, I am in no way a Python programmer, just dropping some ideas. Also, we would need to determine the value of is_ongoing for each season. @itsToggle, any chance you would be able to look into this? This would certainly improve an already amazing project!

theincredibleman avatar Feb 14 '24 22:02 theincredibleman

Also, we would need to determine the value of is_ongoing for each season.

The Overseerr API could be a source for this data. There is an endpoint to fetch data on a specific season of a series and you'd likely be able to determine whether the season was completed or not.

jeffss00 avatar Mar 29 '24 20:03 jeffss00

It looks like this line was accidentally commented out as part of this commit which resulted in episode.skip_scraping = True always being set regardless of whether a season pack was downloaded. This disabled any episode level scraping further down the line...

If you're applying this fix manually by commenting out line 1369 in classes.py, make sure the if statement lines up with the if statement 2 lines up.

image

sirstudly avatar Mar 30 '24 13:03 sirstudly