[WS] Deezer

Great work vikaesar :+1: :heart:
Just a quick request please, is it possible to add the following (so it matches more closely the tags you get on flac from deezer?):
ARTISTS
BARCODE
COPYRIGHT
EXPLICIT
LABEL
LENGTH
MEDIA
SOURCE
SOURCEID

Thank you in advance

Yes, I can write a modified version of the script to output some of those tags, which are commonly used with audio file formats using Vorbis comments for tagging purposes such as FLAC, instead of the ones currently used.

I don't know if Deezer provides all of them, though. What are SOURCE and SOURCEID used for? Also, why a LENGTH tag?

Can you give me an example that shows how they would be filled for a sample album?

Thank you for your prompt response vikaesar :+1:
I have messaged the relevant info/example.

pleas add tags 'bpm'

Hi.
Which lines should i edit to only download Cover Art?
Thank you.

################################################################################
# Mp3tag Tag Source for Deezer v1.0                                            #
#                                                                              #
# Created by vikaesar                                                          #
# Modified by stevehero 2020.04.08                                             #
#                                                                              #
# KNOWN ISSUES: Genre information can't be parsed as it is not provided        #
#               by Deezer.                                                     #
#                                                                              #
#               When parsing multi-disc albums with more than 20 discs         #
#               then the total tracks for every disc past the twentieth        #
#               one aren't parsed, so their %track% field won't follow         #
#               this pattern: "track number/total tracks", it will just        #
#               show the track number.                                         #
#                                                                              #
# INSTRUCTIONS: This file needs to be stored in Mp3tag's tag sources           #
#               directory:                                                     #
#               %APPDATA%\Mp3tag\data\sources                                  #
#                                                                              #
# CHANGELOG                                                                    #
#                                                                              #
# [2019-05-25]  v1.00   Initial release                                         #
# [2020-04-08]  v1.00a  Artwork only 1200px                                     #
################################################################################
[Name]=Deezer
[BasedOn]=www.deezer.com
[IndexUrl]=https://www.deezer.com/search/%s
[AlbumUrl]=https://www.deezer.com/en/album/
[WordSeparator]=%20
[IndexFormat]=%_url%|%Album%|%Artist%|%Year%
[SearchBy]=%Artist% %Album%
[Encoding]=url-utf-8
################################################################################
#                        LIST OF SEARCH RESULTS DIALOG                         #
################################################################################
[ParserScriptIndex]=...
## Comment/uncomment for debugging purposes:
# DebugWriteInput "C:\Users\your_username\Desktop\mp3tag-deezer-ws-index-debug.out.html"
# Debug "ON" "C:\Users\your_username\Desktop\mp3tag-deezer-ws-index-debug.txt"
FindLine "<script>window.__DZR_APP_STATE__"
RegexpReplace ".+<script>.+ = " ""
RegexpReplace "</script>.+</div>" ""
json "ON" "current"
## First, check if we've found anything
json_select_object "ALBUM"
json_select "count"
## Then iterate over all releases
ifnot "0"
  json_foreach "data"
    # URL
    json_select "ALB_ID"
    SayRest
    Say "|"
    # Album
    json_select "ALB_TITLE"
    SayRest
    Say "|"
    # Artist
    json_select "ART_NAME"
    SayRest
    Say "|"
    # Year
    json_select "PHYSICAL_RELEASE_DATE"
    SayRest
    SayNewline
  json_foreach_end
endif
################################################################################
#                        ADJUST TAG INFORMATION DIALOG                         #
################################################################################
[ParserScriptAlbum]=...
## Comment/uncomment for debugging purposes:
# DebugWriteInput "C:\Users\your_username\Desktop\mp3tag-deezer-ws-album-debug.out.html"
# Debug "ON" "C:\Users\your_username\Desktop\mp3tag-deezer-ws-album-debug.txt"
FindLine "<script>window.__DZR_APP_STATE__"
RegexpReplace ".+<script>.+ = " ""
RegexpReplace "</script>.*" ""
json "ON" "current"
## First, parse album data
json_select_object "DATA"
# Cover
OutputTo "COVERURL"
json_select "ALB_PICTURE"
Say "https://e-cdns-images.dzcdn.net/images/cover/"
SayRest
## You can choose the cover resolution here, up to 1200px x 1200px
Say "/1200x1200.jpg"
# Say "/512x512.jpg"
3 Likes

Excellent!
Thank you so much.

Been using MP3Tag for awhile now and just discovered that more sources can be added. I downloaded the above SRC and put it into the ~Mp3tag\data\sources~ folder but it is not showing up in my sources when i open a fresh process of the application. Am I doing something incorrectly or not doing everything completely? Thanks for your time.

The correct location is described in this thread:

1 Like

Hi,

I am looking for a way to add the ISRC to all my files, without having to map every single song manually to its position on the album.

Is there a way to make this script work on a single song basis, rather than album based?

All my Songs have the (so I assume) relevant Infos needed to match them automatically:
Artist, Title, Album

So can someone please modify this script to automatically pull only the ISRC-Code of each song from deezer (or any other source)?

Thanks and cheers
Mike

Welcome! ISRC is not available on the source pages for deezer.

See here: view-source:https://www.deezer.com/en/album/111015702

... well, the Deezer-Script from this Thread already pulls the ISRC ...

I didn't look at the script just the source of a url. I searched for ISRC and there's nothing for it. Strange, how the script can get it. It must be under some other html tag.

You can use the set function to set all other tags written apart from the ISRC at the bottom. Or delete all other outputto functions below the [ParserScriptAlbum] part. You will probably need the title there too so can line the correct track up with the left side in the info tag panel.

The scripts will need a complete rewrite for searching for the tracks individually so the above is something as a workaround.

use API https://api.deezer.com/2.0/album/111015702/tracks

Here's a direct URL for coverart if anyone needs it.

Dee&zer v1.0#Cover Art (&Direct by WWW).src

    # Mp3tag Tag Source for Deezer v1.0                                            #
    #                                                                              #
    # Created by vikaesar                                                          #
    # Modified by stevehero 2021.02.13                                           #
    #                                                                              #
    # KNOWN ISSUES: Genre information can't be parsed as it is not provided        #
    #               by Deezer.                                                     #
    #                                                                              #
    #               When parsing multi-disc albums with more than 20 discs         #
    #               then the total tracks for every disc past the twentieth        #
    #               one aren't parsed, so their %track% field won't follow         #
    #               this pattern: "track number/total tracks", it will just        #
    #               show the track number.                                         #
    #                                                                              #
    # INSTRUCTIONS: This file needs to be stored in Mp3tag's tag sources           #
    #               directory:                                                     #
    #               %APPDATA%\Mp3tag\data\sources                                  #
    #                                                                              #
    # CHANGELOG                                                                    #
    #                                                                              #
    # [2019-05-25]  v1.00  Initial release                                         #
    # [2020-04-08]  v1.01  Artwork only 1200px                                     #
    ################################################################################

    [Name]=Deezer
    [AlbumUrl]=
    [BasedOn]=www.deezer.com

    ################################################################################
    #                        ADJUST TAG INFORMATION DIALOG                         #
    ################################################################################
    [ParserScriptAlbum]=...
    ## Comment/uncomment for debugging purposes:
    # DebugWriteInput "C:\Users\your_username\Desktop\mp3tag-deezer-ws-album-debug.out.html"
    # Debug "ON" "C:\Users\your_username\Desktop\mp3tag-deezer-ws-album-debug.txt"
    FindLine "<script>window.__DZR_APP_STATE__"
    RegexpReplace ".+<script>.+ = " ""
    RegexpReplace "</script>.*" ""
    json "ON" "current"
    ## First, parse album data
    json_select_object "DATA"
    # Cover
    OutputTo "COVERURL"
    json_select "ALB_PICTURE"
    Say "https://e-cdns-images.dzcdn.net/images/cover/"
    SayRest
    ## You can choose the cover resolution here, up to 1200px x 1200px
    Say "/1200x1200.jpg"
    # Say "/512x512.jpg"

Great source, how do you move all "feat. artists" to the Artist name. I have tried and failed. I tried learning json and playing with the script but then the artist column completely disappears.

Please add new tags to the script: COMPOSER, DISCTOTAL, GENRE, TRACKNUMBER, TRACKTOTAL.

The script fetches the composer-tag.

The Deezer database has no information about genres.

The tracknumber is written to the tag TRACK.

The total number of discs and the total number of tracks are written to the Tags TRACK and DISCNUMBER after the slash. This is the way it is provided in the ID3v2-standard.
https://id3.org/id3v2.3.0

There are no official tags like TRACKNUMBER, TRACKTOTAL and DISCTOTAL.

I'm talking about Vorbis tags, not ID3v2 tags.

Genre info is present https://api.deezer.com/2.0/album/111015702 - "Electro/Dance"

@vikaesar
I noticed that there is a problem to tag the albums of Ed Sheeran with your script.
Most of the time Sheeran uses arythmetic characters as album names (=, X, +, ÷) and so I thought that that is the reason. But only using "Ed Sheeran" as search criteria gives the same error:
"Sorry, no entries are matching your search criteria"

Taking another album without these characters (Bad Habits) gives results. Using only "Ed Sheeran Habits" as search criteria even lists the "=album".