sigma67 / ytmusicapi

Unofficial API for YouTube Music
https://ytmusicapi.readthedocs.io
MIT License
1.76k stars 209 forks source link

fix #656: attempt to find runs in subtitle if not in title #657

Closed gotofritz closed 1 month ago

gotofritz commented 1 month ago

Sometimes the object 'runs' is not to be found within title, but within subtitle. This PR makes ytmusicapi look in both places.

Closes #656

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.03%. Comparing base (e995ae5) to head (0138c18). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
ytmusicapi/parsers/playlists.py 90.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #657 +/- ## ========================================== - Coverage 95.15% 95.03% -0.13% ========================================== Files 38 38 Lines 2290 2274 -16 ========================================== - Hits 2179 2161 -18 - Misses 111 113 +2 ``` | [Flag](https://app.codecov.io/gh/sigma67/ytmusicapi/pull/657/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sigma67) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/sigma67/ytmusicapi/pull/657/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sigma67) | `95.03% <91.66%> (-0.13%)` | :arrow_down: | 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=sigma67#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sigma67 commented 1 month ago

@gotofritz I would like to merge the fix but as you can tell from the pipeline I cannot reproduce.. In the second commit I removed your fix and the result is the same, no crash (despite adding a test for the playlist you provided).

It seems this bug is only present when you own the playlist?

Here is a screenshot what it looks like for me, logged in.

image

You could also test if the issue also occurs with a non-authenticated account for you.

gotofritz commented 1 month ago

Yeah it's not happening any more, it must have been a short lived glitch. The playlists have titles again and they now appear in my list. FYI, my account was suspended out of the blue for three hours and then restored, not sure what happened there but this must have been part of it. Thanks for your time, not sure what you want to do with this PR now, up to you.