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.
This collection goes beyond 1000 tracks. It would take way too much time...
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.
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: http://freecode.com/projects/id3
(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 <leandro.azevedo@gmail.com>
' * Release......: 2014/08/11
' *****************************************************************************
Option explicit
Dim url : url = "http://www.discogs.com/search/?type=master&artist=$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, ""
wscript.quit
else
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
Loop
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
wscript.quit
end if
on error goto 0
oIE.quit
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))
shell.run 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!
Another more simple but slower would be to use the find song on Google and just edit the tag one by one, I have mine listed by years so it's easier to spot missing ones.