Page 1 of 11

Earliest Release Date v4.5.1 (2018-08-15)

Posted: Tue Jul 03, 2012 5:35 pm
by wxdude
Description:

This script is an update from the original earliest release date from discogs script written by yhsiugs. With his permission I have updated the script and started a new thread. Would like to thank Hagar and Cotto for their comments and testing in version 2.0, and to others for suggestions for the current version....
Would also like to thank crap_inhuman for his input into the PHP server side code

Download:

http://earliestrelease.com/ERDVersions/ ... 1.236.mmip

What's New:

Version 4.5.1.236 - August 15, 2018
  • fix bug that could result in the script waiting for a very long time if user switched from MB to Discogs, and no way to end the script
  • fix long standing bug where if a user made a new selection while the script was running, the dates would be added/changed on the new selection incorrectly
  • API throttling was too aggressive resulting in long waits
  • Fixed an error if Discogs returned an invalid master release
Version 4.5.0.235 - August 13, 2018
  • Add support for DiscogsAuth
  • Add support for debug logging
  • Use response headers for rate limiting
  • Other minor bug fixes
Version 4.4.0.206 - February 19, 2016
  • Add option to clear Discogs Keys on main UI
  • Add option to switch API service on Main Page
    -switch searches changed API on previously selected/playing song
    -options greyed out when both services have been checked
  • Minor UI Changes - don't hide choices just disabled
  • Change rate limit for Discogs to 3/s
  • Use only first artist if multi-artist
  • Change Discogs API calls to HTTPS
Version 4.3.2.195 - August 14, 2014
- Changed Discogs Oauth date requirement to October 14, 2014
- Fix object required if oAuth process cancelled by user choice
- Fixed error in install.ini file

Version 4.3.1.194 - August 13, 2014
- removed from memory - built from wrong source

Version 4.3.0.193 - August 8, 2014
- Add support for oAuth and the search endpoint for Discogs
- Add checks for artist and track tags
- Changed installation directory constant to {gsf} to work around MM {lsf} bug and portable mode
- Moved location of MMIP file to a server that supports PHP

Version 4.2.0.191 - July 17, 2014
- 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 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

Version 4.1.0.185 - February 9, 2014
- Fix bug where web searches would fail if main panel in MM was not a music node (eg. web node)
- Updated option page

Version 4.0.1.184

- Fix bug due to malformed API calls with double quote in search string

Version 4.0.0.183 - January 13, 2014
- Uses JSON endpoints for all Discogs API calls
* Special thanks to eepman for supplying the working JSON parser for vbscript. His work based on http://demon.tw/my-work/vbs-json.html#code
- Fixed lookup fail for artists with trailing ", The"
- Add web search option for 45cat.com as per fizzjob
- Add options to apply the earliest date found album name to Original Title, or if one desires Album
- Cleaned up the UI and code some more....


Usage
  • Back-up your database!
  • Install Earliest Release Date
  • Play A Song or Select Song(s) using MM
  • Script will present a list of release dates for the currently playing song (user selectable up to 50)
  • If panel is not visible after install click on View, then Earliest Date
Options:
Tools-->Options-->Library-->Earliest Date

- Search Earliest Date Using:
Self Explanatory. Can select either MusicBrainz or Discogs. Default on install is MusicBrainz.

- Maximum number of discogs masters to search
User selectable from 1 - 100 only if Discogs search enabled. Default on install is 15. The initial Discogs search searches for Master releases. For each master release the script will make another call to the API to search for the earliest date in the releases for that master. Each call to Discogs takes 1 second.

- Exclude Bracketed Text
Removes the brackets and any text in between to perform the seach for the earliest release date. Helps to find dates for those songs tag with (Live) (12") (Feat...) etc.
Regular parenthesis, square brackets, and curly braces are removed.

- Use 'Date' Field
Self explanatory. Script will update the "Date" Field instead of the "Original Date" field with the earliest date found from Discogs. (Default is OFF for 'Original Date')

- Include the Release Month/Day (if available)
If the month and/or day of the release is available from Discogs the script will display those values and use them for updates to the database. If this option is selected then a release date with a day and or month of release is more significant than one without. For example a release date of Dec 31, 2011 has priority over Dec 2011 and this has priority over a release date of 2011. (Default is ON)

- Search Discogs only if preferred date field is empty
Self Explanatory. Discogs search will only occur if the date field one chooses to use is empty. If this option is selected users can force a search by clicking on the results dialog that is presented in the panel. (Default is OFF)

- Search by selected song(s)
Allows user to search by selected songs in the main window. By turning this option on Automatic DB updates will be forced on too. (Default is OFF)

- Automatically update DB with earliest date found
If checked the database (and tags if the option is set) are updated automatically without user intervention. The script will pick the earliest date available for you. Automatic updates are forced if searching by selected songs.

- Automatically update only if preferred date found is earlier
If selected will only update DB if the preferred date found is earlier than any existing value. (Default is OFF)

- Use specified value for the preferred date if no results found
Allows user to select a value between 1000 and 9999 to use as a year if a search for the earliest date finds no results. Can be because there are no dates for that song, tags are incorrect, or internet connection is down. Default is OFF and "9999".

- Result Display Settings
Controls how the results are shown. Because the dates found are now automatically sorted from earliest to latest the number of radio buttons displayed can be kept to a minimum. User is allowed to select between 1 and 50 results displayed. Default is 5.
User is also allowed to choose what information is displayed. Default is Artist - Album - Song along with earliest date. Artist, Album and Song can be turned off if so desired. Minimum test displayed is the Earliest Date.

Re: Earliest Release Date from Discogs v2.0

Posted: Wed Jul 04, 2012 7:26 am
by Vyper
Looks good!

This is going to be a REALLY dumb question but why does the song have to be playing and not just selected? It wouldn't be possible to do this if it weren't?

If it's a long or really technical answer, don't bother, I'll take your word for it. :lol:

Re: Earliest Release Date from Discogs v2.0

Posted: Wed Jul 04, 2012 8:54 am
by wxdude
Only real reason is that is how the original script worked.

Should be able to search on selected song as well. Will look at adding that to the next version.

Re: Earliest Release Date from Discogs v2.0

Posted: Wed Jul 04, 2012 2:14 pm
by Vyper
That would be way cool. :D

Re: Earliest Release Date from Discogs v2.0

Posted: Thu Jul 05, 2012 1:56 am
by richiefinger
I have just used the new version and left it running over night and no cint overflow messages. Excellent.

Excellent work. Thanks so much for taking this script on and improving it.

Would it be possible to add something to the chosen field if nothing is found. I use 9999 in my original date field if I have searched but found nothing?

Would it be very hard to use alternative sites to discogs to find earliest date ?

Re: Earliest Release Date from Discogs v2.0

Posted: Thu Jul 05, 2012 12:35 pm
by wxdude
richiefinger wrote:Would it be possible to add something to the chosen field if nothing is found. I use 9999 in my original date field if I have searched but found nothing?
Should be able to add an option to do that for you.
richiefinger wrote:Would it be very hard to use alternative sites to discogs to find earliest date ?
Looking at using the MusicBrainz API as well. Either as an option or as a new script based on this one.

Re: Earliest Release Date from Discogs v2.0

Posted: Thu Jul 12, 2012 2:21 am
by richiefinger
OK Thanks. Much appreciated, I hope what I've asked for is something that will appeal to more than just myself.

I've been playing with the script using "previews" of tracks. I noticed this was mentioned in the previous thread but I thought I would update what I have found here.

I have tried using various length previews. 5,10 and 15 seconds. 15 seconds is normally enough length of time for the script to complete it's search and enter data for the tracks that I've been using.
I have had the following results:
When the script finds no date for the playing preview, it plays to the end of the preview and moves on to the next preview in the list. NO PROBLEMS.
When the script finds a date, It enters the data OK but then does 1 of 2 things:
1. It enters the data and then stops. It does not go the next track on the list. OR
2. It starts to play the preview at a super slowed down speed, effectively stopping. If you forward to the next track it will start to work OK again until it enters a new date.
Sometimes an error appears "Y script out of range"

I'm not fussed about using previews. I'm just using them to calculate the dates automatically whilst I'm not at the PC and at a quicker speed than playing in real time.

Would it be possible to have an "auto" mode where the track skips to the next track when data is found/not found? I don't know if that is even possible?

Re: Earliest Release Date from Discogs v2.0

Posted: Sat Jul 21, 2012 11:27 am
by Blutarsky
Wonderful script mate have been waiting for a while to get such a script.

How do you apply the new date? I get a checkbox list, however I can't "apply" the change..... thanks

Re: Earliest Release Date from Discogs v2.0

Posted: Sat Jul 21, 2012 11:35 am
by Blutarsky
Ok I wasn't using the date field in place of the original date! Perfect!!!!

A few suggestions:
- you could offer a maximum number of results
- would it be possible to query at once multiple tracks?

Re: Earliest Release Date from Discogs v2.0

Posted: Sat Jul 21, 2012 11:39 am
by Blutarsky
- add an option to halt discogs querying? Maybe you could halt on user selection; this would need parsing user input between each result....

Re: Earliest Release Date from Discogs v2.0

Posted: Sat Jul 21, 2012 2:17 pm
by wxdude
Blutarsky wrote: A few suggestions:
1 - you could offer a maximum number of results
2 - would it be possible to query at once multiple tracks?
First off glad you like the script, as for your suggestions...

1. Yes and no. The maximum number of results I can return is 20. This is a function of the XML endpoints used in Discogs. On my to-do list is to actually query to the maximum number of 20 and present the 10 earliest dates found. To get the maximum number of results I would need to re-write the script to use the JSON endpoints. I don't know much about JSON parsing, and JScript in general. This one is on my to learn list.

2. It is possible to do multiple queries, but you would overwhelm the API and would most likely result in Discogs blocking your IP for some period of time. Would also have to modify the script to search on selection rather then the currently playing song. Searching by selection is on my to-do list.

The way the script works is it searches for all releases of a Song by Artist. With those results it then searches each release for a date, and then determines the earliest date found. The current script accesses the API at least once (no results) to a maximum of 11 times. With some artists having songs on literally hundreds of releases, to present the maximum number would quickly surpass the stated API request limit of 1 per second (60 per minute). The same principle applies for multiple queries.

The current Discogs API has limited search options which is why it has to be done this way. Would be nice if one could sort the results by release date but this has not been implemented in the Discogs API (yet).
Blutarsky wrote:- add an option to halt discogs querying? Maybe you could halt on user selection; this would need parsing user input between each result....
You can halt Discogs querying by closing the Earliest Date panel. To reopen the panel go to View --> Earliest Date, and the script will start to run on the currently playing song, or at least the last song played. I could add an option button in the panel to pause/start, which I'll add to the to-do list also.

Re: Earliest Release Date from Discogs v2.0

Posted: Sat Jul 21, 2012 3:09 pm
by Blutarsky
Thanks again.

For example on an 8 results list, you may accept the thirs result, no need to wait the tenth. Clicking on the third result, should apply the new date and halt query. Faster :D

Re: Earliest Release Date from Discogs v2.0

Posted: Sat Jul 21, 2012 3:55 pm
by Blutarsky
Do you plan any Muscibrainz querying?

Re: Earliest Release Date from Discogs v2.0

Posted: Sat Jul 21, 2012 4:41 pm
by wxdude
Blutarsky wrote:Do you plan any Muscibrainz querying?
The MusicBrainz API appears to have more search option and sorting options and it is on list. Not sure yet whether it will be an option or new script....

Re: Earliest Release Date from Discogs v2.0

Posted: Sat Jul 21, 2012 4:44 pm
by Blutarsky
MusicBrainz has a far superior accuracy in earliest date.