Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Deezer): workaround for fetching copyright & total disk number #639

Merged
merged 3 commits into from
Jan 14, 2024

Conversation

miraclx
Copy link
Owner

@miraclx miraclx commented Jan 14, 2024

#634 highlighted an alternative API for Deezer that provides copyright information as well as disk numbers for all tracks in the album.

The implementation in this PR makes Deezer feature complete.

There's an alt-API we could use for this (which also provides us copyright information)

$ xh 'https://www.deezer.com/ajax/gw-light.php?method=deezer.getUserData&api_version=1.0&api_token=' \
  | jq '{cf: .results.checkForm, sid: .results.SESSION_ID}'
{
  "cf": "8MBdPkLVd3V~Exj0gJP0chXXXgM~2yb0",
  "sid": "fr0f7920da51b1f2b72dbbc7052a4a4141872d94"
}

$ xh 'https://www.deezer.com/ajax/gw-light.php?method=deezer.pageAlbum&api_version=1.0&api_token=8MBdPkLVd3V~Exj0gJP0chXXXgM~2yb0' \
    cookie:sid=fr0f7920da51b1f2b72dbbc7052a4a4141872d94 \
    alb_id:=264169542 lang=us \
  | jq -r '{total_discs: [.results.SONGS.data[] | .DISK_NUMBER] | unique | sort | reverse[0], copyright: .results.DATA.PRODUCER_LINE}'
{
  "total_discs": "3",
  "copyright": "(P) 2021 Floating World LTD"
}

Copy link

github-actions bot commented Jan 14, 2024


🐋 🤖

A docker image for this PR has been built!

docker pull freyrcli/freyrjs-git:pr-639
Base (master)
This Patch


What's this?

This docker image is a self-contained sandbox that includes all the patches made in this PR. Allowing others to easily use your patches without waiting for it to get merged and released officially.

For more context, see https://github.com/miraclx/freyr-js#docker-development.

@miraclx miraclx changed the title fetch copyright & total disk number from alt deezer API feat(Deezer): workaround for fetching copyright & total disk number Jan 14, 2024
@miraclx miraclx merged commit f8139b7 into master Jan 14, 2024
23 checks passed
@miraclx miraclx deleted the miraclx/deezer-alt-api branch January 14, 2024 03:49
@miraclx miraclx mentioned this pull request Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant