fix: playlist not getting updated after first index

Addresses the bug #634 
inside playlist.py
```
    def build_json(self, scrape=False):
...
        if scrape or not self.json_data:
```
self.json_data will only be empty if the playlist has never been indexed. Since `scrape` defaults to `False`, both conditions mean subsequent playlist downloads will never do any scraping. Adding `scrape=True` to the parent call fixes this scenario (tested on my own setup). 

Note that playlists don't seem to update via subscriptions scans still. I suspect we need a similar fix there, but I don't have the bandwidth to dig into that atm.
This commit is contained in:
svuong-dev 2024-03-03 11:29:33 -05:00 committed by GitHub
parent 0ff27ebfb9
commit 70f4284e29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ class PendingList(PendingIndex):
def _parse_playlist(self, url):
"""add all videos of playlist to list"""
playlist = YoutubePlaylist(url)
playlist.build_json()
playlist.build_json(scrape=True)
if not playlist.json_data:
message = f"{playlist.youtube_id}: failed to extract metadata"
print(message)