fix(playlists): handle missing regex group in trackCount (#651)

* fix(playlists): get_playlist trackCount incorrect for playlists with more than 1k tracks

This ensures that the regex doesnt just return the first group in 1000+ long playlists.

* feat+fix(playlist_tests): Update playlist ID and add new track count test

* fix tests

---------

Co-authored-by: RealCalumPlays <calumplays666+github@gmail.com>
Co-authored-by: sigma67 <sigma67.github@gmail.com>
This commit is contained in:
RealCalumPlays 2024-10-05 09:33:20 +01:00 • committed by GitHub
commit 5478951ba3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 22 deletions

View file

@ -3,7 +3,7 @@ class TestPodcasts:
podcast_id = config["podcasts"]["channel_id"]
channel = yt.get_channel(podcast_id)
assert len(channel["episodes"]["results"]) == 10
assert len(channel["podcasts"]["results"]) > 5
assert len(channel["podcasts"]["results"]) >= 5
def test_get_channel_episodes(self, config, yt_oauth):
channel_id = config["podcasts"]["channel_id"]