Jump to content
smirky

Discogs.com Explorer

Recommended Posts

Discogs.com Explorer - v1.13
An Alfred 2 workflow for exploring the Discogs.com database, with family-friendly drill downs.

 
I highly recommend downloading this from Packal as they provide an updating feature for future versions of the workflow.
 

Github Repo or Direct Download
 

 

Features:

  • A drill-down style workflow to allow exploring the Discogs.com release database. The workflow is triggered by the keyword "dex" or via hotkey.
  • Upon actioning, the workflow defaults to checking if iTunes is currently playing and will look up info for the current track at Discogs.
  • Typing in the Alfred window triggers searching for the entered query.
  • Anything found in the Discogs API search begins populating in the Alfred window.
  • Depending on the results rows will provide static text, a direct link to the relevant Discogs url, or further drill-down ("Explore") options.
  • Note: This workflow requires you to have a Discogs log in already set up. This is entirely due to their new API requirement for OAuth verification. Trust me, I hate requirements like this as much as you do.
  • Upon starting this workflow you will be walked through the relatively painless OAuth process. After that it should never ask you again. The keyword "|dexauth" opens up the Authentication Set-up window where you can do a few things like start the OAuth process over in case something went weird on you.

Screenshots:

Default.png?raw=true

Artist.png?raw=trueRelease.png?raw=trueReleases.png?raw=true

Limitations and Such:

  • Because of the way Discogs categorizes 'releases' there is a little inconsistency across all of the data. I've tried to smooth this out as best I can.
  • Essentially, this workflow provides the same search ability as the main Discogs site. This means we still have to deal with how they handle artists with similar names (i.e., adding (2), (3), etc. to them). There's nothing I can do about that, and yeah I think it's annoying too.
  • I purposely left out the loading of Discogs images because it dramatically slowed down the workflow to the point of not being useable.
  • The Discogs API is still having server-side issues so you may run into trouble with this extension here and there. I am working on getting the little bugs out but wanted to post this update ASAP since OAuth totally broke the previous version.
Edited by smirky

Share this post


Link to post

Great workflow! No good deed goes unpunished, so let me make a polite request for a workflow with this functionality for the indispensable All Music Guide (allmusic.com). The profile lookup feature would be great on this site too. Thanks mate!

Share this post


Link to post

Great workflow! No good deed goes unpunished, so let me make a polite request for a workflow with this functionality for the indispensable All Music Guide (allmusic.com). The profile lookup feature would be great on this site too. Thanks mate!

 

Ha, thanks! :-)

 

This might be a little complicated as it looks like AMG gets all of it's data from a third-party called Rovi:

 

 "Rovi provides AllMusic with written content like reviews and biographies, tagged metadata like Genres, Styles, Moods, Themes and Similar Artists, as well as information about credits, album covers, sound clips, music videos and a ton of other good stuff." 

 

That isn't to say that it's not possible, but since I'm not at all familiar with how AMG's site works these days it could take a while to restructure the Discogs Explorer to match a different API. I'll try to spend some time giving it a look and see if I can come up with something.

Share this post


Link to post

First of all THANKS for the great extension :)
Now the question or request... Is there any way to copy the content of the query on selection.

I find it very useful to query for albums/eps on discogs, and then get the comma separated styles list of the album. If I could just copy the value from within Alfred would be awesome!

Thanks!

Share this post


Link to post

First of all THANKS for the great extension :)

Now the question or request... Is there any way to copy the content of the query on selection.

I find it very useful to query for albums/eps on discogs, and then get the comma separated styles list of the album. If I could just copy the value from within Alfred would be awesome!

Thanks!

 

You're very welcome, I'm glad to know this is helpful for others besides myself!

 

Although I'm not at my Mac right now, I see no reason that I couldn't have the selected item sent to the clipboard. I'll look into it over the weekend and push an update through.

 

Out of curiosity, what do you like to do with the comma separated styles after you copy them? Do you pull up Discogs pages with each style? Insert them to an iTunes info window? Depending on what it is, it might be worthwhile for me to build that into the extension as well... :-)

Share this post


Link to post

I updated this extension to allow for copying many of the list results to the clipboard. It's saved on Packal, here.

 

The Packal repository is great because it allows for automatic update tracking if you use the its updater workflow.

 

Let me know if you run into any issues with this update. Thanks!!

Share this post


Link to post

Just wanted to bump this post to let any other users know that this workflow should function following the newest update. Discogs changed their API to require OAuth so now I too have learned how much I hate OAuth. You can get the updated version from Packal or the other links at the top of the thread.

FWIW, the Discogs API is still having server-side issues so you will likely run into trouble with this workflow here and there. I'm working on getting the little bugs worked out but wanted to post this update ASAP since OAuth totally broke the previous version. Also, it feels like the API responses are coming back slower which makes this workflow feel less snappy. I apologize for that, although I don't yet know what I can fix on my end.

Finally, it's possible others can use this workflow as another option to see how OAuth can be set up in Alfred. Don't ask why I might have done anything in particular; I barely know what I'm doing and pretty much just learned all this this weekend. I will be happy to help if anyone has questions.

Edited by smirky

Share this post


Link to post

Please help! It won't work. I'm typing "|dexauth" but authorization menu don't appear.

 

Ok, I have a few ideas, but can you provide me with any more information on your end of things? What OS are you running, is this your first time installing the workflow, did you download direct from Packal or Github? `

 

Immediately after installing this workflow, if you only enter the symbol "|" you should see the image below. Does that not happen for you?

Ujzjm0F.png

 

I also just realized that Yosemite is throwing the following window up during the installation, which it hadn't done before. Do you get this window below?

eMS8ZYd.png

Share this post


Link to post

Thanks for answer. OS X 10.8.5, Alfred v2.6 (374). Workflow downloaded from Packal. When i enter the symbol "|", i see that image:

1QJNNtS.png

well, i press Enter and nothing happens.

q_json.helper window not appear.

Edited by Savely

Share this post


Link to post

Thanks for answer. OS X 10.8.5, Alfred v2.6 (374). Workflow downloaded from Packal. When i enter the symbol "|", i see that image:

1QJNNtS.png

well, i press Enter and nothing happens.

q_json.helper window not appear.

 

Thanks for this info! When you hit 'enter' after the above window pops up, does the Alfred window go away or does the window just sit there?

 

Are you familiar with the Alfred workflow debugging tool? Would you be able to tell me what displays in that window after you hit 'enter' from the above window? I've been able to successfully install fresh versions of this workflow on Yosemite and 10.7 machines today. My first guess is that there's something odd going on with my use of an Applescript command for opening the Discogs URL vs. 10.8 wanting to follow the command.

 

If true, I'm sure I can fix it pretty easily.

Share this post


Link to post

Thanks for this info! When you hit 'enter' after the above window pops up, does the Alfred window go away or does the window just sit there?

 

Are you familiar with the Alfred workflow debugging tool? Would you be able to tell me what displays in that window after you hit 'enter' from the above window? I've been able to successfully install fresh versions of this workflow on Yosemite and 10.7 machines today. My first guess is that there's something odd going on with my use of an Applescript command for opening the Discogs URL vs. 10.8 wanting to follow the command.

 

If true, I'm sure I can fix it pretty easily.

When i hit 'enter' Alfred window is go away.

 

Debugging log:

 

Starting debug for 'Discogs Explorer'

 
[iNFO: alfred.workflow.input.scriptfilter] <?xml version="1.0"?>
<items>
<item arg="1. ">
<title>Please Authorize Discogs Explorer</title>
<subtitle>It looks like this is your first run; press Enter to authorize at Discogs.com.</subtitle>
<icon>icon.png</icon>
</item>
</items>
[iNFO: alfred.workflow.input.scriptfilter] Processing output 'alfred.workflow.action.script' with arg '1. '
[ERROR: alfred.workflow.action.script] 2041:2047: execution error: Can’t get item 2 of {"Expired timestamp: given 1425212873 and now 1425216490 has a greater difference than threshold 300"}. (-1728)
[iNFO: alfred.workflow.action.script] Processing output 'alfred.workflow.output.notification' with arg ''
 
I'm sorry, i am not a programmer :) Thanks for Your support.

Share this post


Link to post

 

When i hit 'enter' Alfred window is go away.

 

Debugging log:

 

Starting debug for 'Discogs Explorer'

 
[iNFO: alfred.workflow.input.scriptfilter] Processing output 'alfred.workflow.action.script' with arg '1. '
[ERROR: alfred.workflow.action.script] 2041:2047: execution error: Can’t get item 2 of {"Expired timestamp: given 1425212873 and now 1425216490 has a greater difference than threshold 300"}. (-1728)
[iNFO: alfred.workflow.action.script] Processing output 'alfred.workflow.output.notification' with arg ''
 
I'm sorry, i am not a programmer :) Thanks for Your support.

 

 

No need to apologize, you're being very helpful! That error message actually tells me a lot. :-)

 

In short, Discogs requires that a timestamp be created as part of the initial log-in process and it looks like the timestamp created by your machine is about 60 minutes different from what Discogs expects ("expired timestamp"). Can you think of any reason why your machine has a different time? 

Share this post


Link to post

No need to apologize, you're being very helpful! That error message actually tells me a lot. :-)

 

In short, Discogs requires that a timestamp be created as part of the initial log-in process and it looks like the timestamp created by your machine is about 60 minutes different from what Discogs expects ("expired timestamp"). Can you think of any reason why your machine has a different time? 

The reason is that i am from Moscow (RU), recently our government again changed the time zone. OS X 10.8.5 has a wrong (old) time zone's list, and Apple won't fix this :) Thanks to you i now know the cause of the error. I'll try it on Yosemite (after upgrade).

Share this post


Link to post

The reason is that i am from Moscow (RU), recently our government again changed the time zone. OS X 10.8.5 has a wrong (old) time zone's list, and Apple won't fix this :) Thanks to you i now know the cause of the error. I'll try it on Yosemite (after upgrade).

 

Oh, shoot, that's a bummer. Is there a way to force your computer to have the right time while you set up this workflow? You should only need that info the first time, so you could switch it back right after.

 

I'm not sure how else to force this to work, but I'll think about it and maybe come up with something.

Share this post


Link to post

Oh, shoot, that's a bummer. Is there a way to force your computer to have the right time while you set up this workflow? You should only need that info the first time, so you could switch it back right after.

 

I'm not sure how else to force this to work, but I'll think about it and maybe come up with something.

I'm trying to force computer to the automatically time zone, and authorization set-up was complete. Workflow is works fine, but after return computer to manually time, it won't work again. Two screenshots as example:

Change time zone to automatically:

5wX5adt.png

Return to manually time:

2AK9Ucp.png

Searches made by automatic time ("slayer" as example) works after return to manually time. But new searches not work.

Edited by Savely

Share this post


Link to post

I'm trying to force computer to the automatically time zone, and authorization set-up was complete. Workflow is works fine, but after return computer to manually time, it won't work again. Two screenshots as example:

 

 

Ok, on even further digging, it looks like Discogs has GREATLY simplified this whole Authorization process which should fix this issue completely. I need to throw together a test version that integrates their changes, but I should be able to do that in a day or so.

 

Thanks for your patience! :-)

Share this post


Link to post

Ok, on even further digging, it looks like Discogs has GREATLY simplified this whole Authorization process which should fix this issue completely. I need to throw together a test version that integrates their changes, but I should be able to do that in a day or so.

 

Thanks for your patience! :-)

Oh no, thank YOU for helping me out! :)

Share this post


Link to post

Oh no, thank YOU for helping me out! :)

 

Discogs has seriously slimmed down their requirements almost back to what they were before this whole thing changed.

 

Do you mind trying the version at this direct link and let me know if it works for you? There should be NO log-in required anymore and should just work immediately from the start.

Share this post


Link to post

Discogs has seriously slimmed down their requirements almost back to what they were before this whole thing changed.

 

Do you mind trying the version at this direct link and let me know if it works for you? There should be NO log-in required anymore and should just work immediately from the start.

It works almost excellent. Sometimes search buggy and shows:

viApb4d.png

but if i hit backspace and search again - all it works fine.

Share this post


Link to post

It works almost excellent. Sometimes search buggy and shows:

viApb4d.png

but if i hit backspace and search again - all it works fine.

Ok, well that's great to know it works for you at all. :-) I'm going to package this up and send it over to Packal as an official release but nothing will change from the version you have now.

 

I think the issue you might be running into above is the speed that Discogs and your internet are talking to each other, especially if the search works after a second try. Please let me know if you run into this issue more frequently, as it might be something I can address. Also, if you're getting that error with the same list of artists there could be a bug in how the workflow reads certain artist name (odd characters, for example). It looks like the one you show above is for "Kreator" which definitely should not cause issues.

 

Thanks for helping me track down the source of your troubles, it's been extremely helpful!

Share this post


Link to post

Ok, well that's great to know it works for you at all. :-) I'm going to package this up and send it over to Packal as an official release but nothing will change from the version you have now.

 

I think the issue you might be running into above is the speed that Discogs and your internet are talking to each other, especially if the search works after a second try. Please let me know if you run into this issue more frequently, as it might be something I can address. Also, if you're getting that error with the same list of artists there could be a bug in how the workflow reads certain artist name (odd characters, for example). It looks like the one you show above is for "Kreator" which definitely should not cause issues.

 

Thanks for helping me track down the source of your troubles, it's been extremely helpful!

I think you're right, the reason is the speed of the talk between Discogs and computer. If anything else happens, i'll let you know of course. Thanks to YOU, i finally use this wonderful workflow! :)

Share this post


Link to post

This is a great workflow.  Unfortunately it's been a few months since I've used it.  New computer and now the "sex" command tells me hit enter to authorize and nothing happens...alfred prompt just disappears.  Any ideas?

Share this post


Link to post

This is a great workflow.  Unfortunately it's been a few months since I've used it.  New computer and now the "sex" command tells me hit enter to authorize and nothing happens...alfred prompt just disappears.  Any ideas?

Thanks for letting me know, sorry that you're having trouble! Unfortunately, I'm away from my machine to try and fix this for a few days but I will check it out ASAP. Can you confirm that you're trying to run this workflow essentially on a brand new fresh install of Alfred on a new computer? Or is this something you migrated over from your old computer, and after the move it no longer works?

My gut tells me that Discogs may have changed something in their process and I just need to update the workflow's set up. Shouldn't be too tough, I hope. :)

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...