Skip to content

Commit

Permalink
Add another fallback date for tracks
Browse files Browse the repository at this point in the history
In some cases a track may not have an album release or track release date, in this case fallback to when the track was first added to Bandcamp.
  • Loading branch information
Evolution0 committed May 18, 2022
1 parent 8569d6e commit fe2eafa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bandcamp_dl/bandcamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def parse(self, url: str, art: bool = True, lyrics: bool = False, debugging: boo
album_release = page_json['album_release_date']
if album_release is None:
album_release = page_json['current']['release_date']
if album_release is None:
album_release = page_json['embed_info']['item_public']

try:
album_title = page_json['current']['title']
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
--index-url https://pypi.python.org/simple/

beautifulsoup4==4.10.0
beautifulsoup4==4.11.1
demjson3==3.0.5
docopt==0.6.2
mutagen==1.45.1
requests==2.26.0
requests==2.27.1
unicode-slugify==0.1.5
mock==4.0.3
chardet==4.0.0

0 comments on commit fe2eafa

Please sign in to comment.