mreweilk / redsea Goto Github PK
View Code? Open in Web Editor NEWThis project forked from text-editor/redsea
Music downloader for Tidal, slightly revived
This project forked from text-editor/redsea
Music downloader for Tidal, slightly revived
Hi,
I ran sudo pip install -r requirements.txt
but got this error:
ERROR: Command "/usr/bin/python -u -c 'import setuptools, tokenize;file='"'"'/private/tmp/pip-install-jrfqBF/mutagen/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-1oeLbH/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-install-jrfqBF/mutagen/
It would be nice to either have a flag on the command, or an option in the config to skip the downloads of things not available in their requested format. For certain things in Tidal's library, only High/Normal are available and not Lossless, so it'd be nice to skip those things that are high/normal only. Essentially something like the ability to do "redsea --lossless-only https://linkshere".
Below is an example output of something requested in Lossless but there's only High available:
<<< Downloading album: 13 track(s) in total >>>
=== Downloading track ID 11398250 ===
Track: 01
Title: Opposite Man
Artist: True Margrit
Album: The Juggler's Progress
----
Grabbing stream URL...
WARNING: LOSSLESS quality requested, but only HIGH quality available.
^C Download progress: 12%
So downloading MQA is a thing you can do with Tidal. Support for it currently exists in Athame (https://github.com/svbnet/AthamePlugin.Tidal), and support would probably be a good idea for RedSea as well. I would make it a separate quality flag a la LOW/HIGH/LOSSLESS (call it MQA or something), and also have a flag for the script itself, something like "redsea --mqa http://linkhere".
Some releases are still causing the script to die and throw an exception error when tagging. This occurs when there is no album art on the release or track you rip. If there is no album art, the art tagging should just be skipped for the track and the ripping should continue.
Example release: https://listen.tidal.com/track/75617724
Here's the exception:
Traceback (most recent call last):
File "/home/aoichan/RedSea/redsea.py", line 114, in <module>
main()
File "/home/aoichan/RedSea/redsea.py", line 81, in main
_, filepath = md.download_media(track, config['tidal']['quality'])
File "/home/aoichan/RedSea/mediadownloader.py", line 141, in download_media
if not self._dl_picture(track_info['album']['cover'], aa_location):
File "/home/aoichan/RedSea/mediadownloader.py", line 43, in _dl_picture
return self._dl_url(TidalApi.get_album_artwork_url(album_id), where)
File "/home/aoichan/RedSea/mediadownloader.py", line 30, in _dl_url
total = int(r.headers['content-length'])
File "/home/aoichan/.local/lib/python3.5/site-packages/requests/structures.py", line 54, in __getitem__
return self._store[key.lower()][1]
KeyError: 'content-length'
Edit: After further inspection, it appears Tidal does have the album art, but the site doesn't say so. I'm not sure if it's still a cover problem or what, but that seems to be the issue. Also, the cover is attached to the tracks, but it is not downloaded to the folder.
`
If you rip something with an & or ' in the track name, the resulting filename will convert the character to a hyphen.
As an example, if you rip this release: https://listen.tidal.com/album/66330194
The resulting filename for track 2 will be "2 New Flows (Rugged - Raw Remix).flac" rather than "2 New Flows (Rugged & Raw Remix).flac"
As well, if you rip this release: https://listen.tidal.com/album/74277668
The resulting track name for Track 2 and Track 3 will be "2 Don-t Mind.flac" and "3 Say You-ll Work It.flac" instead of "2 Don't Mind.flac" and "3 Say You'll Work It.flac"
If you rip a release that has different artists for each track, each track will be ripped to its own folder. The proper thing to do would be to rip all the tracks to the same folder, and possibly have the artist set as "Various Artists" or "VA" or something similar.
Example release would be https://listen.tidal.com/album/38610083
For Multi-Disc uploads, the way they are ripped right now is that all the tracks are dumped in to the release folder. For Multi-Disc releases only, a Disc 1/Disc 2/etc folder should be made and the tracks from each disc should be put in their corresponding folders.
For example, on https://listen.tidal.com/album/33746982, instead of being output like this:
03 - God (Interlude).flac
03 - Unhappy.flac
04 - Bowtie (feat. Sleepy Brown and Jazze Pha).flac
04 - Happy Valentine's Day.flac
05 - Spread.flac
05 - The Way You Move (Radio Mix) (feat. Sleepy Brown).flac
06 - The Rooster.flac
...
they would be put in their respective folders like this:
CD1/01 - Intro.flac
CD1/02 - GhettoMusick (Radio Mix).flac
CD1/03 - Unhappy.flac
CD1/04 - Bowtie (feat. Sleepy Brown and Jazze Pha).flac
...
CD2/01 - The Love Below (Intro).flac
CD2/02 - Love Hater.flac
CD3/03 - God (Interlude).flac.
and so on.
When you rip something, the filenames of the tracks will be "1 - Track Name.flac", "2 - Track Name.flac", etc. It would be much nicer if the track numbers could be zero padded for tracks 1-9, i.e "01 - Track Name.flac", "02 - Track Name.flac", etc. The zero-padding should not apply to tracks 10+, as that would mess up sorting.
Is there any way do add Album Year number in the name of the Folder?
Something like {title}, {artist}, {yearnumber}, {album}, {tracknumber}.
That need to collect albums: Artist - 2000 - Album Name.
It would be nice to have the ability to have redsea tag the folder name with the label, similar to how you can have it tag with the date, album, and artist.. Right now, rs_config.json by default will tag the folder name with "{artist} and {album}". I know the year tag can be added to the folder with {date} to the album_format line in rs_config.json, and label would be nice too with something like {label}.
Currently, if you provide multiple albums to rip and one isn't available, you'll get a 404 error. If this happens, the script should just skip that item and continue on. For example, if I provide this list: https://listen.tidal.com/album/3809614 https://listen.tidal.com/album/44402187 https://lis
ten.tidal.com/album/11622501, it will crap out on the second item, and not continue to the third. It would be nice if the script just says "Error: Album not available" or something and just continues on.
This is what happens when it hits the unavailable album currently:
Traceback (most recent call last): File "/home/aoichan/RedSea/redsea.py", line 117, in <module> main() File "/home/aoichan/RedSea/redsea.py", line 98, in main media_info = api.get_album(id) File "/home/aoichan/RedSea/tidal_api.py", line 56, in get_album return self._get('albums/' + str(album_id)) File "/home/aoichan/RedSea/tidal_api.py", line 24, in _get raise TidalError(resp) tidal_api.TidalError: 2001: Album [44402187] not found (HTTP 404)
The default rs_config.txt in the repo is broken. I don't know how to send things in, but https://github.com/mreweilk/RedSea/blob/master/rs_config.txt#L9 needs to have its comma removed. Otherwise it's incorrect.
As of the latest version, some characters aren't being handled correctly.
If there are multiple artists, they are separated by commas. Currently those multiple artists will be output to a folder name as "Artist1- Artist2", instead of "Artist 1, Artist 2". Example release: https://listen.tidal.com/album/75306354
If there is an exclamation point in an artist name or song, the foldername will appear as "Artist-" instead of "Artist!". I believe the same thing happens for file names. Example: https://listen.tidal.com/album/61677069
If there is a remix of a song along with a featured artist in the track name, the "Remix" portion at the end of the song title will be listed as "-Remix Name-" in the filename, as opposed to "[Remix Name]" as it should be. Example: https://listen.tidal.com/album/72646156
If there is a colon in the album title and the corresponding folder, it should be output as " - " instead of the colon, due to compatibility issues on some systems. So if the album title is "AlbumTitle: Album2", the script currently outputs as "AlbumTitle- Album2". It should output as "AlbumTitle - Album2". The tagging for this should remain unaffected. Example release: https://listen.tidal.com/album/75439232
There are probably a couple other characters that cause this but this is what comes to mind offhand.
You can browse tidal and get the links for albums using store links. Currently store links are not processed properly by the script. If you try grabbing a store version, you'll get this result:
`redsea http://tidal.com/be/store/album/67107661
/$$$$$$$ /$$ /$$$$$$
|
| $$ \ $$ /$$$$$$ /$$$$$$$| $$ _/ /$$$$$$ /$$$$$$
| $$$$$$$/ /$$__ $$ /$$__ $$| $$$$$$ /$$__ $$ |___ $$
|
| $$ \
| $$ |
|/ |/ _/ _/ _/ _/ ______/
(c) 2016 Joe Thatcher
https://github.com/svbnet/RedSea
Unknown media type - be
Download queue: 1/1 items complete (100% done) <
All downloads completed. <`
Or this:
`redsea http://tidal.com/store/album/67448126
/$$$$$$$ /$$ /$$$$$$
|
| $$ \ $$ /$$$$$$ /$$$$$$$| $$ _/ /$$$$$$ /$$$$$$
| $$$$$$$/ /$$__ $$ /$$__ $$| $$$$$$ /$$__ $$ |___ $$
|
| $$ \
| $$ |
|/ |/ _/ _/ _/ _/ ______/
(c) 2016 Joe Thatcher
https://github.com/svbnet/RedSea
Unknown media type - store
Download queue: 1/1 items complete (100% done) <
All downloads completed. <`
However, if you remove the /store/ or /cc/store/, it is the exact same link as if it was a direct album link. It would be nice if redsea supported this to rip.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.