Coder Social home page Coder Social logo

meeb / bandcampsync Goto Github PK

View Code? Open in Web Editor NEW
135.0 135.0 7.0 238 KB

Downloads your Bandcamp purchases automatically

License: BSD 3-Clause "New" or "Revised" License

Python 94.53% Dockerfile 3.88% Makefile 0.75% Shell 0.84%
bandcamp bandcampsync music selfhosted

bandcampsync's Introduction

Hi

My GitHub profile hosts any public project that is polished enough to be released and used by others. Feel free to drop me an email, create issues or make contributions. A special massive thank you to anyone who sponsors me.

Cheers!

//meeb

🔗 meeb.org    |    📧 [email protected]


meeb's GitHub stats

bandcampsync's People

Contributors

meeb avatar navicore avatar olepbr avatar zliebersbach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bandcampsync's Issues

Filename too long error

During library sync I encountered and error. I ran a pip3 install -U bandcampsync to the latest version and repeated the error. In order work around the issue I ran bandcampsync again this time using a top-level directory off the root filesystem to get the character count of the directories plus filename under the allowable amount for the python os module.

So, in short, if you encounter a long file name download to /tmp or create a symlink to your download directory in the filesystem root and sync there. eg: "sudo ln -s ~/Music/bandcamp /bc ; bandcampsync --cookies cookies.txt --directory /bc"

Traceback (most recent call last):
File "/usr/lib/python3.9/shutil.py", line 806, in move
os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/tmp/tmppgoefa7s/SunSquabi - 2019.05.25 - Summer Camp Music Festival - Chillicothe, IL - 03 Tequila Mockingbird - Get Down - Tequila Mockingbird feat. Dominic Lalli.flac' -> '/home/william/Music/bandcamp/SunSquabi/2019.05.25 :: Summer Camp Music Festival :: Chillicothe, IL/SunSquabi - 2019.05.25 - Summer Camp Music Festival - Chillicothe, IL - 03 Tequila Mockingbird - Get Down - Tequila Mockingbird feat. Dominic Lalli.flac'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/william/.local/bin/bandcampsync", line 55, in
do_sync(cookies_path, cookies, dir_path, media_format, temp_dir, ign_patterns)
File "/home/william/.local/lib/python3.9/site-packages/bandcampsync/init.py", line 74, in do_sync
move_file(file_path, file_dest)
File "/home/william/.local/lib/python3.9/site-packages/bandcampsync/download.py", line 87, in move_file
return shutil.move(src, dst)
File "/usr/lib/python3.9/shutil.py", line 820, in move
copy_function(src, real_dst)
File "/usr/lib/python3.9/shutil.py", line 435, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.9/shutil.py", line 264, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
OSError: [Errno 36] File name too long: '/home/william/Music/bandcamp/SunSquabi/2019.05.25 :: Summer Camp Music Festival :: Chillicothe, IL/SunSquabi - 2019.05.25 - Summer Camp Music Festival - Chillicothe, IL - 03 Tequila Mockingbird - Get Down - Tequila Mockingbird feat. Dominic Lalli.flac'

When pulling purchases an error is thrown when it arrives at a Subscription in my collections list

Traceback (most recent call last):
File "C:\Users\profile\AppData\Local\Programs\Python\Python39\lib\site-packages\bandcampsync\bandcamp.py", line 212, in load_purchases
download_url = redownload_urls[download_url_key]
KeyError: 'm83897'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\profile\AppData\Local\Programs\Python\Python39\lib\site-packages\bandcampsync\bandcamp.py", line 294, in getattr
return self._data[key]
KeyError: 'title'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\profile\AppData\Local\Programs\Python\Python39\Scripts\bandcampsync", line 49, in
do_sync(cookies_path, cookies, dir_path, media_format, temp_dir)
File "C:\Users\profile\AppData\Local\Programs\Python\Python39\lib\site-packages\bandcampsync_init_.py", line 20, in do_sync
bandcamp.load_purchases()
File "C:\Users\profile\AppData\Local\Programs\Python\Python39\lib\site-packages\bandcampsync\bandcamp.py", line 214, in load_purchases
log.error(f'Failed to locate download URL for {item.band_name} / {item.title} '
File "C:\Users\profile\AppData\Local\Programs\Python\Python39\lib\site-packages\bandcampsync\bandcamp.py", line 296, in getattr
raise KeyError(f'BandcampItem value "{key}" does not exist') from e
KeyError: 'BandcampItem value "title" does not exist'

wrong file name and folder name if only one track is purchased from the album

Hi.
I have a few tracks that I bought separately from the albums in my collection, and noticed that instead of Artist Name/Album Name/Track Name.flac they are saved to Artist Name/Track Name/Album Name.flac and they don't have album art in the folder (not sure that it should be there in this case, just a note).
Otherwise the script works just great, thanks a lot! :)

Getting errors when ran

I tried running this today and got it working okay as it was making folders but not grabbing any songs. I looked at the output and saw 2023-10-08 16:11:32,990 sync [ERROR] Downloaded file for "The Classy Wrecks / Bedrocksteady" (id:2279975560) at "C:\Users\username\AppData\Local\Temp\tmp247tma8f" is not a zip archive or a single track, skipping

and then it stops running after

2023-10-08 16:11:45,361 sync [INFO] New media item, will download: "The Holophonics / MaSKArades Vol. 14: Not A Cover Band" (id:398541076) in "flac"
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Scripts\bandcampsync", line 49, in
do_sync(cookies_path, cookies, dir_path, media_format, temp_dir)
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\bandcampsync_init_.py", line 30, in do_sync
local_path.mkdir(parents=True, exist_ok=True)
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\pathlib.py", line 1312, in mkdir
os.mkdir(self, mode)
NotADirectoryError: [WinError 267] The directory name is invalid: 'C:\Users\user\Music\The Holophonics\MaSKArades Vol. 14: Not A Cover Band'

Any idea what I did wrong?

Error caused by lack of downloadable content for an album

I'm getting stuck on this one every time. I'm far from sure, but guessing it might be the '?' in the album title

2023-09-20 15:57:20,265 sync [INFO] New media item, will download: "MZYLKYPOP / Kiedy Wilki Zawyja ? "(id:4089197226) in "vorbis"
Traceback (most recent call last):
  File "/[redacted]/lib/python3.11/site-packages/bandcampsync/bandcamp.py", line 243, in get_download_file_url
    downloads = digital_item['downloads']
                ~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'downloads'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/[redacted]/bin/bandcampsync", line 41, in <module>
    do_sync(cookies_path, cookies, dir_path, media_format)
  File "[redacted]/lib/python3.11/site-packages/bandcampsync/__init__.py", line 31, in do_sync
    initial_download_url = bandcamp.get_download_file_url(item, encoding=media_format)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/[redacted]/lib/python3.11/site-packages/bandcampsync/bandcamp.py", line 245, in get_download_file_url
    raise BandcampError(f'Failed to parse pagedata JSON, does not contain an '
bandcampsync.bandcamp.BandcampError: Failed to parse pagedata JSON, does not contain an "digital_items.downloads" key

Handle preordered albums

When I synced my library I had an album preordered which had some of the tracks available. These were downloaded and a bandcamp_item_id.txt file was created in the album folder. This means that now the album has been properly released, it's being skipped so I only have the partial album downloaded.

Now that I realise this happens, I can manually delete the bandcamp_item_id.txt from the folder when a preordered album is released; but it may be preferable to simply skip downloading unreleased preorders altogether, eg. in __init__.py:

...
local_path = local_media.get_path_for_purchase(item)
if item.is_preorder == True:
    log.info(f'Item is preorder, skipping: "{item.band_name} / {item.item_title}" '
             f'(id:{item.item_id})')
    continue
elif local_media.is_locally_downloaded(item, local_path):
...

Recheck download links when a download requires a wait

Some download links take you to a "thank you for your purchase" (?) page, or, a page which makes you wait for the download link to appear. This needs to be handled gracefully rather than ignoring text/html responses to download requests.

OSError: [Errno 28] No space left on device

Hardware

  • Raspberry Pi 4 Model B w/ 8GiB of RAM
  • ZFS hard drive array w/ 15.9 TiB of free space

Software

  • Raspberry Pi OS (Debian 11 "Bullseye")
  • Linux kernel version 6.1.21-v8+
  • OpenMediaVault version 6.9.2-1 (Shaitan)
  • bandcampsync version 0.3.3 (installed from pip)

Error message

2023-10-06 09:41:40,514 sync [INFO] Decompressing downloaded zip "/tmp/tmpaha9l3q0" to "/tmp/tmptw08xjje"
Traceback (most recent call last):
File "/home/pi/.local/bin/bandcampsync", line 41, in
do_sync(cookies_path, cookies, dir_path, media_format)
File "/home/pi/.local/lib/python3.9/site-packages/bandcampsync/init.py", line 54, in do_sync
unzip_file(temp_file.name, temp_dir)
File "/home/pi/.local/lib/python3.9/site-packages/bandcampsync/download.py", line 82, in unzip_file
z.extractall(decompress_to)
File "/usr/lib/python3.9/zipfile.py", line 1633, in extractall
self._extract_member(zipinfo, path, pwd)
File "/usr/lib/python3.9/zipfile.py", line 1688, in _extract_member
shutil.copyfileobj(source, target)
File "/usr/lib/python3.9/shutil.py", line 208, in copyfileobj
fdst_write(buf)
OSError: [Errno 28] No space left on device

Diagnosis

I believe this error is due to an unfortunate collision between bandcampsync's default temp storage location and OpenMediaVault's overabundance of caution with regards to flash-based storage devices. Here's what I think is happening:

  • When bandcampsync downloads a zip file from bandcamp.com, it saves that file inside a new directory in /tmp. Then, it extracts the zip file, putting the contents in another new directory in /tmp. Then, it moves the extracted files to the destination specified by the user with the -d parameter. And finally, it cleans up after itself by recursively deleting the two new directories it created in /tmp.
  • When OpenMediaVault detects that it is running on a Raspberry Pi booted from a microSD card, it tries to prevent that microSD card from burning out prematurely due to excessive write cycles by creating a special RAMDisk from available system RAM, and symlinking all of the usual "chatty" filesystem locations (/tmp, /var/log, /var/spool, etc.) to that. Then, it creates a cronjob which synchronizes the contents of the RAMDisk to permanent storage on an hourly schedule.
  • My Raspberry Pi 4 Model B has 8 GiB of RAM, roughly 30-50% of which is occupied by the OS and various background processes at any given time, and the remainder can be used by OpenMediaVault's RAMDisk. When bandcampsync downloads a particularly hefty file from bandcamp.com (in this case, a 2.5 GiB zip file, which unzips to a folder roughly the same size), stores it in /tmp (RAMDisk), and then also extracts that same file to /tmp, it runs out of "storage" space, regardless of how much free space is actually available in the destination directory.

Possible solution

One way to avoid this problem would be to add an optional temp directory preference parameter (-t/--temp, perhaps?) to bandcampsync, with several options:

  • Put temp files in /tmp (default behavior if user does not pass -t parameter with a valid value)
  • -t --in-place: Put temp files in a temp directory under the user's specified destination directory
  • -t '~/myTemp': Put temp files in a custom temp directory path

Willing to help develop & test

I'm more than willing to help develop and test a solution to this problem, but I'm not sure where to start. I've done a fair amount of Python development, though I have never created a pip package or Docker container, written CI/CD tests of any kind, etc. If you can guide me through the process of getting a local dev environment up and running, then I'd be happy to take a crack at adding the -t parameter myself, and submitting a PR once it's done.

Invalid download links

It would seem that some download links come invalid.

When accessing the URL it turns to a Bandcamp page saying

"Sorry, that download link isn't valid.
Please alert the person that sent you the link. If it was the artist, use the "Contact artist" link on the artist's page, or look for the music there."

Maybe related but the script keeps refreshing and stops after exhibiting this error:

Traceback (most recent call last):
  File "/usr/local/bin/bandcampsync-service", line 61, in <module>
    do_sync(cookies_path, cookies, dir_path, media_format_env)
  File "/usr/local/lib/python3.11/dist-packages/bandcampsync/__init__.py", line 30, in do_sync
    download_url = bandcamp.load_download_url(purchase, encoding=media_format)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/bandcampsync/bandcamp.py", line 210, in load_download_url
    band_name = item['band_name']
                ^^^^
NameError: name 'item' is not defined. Did you mean: 'iter'?

Failure to start container: `NameError: name 'mask_sig' is not defined

Reproduction steps:

$docker-compose --version
Docker Compose version v2.9.0-6413-g38f6acd

I have added a cookies.txt file as per the README

  1. Use the docker-compose.yml as defined in the README
  2. Run docker-compose up -d
  3. Check container logs

Result:
The container does not start. Log is as shown

2023/10/23 16:41:14,stderr,"2023-10-23 16:41:14,264 bandcamp [INFO] Located Bandcamp session in cookies: {REDACTED}
"
2023/10/23 16:41:14,stderr,"2023-10-23 16:41:14,263 media [INFO] Local media directory: /downloads
"
2023/10/23 16:41:14,stderr,"2023-10-23 16:41:14,263 service [INFO] Starting synchronisation
"
2023/10/23 16:41:14,stderr,"2023-10-23 16:41:14,263 service [INFO] Running an initial one-off synchronisation immediately
"
2023/10/23 16:41:14,stderr,"2023-10-23 16:41:14,263 service [INFO] Time now in {REDACTED}
"
2023/10/23 16:41:14,stderr,"2023-10-23 16:41:14,263 service [INFO] Loaded cookies from \"/config/cookies.txt\"
"
2023/10/23 16:41:14,stderr,"2023-10-23 16:41:14,262 service [INFO] BandcampSync v0.3.3 starting
"
2023/10/23 16:41:13,stdout,Set service UID:GID to 1029:100

2023/10/23 16:41:13,stdout,usermod: no changes

2023/10/23 16:41:05,stderr,NameError: name 'mask_sig' is not defined

2023/10/23 16:41:05,stderr,                                                          ^^^^^^^^

2023/10/23 16:41:05,stderr,    raise BandcampError(f'Failed to make HTTP request to {mask_sig(url)}: {e}') from e

2023/10/23 16:41:05,stderr,"  File \"/usr/local/lib/python3.11/dist-packages/bandcampsync/bandcamp.py\", line 89, in _request
"
2023/10/23 16:41:05,stderr,           ^^^^^^^^^^^^^^^^^^^^^^^^^

2023/10/23 16:41:05,stderr,"    soup = self._request('get', url)
"
2023/10/23 16:41:05,stderr,"  File \"/usr/local/lib/python3.11/dist-packages/bandcampsync/bandcamp.py\", line 147, in verify_authentication
"
2023/10/23 16:41:05,stderr,    bandcamp.verify_authentication()

2023/10/23 16:41:05,stderr,"  File \"/usr/local/lib/python3.11/dist-packages/bandcampsync/__init__.py\", line 19, in do_sync
"
2023/10/23 16:41:05,stderr,"    do_sync(cookies_path, cookies, dir_path, media_format_env)
"
2023/10/23 16:41:05,stderr,"  File \"/usr/local/bin/bandcampsync-service\", line 67, in <module>
"
2023/10/23 16:41:05,stderr,Traceback (most recent call last):

2023/10/23 16:41:05,stderr,

2023/10/23 16:41:05,stderr,"During handling of the above exception, another exception occurred:
"
2023/10/23 16:41:05,stderr,

2023/10/23 16:41:05,stderr,"requests.exceptions.ConnectionError: HTTPSConnectionPool(host='bandcamp.com', port=443): Max retries exceeded with url: / (Caused by NameResolutionError(\"<urllib3.connection.HTTPSConnection object at 0x7fe01a30cf50>: Failed to resolve 'bandcamp.com' ([Errno -3] Temporary failure in name resolution)\"))
"
2023/10/23 16:41:05,stderr,"    raise ConnectionError(e, request=request)
"
2023/10/23 16:41:05,stderr,"  File \"/usr/local/lib/python3.11/dist-packages/requests/adapters.py\", line 519, in send
"
2023/10/23 16:41:05,stderr,        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2023/10/23 16:41:05,stderr,"    r = adapter.send(request, **kwargs)
"
2023/10/23 16:41:05,stderr,"  File \"/usr/local/lib/python3.11/dist-packages/requests/sessions.py\", line 703, in send
"
2023/10/23 16:41:05,stderr,           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2023/10/23 16:41:05,stderr,"    resp = self.send(prep, **send_kwargs)
"
2023/10/23 16:41:05,stderr,"  File \"/usr/local/lib/python3.11/dist-packages/requests/sessions.py\", line 589, in request
"
2023/10/23 16:41:05,stderr,               ^^^^^^^^^^^^^^^^^^^^^

2023/10/23 16:41:05,stderr,    response = self.session.request(

2023/10/23 16:41:05,stderr,"  File \"/usr/local/lib/python3.11/dist-packages/bandcampsync/bandcamp.py\", line 80, in _request
```

Sync fails if download has been requested too many times

Running 0.3.5 in Docker, I noticed that syncing had stopped and the container was continually restarting. Relevant logs:

2023-10-24 13:58:39,365 service [INFO] BandcampSync v0.3.5 starting
2023-10-24 13:58:39,366 service [INFO] Loaded cookies from "/config/cookies.txt"
2023-10-24 13:58:39,367 service [INFO] Time now in GB: 2023-10-24 13:58:39+01:00
2023-10-24 13:58:39,367 service [INFO] Running an initial one-off synchronisation immediately
2023-10-24 13:58:39,367 service [INFO] Starting synchronisation
2023-10-24 13:58:39,367 media [INFO] Local media directory: /downloads
...
2023-10-24 13:58:44,868 bandcamp [INFO] Found item: DISCHORDIA / Triptych (id:2177694343)
...
2023-10-24 13:58:46,556 sync [INFO] Downloading item "DISCHORDIA / Triptych" (id:2177694343) from https://popplers5.bandcamp.com/download/album?enc=flac&id=2177694343&payment_id=_REDACTED_&sig=[masked] to /var/tmp/tmpkpfo6pc3
Traceback (most recent call last):
  File "/usr/local/bin/bandcampsync-service", line 74, in <module>
    do_sync(cookies_path, cookies, dir_path, media_format_env, temp_dir)
  File "/usr/local/lib/python3.11/dist-packages/bandcampsync/__init__.py", line 42, in do_sync
    download_file(download_file_url, temp_file)
  File "/usr/local/lib/python3.11/dist-packages/bandcampsync/download.py", line 43, in download_file
    r.raise_for_status()
  File "/usr/local/lib/python3.11/dist-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://popplers5.bandcamp.com/download/album?enc=flac&id=2177694343&payment_id=_REDACTED_&sig=_REDACTED_

At this point it bombs out and restarts the container, causing it to happen again and again.

Checking the download page on bandcamp shows this error:

image

For the time being I've manually created a bandcamp_item_id.txt file to skip the dl; is it worth adding error handling to (temporarily?) skip downloads that fetch a 403 response?

(For reference, I think it ended up in this state because I ran out of room on the download drive while it was running overnight. So it would start to download that album, bomb out due to lack of space, restart the container, try the download again etc.)

"file too long" fatal issue on macos

In my collection I have an artist/album that can't download to mac. This causes the bandcampsync process to halt.

Bandcamp does not support deleting catalog entries.

The entry is Waveform Magazine issue 3 creates a crazy file resulting is:

OSError: [Errno 63] File name too long: '/Users/navicore/Music/Bandcamp/media/Waveform Magazine/WAVEFORM MAGAZINE ISSUE 3 COMPILATION---Yes, Bandcamp says you can pay for this album, and even name your own price! Please dont. Instead, when a track hits you a certain way, please go to that artists websiteBandcamp page and show them your love and support. Thanks!'

I got past it adding support for a --bypass arg so I could "--bypass waveform" https://github.com/navicore/bandcampsync/blob/48ea82f1d0b8125cf4c4414b53bcd0df53a4c1d2/bandcampsync/__init__.py#L16

I held off on a PR because maybe this shouldn't be a fatal error... just log and continue? I could take a crack at that for a PR if desired.

A particular single always gets redownloaded despite already being synced

Hi, great script here!

I have 87 Bandcamp purchases and just this one particular release keeps getting redownloaded every time I run the script. The release in question is https://thefieryfurnaces.bandcamp.com/album/down-at-the-so-and-so-on-somewhere

Let me know if I can help debug this. Here's the script output from the last time I ran it:

...
2023-09-20 19:18:43,637 sync [INFO] New media item, will download: "The Fiery Furnaces / Down at the So and So on Somewhere "(id:3159597158) in "flac"
2023-09-20 19:18:44,187 sync [INFO] Downloading item "The Fiery Furnaces / Down at the So and So on Somewhere" (id:3159597158) from https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874881 to /tmp/tmppiabqv_f
2023-09-20 19:18:44,848 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874881: 10%
2023-09-20 19:18:45,101 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874881: 20%
2023-09-20 19:18:45,489 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874881: 30%
2023-09-20 19:18:46,027 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874881: 40%
2023-09-20 19:18:46,582 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874881: 50%
2023-09-20 19:18:47,126 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874881: 60%
2023-09-20 19:18:47,815 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874881: 70%
2023-09-20 19:18:48,484 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874881: 80%
2023-09-20 19:18:49,143 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874881: 90%
2023-09-20 19:18:49,932 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874881: 100%
2023-09-20 19:18:49,933 sync [INFO] Decompressing downloaded zip "/tmp/tmppiabqv_f" to "/tmp/tmpzjtj7awv"
2023-09-20 19:18:50,050 sync [INFO] Moving extracted file: "/tmp/tmpzjtj7awv/cover.jpg" to "/media/store-f/music/sorted/The Fiery Furnaces/Down at the So and So on Somewhere/cover.jpg"
2023-09-20 19:18:50,099 sync [INFO] Moving extracted file: "/tmp/tmpzjtj7awv/The Fiery Furnaces - Down at the So and So on Somewhere - 01 Down at the So and So on Somewhere.flac" to "/media/store-f/music/sorted/The Fiery Furnaces/Down at the So and So on Somewhere/The Fiery Furnaces - Down at the So and So on Somewhere - 01 Down at the So and So on Somewhere.flac"
2023-09-20 19:18:50,570 media [INFO] Writing bandcamp item id:3159597158 to: /media/store-f/music/sorted/The Fiery Furnaces/Down at the So and So on Somewhere/bandcamp_item_id.txt
2023-09-20 19:18:50,584 sync [INFO] Already locally downloaded, skipping: "The Fiery Furnaces / Down at the So and So on Somewhere "(id:2569082990)
...

And I can see the file is definitely there:

-rw-rw-r-- 1 john john   11 Sep 20 19:15  bandcamp_item_id.txt
-rw-rw-r-- 1 john john 4.8M Sep 20 19:15  cover.jpg
-rw-rw-r-- 1 john john  54M Sep 20 19:15 'The Fiery Furnaces - Down at the So and So on Somewhere - 01 Down at the So and So on Somewhere.flac'

Thanks!

Handle slashes in artist, title and track names

Artists, title and track names (when track names are for single tracks and the title is used) can contain forward and backslashes. These can be converted by pathlib to be valid subdirectory paths. Slashes should be replaced by something filesystem path agnostic like hyphens.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.