Compare commits

...

5 Commits

Author SHA1 Message Date
AnthonyF fe2eafae4b Add another fallback date for tracks
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.
2022-05-18 11:54:02 -04:00
Anthony Forsberg 8569d6e9fe
Merge pull request #194 from relthyg/template_docs
Update docs for template variables
2022-05-08 09:24:23 -04:00
relthyg c14ef3e054 Update docs for template variables 2022-04-02 18:42:30 +02:00
AnthonyF d35c7edd4f Version bump
Sad excuse for a commit I know.
2021-12-09 22:01:46 -05:00
AnthonyF 439be8417c Backport fix from 1.0.0-dev-r1, correct build command 2021-12-09 21:59:14 -05:00
6 changed files with 18 additions and 10 deletions

View File

@ -18,7 +18,7 @@ jobs:
- name: Install dependencies
run: python -m pip install -U setuptools wheel build
- name: Build a binary wheel and a source tarball
run: python setup.py sdist bdist_wheel
run: python -m build .
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@master
with:

View File

@ -99,6 +99,8 @@ tokens:
- ``album``: The album name.
- ``track``: The track number.
- ``title``: The track title.
- ``date``: The album date.
- ``label``: The album label.
The default template is: ``%{artist}/%{album}/%{track} - %{title}``.

View File

@ -94,12 +94,16 @@ def main():
urls = arguments['URL']
album_list = []
for url in urls:
logging.debug("\n\tURL: {}".format(url))
album_list.append(
bandcamp.parse(url, not arguments['--no-art'], arguments['--embed-lyrics'], arguments['--debug']))
# url is now a list of URLs. So lets make an album_list and append each parsed album to it.
if type(urls) is str:
album_list.append(bandcamp.parse(urls, not arguments['--no-art'], arguments['--embed-lyrics'],
arguments['--debug']))
else:
for url in urls:
logging.debug(f"\n\tURL: {url}")
album_list.append(bandcamp.parse(url, not arguments['--no-art'], arguments['--embed-lyrics'],
arguments['--debug']))
for album in album_list:
logging.debug(" Album data:\n\t{}".format(album))

View File

@ -51,6 +51,8 @@ class Bandcamp:
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']

View File

@ -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

View File

@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import pathlib
appversion = "0.0.11"
appversion = "0.0.12"
here = pathlib.Path(__file__).parent.resolve()