LizardByte / Themerr-plex

Plugin for Plex Media Server that adds theme songs to movies using ThemerrDB.
https://app.lizardbyte.dev/ThemerrDB
GNU Affero General Public License v3.0
71 stars 4 forks source link

fix(yt-dl): validate audio url and add retry logic #486

Open ReenigneArcher opened 1 month ago

ReenigneArcher commented 1 month ago

Description

After merging #481 there are issues with YouTube urls.

It seems the urls provided by youtube are inaccessible due to 403 errors. When these are sent to Plex, a 406 response is given. See https://github.com/ytdl-org/youtube-dl/issues/32882 for more info.

Screenshot

Issues Fixed or Closed

Type of Change

Checklist

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch must be updated before it can be merged. You must also Allow edits from maintainers.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 31.66667% with 41 lines in your changes missing coverage. Please review.

Project coverage is 69.55%. Comparing base (29d0e8e) to head (e71e641). Report is 1 commits behind head on master.

Files Patch % Lines
Contents/Code/youtube_dl_helper.py 32.20% 40 Missing :warning:
Contents/Code/plex_api_helper.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #486 +/- ## ========================================== + Coverage 67.98% 69.55% +1.56% ========================================== Files 12 12 Lines 1087 1120 +33 ========================================== + Hits 739 779 +40 + Misses 348 341 -7 ``` | [Flag](https://app.codecov.io/gh/LizardByte/Themerr-plex/pull/486/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LizardByte) | Coverage Δ | | |---|---|---| | [Linux](https://app.codecov.io/gh/LizardByte/Themerr-plex/pull/486/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LizardByte) | `68.92% <31.66%> (+0.94%)` | :arrow_up: | | [Windows](https://app.codecov.io/gh/LizardByte/Themerr-plex/pull/486/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LizardByte) | `68.92% <31.66%> (+0.94%)` | :arrow_up: | | [macOS](https://app.codecov.io/gh/LizardByte/Themerr-plex/pull/486/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LizardByte) | `69.55% <31.66%> (+1.56%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LizardByte#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/LizardByte/Themerr-plex/pull/486?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LizardByte) | Coverage Δ | | |---|---|---| | [Contents/Code/default\_prefs.py](https://app.codecov.io/gh/LizardByte/Themerr-plex/pull/486?src=pr&el=tree&filepath=Contents%2FCode%2Fdefault_prefs.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LizardByte#diff-Q29udGVudHMvQ29kZS9kZWZhdWx0X3ByZWZzLnB5) | `100.00% <ø> (ø)` | | | [Contents/Code/plex\_api\_helper.py](https://app.codecov.io/gh/LizardByte/Themerr-plex/pull/486?src=pr&el=tree&filepath=Contents%2FCode%2Fplex_api_helper.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LizardByte#diff-Q29udGVudHMvQ29kZS9wbGV4X2FwaV9oZWxwZXIucHk=) | `55.15% <0.00%> (+6.06%)` | :arrow_up: | | [Contents/Code/youtube\_dl\_helper.py](https://app.codecov.io/gh/LizardByte/Themerr-plex/pull/486?src=pr&el=tree&filepath=Contents%2FCode%2Fyoutube_dl_helper.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LizardByte#diff-Q29udGVudHMvQ29kZS95b3V0dWJlX2RsX2hlbHBlci5weQ==) | `39.25% <32.20%> (-2.64%)` | :arrow_down: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/LizardByte/Themerr-plex/pull/486/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LizardByte)
sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud