mirror of
https://github.com/beetbox/beets.git
synced 2025-12-24 01:25:47 +01:00
Error handling
This commit is contained in:
parent
2eb8000a0b
commit
7440ca51fb
1 changed files with 5 additions and 2 deletions
|
|
@ -160,8 +160,11 @@ class ListenBrainzPlugin(BeetsPlugin):
|
|||
playlist_type = (
|
||||
"Exploration" if "Exploration" in title else "Jams"
|
||||
)
|
||||
date_str = title.split("week of ")[1].split(" ")[0]
|
||||
date = datetime.datetime.strptime(date_str, "%Y-%m-%d").date()
|
||||
if "week of " in title:
|
||||
date_str = title.split("week of ")[1].split(" ")[0]
|
||||
date = datetime.datetime.strptime(date_str, "%Y-%m-%d").date()
|
||||
else:
|
||||
date = None
|
||||
identifier = playlist_info.get("identifier")
|
||||
id = identifier.split("/")[-1]
|
||||
listenbrainz_playlists.append(
|
||||
|
|
|
|||
Loading…
Reference in a new issue