vitiko98 / qobuz-dl

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

500 albums limit #130

Open pinus2 opened 2 years ago

pinus2 commented 2 years ago

Hello, how can i bypass the 500 album limit when i add an artist or a label with many album? thank you

OrakelDelphi commented 2 years ago

Not tested, but maybe it works when you change "limit": 500, at severus points at the file copy.py. Just give it a try.

pinus2 commented 2 years ago

Not tested, but maybe it works when you change "limit": 500, at severus points at the file copy.py. Just give it a try.

@OrakelDelphi thank you, maybe it work, can you tell me where is located the qobuz file in linux system?

OrakelDelphi commented 2 years ago

@pinus2 It depends ... If you downloaded the master zip and extraced into current directory, maybe as user qobuz @home directory your path is /home/qobuz/qobuz-dl-master. You can find the qopy.py file into the subdirectory qobuz_dl.

qobuz@quobuz-2021:~/qobuz-dl-master$ pwd
/home/qobuz/qobuz-dl-master
qobuz@quobuz-2021:~/qobuz-dl-master$ ls -al
total 72
drwxrwxr-x 3 qobuz qobuz  4096 Nov 30 19:45 .
drwxr-xr-x 8 qobuz qobuz  4096 Nov 30 19:56 ..
-rw-rw-r-- 1 qobuz qobuz   286 Nov 27 01:56 .flake8
-rw-rw-r-- 1 qobuz qobuz  2093 Nov 27 01:56 .gitignore
-rw-rw-r-- 1 qobuz qobuz 35149 Nov 27 01:56 LICENSE
drwxrwxr-x 2 qobuz qobuz  4096 Nov 30 19:56 qobuz_dl
-rw-rw-r-- 1 qobuz qobuz  5388 Nov 27 01:56 README.md
-rw-rw-r-- 1 qobuz qobuz    64 Nov 27 01:56 requirements.txt
-rw-rw-r-- 1 qobuz qobuz  1043 Nov 27 01:56 setup.py
qobuz@quobuz-2021:~/qobuz-dl-master$
qobuz@quobuz-2021:~/qobuz-dl-master$ cd qobuz_dl/
qobuz@quobuz-2021:~/qobuz-dl-master/qobuz_dl$ ls -la
total 100
drwxrwxr-x 2 qobuz qobuz  4096 Nov 30 19:56 .
drwxrwxr-x 3 qobuz qobuz  4096 Nov 30 19:45 ..
-rw-rw-r-- 1 qobuz qobuz  6362 Nov 29 22:29 cli.py
-rw-rw-r-- 1 qobuz qobuz   250 Nov 27 01:56 color.py
-rw-rw-r-- 1 qobuz qobuz  5122 Nov 29 20:09 commands.py
-rw-rw-r-- 1 qobuz qobuz 14412 Nov 29 20:19 core.py
-rw-rw-r-- 1 qobuz qobuz  1138 Nov 27 01:56 db.py
-rw-rw-r-- 1 qobuz qobuz 13748 Nov 30 19:47 downloader.py
-rw-rw-r-- 1 qobuz qobuz   299 Nov 27 01:56 exceptions.py
-rw-rw-r-- 1 qobuz qobuz    47 Nov 27 01:56 __init__.py
-rw-rw-r-- 1 qobuz qobuz  7186 Nov 30 19:38 metadata.py
-rw-rw-r-- 1 qobuz qobuz  7956 Nov 30 19:07 qopy.py
-rw-rw-r-- 1 qobuz qobuz  2599 Nov 27 01:56 spoofbuz.py
-rw-rw-r-- 1 qobuz qobuz  6525 Nov 29 21:19 utils.py
qobuz@quobuz-2021:~/qobuz-dl-master/qobuz_dl$

edit qopy.py with your favorit editor and save it.

cd ..
qobuz@quobuz-2021:~/qobuz-dl-master$ pwd
/home/qobuz/qobuz-dl-master

obuz@quobuz-2021:~/qobuz-dl-master$ pip3 install .
Processing /home/qobuz/qobuz-dl-master
Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.8/dist-packages (from qobuz-dl==0.9.9.5) (4.10.0)
Requirement already satisfied: colorama in /usr/lib/python3/dist-packages (from qobuz-dl==0.9.9.5) (0.4.3)
Requirement already satisfied: mutagen in /usr/local/lib/python3.8/dist-packages (from qobuz-dl==0.9.9.5) (1.45.1)
Requirement already satisfied: pathvalidate in /usr/local/lib/python3.8/dist-packages (from qobuz-dl==0.9.9.5) (2.5.0)
Requirement already satisfied: pick in /usr/local/lib/python3.8/dist-packages (from qobuz-dl==0.9.9.5) (1.0.0)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from qobuz-dl==0.9.9.5) (2.22.0)
Requirement already satisfied: tqdm in /usr/local/lib/python3.8/dist-packages (from qobuz-dl==0.9.9.5) (4.62.3)
Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.8/dist-packages (from beautifulsoup4->qobuz-dl==0.9.9.5) (2.3.1)
Building wheels for collected packages: qobuz-dl
  Building wheel for qobuz-dl (setup.py) ... done
  Created wheel for qobuz-dl: filename=qobuz_dl-0.9.9.5-py3-none-any.whl size=37742 sha256=382739625a285d3eb0fb7709f7bfd9b29f19c4389e93d76f79540887938b4552
  Stored in directory: /home/qobuz/.cache/pip/wheels/c5/01/f1/a6233680fd965e1ed018dce149f740e7db19fd76b67280a621
Successfully built qobuz-dl
Installing collected packages: qobuz-dl
  Attempting uninstall: qobuz-dl
    Found existing installation: qobuz-dl 0.9.9.5
    Uninstalling qobuz-dl-0.9.9.5:
      Successfully uninstalled qobuz-dl-0.9.9.5
Successfully installed qobuz-dl-0.9.9.5

If you like to install it for all users you have to use sudo pip3 install . #(dot at the end)

pinus2 commented 2 years ago

@OrakelDelphi i have tried to modify the limit value and reinstall but nothing happened, always the same 500 albums limit

pinus2 commented 2 years ago

@pinus2 It depends ... If you downloaded the master zip and extraced into current directory, maybe as user qobuz @home directory your path is /home/qobuz/qobuz-dl-master. You can find the qopy.py file into the subdirectory qobuz_dl.

qobuz@quobuz-2021:~/qobuz-dl-master$ pwd
/home/qobuz/qobuz-dl-master
qobuz@quobuz-2021:~/qobuz-dl-master$ ls -al
total 72
drwxrwxr-x 3 qobuz qobuz  4096 Nov 30 19:45 .
drwxr-xr-x 8 qobuz qobuz  4096 Nov 30 19:56 ..
-rw-rw-r-- 1 qobuz qobuz   286 Nov 27 01:56 .flake8
-rw-rw-r-- 1 qobuz qobuz  2093 Nov 27 01:56 .gitignore
-rw-rw-r-- 1 qobuz qobuz 35149 Nov 27 01:56 LICENSE
drwxrwxr-x 2 qobuz qobuz  4096 Nov 30 19:56 qobuz_dl
-rw-rw-r-- 1 qobuz qobuz  5388 Nov 27 01:56 README.md
-rw-rw-r-- 1 qobuz qobuz    64 Nov 27 01:56 requirements.txt
-rw-rw-r-- 1 qobuz qobuz  1043 Nov 27 01:56 setup.py
qobuz@quobuz-2021:~/qobuz-dl-master$
qobuz@quobuz-2021:~/qobuz-dl-master$ cd qobuz_dl/
qobuz@quobuz-2021:~/qobuz-dl-master/qobuz_dl$ ls -la
total 100
drwxrwxr-x 2 qobuz qobuz  4096 Nov 30 19:56 .
drwxrwxr-x 3 qobuz qobuz  4096 Nov 30 19:45 ..
-rw-rw-r-- 1 qobuz qobuz  6362 Nov 29 22:29 cli.py
-rw-rw-r-- 1 qobuz qobuz   250 Nov 27 01:56 color.py
-rw-rw-r-- 1 qobuz qobuz  5122 Nov 29 20:09 commands.py
-rw-rw-r-- 1 qobuz qobuz 14412 Nov 29 20:19 core.py
-rw-rw-r-- 1 qobuz qobuz  1138 Nov 27 01:56 db.py
-rw-rw-r-- 1 qobuz qobuz 13748 Nov 30 19:47 downloader.py
-rw-rw-r-- 1 qobuz qobuz   299 Nov 27 01:56 exceptions.py
-rw-rw-r-- 1 qobuz qobuz    47 Nov 27 01:56 __init__.py
-rw-rw-r-- 1 qobuz qobuz  7186 Nov 30 19:38 metadata.py
-rw-rw-r-- 1 qobuz qobuz  7956 Nov 30 19:07 qopy.py
-rw-rw-r-- 1 qobuz qobuz  2599 Nov 27 01:56 spoofbuz.py
-rw-rw-r-- 1 qobuz qobuz  6525 Nov 29 21:19 utils.py
qobuz@quobuz-2021:~/qobuz-dl-master/qobuz_dl$

edit qopy.py with your favorit editor and save it.

cd ..
qobuz@quobuz-2021:~/qobuz-dl-master$ pwd
/home/qobuz/qobuz-dl-master

obuz@quobuz-2021:~/qobuz-dl-master$ pip3 install .
Processing /home/qobuz/qobuz-dl-master
Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.8/dist-packages (from qobuz-dl==0.9.9.5) (4.10.0)
Requirement already satisfied: colorama in /usr/lib/python3/dist-packages (from qobuz-dl==0.9.9.5) (0.4.3)
Requirement already satisfied: mutagen in /usr/local/lib/python3.8/dist-packages (from qobuz-dl==0.9.9.5) (1.45.1)
Requirement already satisfied: pathvalidate in /usr/local/lib/python3.8/dist-packages (from qobuz-dl==0.9.9.5) (2.5.0)
Requirement already satisfied: pick in /usr/local/lib/python3.8/dist-packages (from qobuz-dl==0.9.9.5) (1.0.0)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from qobuz-dl==0.9.9.5) (2.22.0)
Requirement already satisfied: tqdm in /usr/local/lib/python3.8/dist-packages (from qobuz-dl==0.9.9.5) (4.62.3)
Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.8/dist-packages (from beautifulsoup4->qobuz-dl==0.9.9.5) (2.3.1)
Building wheels for collected packages: qobuz-dl
  Building wheel for qobuz-dl (setup.py) ... done
  Created wheel for qobuz-dl: filename=qobuz_dl-0.9.9.5-py3-none-any.whl size=37742 sha256=382739625a285d3eb0fb7709f7bfd9b29f19c4389e93d76f79540887938b4552
  Stored in directory: /home/qobuz/.cache/pip/wheels/c5/01/f1/a6233680fd965e1ed018dce149f740e7db19fd76b67280a621
Successfully built qobuz-dl
Installing collected packages: qobuz-dl
  Attempting uninstall: qobuz-dl
    Found existing installation: qobuz-dl 0.9.9.5
    Uninstalling qobuz-dl-0.9.9.5:
      Successfully uninstalled qobuz-dl-0.9.9.5
Successfully installed qobuz-dl-0.9.9.5

If you like to install it for all users you have to use sudo pip3 install . #(dot at the end)

@OrakelDelphi everytime that i reinstall qobuz with pip3 install qobuz, the qopy.py file into the /usr/local/lib/python3.8/dist-packages/qobuz-dl that i have edited befor, it's automatically modified back to 500 limit

OrakelDelphi commented 2 years ago

Do not modify the file in /usr/local/blablabla - edit the file in /home/qobuz - that is the source.

pinus2 commented 2 years ago

Do not modify the file in /usr/local/blablabla - edit the file in /home/qobuz - that is the source.

@OrakelDelphi finally i have installed properly it with the source code modified but if i insert more than 500 limit it don't run, and queue only 25 album to download, have you tested it?

@vitiko98 can you help me?

rodrigo081089 commented 2 years ago

Im having the exact same issue, even if I edited the qopy limit it will only download 500 albums

LETRA commented 2 years ago

Maybe it's a limitation of Qobuz and not of the app. But there should be a way to fix it.

pingzoo commented 1 year ago

Maybe it's a limitation of Qobuz and not of the app. But there should be a way to fix it.

That's correct. Qobuz does have a limit of 500 when requesting on there API. But the limit is only on the call in order to limit the response time. So we had to use the parameters "limit" and "offset" to get all results greater than 500.

For example, if you have an artist with 1500 albums the first call can forward the first 500 albums. Then a second call is made with the "offset" parameter on a value of 501 and the "limit" parameter still on a value of 500 to have the next 500 favorites and so on until the total number of results is reached. In the file you mentioned (qopy.py), there is a section that deals with this offset parameter. However, I do not know what this code does exactly. It look like its only working for favorits. Not for labels/artist.

I'm new to python. So i don't know how to realise that. But I'm trying hard.

iamABH commented 1 year ago

Maybe it's a limitation of Qobuz and not of the app. But there should be a way to fix it.

That's correct. Qobuz does have a limit of 500 when requesting on there API. But the limit is only on the call in order to limit the response time. So we had to use the parameters "limit" and "offset" to get all results greater than 500.

For example, if you have an artist with 1500 albums the first call can forward the first 500 albums. Then a second call is made with the "offset" parameter on a value of 501 and the "limit" parameter still on a value of 500 to have the next 500 favorites and so on until the total number of results is reached. In the file you mentioned (qopy.py), there is a section that deals with this offset parameter. However, I do not know what this code does exactly. It look like its only working for favorits. Not for labels/artist.

I'm new to python. So i don't know how to realise that. But I'm trying hard.

In my PR #185 I implemented this pagination behavior with the offset parameter but, first, only with my new command "me". If the API have the same behavior in playlist/artist endpoints I will try to implement it too in associated commands.

pingzoo commented 1 year ago

In my PR #185 I implemented this pagination behavior with the offset parameter but, first, only with my new command "me". If the API have the same behavior in playlist/artist endpoints I will try to implement it too in associated commands.

That would be so nice :) <3