VA - get year!


I have this large collection of mp3s which actually is a mix of songs I collected along the years.

The files are tagged with ARTIST and TITLE only.

Is it possible for mp3tag to find those songs' YEAR on discogs/amazon/last fm?

Please note the files are a MIX (various artists), not an album. I just would like them to have the songs' year.

Thank you!

If you do not know the album, it is fairly hard to determine the exact year as there are remixes, re-releases and other folly around.
If you are content with a rough guess, then you might get a lot of files with a year if you copy the contents of TITLE to ALBUM and so treat the track as though it would be a single. Then let the websource script have a look.
You would have to treat each track individually.

I was wary about that. Indeed, as you said it may have remixes, re-releases, remasters, ...
In this particular case it would refer only to the original release. But I think there's no such way. :frowning:
This collection goes beyond 1000 tracks. It would take way too much time...

Thanks for you reply though!

The closer I got is this:

google 1st result:
+"" +"released: "

It will work for me. Even though it may have some error margin (remixes, re-releases, remasters).
It's better to correct 50 than mannually lookup for 1600.

I'll write a vbscript to do the job.

Well, I found something even better than google.
Discogs have it's own advanced search, which puts aside the odds of getting a 'wrong' release.

The script works 100%:
Uses this small utility to write the year to the tag:
(it is so bad that mp3tag doesn't provide such a simple funcionality from command line!)

' *****************************************************************************
' *  Description..: Get mp3 release year
' *  Parameters...: mp3 file: artist - title.mp3
' *  Author.......: Leandro Azevedo <>
' *  Release......: 2014/08/11
' *****************************************************************************

    Option explicit
    Dim url : url = "$1&track=$2&format=Album"
    Dim oIE, tagger, yr
    Dim fso : Set fso = CreateObject("Scripting.FileSystemObject")

    if WScript.Arguments.Count=0 then
        msgbox "Input file is missing.", 48, ""
        dim filepath : filepath = WScript.Arguments(0)
        dim filename : filename = fso.getBaseName(filepath)
        dim info : info = split(filename, " - ") ' artist - title.mp3
    end if

    Dim shell : Set shell = CreateObject("WScript.Shell")

    Set oIE = CreateObject("InternetExplorer.Application")

    url = replace(url, "$1", info(0))
    url = replace(url, "$2", info(1))

    With oIE
        .Visible = false
        Do While .Busy
            WScript.Sleep 100

    End With

    on error resume next
    yr = oIe.document.getElementsByClassName("card_release_year")(0).innerhtml '1st ocurrence
    if err.number <> 0 then
        msgbox "Information not found for " & filename , 48
    end if
    on error goto 0

    set oIE = Nothing

    tagger = "c:\id3\id3.exe -2 -y $1 /$2/"
    tagger = replace(tagger, "$1", yr)
    tagger = replace(tagger, "$2", filepath)
    tagger = replace(tagger, "/", chr(34)) tagger, 0

This script get the year of the original release (album version) based on the file name (%ARTIST% - %TITLE%.mp3). It can be tweaked to adapt the search though.

That sounds very interesting!
How do you use it? What kind of script is it?
Do you use it as a stand alone script or can you trigger it from the mp3tag right-click tools menu?

sorry for my ignorance, but i would be very usefull to me, if I could figure how to use it.
Thank You!

The VBS script wants to be invoked with parameter like ....
artist - title.mp3
The VBS script relies on the correctness of the link ...
url = "$1&track=$2&format=Album"

For example you can try ...;format=Album

The result is not very useful.
Maybe discogs has changed their html pages ...
and the VBS script needs to be updated.


Thank You Detlev!
And excuse me please, for responding so late!