Commit Graph

65 Commits (master)

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
AnthonyF 439be8417c Backport fix from 1.0.0-dev-r1, correct build command 2021-12-09 21:59:14 -05:00
AnthonyF e0b2ca8f4f Merge remote-tracking branch 'origin/master' 2021-12-09 21:22:00 -05:00
AnthonyF cf9d43fed2 Housekeeping + Minor bugfixes
Fixed: #186, #188, #189

Cleaned up lingering `.format()`s and replaced with appropriate f-strings.

Updated project structure to slightly more modern standards.
2021-12-09 21:18:42 -05:00
relthyg 391646f59e Provide date and label as template variables 2021-08-14 12:17:09 +02:00
AnthonyF f3e91a7d4d Exposed slugify args
Enhanced flexibility when naming output files:
Example: `--template="%{artist}/%{album}/%{track}-%{title}" --space-char="_"`

Would produce "scene" style filenames.

Also added is the ability to:
 - Retain upper case letters
 - Leave spaces intact
 - Convert characters to ASCII (北京 -> beijing)
 - Allow additional characters like `()[];` etc
2021-01-10 15:03:53 -05:00
Nightdavisao 0b9ce91621
change the matching <script> type attribute (#171) 2020-10-16 20:29:07 -04:00
ViperZer0 4a5e14b8f1
Added multiple URL functionality. (#160)
* Added multiple URL functionality.

* removed debug messages
2020-09-27 08:11:01 -07:00
Piotr Patrzyk 3d3a524af2
Jsdatafix (#167)
* bandcampjson simplify

* one merged json

* change script identifier

* version bump

* rm extract_data

* go back to json data as list

* tralbum fix

* fix title path

* logging fix
2020-09-27 08:05:04 -07:00
BourgondAries 4f8c28e3b1
Use the popup image instead of the thumbnail (#163)
The thumbnail is often 700x700 in resolution, the pop-up image tends
to be 1200x1200.

For use in music libraries, where the album art may be displayed. It's
preferable to fetch the original resolution album art.
2020-09-26 13:33:17 -07:00
Anthony Forsberg 243e537684 Switch to shutil for getting terminal size
Due to possible permissions issues with automated testing switching to shutil to indirectly call os.get_terminal_size() is best.
2018-03-09 20:24:52 -05:00
Anthony Forsberg af0635cfac Transition from sys.stdiout.write to print
Homebrew Jenkins testing compatability
2018-03-06 17:33:09 -05:00
Anthony Forsberg e8a016fc35 Fixes #138 for all terminals 2018-02-07 17:32:53 -05:00
Anthony Forsberg 1d82ca669a Output tweaks
Fixes #138 and #139
2018-02-06 15:40:38 -05:00
Anthony Forsberg 1521acd977 Preliminary 0.0.9 changes
`--artist` tag can no longer be used on its own accidently.
2017-09-27 17:10:45 -04:00
Anthony Forsberg 905ff8cfd4 Session file tweaks and track url schema fix
bandcamp-dl will now ignore the session file if a url is manually provided, this should prevent clashing with things such as frontends or other external programs which make use of it. Restoring previous download sessions will still work, simply run bandcamp-dl without arguments (Other than --base-dir if previously used) and it will behave as normal.

Bandcamp changed their file urls to include the protocol, code has been changed to reflect this.
2017-09-27 14:22:03 -04:00
Nicholas abb32308a6 Fix for #123 - ensures lockfile deleted from base directory (#124)
* Fix for #123 - ensures lockfile deleted from base directory

__main__ created the file in base-dir but bandcampDownloader checked for it in the working
directory. As bandcampDownloader has the base-dir, this commit uses that to point in
the expected place.

* Fix #123 arguments need breathing room
2017-07-04 12:20:56 -04:00
Anthony Forsberg c460cdc09c Added debug option, corrected an argument check
`--debug` option is now in, should give you a better idea of what is happening when used and where a possible error may be.
2017-05-25 11:22:45 -04:00
Anthony Forsberg 2f8b87713c Lyrics embedding update
Fixed lyrics embedding, they will now work even if the lyrics were left out of the track data as we now insert it ourselves by grabbing it from the tracks individual page.

This of course slows things down when using the option so be aware.
2017-05-24 15:29:04 -04:00
Anthony Forsberg 5d9327195a Preliminary lyric embedding changes 2017-05-23 14:47:41 -04:00
Anthony Forsberg c3bcb77fd6 Silly code, fixed 2017-05-23 13:56:39 -04:00
Anthony Forsberg c0048dd9fe Tweak argument defaults
Manually specifying True/False/None for the arguments was not needed, docopt sets them to False unless they are used.
2017-05-23 13:56:01 -04:00
Anthony Forsberg a2ad7439c2 File permissions issue under Windows fixed
Under Windows while using the `--overwrite` option files would refuse to be overwritten, this is now fixed by first removing the file then renaming it.
2017-05-23 13:53:56 -04:00
Anthony Forsberg ff13704c83 Usage cleanup, squashed URL error 2017-05-23 13:51:19 -04:00
Anthony Forsberg 25e5da8cdb not.finished file bugfix
Take into account filename changes per version when deleting the temp file at the end of the download process.
2017-05-21 13:47:37 -04:00
Anthony Forsberg c8680f2694 Version specific not.finished files, etc
`not.finished` files are now version specific, old `not.finished` files will simply not be loaded preventing any issues with feature changes that require new arguments.

Minimum Python version is now enforced properly, it should now be impossible to install (via `pip`) with an unsupported Python version.

Bandcamp-dl version is now located in setup.py only with it being added to a generated `__init__.py` during packaging or install.
2017-05-20 16:02:17 -04:00
Anthony Forsberg 4413ad3ab2 Added --no-slugify option
Option added to maintain track, artist, and album names as they are. (Retain spaces, capitalization, etc)
2017-05-08 21:31:56 -04:00
Anthony Forsberg c881c1d00d Fixed complete failure after Bandcamp site update.
Fixes: #113, #110
2017-05-08 12:58:03 -04:00
Anthony Forsberg 12327e119b 0.0.8 Update
Added --track for downloading individual tracks/singles
Added --embed-art to forcibly embed album art if available
2017-04-15 09:30:34 -04:00
Anthony Forsberg 609ad3a813 Logging for debug purposes 2017-02-27 08:02:24 -05:00
Anthony Forsberg 098ae8c6c7 Refactored BandcampJSON, Added --group option, readability changes.
BandcampJSON now returns a list of JSON strings, Album data, Embed data,
and Page data and is only called once.

Added a `--group` option to insert a group tag, currently this attempts
to use the artist/album Label.

Made some small readability changes for future work, adjusted the
imports and filenames for the last time.
2017-02-17 22:09:17 -05:00
Anthony Forsberg 360732cdcc Requirements update, setup changes 2017-02-07 20:23:25 -05:00
Anthony Forsberg fcd7526d5c Checks and alternative values added for singles 2017-01-28 08:23:31 -05:00
Anthony Forsberg ce27187c87 init needed to import patch 2017-01-28 06:19:06 -05:00
Anthony Forsberg 88107f7538 Fixes #100 and possibly #99
Patches Requests if Python version is below 3.6.0 to fix a quirk in
httplib relating to utf-8 headers.

Also tracks are now sanitized before tagging.
2017-01-28 06:12:21 -05:00
Anthony Forsberg 370da98e21 Refined the regex, no need to remove offending characters now 2017-01-16 21:14:00 -05:00
Anthony Forsberg 6dc73cf5eb version bump, readme correction 2017-01-16 16:45:46 -05:00
Anthony Forsberg 1e572a7ad3 JS dictionary can contain strings with ; in them 2017-01-16 16:41:26 -05:00
Anthony Forsberg feb6d93bb9 Fixes #95
Fixed the incomplete file issue due to not understanding Mutagens
tagging process.

Also added in user_agent and requests session, the user-agent because
its proper and session because it increases performance slightly by
using keep-alive by default.
2017-01-13 14:15:42 -05:00
Anthony Forsberg c74e82ba96 Changes that I should not have merged from master into 0.0.7 2017-01-12 19:36:21 -05:00
Anthony Forsberg abf0dd261b Merge 0.0.7 (#94)
* Preliminary 0.0.7 changes

Moved to a new album/track data parser using demjson.

Slimit and Ply are no longer required.

Some basic spelling corrections and consistency changes.

Function Annotation, return types, and docstrings added.

* Initial commit for the Issue Template

* Fleshed out the issue template

* Switched to rst (oops), reformatted accordingly

* Update ISSUE_TEMPLATE.rst

* Moved CONTRIBUTING to the hidden .github directory

* No longer trips up on unavailable tracks in an album

* Much more robust file integrity checking, session file support.

Multi-step process in making sure files are downloaded and encoded
properly.

Bandcamp-dl will now attempt to search for a not.finished file and if it
is found load that sessions arguments and resume operation form where it
left off.

* Improve download status/progress messages

Made the download progress and status messages neater, no more multiple
progress bars and lines of status messages.

* Final 0.0.7 changes

Setup imports for distribution again.

Reformatted docstrings.

Clarified choices in partial download dialog.

Updated changelog.

Updated manifest.

Updated readme.
2017-01-12 19:25:43 -05:00
Anthony Forsberg 0176249237 Fixes #95 2017-01-12 19:20:52 -05:00
Olivier Aubert 5a06c86b61 Specify filename encoding (#93)
Else python will try to encode accented filenames with ascii codec, which will fail.
2017-01-09 20:20:08 -05:00
Anthony Forsberg d8ce58e66d Revert "Preliminary 0.0.7 changes"
This reverts commit 8cc97905a7.
2017-01-04 14:08:56 -05:00
Anthony Forsberg 8cc97905a7 Preliminary 0.0.7 changes
Moved to a new album/track data parser using demjson.

Slimit and Ply are no longer required.

Some basic spelling corrections and consistency changes.

Function Annotation, return types, and docstrings added.
2017-01-04 14:07:53 -05:00
Anthony Forsberg e3bb0acff2 Version numbering 2016-12-30 10:39:53 -05:00
Anthony Forsberg 7a9ae45657 Another small python 2.7.12 update, hopefully the last 2016-12-30 09:13:55 -05:00
Anthony Forsberg 542ab1aec0 Tiny change to support Python 2.7.12 2016-12-30 08:58:50 -05:00
Anthony Forsberg d3fdd798bf --no-art option, mutagen cleanup, removed bad lyric code.
Added the option to skip grabbing album art.

Removed the lyric grabbing code for now as it seems that if its
available its already embedded

Organized the mutagen imports and encoding.
2016-12-30 08:38:23 -05:00
Anthony Forsberg ed5132bdd0 Version correction 2016-12-27 18:25:55 -05:00