Skip to content

Commit

Permalink
cover:discogs: use basic auth (no big images yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
sahib committed Sep 20, 2015
1 parent e871de0 commit 167d047
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/intern/cover/discogs.c
Expand Up @@ -21,7 +21,7 @@
#include "../../core.h"
#include "../../stringlib.h"

#define API_ENTRY "http://api.discogs.com/database/search?type=release&q=${artist}"
#define API_ENTRY "https://api.discogs.com/database/search?type=release&q=${artist}&token=gUtGiYqikFIMrDYStQNgewQbrCdRoTBOTXDNtRgB"

/////////////////////////////////

Expand Down Expand Up @@ -77,7 +77,6 @@ static bool check_artist_album (GlyrQuery * q, const char * artist_album)
static GlyrMemCache * transform_url (cb_object * s, const char * url)
{
GlyrMemCache * rc = NULL;
size_t rc_size = strlen (url);
char * rc_url = g_strdup (url);

if (rc_url != NULL)
Expand All @@ -90,12 +89,12 @@ static GlyrMemCache * transform_url (cb_object * s, const char * url)
{
char * ep = strchr (sp + 1, '-');
if(ep != NULL) {
size_t rest_len = rc_size - (ep - rc_url) + 1;
memmove (sp,ep,rest_len);
// size_t rest_len = rc_size - (ep - rc_url) + 1;
// memmove (sp,ep,rest_len);

rc = DL_init();
rc->data = (char*) rc_url;
rc->size = strlen (url);
rc->size = strlen (rc_url);
rc->dsrc = g_strdup (s->url);
}
}
Expand Down Expand Up @@ -134,7 +133,6 @@ static GList * cover_discogs_parse (cb_object * capo)
char * thumb_url = get_search_value (node,THUMB_SUBDNOE,ENDOF_SUBNODE);
if (thumb_url)
{

GlyrMemCache * p = transform_url (capo,thumb_url);
if (p != NULL)
{
Expand Down

0 comments on commit 167d047

Please sign in to comment.