Earliest Release Date v4.5.1 (2018-08-15)
-
- Posts: 4
- Joined: Mon Jun 16, 2014 9:03 am
- Location: Exeter, UK - "In The Mix!!"
Re: Earliest Release Date v4.1.0 (2014-02-09)
Hi,
I've only joined the forum to say a big thanks for this script - it's saved me a lot of hard work after migrating my entire library from iTunes.
As you can see from the image below, I have a substantial collection
I've made a couple of very minor modifications to the code purely to suit my personal library.
The first being that I have some tracks in the format (12") <title> - including brackets, as the unmodified script searches for <space>12 <title> etc, I added code to strip the leading space and number 12 from the search string before the script submits the query.
I use another software package for creating mixes etc and it's unable to get the release date from MM, so another modification I have made is to also write the release date to the comments tag as I don't use this for any other purpose.
I've only joined the forum to say a big thanks for this script - it's saved me a lot of hard work after migrating my entire library from iTunes.
As you can see from the image below, I have a substantial collection
I've made a couple of very minor modifications to the code purely to suit my personal library.
The first being that I have some tracks in the format (12") <title> - including brackets, as the unmodified script searches for <space>12 <title> etc, I added code to strip the leading space and number 12 from the search string before the script submits the query.
I use another software package for creating mixes etc and it's unable to get the release date from MM, so another modification I have made is to also write the release date to the comments tag as I don't use this for any other purpose.
Last edited by Exeter Music Man on Sat Jun 21, 2014 6:59 am, edited 1 time in total.
Re: Earliest Release Date v4.1.0 (2014-02-09)
Glad the script has helped you out.
If you are willing to share the changes you have made I can see about incorporating the change in a future release.
If you are willing to share the changes you have made I can see about incorporating the change in a future release.
-
- Posts: 4
- Joined: Mon Jun 16, 2014 9:03 am
- Location: Exeter, UK - "In The Mix!!"
Re: Earliest Release Date v4.1.0 (2014-02-09)
Hi, just in case you've already seen my code mods and wonder why I've deleted them, it's because I've been tinkering around and tidied the mods up quite considerably, so here's my re-modified code:
First off, my code for dealing with titles such as: (12") Blue Monday where we need to remove the leading (12")<space> string before submitting the search query - this requires changes in two Subs: SearchText and SearchButton and the Function CleanSearchString
In SearchText() I changed line 317 which from
to
The second sub that requires changing is SearchButton(oPnl) changes are as follows:
Lines 1173 & 1174 were changed from
To this
For no other reason than to reduce calls to the CleanSearchString function I modified the Select Case block accordingly to this:
The changes to the CleanSearchString function was quite dramatic so I've posted the whole function below:
One change you may notice in the CleanSearchString function is that I removed line 1547 completely.
I did this as the search would fail on a track such as H.O.L.L.A.N.D by The Bluebells (B side of I'm Falling), which would be queried as H O L L A N D
Changing the code to replace a period with a null value, this would then be queried as HOLLAND and the search completes successfully, so far I've had no trouble where an artist or title field has a period in them such D.J. - Feat. - R.E.M etc
---------
Here are my mods for writing the original date to the comments tag, this also leaves the original date field and comments tag blank instead of writing 9999 when no results are found. PLEASE NOTE as I only use the year in my date fields I made no changes to the day or month code, although I see no reason why the changes couldn't be expanded to include those fields.
All the changes are made in the sub, ProcessAlbum.
Each of the four lines 1137, 1141, 1147 & 1151 were changed from
to this
The following was added at line 1162 between the "End If" and "Next" statements
Another point of interest, I'm not sure whether my mods are the cause but when processing a huge batch of tracks I very occasionally got an error which halted the script but without any information as to what caused the error. I've very crudely got around it by adding "On Error Resume Next" on line 76, so far with no obvious negative effects
First off, my code for dealing with titles such as: (12") Blue Monday where we need to remove the leading (12")<space> string before submitting the search query - this requires changes in two Subs: SearchText and SearchButton and the Function CleanSearchString
In SearchText() I changed line 317 which from
Code: Select all
sTrack = oSongData.title
Code: Select all
sTrack = CleanSearchString(oSongData.title)
The second sub that requires changing is SearchButton(oPnl) changes are as follows:
Lines 1173 & 1174 were changed from
Code: Select all
sArt = oSongData.ArtistName
sTrack = oSongData.Title
Code: Select all
sArt = CleanSearchString(oSongData.ArtistName)
sTrack = CleanSearchString(oSongData.Title)
Code: Select all
Select Case engine
Case 1
url = "www.allmusic.com/search/all/" & URLEncodeUTF8(arttrack)
Case 2
url = "http://www.discogs.com/search?artist=" & URLEncodeUTF8(sArt) & "&track=" & URLEncodeUTF8(sTrack)
Case 3
url = "http://www.google.com/search?as_q=" & URLEncodeUTF8(arttrack)' & "&as_eq=lyrics"
Case 4
url = "http://www.last.fm/search?q=" & URLEncodeUTF8(arttrack)
Case 5
url = "http://www.musicbrainz.org/search?query=" & Chr(34) & URLEncodeUTF8(sTrack) & Chr(34) & "+AND+artist:" & Chr(34) & URLEncodeUTF8(sArt) & Chr(34) & "&type=recording"
Case 6
url = "http://www.45cat.com/45_search.php?sq=" & URLEncodeUTF8(arttrack)
Case Else
url = "http://www.discogs.com/search?q=" & URLEncodeUTF8(discogs)
End Select
The changes to the CleanSearchString function was quite dramatic so I've posted the whole function below:
Code: Select all
Function CleanSearchString(Text)
Dim sTrLen, sTrText
sTrText = Text
sTrText = Replace(sTrText,")", " ") 'remove parenthesis to avoid search errors (discogs bug)
sTrText = Replace(sTrText,"(", " ") 'also clean other unnecessary characters
sTrText = Replace(sTrText,"[", " ")
sTrText = Replace(sTrText,"]", " ")
sTrText = Replace(sTrText,"@", " ")
sTrText = Replace(sTrText,"_", " ")
sTrText = Replace(sTrText,"?", " ")
sTrText = Replace(sTrText,"-", " ")
sTrText = Replace(sTrText,",", "")
sTrText = Replace(sTrText,chr(34), "")
sTrText = Replace(sTrText,"`", "'") 'added by wxdude, fix accent grave --> apostrophe
sTrText = Replace(sTrText,"\B4", "'") 'added by wxdude. fix acute accent --> apostrophe
sTrText = Replace(sTrText," ", " ") 'added by wxdude. set double spaces to single
If left(sTrText,3) = " 12" Then
sTrLen = Len(sTrText) -4
CleanSearchString = Right(sTrText, sTrLen)
Exit Function
End If
CleanSearchString = sTrText
End Function
Code: Select all
CleanSearchString = Replace(CleanSearchString,".", " ")
Changing the code to replace a period with a null value, this would then be queried as HOLLAND and the search completes successfully, so far I've had no trouble where an artist or title field has a period in them such D.J. - Feat. - R.E.M etc
---------
Here are my mods for writing the original date to the comments tag, this also leaves the original date field and comments tag blank instead of writing 9999 when no results are found. PLEASE NOTE as I only use the year in my date fields I made no changes to the day or month code, although I see no reason why the changes couldn't be expanded to include those fields.
All the changes are made in the sub, ProcessAlbum.
Each of the four lines 1137, 1141, 1147 & 1151 were changed from
Code: Select all
oSongList.item(i-1).year = newyear
Code: Select all
If newyear <> 9999 Then oSongList.item(i-1).year = newyear
Code: Select all
If newyear <> 9999 Then oSongList.item(i-1).Comment = "Year of release: " & newyear
If oSongList.item(i-1).Comment <> "Year of release: " & newyear And oSongList.item(i-1).Comment <> "" Then oSongList.item(i-1).Comment = ""
Another point of interest, I'm not sure whether my mods are the cause but when processing a huge batch of tracks I very occasionally got an error which halted the script but without any information as to what caused the error. I've very crudely got around it by adding "On Error Resume Next" on line 76, so far with no obvious negative effects
Re: Earliest Release Date v4.1.0 (2014-02-09)
Is youa plugin support Updates from MMW extensions?
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts
Re: Earliest Release Date v4.1.0 (2014-02-09)
Peke wrote:Is youa plugin support Updates from MMW extensions?
Yes it does.
-
- Posts: 4
- Joined: Mon Jun 16, 2014 9:03 am
- Location: Exeter, UK - "In The Mix!!"
Re: Earliest Release Date v4.1.0 (2014-02-09)
Been tinkering, and realised this bit isn't really required.
[This change NOT required]
Each of the four lines 1137, 1141, 1147 & 1151
I had originally set the script to write 9999 in the field, but upon using my brain (first time for everything ) I realised that if I turned it off in the options it would have exactly the same effect as my code change.
I think I've figured out what's causing my "unknown" error, it appears to be the pause routine that starts at line 572 not being quite long enough, increasing the value from 600 to 800 appears to have cured my issue. I left the script running overnight with 18,000 items in the search list and it completed successfully
[This change NOT required]
Each of the four lines 1137, 1141, 1147 & 1151
I had originally set the script to write 9999 in the field, but upon using my brain (first time for everything ) I realised that if I turned it off in the options it would have exactly the same effect as my code change.
I think I've figured out what's causing my "unknown" error, it appears to be the pause routine that starts at line 572 not being quite long enough, increasing the value from 600 to 800 appears to have cured my issue. I left the script running overnight with 18,000 items in the search list and it completed successfully
Code: Select all
While (XML.readyState < 4) And (t < 800)
Re: Earliest Release Date v4.2.0 (2014-07-16)
Latest version 4.2 available for download. See first post for download link or use Tools --> Extensions-->Find Updates.
If you are upgrading from a previous version you may need to restart MM.
Changes include;
- Add option to exclude bracketed text in search
- Add checks for valid JSON, this included a fix to a logic error and increase in wait time for API responses
- Cleaned up the UI a bit more. Buttons/Checkboxes now hidden instead of disabled if not applicable
- Force users to Musicbrainz on August 15th, 2014 due to Discogs requirement for oAuth for the database/search endpoint after that date
According to Discogs from August 15, 2014 and beyond, all users of the database/search endpoints in the API are required to be authorized using oAuth. This script relies exclusively on that endpoint for Discogs searches. There is no easy way to accomplish this on a per user basis using vbscript. If there is anyone, way smarter then me, that knows how this can be done let me know, otherwise development of the script will be for MusicBrainz searches only.
If you are upgrading from a previous version you may need to restart MM.
Changes include;
- Add option to exclude bracketed text in search
- Add checks for valid JSON, this included a fix to a logic error and increase in wait time for API responses
- Cleaned up the UI a bit more. Buttons/Checkboxes now hidden instead of disabled if not applicable
- Force users to Musicbrainz on August 15th, 2014 due to Discogs requirement for oAuth for the database/search endpoint after that date
According to Discogs from August 15, 2014 and beyond, all users of the database/search endpoints in the API are required to be authorized using oAuth. This script relies exclusively on that endpoint for Discogs searches. There is no easy way to accomplish this on a per user basis using vbscript. If there is anyone, way smarter then me, that knows how this can be done let me know, otherwise development of the script will be for MusicBrainz searches only.
Re: Earliest Release Date v4.2.0 (2014-07-16)
best laid plans go awry.
MMIP uploaded to website is malformed . Will re-upload version 4.2 tomorrow.
MMIP uploaded to website is malformed . Will re-upload version 4.2 tomorrow.
Re: Earliest Release Date v4.2.0 (2014-07-17)
Sorry for the mess up. Re-loaded the installation package up on the web and now appears to be working. Updated the version number so that those who tried updating by Tool --> Extensions-->Find Updates and thought the script was updated, can now get a valid package.
http://www3.telus.net/sowiakj/EarliestD ... 0.191.mmip
http://www3.telus.net/sowiakj/EarliestD ... 0.191.mmip
Re: Earliest Release Date v4.2.0 (2014-07-17)
I can't get this to install properly. Any tips or tricks?
I install/restart it like page instructions say. Then, check to see if it shows up under "View" or "Options".
I'm not getting anything anywhere. Selecting and playing songs doesn't show anything.
When I look at the files there are 3; an app icon, uninstall.vbs, uninstall.ini. (is this correct?).
I'm using MM.1707 portable. It installs it to Portable > Extensions > EarliestDate > files.
I've fooled around with lots of different combinations:
inside/outside of portable folder, in auto scripts folder, files outside/inside the EarliestDate folder, etc..
Any ideas?
I install/restart it like page instructions say. Then, check to see if it shows up under "View" or "Options".
I'm not getting anything anywhere. Selecting and playing songs doesn't show anything.
When I look at the files there are 3; an app icon, uninstall.vbs, uninstall.ini. (is this correct?).
I'm using MM.1707 portable. It installs it to Portable > Extensions > EarliestDate > files.
I've fooled around with lots of different combinations:
inside/outside of portable folder, in auto scripts folder, files outside/inside the EarliestDate folder, etc..
Any ideas?
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
|| software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
"The absurd is the essential concept and the first truth"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
|| software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
"The absurd is the essential concept and the first truth"
Re: Earliest Release Date v4.2.0 (2014-07-17)
There is one file missing. The most important one "EarliestDate.vbs", and it should be located at "pathtoportable\MediaMonkey\Scripts\Auto\EarliestDate.vbs".MMFrLife wrote: When I look at the files there are 3; an app icon, uninstall.vbs, uninstall.ini. (is this correct?).
I'm using MM.1707 portable. It installs it to Portable > Extensions > EarliestDate > files.
You can open the mmip file using a program like 7-zip and manually extract the file to the correct location, then restart MM to get it to work.
I am not sure if it is an error in the "installation.ini" file but I'll try and figure it out. I am using the "lsf" constant as per the wiki to specify the scripts folder to use. This should put the "EarliestDate.vbs" file in the right place for portable installs but it doesn't seem to.
Re: Earliest Release Date v4.2.0 (2014-07-17)
Ok, that makes a lot more sense. I thought it fishy that the script file was missing.
I extracted it from archive and put it in auto and restarted MM and it showed up under View and Libray > options,
but I can't get it to show anything when I select or play song.
Where is the icon file suppossed to be (moved it to auto) and does it matter if I even have the other files, if so, what location?
I'm trying to write the release dates into a custom field in format: 1978 10 28.
It doesn't have to be able to fill to a custom field if I could just look at something for selection > choose > put into other field like original date and then
I could batch swap with RegExp Find & Rep or something. But I really would like to find that selection panel. ......pop up?
What am I doing wrong?
I extracted it from archive and put it in auto and restarted MM and it showed up under View and Libray > options,
but I can't get it to show anything when I select or play song.
Where is the icon file suppossed to be (moved it to auto) and does it matter if I even have the other files, if so, what location?
I'm trying to write the release dates into a custom field in format: 1978 10 28.
It doesn't have to be able to fill to a custom field if I could just look at something for selection > choose > put into other field like original date and then
I could batch swap with RegExp Find & Rep or something. But I really would like to find that selection panel. ......pop up?
What am I doing wrong?
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
|| software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
"The absurd is the essential concept and the first truth"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
|| software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
"The absurd is the essential concept and the first truth"
Re: Earliest Release Date v4.2.0 (2014-07-17)
I pretty sure you are not doing anything wrong...the script should install a dockable panel that will show results for you. If you do not see an "Earliest Date" panel, go to the View tab and ensure that "Earliest Date" is checked, the panel should appear docked to the top right of MM. Un-dock the panel and expand if necessary to see the panel in full.MMFrLife wrote:What am I doing wrong?
The icon is not used for much yet, I have plans for it though.
Re: Earliest Release Date v4.2.0 (2014-07-17)
Well, I don't get it. It shows up checked and in options. I even deleted the files and tried again manually.
It's checked by default but no panel. I'll just wait 'til I upgrade MM or you have an upgrade and see if it just needs a fresh start
in my environment.
Thanks for your help!
It's checked by default but no panel. I'll just wait 'til I upgrade MM or you have an upgrade and see if it just needs a fresh start
in my environment.
Thanks for your help!
Last edited by MMFrLife on Wed Jul 30, 2014 10:07 am, edited 2 times in total.
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
|| software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
"The absurd is the essential concept and the first truth"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
|| software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
"The absurd is the essential concept and the first truth"
Re: Earliest Release Date v4.2.0 (2014-07-17)
Ok, I just clicked on a song and noticed a progress bar in bottom right corner saying something like "Searching Discog for Earliest Date".
So it seems to be there working except the results/selection panel is not visible.
So it seems to be there working except the results/selection panel is not visible.
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
|| software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
"The absurd is the essential concept and the first truth"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
Please take a moment to read the bottom of the linked page to support the one and only - ZvezdanD! (the "originator" since 2006).
MMW 4.1.31.1919; 5.0.4.2690 || back it up...frequently!
|| software for power users: "Q-Dir" (free alt. to explorer) and file/folder renamer: "ReNamer" (den4b)
"The absurd is the essential concept and the first truth"