[WS] Deezer

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"

1 Like

@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".

would it be possible to change the way artists are listed in the ARTIST field? Instead of it being Artist 1, Artist 2, Artist 3 i need it to be Artist 1, Artist 2 & Artist 3. Is there any way to do this?

You can apply an action to format the field in your special way:
use an action of the type Replace with regular expression for ARTIST
Search string: (.*), (.*)
Replace string: $1 & $2

I‘m a bit of a noob when it comes to all this, so would you be so kind as to modify the original script to encompass my changes? It would mean the world to me!

What about the others who want to keep the data as it comes from the source?

I didn’t mean integrating my changes into the original but rather forking it (is that the correct term?) the original should stay as is and my changes should be in a seperate script. Sorry if i didn’t make that clear in my first post…

I don't know if anyone will do that for you.
In the meantime, you could create the action and use it on all the tracks that you already got and replace the last commas.
With very little effort you do not have to wait until the script works like you want it but you can brush up your collection straightaway.

And the good thing about the action: if also works for tracks that you do not get from this script but also for all other ARTIST fields that follow the pattern.

1 Like

I got it working, thank you very much! I was just a little bit confused that is all haha :slight_smile:

Hi all,
I was wondering, for this Deezer script, do I have to manually search each individual song? or I can batch search, let's say 10 songs from 10 different release/artists at a time?

Thanks.

No. Such websource-scripts are meant for albums.

Cool, understood. I found the batch solution through another tagging app using Spotify as source.

Thanks!

I was cataloguing some separate tracks and noticed that the script from the original post didn't return individual track results, only albums. So I made a separate version of the script which takes the artist & title tags as input for the search query and also parses the individual tracks from the Deezer result page.
Additionally I preferred to concatenate the "Version" to the track title instead of adding it in the comment field, so changed that as well.

Example usecase which could not be found/parsed by the original script:
https://www.deezer.com/search/Komakino%20Man%20On%20Mars%20(DJ%20Jan%20Remix)
Anyway, just in case anyone else finds it useful, I attached my modified version.
Deezer v1.1 Artist + Title.src (20.2 KB)

2 Likes

Hey Folks i have a quick question regarding the script! Would it be possible to somehow add the COMMENT tag to the end of the title? So, as an example, "Come Fly with Me" by Frank Sinatra would become "Come Fly with me (2008 Remaster)"

Thanks for any replies!