vitiko98 / qobuz-dl

A complete Lossless and Hi-Res music downloader for Qobuz
GNU General Public License v3.0
1.4k stars 185 forks source link

Download purchased music without active subscription #261

Open ThomasAH opened 6 months ago

ThomasAH commented 6 months ago

I regularly buy albums on Qobuz. In 2023 the official Qobuz downloader app for Windows was introduced and the former option of downloading .tar archives via their web interface has been removed, so Linux users can only download single tracks via the web interface.

qobuz-dl has helped me very much, as I can conveniently download purchased music. Thank you! But by default it aborts with the message "Free accounts are not eligible to download tracks.", so I had to patch qopy.py to make it work:

--- qopy.py.orig
+++ qopy.py
@@ -122,12 +122,12 @@

     def auth(self, email, pwd):
         usr_info = self.api_call("user/login", email=email, pwd=pwd)
-        if not usr_info["user"]["credential"]["parameters"]:
-            raise IneligibleError("Free accounts are not eligible to download tracks.")
+        #if not usr_info["user"]["credential"]["parameters"]:
+        #    raise IneligibleError("Free accounts are not eligible to download tracks.")
         self.uat = usr_info["user_auth_token"]
         self.session.headers.update({"X-User-Auth-Token": self.uat})
-        self.label = usr_info["user"]["credential"]["parameters"]["short_label"]
-        logger.info(f"{GREEN}Membership: {self.label}")
+        #self.label = usr_info["user"]["credential"]["parameters"]["short_label"]
+        #logger.info(f"{GREEN}Membership: {self.label}")

     def multi_meta(self, epoint, key, id, type):
         total = 1

For tracks I do not have purchased, I get "Demo. Skipping", which is absolutely fine, so in my opinion there shouldn't be a reason to abort on accounts without a subscription. Maybe print a warning like "Free accounts are only eligible to download purchased tracks." instead?

Saimyx commented 5 months ago

It works for me, thank you !

Maybe print a warning like "Free accounts are only eligible to download purchased tracks." instead?

I totally agree

danopia commented 4 months ago

Thank you for the patch, I just purchased several albums and the presented option of downloading tracks one by one is not good. So I found this tool and made the above change in order to grab my purchases. :)

lypanov commented 4 months ago

Thank you! Works flawlessly! Finally a work around for the lack of Qobuz Downloader on Linux!

Rapakko commented 3 months ago

For some reason I get "Demo. Skipping" even for tracks I have purchased. Any idea about why this might be?

ThomasAH commented 3 months ago

For some reason I get "Demo. Skipping" even for tracks I have purchased. Any idea about why this might be?

Just tested, it still works fine for me with both, purchased albums and purchased tracks.

When I'm clicking on a purchased track in the web player, the page still displays the full album URL and qobuz-dl shows "Demo. Skipping" for all tracks except the purchased one. You could use the three dots menu and "share" the track to see a URL for the single track that works with qobuz-dl.

Can you see the purchased album or track in https://play.qobuz.com/user/library/purchases/albums or https://play.qobuz.com/user/library/purchases/tracks? Edit: And are you logged in with the same user account in qobuz-dl as you are in the web interface?