Kodi Community Forum
Headphones - Music albums & artists auto download program - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: Headphones - Music albums & artists auto download program (/showthread.php?tid=103688)



- Accidental - 2011-12-19

This is a newbie question about headphones.

I just installed and configured Headphones. I scanned my music library and the process is finally complete. I noticed that the matching is very literal. If my artist name does not match the online database exactly it does not match in Headphones

i.e. "Béla Fleck and The Flecktones" is the online database reference, but it doesn't seem to match to "Bela Fleck..." or "...& The Flecktones" from my catalog. It also doesn't match if The is there (or not) between the online DB and my catalog (i.e. "The Beatles" vs. "Beatles")

It seems to have the same 'exact/literal' matching on albums and songs. Is there a way for the program to accept slight deviations during the matching process? If not, is there a way to at least manually match up an album/artist and/or song with an entry in Headphones?


- ZestyChicken - 2011-12-20

HenryFord Wrote:Most likely this is an error in your config - make sure that you entered your username&password correctly for MusicBrainz.

I agree with the above poster. There is nowhere you enter that. For awhile yesterday, the match was working and I got about 50 matches. Now nothing is working. I'm getting a different error now...


2011-12-19 17:51:38 WARNING Attempt to retrieve artist information from MusicBrainz failed for artistid: fb7272ba-f130-4f0a-934d-6eeea4c18c9a. Sleeping 5 seconds
2011-12-19 17:51:33 WARNING Attempt to retrieve artist information from MusicBrainz failed for artistid: fb7272ba-f130-4f0a-934d-6eeea4c18c9a. Sleeping 5 seconds
2011-12-19 17:51:28 WARNING Attempt to retrieve artist information from MusicBrainz failed for artistid: fb7272ba-f130-4f0a-934d-6eeea4c18c9a. Sleeping 5 seconds
2011-12-19 17:51:23 WARNING Attempt to retrieve artist information from MusicBrainz failed for artistid: fb7272ba-f130-4f0a-934d-6eeea4c18c9a. Sleeping 5 seconds
2011-12-19 17:51:17 WARNING Attempt to retrieve artist information from MusicBrainz failed for artistid: fb7272ba-f130-4f0a-934d-6eeea4c18c9a. Sleeping 5 seconds
2011-12-19 17:51:12 WARNING Attempt to retrieve artist information from MusicBrainz failed for artistid: 7364dea6-ca9a-48e3-be01-b44ad0d19897. Sleeping 5 seconds
2011-12-19 17:51:07 WARNING Attempt to retrieve artist information from MusicBrainz failed for artistid: 7364dea6-ca9a-48e3-be01-b44ad0d19897. Sleeping 5 seconds
2011-12-19 17:51:02 WARNING Attempt to retrieve artist information from MusicBrainz failed for artistid: 7364dea6-ca9a-48e3-be01-b44ad0d19897. Sleeping 5 seconds
2011-12-19 17:50:57 WARNING Attempt to retrieve artist information from MusicBrainz failed for artistid: 7364dea6-ca9a-48e3-be01-b44ad0d19897. Sleeping 5 seconds
2011-12-19 17:50:52 WARNING Attempt to retrieve artist information from MusicBrainz failed for artistid: 7364dea6-ca9a-48e3-be01-b44ad0d19897. Sleeping 5 seconds
2011-12-19 17:50:51 INFO Starting update for 54 active artists


- ZestyChicken - 2011-12-20

I'm also finding that the system is failing to pick up any artists after the initial aborted scan. It got 54 of something like 250 and won't rescan...

...if I do a search for something obvious, like Billy Joel, it returns no results...

2011-12-19 18:08:39 WARNING Attempt to query MusicBrainz for Billy Joel failed: HTTP Error 403: Forbidden
2011-12-19 18:08:34 WARNING Attempt to query MusicBrainz for Billy Joel failed: HTTP Error 403: Forbidden
2011-12-19 18:08:29 WARNING Attempt to query MusicBrainz for Billy Joel failed: HTTP Error 403: Forbidden
2011-12-19 18:08:24 WARNING Attempt to query MusicBrainz for Billy Joel failed: HTTP Error 403: Forbidden
2011-12-19 18:08:19 WARNING Attempt to query MusicBrainz for Billy Joel failed: HTTP Error 403: Forbidden
2011-12-19 18:07:56 WARNING Attempt to query MusicBrainz for Ke$ha failed: HTTP Error 403: Forbidden
2011-12-19 18:07:51 WARNING Attempt to query MusicBrainz for Ke$ha failed: HTTP Error 403: Forbidden
2011-12-19 18:07:46 WARNING Attempt to query MusicBrainz for Ke$ha failed: HTTP Error 403: Forbidden


- silencery - 2011-12-20

Yup, noticed this issue since yesterday. Looks like MusicBrianz recently updated their API to block headphones?


- HenryFord - 2011-12-20

silencery Wrote:Yup, noticed this issue since yesterday. Looks like MusicBrianz recently updated their API to block headphones?
No, that is definetly not the case (the API is intended to be used by programs such as headphones). But as I can see from their API-Documentation, authentication is required, but headphones doesn't implement it (per your statements, I actually stopped using headphones since it delivers too many wrong matches on my artists and currently I can't see any updates).


- sladinki007 - 2011-12-20

HenryFord Wrote:No, that is definetly not the case (the API is intended to be used by programs such as headphones). But as I can see from their API-Documentation, authentication is required, but headphones doesn't implement it (per your statements, I actually stopped using headphones since it delivers too many wrong matches on my artists and currently I can't see any updates).

well this is on their webservice page

http://musicbrainz.org/doc/XML_Web_Service/Version_2

Quote:Limiting Connections to the MusicBrainz Web Service

All users of the XML web service must ensure that each of their client applications never make more than ONE web service call per second. Making more than one call per second drives up the load on the servers and prevents others from using MusicBrainz. If you impact the server by making more than one call per second, your IP address may be blocked preventing all further access to MusicBrainz.


Identifying your application to the MusicBrainz Web Service

Starting on May 16th, 2011 the MusicBrainz Web Service requires all requests to have a proper User-Agent header that identifies the application and the version of the application making the request. Please do no use generic User-Agent strings like “Java/1.6.0_24″ or “PHP/5.3.4″ -- they do not allow us to identify the application making the request. On November 16, 2011 we're going to start blocking requests with generic User-Agent strings

so seems they are blocking things Sad
maybe the code has these generic user agent strings ?
not a coder here Tongue

Henry Ford any other similar tool for us lazy people ?


- HenryFord - 2011-12-20

sladinki007 Wrote:well this is on their webservice page

http://musicbrainz.org/doc/XML_Web_Service/Version_2
I definetly overread that part. So it could be either due to the user-agent or to the amount of requests. But I would think it is rather due to the user-agent, because if it was the amount of request there would be at least one successfull one.

Quote:maybe the code has these generic user agent strings ?
I think so too. Unfortunately Python is not really on my strong side...

Quote:Henry Ford any other similar tool for us lazy people ?
No, sorry Sad Audiomatic looked good for a while (for Windows that is), but the dev. stopped the developement. Currently I am doing it just manually.


- sladinki007 - 2011-12-20

i had a look in the code Tongue

assuming i am a bit on the right path Tongue

/headphones/lib/musicbrainz2/webservice.py

guess this is the part that needs modifying

Quote: def _openUrl(self, url, data=None):
userAgent = 'python-musicbrainz/' + musicbrainz2.__version__
req = urllib2.Request(url)
req.add_header('User-Agent', userAgent)
return self._opener.open(req, data)

but here it stops for me
as i have no clue how to change it from here
guess changing it to python-headphones in this file will not do the trick Wink


- sladinki007 - 2011-12-20

LOL
you never believe it
i changed this snippet to

Quote: def _openUrl(self, url, data=None):
userAgent = 'python-headphones/' + musicbrainz2.__version__
req = urllib2.Request(url)
req.add_header('User-Agent', userAgent)
return self._opener.open(req, data)

restarted headphones and it works LOL

Quote:Artist Name Score
Fergie (real name: Robert Ferguson. hardhouse/techno DJ) 100 Add this artist
Fergie (member of The Black Eyed Peas) 92 Add this artist
Fergie Frederiksen 64 Add this artist
Fergie MacDonald 64 Add this artist
Fergie & BK (Hard Dance) 55 Add this artist
Artists Stand Up to Cancer 25 Add this artist

logs
Quote:Timestamp Level Message
2011-12-20 17:57:17 INFO Now adding/updating: Fergie

simple enough Wink


- BigladUK - 2011-12-20

sladinki007 Wrote:LOL
you never believe it
i changed this snippet to



restarted headphones and it works LOL



logs


simple enough Wink


Brilliant

Works for me too :

Thanks


- ZestyChicken - 2011-12-20

BigladUK Wrote:Brilliant

Works for me too :

Thanks

Huh, what kind of editor did you use to edit the file? I assume you edited the py file and the rest was compiled at runtimeHuh


- BigladUK - 2011-12-20

ZestyChicken Wrote:Huh, what kind of editor did you use to edit the file? I assume you edited the py file and the rest was compiled at runtimeHuh

I'm using a Mac but you can just edit it in notepad on your Windows machine not problem

Si


- sladinki007 - 2011-12-20

Quote:Huh, what kind of editor did you use to edit the file? I assume you edited the py file and the rest was compiled at runtime

i am a big fan of winscp Smile
edits things easy

for the unexperienced ... take a backup of your original file before you mess around Smile


- BigladUK - 2011-12-20

sladinki007 Wrote:i am a big fan of winscp Smile
edits things easy

for the unexperienced ... take a backup of your original file before you mess around Smile

Oh if your going to be technical then I did my father in laws update over SSH via terminal using nano :p

Si


- ZestyChicken - 2011-12-20

BigladUK Wrote:I'm using a Mac but you can just edit it in notepad on your Windows machine not problem

Si

The text was pretty garbled looking in notepad. Maybe that's the way it's supposed to look? Have to try later tonight...

EDIT: Opened it on my MacBook and it looks fine. Go figure. Wil have to test this tonight!