I've been playing with the Discogs plugin Update From functionality, but have found it not very functional. It appears to search on the field Catalog No, however this value is not unique on Discogs. Many releases have the same Catalog No, so it retrieves incorrect results.
It would seem that the plugin accuracy could be greatly improved if it used the "release_id" field on Discogs instead, as that is unique and guaranteed to return the correct information.
For context, I've exported my Discogs Collection via CSV, which is somewhat lacking in details. I've Imported it into CDPedia, and would like to now go sync all my entries back with Discogs to pull the remaining information that Discogs doesn't export. I always have the "release_id" from Discogs.
Or could you provide the source code for your Discogs plugin, and I could make a modified version? I've played with the sample.plugin, but implementing the Discogs calls, without an example set of calls to start with, is a bit beyond my abilities. But editing the existing one should be fairly straightforward.
Thanks,
Cory
Discogs Plugin search criteria
-
- Inductee
- Posts: 1
- Joined: Sat Sep 22, 2018 7:11 pm
Re: Discogs Plugin search criteria
I have a complicated setup for the plugins, so that I can build them and update them quickly. Here I have pulled out the Discogs files and added them to the sample project so that you can build the plugin. I have to come up with a GitHub repo that is open and everybody could improve on the plugins.
Right at the top you will find a "CONSUMER_KEY" and "CONSUMER_SECRET" that you will have to fill out from logging into Discogs with your user id and visiting the developer section for the API. You can put that you will be using it for CDpedia. With that info the plugin will do all the necessary calls to the authentication and get save all the internal keys in needs.
With the current plugin you can drag and drop the URL from Safari over to the dock icon of CDpedia and it will get the exact release or master based on the ID in the URL. You can look for this method in the plugin called "detailsForPath" and take the ideas from it. It assumes the code is correct and simply creates the API URL that will produce results and assumes the release number exists and returns the info.
Actually with the current plugin without change, if you make sure to import a URL that has "/release/00001", you can then use the "Album -> Update from ->DiscoGS" command and it will get the exact version. As the "searchFor:sender:" method first looks for that unique ID in the URL. This how all the plugins work, they store the original source of info the URL and retrieve it from there, instead of having a special field. You would just have to massage the CSV export to make the release_id into a Discos URL.
Right at the top you will find a "CONSUMER_KEY" and "CONSUMER_SECRET" that you will have to fill out from logging into Discogs with your user id and visiting the developer section for the API. You can put that you will be using it for CDpedia. With that info the plugin will do all the necessary calls to the authentication and get save all the internal keys in needs.
With the current plugin you can drag and drop the URL from Safari over to the dock icon of CDpedia and it will get the exact release or master based on the ID in the URL. You can look for this method in the plugin called "detailsForPath" and take the ideas from it. It assumes the code is correct and simply creates the API URL that will produce results and assumes the release number exists and returns the info.
Actually with the current plugin without change, if you make sure to import a URL that has "/release/00001", you can then use the "Album -> Update from ->DiscoGS" command and it will get the exact version. As the "searchFor:sender:" method first looks for that unique ID in the URL. This how all the plugins work, they store the original source of info the URL and retrieve it from there, instead of having a special field. You would just have to massage the CSV export to make the release_id into a Discos URL.
Re: Discogs Plugin search criteria
Just realized I forgot to change the install app from DVDpedia to CDpedia in the sample. Do visit the project setting for "build phases" and the last one a custom script "Quit Copy Launch", change the first line from "PROGRAM="DVDpedia" to PROGRAM="CDpedia". You can then set the executable in the schema debug to your CDpedia as well and you can use the "Build & Run" directly from Xcode to test.