# Discogs Agent

**URL:** <https://forums.plex.tv/t/discogs-agent/25351>\
**Category:** Dev/API Corner\
**Tags:** scanner-agent-dev\
**Created:** [December 18, 2012, 11:44pm UTC](https://forums.plex.tv/t/discogs-agent/25351 "2012-12-18T23:44:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vignot](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@vignot](https://forums.plex.tv/u/vignot)\
**Post date:** [December 18, 2012, 11:44pm UTC](https://forums.plex.tv/t/discogs-agent/25351/1 "2012-12-18T23:44:26Z")

</div>

Hi all,  
  
  
  
I’m new to Plex and, like a lot of other users on this board, I found that music scanners/agent were not very efficient.  
  
  
  
After playing a while, I managed to get Plex read my ID3 tags correctly so all albums and tracks are correctly imported in the library, even with covers.  
  
But artists summary and artwork are not included in tags. Tried with LastFM but… you know what happened.  
  
  
  
So I started to write an Artist Agent for Discogs. I’m also new to Python but looking at other agents, it tooks only a few hours.  
  
  
  
Now, most of my artists have a nice artwork and a summary, only a few of them have a wrong match.  
  
I would like to match them manually but when I do, I get only one choice in the list.  
  
I don’t understand how to get the list filled with the result of my agent search() method…  
  
  
  
Attached is the agent.  
  
Once installed, it appears in Agents/Personal Media Artists and I put it on top.  
  
  
  
Any help is welcome.  
  
  
  
Thanks,  
  
Pierre

---

<div class="post-metadata">

**Author:** ![EtherMan](https://avatars.discourse-cdn.com/v4/letter/e/958977/32.png) [@EtherMan](https://forums.plex.tv/u/EtherMan)\
**Post date:** [December 19, 2012, 1:52am UTC](https://forums.plex.tv/t/discogs-agent/25351/2 "2012-12-19T01:52:21Z")

</div>

> [@](#):
>
> Hi all,  
>   
> I'm new to Plex and, like a lot of other users on this board, I found that music scanners/agent were not very efficient.  
>   
> After playing a while, I managed to get Plex read my ID3 tags correctly so all albums and tracks are correctly imported in the library, even with covers.  
> But artists summary and artwork are not included in tags. Tried with LastFM but... you know what happened.  
>   
> So I started to write an Artist Agent for Discogs. I'm also new to Python but looking at other agents, it tooks only a few hours.  
>   
> Now, most of my artists have a nice artwork and a summary, only a few of them have a wrong match.  
> I would like to match them manually but when I do, I get only one choice in the list.  
> I don't understand how to get the list filled with the result of my agent search() method...  
>   
> Attached is the agent.  
> Once installed, it appears in Agents/Personal Media Artists and I put it on top.  
>   
> Any help is welcome.  
>   
> Thanks,  
> Pierre

  
  
  
You can have a look at my Musicbrainz agent package that I released yesterday. It uses musicbrainz for matching and among other services, discogs for metadata (provided there's a link from musicbrainz to the discogs resource).  
  
If you dont like the agents themself, they're kindof well commented and structured so should be easy to read and make out exactly what parts it is you need.  
  
EDIT: Oh and having a quick read of your source, shows that your agent isnt a primary agent, so will not use its search function to provide any search hits. Your agent is contributing to the com.plexapp.agents.none agent, which is the local data agent, which means, it wont be searching any information at all... It'll just provide extra metadata from discogs to that agent... Which is kindof a bad idea since a local primary shouldnt be fetching remote data. To provide search hits, you need to make it into a primary agent instead... Also, I highly suggest you look into PEP8 if you're planning on doing some python programming. I know that basicly no other agents follow the PEP8 style guidelines, but that they're poorly made, doesnt mean you have to follow in their footsteps :)

---

<div class="post-metadata">

**Author:** ![vignot](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@vignot](https://forums.plex.tv/u/vignot)\
**Post date:** [December 19, 2012, 9:32am UTC](https://forums.plex.tv/t/discogs-agent/25351/3 "2012-12-19T09:32:04Z")

</div>

> [@](#):
>
> EDIT: Oh and having a quick read of your source, shows that your agent isnt a primary agent, so will not use its search function to provide any search hits. Your agent is contributing to the com.plexapp.agents.none agent, which is the local data agent, which means, it wont be searching any information at all... It'll just provide extra metadata from discogs to that agent...

  
Allright, I missed that part. Anyway, I can see in the log that my search method is call. Pretty confusing...  
  

> [@](#):
>
> To provide search hits, you need to make it into a primary agent instead...

  
I think I tried that, but the agent didn't show in the list. Probably I had a problem somewhere else.  
  

> [@](#):
>
> Also, I highly suggest you look into PEP8 if you're planning on doing some python programming. I know that basicly no other agents follow the PEP8 style guidelines, but that they're poorly made, doesnt mean you have to follow in their footsteps :)

  
I will !  
  
Thanks, I will look at your package and see if it fit my need or if I can improve my agent.  
  
Pierre

---

<div class="post-metadata">

**Author:** ![EtherMan](https://avatars.discourse-cdn.com/v4/letter/e/958977/32.png) [@EtherMan](https://forums.plex.tv/u/EtherMan)\
**Post date:** [December 19, 2012, 7:25pm UTC](https://forums.plex.tv/t/discogs-agent/25351/4 "2012-12-19T19:25:42Z")

</div>

> [@](#):
>
> Allright, I missed that part. Anyway, I can see in the log that my search method is call. Pretty confusing...

  
  
Indeed it is... It's always executed... It's just not used to provide search hits... I have no idea why the function is called AT ALL but for some reason, it is both required to be there, it's required to provide atleast one hit, even though that information, is not used at all later. But well... That's actually one of the minor limitations of the plex agent APIs which are kindof iffy IMO :)

---

<div class="post-metadata">

**Author:** ![snickers\_1](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/snickers_1/32/91590_2.png) [@snickers\_1](https://forums.plex.tv/u/snickers_1)\
**Post date:** [January 27, 2014, 9:47pm UTC](https://forums.plex.tv/t/discogs-agent/25351/5 "2014-01-27T21:47:41Z")

</div>

Is this Agent still working and supported?

---

<div class="post-metadata">

**Author:** ![CTennant73](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ctennant73/32/85217_2.png) [@CTennant73](https://forums.plex.tv/u/CTennant73)\
**Post date:** [June 29, 2014, 9:11pm UTC](https://forums.plex.tv/t/discogs-agent/25351/6 "2014-06-29T21:11:40Z")

</div>

I recently installed this Agent and had it working on my extremely large music folder. Did this last night... today I can't access the Discogs.com anymore. If I plug in my modem directly into the computer I can but not through my router. All of a sudden I can no longer access Discogs.com. Is it possible that the Discogs Agent made too many requests from Discogs.com and now my computer/router is blocked from Discogs?

Edit: I did get IP banned for using this plugin.. too many requests. I had to submit a support request to have the ban lifted.&nbsp;

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 10:36pm UTC](https://forums.plex.tv/t/discogs-agent/25351/7 "2019-12-20T22:36:03Z")

</div>

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