# VA - get year!

**URL:** https://community.mp3tag.de/t/va-get-year/15985
**Category:** Support
**Created:** [August 10, 2014, 12:26am UTC](https://community.mp3tag.de/t/va-get-year/15985 "2014-08-10T00:26:41Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Azevedo](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/a88e57/32.png) [@Azevedo](https://community.mp3tag.de/u/Azevedo)
#### Post date: [August 10, 2014, 12:26am UTC](https://community.mp3tag.de/t/va-get-year/15985/1 "2014-08-10T00:26:41Z")

</div>

Hi!

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!

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [August 10, 2014, 6:23am UTC](https://community.mp3tag.de/t/va-get-year/15985/2 "2014-08-10T06:23:45Z")

</div>

> [@Azevedo](#):
>
> ...  
> The files are tagged with ARTIST and TITLE only.
> 
> Is it possible for mp3tag to find those songs' **YEAR** on discogs/amazon/last fm?  
> ..

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.

---

<div class="post-metadata">

### Author: ![Azevedo](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/a88e57/32.png) [@Azevedo](https://community.mp3tag.de/u/Azevedo)
#### Post date: [August 10, 2014, 8:39am UTC](https://community.mp3tag.de/t/va-get-year/15985/3 "2014-08-10T08:39:09Z")

</div>

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

Thanks for you reply though!

---

<div class="post-metadata">

### Author: ![Azevedo](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/a88e57/32.png) [@Azevedo](https://community.mp3tag.de/u/Azevedo)
#### Post date: [August 10, 2014, 9:07am UTC](https://community.mp3tag.de/t/va-get-year/15985/4 "2014-08-10T09:07:52Z")

</div>

The closer I got is this:

google **1st result** :  
 +"" +"released: " site:discogs.com

https://encrypted.google.com/search?q=+%2B%22%22+%2B%22released%3A+%22+site%3Adiscogs.com&btnG=Search

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.

---

<div class="post-metadata">

### Author: ![Azevedo](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/a88e57/32.png) [@Azevedo](https://community.mp3tag.de/u/Azevedo)
#### Post date: [August 11, 2014, 5:32pm UTC](https://community.mp3tag.de/t/va-get-year/15985/5 "2014-08-11T17:32:26Z")

</div>

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](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.

---

<div class="post-metadata">

### Author: ![tagmusing](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/ee59a6/32.png) [@tagmusing](https://community.mp3tag.de/u/tagmusing)
#### Post date: [March 11, 2015, 9:51am UTC](https://community.mp3tag.de/t/va-get-year/15985/6 "2015-03-11T09:51:38Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [March 11, 2015, 11:59am UTC](https://community.mp3tag.de/t/va-get-year/15985/7 "2015-03-11T11:59:31Z")

</div>

> [@tagmusing](#):
>
> 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 = "[http://www.discogs.com/search/?type=master&artist=$1&track=$2&format=Album](http://www.discogs.com/search/?type=master&artist=$1&track=$2&format=Album)"

For example you can try ...  
[http://www.discogs.com/search/?type=master...mp;format=Album](http://www.discogs.com/search/?type=master&artist=Alanis%20Morissette&track=You%20Oughta%20Know&format=Album)

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

DD.20150311.1400.CET

---

<div class="post-metadata">

### Author: ![tagmusing](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/ee59a6/32.png) [@tagmusing](https://community.mp3tag.de/u/tagmusing)
#### Post date: [March 23, 2015, 8:20am UTC](https://community.mp3tag.de/t/va-get-year/15985/8 "2015-03-23T08:20:25Z")

</div>

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

---

<div class="post-metadata">

### Author: ![BigEars](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/74df32/32.png) [@BigEars](https://community.mp3tag.de/u/BigEars)
#### Post date: [October 25, 2024, 10:54am UTC](https://community.mp3tag.de/t/va-get-year/15985/9 "2024-10-25T10:54:36Z")

</div>

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.

Kev

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [October 25, 2024, 12:24pm UTC](https://community.mp3tag.de/t/va-get-year/15985/10 "2024-10-25T12:24:03Z")

</div>

If I read the posts correctly with the suggestion

> [@ohrenkino](#):
>
> You would have to treat each track individually.

which was commented by the OP as

> [@Azevedo](#):
>
> It would take way too much time...

I doubt that

> [@BigEars](#):
>
> use the find song on Google and just edit the tag one by one

would be any better.

---

<div class="post-metadata">

### Author: ![BigEars](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/74df32/32.png) [@BigEars](https://community.mp3tag.de/u/BigEars)
#### Post date: [October 25, 2024, 2:06pm UTC](https://community.mp3tag.de/t/va-get-year/15985/11 "2024-10-25T14:06:20Z")

</div>

I don't think there is an easy way, I play some of them as I go through the process of 3622 tunes, so it is quite enjoyable too.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [November 24, 2024, 2:06pm UTC](https://community.mp3tag.de/t/va-get-year/15985/12 "2024-11-24T14:06:25Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
