diff options
author | Mauricio Scheffer <mauricioscheffer@gmail.com> | 2022-11-27 22:03:17 +0000 |
---|---|---|
committer | Mauricio Scheffer <mauricioscheffer@gmail.com> | 2023-01-19 22:48:12 +0000 |
commit | 596d123cbb148271b0bbf85c6f48ceaf1f77a21f (patch) | |
tree | 378ab0f59a7d21c25ab7c0394d7dc9baa22e60f0 /pkgs/applications/audio/pianoteq/default.nix | |
parent | a4f710e8584dea15a801b75a03abc400bec6c683 (diff) |
pianoteq: fix fetchers
Diffstat (limited to 'pkgs/applications/audio/pianoteq/default.nix')
-rw-r--r-- | pkgs/applications/audio/pianoteq/default.nix | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/pkgs/applications/audio/pianoteq/default.nix b/pkgs/applications/audio/pianoteq/default.nix index 308d5b65f3e5a..0cb5dea39b7f4 100644 --- a/pkgs/applications/audio/pianoteq/default.nix +++ b/pkgs/applications/audio/pianoteq/default.nix @@ -93,14 +93,11 @@ let fetchWithCurlScript { inherit name sha256; script = '' - "''${curl[@]}" --silent --request POST \ + "''${curl[@]}" --silent --request GET \ --cookie cookies \ - --header "modartt-json: request" \ - --header "origin: https://www.modartt.com" \ - --header "content-type: application/json; charset=UTF-8" \ - --header "accept: application/json, text/javascript, */*" \ - --data-raw '{"file": "${name}", "get": "url"}' \ - https://www.modartt.com/json/download -o /dev/null + --header "accept: */*" \ + https://www.modartt.com/ -o /dev/null + json=$( "''${curl[@]}" --silent --request POST \ --cookie cookies \ @@ -109,8 +106,9 @@ let --header "content-type: application/json; charset=UTF-8" \ --header "accept: application/json, text/javascript, */*" \ --data-raw '{"file": "${name}", "get": "url"}' \ - https://www.modartt.com/json/download + https://www.modartt.com/api/0/download ) + url=$(echo $json | ${jq}/bin/jq -r .url) "''${curl[@]}" --progress-bar --cookie cookies -o $out "$url" ''; @@ -140,7 +138,7 @@ let --header "content-type: application/json; charset=UTF-8" \ --header "accept: application/json, text/javascript, */*" \ --data @login.json \ - https://www.modartt.com/json/session + https://www.modartt.com/api/0/session json=$( "''${curl[@]}" --silent --request POST \ @@ -150,10 +148,10 @@ let --header "content-type: application/json; charset=UTF-8" \ --header "accept: application/json, text/javascript, */*" \ --data-raw '{"file": "${name}", "get": "url"}' \ - https://www.modartt.com/json/download + https://www.modartt.com/api/0/download ) - url=$(echo $json | ${jq}/bin/jq -r .url) + url=$(echo $json | ${jq}/bin/jq -r .url) "''${curl[@]}" --progress-bar --cookie cookies -o $out "$url" ''; }; |