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)



- vjmcdonnell - 2011-12-22

How do I install this on Ubuntu 10.10
I have Sickbeard & Counchpotato but used excellent guides to install them.

Can someone tell me what I put in the terminal window to get this thing installing direct from the github

Thanks, still stumbling with Linux


- HenryFord - 2011-12-23

vjmcdonnell Wrote:Can someone tell me what I put in the terminal window to get this thing installing direct from the github
Assuming you have git already installed:
Code:
git clone https://github.com/rembo10/headphones.git headphones
This will clone headphones to the folder "headphones". Then you can just run the python-file.

frieten Wrote:EDIT: python 2.7.2 and its working fine, thanks for the info henryford why is it that it wont work on a newer version of python??
Python above version 3 changes a lot of stuff - see here for details: http://wiki.python.org/moin/Python2orPython3
and
http://docs.python.org/py3k/whatsnew/3.0.html

ZestyChicken Wrote:Another thought: would be nice to add an option to pass the nzb priority to sabnzbd. For instance, now I have TV from SB as high, movie from CPas medium.
You can set the priority in sabnzbd:
Config -> Categories -> music -> "default priority"


- SleepyP - 2011-12-25

I apologize if this has been answered somewhere in the previous 60+ pages Tongue

I am having issues getting Headphones to scan in / recognize my music library. The subset that I am using as my "Active" Library is around 100GB or so. I initially tried just pointing Headphones there and saying "Hey scan all of this!", but that process began and then ran for over a week without completing. Then I tried moving my music into the library little by little, scanning it each time. This kinda works, but is very cumbersome, and Headphones occasionally just refuses to "see" that there are "new' artists in the folder. The directory where I'm pointing Headphones for scanning is completely accessible (I do chmod 777 -R /path/to/the/stuff/* to ensure there aren't any permissions issues) and I have tagged all this stuff with Picard and others, so I am confident the tags and filenames are well-formed, uniform, and readable.

I noticed that in the config.ini file for Headphones there's a setting called "libraryscan_interval" which defaulted to like every 5 minutes. I figured maybe Headphones was running my very large manually-triggered scan and then also auto scanning, which could cause problems on such a large data set. I changed that value to 9999 to help avoid that issue, but I have no clear idea if that helped or not.

The other thing I figured may be a problem: does MusicBrainz have any kind of rate limiting that kicks in at a certain point?


- steve1977 - 2011-12-25

SleepyP Wrote:I apologize if this has been answered somewhere in the previous 60+ pages Tongue

I am having issues getting Headphones to scan in / recognize my music library. The subset that I am using as my "Active" Library is around 100GB or so. I initially tried just pointing Headphones there and saying "Hey scan all of this!", but that process began and then ran for over a week without completing. Then I tried moving my music into the library little by little, scanning it each time. This kinda works, but is very cumbersome, and Headphones occasionally just refuses to "see" that there are "new' artists in the folder. The directory where I'm pointing Headphones for scanning is completely accessible (I do chmod 777 -R /path/to/the/stuff/* to ensure there aren't any permissions issues) and I have tagged all this stuff with Picard and others, so I am confident the tags and filenames are well-formed, uniform, and readable.

I noticed that in the config.ini file for Headphones there's a setting called "libraryscan_interval" which defaulted to like every 5 minutes. I figured maybe Headphones was running my very large manually-triggered scan and then also auto scanning, which could cause problems on such a large data set. I changed that value to 9999 to help avoid that issue, but I have no clear idea if that helped or not.

The other thing I figured may be a problem: does MusicBrainz have any kind of rate limiting that kicks in at a certain point?

Thanks for bringing ths up. I am facing exactly the same issue. While my library is not as large as yours, it is also quite sizeable and I am struggling to scan everything into the library. I believe there are 2 reasons why this happens and I have open tickets for both. I hope that someone picks this up at one point of time to fix it for us with large libraries:

1) Auto-scan interfering with "add to library". The change you made in the config.ini does not help for whatever reason. We need an option to prevent auto-scan completely or set it to weekly or so.

2) Some artists can still not be recognized (e.g., Wet Wet Wet, John Lennon & Yoko Ono) and they cause the whole adding process to stop. I have a ticket with around 10 examples what these artists are. They are tagged with Picard, so they 100% follow Musicbrainz terinology, but it still does not work.


Merry xmas to all!!!


- SleepyP - 2011-12-27

THAT makes a lot more sense now. For a while I was scanning them in in batches of like 10, and that was doing OK but at some point it just quit working. I guess because it hit an artist who couldn't be handled.

Also, it looks like Headphones ignores the cases where Musicbrainz tags are already present? ReallyHuh


- steve1977 - 2011-12-27

SleepyP Wrote:THAT makes a lot more sense now. For a while I was scanning them in in batches of like 10, and that was doing OK but at some point it just quit working. I guess because it hit an artist who couldn't be handled.

Yup, that's what I have done and over time you figure out the ones that did not work. I start to figure out a pattern, which ones don't work (e.g., if the first word(s) are a separate artist such as "Wet Wet Wet" and "John Lennon and Yoko Ono" or "Pink!@), but not conclusive. I have a bug report open on this on GIT. If you can pile on it and also add the artists that don't work for you, that would be terrific. Also a "+1" for an option to disable "autoscanning" would be great.

Hope that some developer picks it up one day. It appears so close to be working with a small glitch stopping it. Not sure whether donations would help, but definitely interested to get headphones to a point that actually works for me.

SleepyP Wrote:Also, it looks like Headphones ignores the cases where Musicbrainz tags are already present? ReallyHuh

WHat do you mean by ignore? All my music has musicbrainz tags and I don't think that this actually makes a difference?


- lpallard - 2011-12-28

Started using Headphones just about now and its definitely not working for me, but nevertheless I am thrilled to see that finally such application exists and finally I'll be able to "manage" my music colledtion once for all!

Anyways now to the problems:

I have something like 275 albums in my music folder.. Each album is organized like this:

Artist - Album title (Year)

Code:
Taio Cruz - Departure (Delinquent Mix bonus CD) (2008)
Taio Cruz - Rokstarr (2009)
Taio Cruz ft Kylie Minogue & Travie McCoy - Higher (Remixes) (2011)
The Beatles - A Hard Days Night (1964)
The Beatles - Abbey Road (1969)
The Beatles - Beatles For Sale (1964)
The Beatles - Help! (1965)
The Beatles - In The Beginning (Circa 1960) (1970)
The Beatles - Let It Be (1970)
The Beatles - Live At The BBC (1994)
The Beatles - Magical Mystery Tour (1967)
The Beatles - Past Masters, Volume One (1988)
The Beatles - Past Masters, Volume Two (1988)
The Beatles - Please Please Me (1963)

The collection was put together manually using an ID3 tag editor like puddletag. XBMC seems to pickup the info quite well , but my former iphone & itunes were not capable of using the folder structure and the tags to sort and manage the music.. Importing 10 albums like they are currently stored on my music folder, I ended up with 14 or 15 albums with each 3 or 4 songs.. Probably due to the fact that I have a lot of compilations and other albums with featuring artists..

Headphones is currently "importing" my albums in its database, but I am not confident with the results so far.. for example, one of the albums is

Code:
Bruno Mars - Doo Wops And Hooligans (2010)

While Headphones lists this album as
Code:
Artist Name    Status    Latest Album    Have
Bruno Mars     Active     None             1/?

Maybe my ID3 tags are all wrong? Can I use Headphones to re-organize everything based on reliable information? Like the folder names?

Thanks a lot!!

EDIT: I am getting lots of these errors in the logs:

Code:
Traceback (most recent call last):
  File "/usr/lib/python2.6/logging/__init__.py", line 791, in emit
    stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 81: ordinal not in range(128)
27-Dec-2011 21:47:15 - INFO :: Thread-12 : Now adding/updating album: Meet The Beatles!
27-Dec-2011 21:47:19 - INFO :: Thread-12 : Now adding/updating album: Twist and Shout
Traceback (most recent call last):
  File "/usr/lib/python2.6/logging/__init__.py", line 791, in emit
    stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 81: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/lib/python2.6/logging/__init__.py", line 791, in emit
    stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 81: ordinal not in range(128)



- lpallard - 2011-12-28

Ok so Ive tried HP quite a bit now since it just finished importing my collection into its DB..

I have enough material for 12 tickets for bug reports.. but before I bother the dev(s) with my problems I need to find out if its my system, me or really bugs.

First problem: Importing the existing collection (see previous post) Wink

Second problem: The error messages in the logs (again ee previous post) Wink

On top of that, Ive experienced the following problems with downloading albums & updating the DB:

I initially had 3 missing albums of a single artist. I used HP to retrieve the missing albums via SABnzbd+. Works well, a bit slow to process, but works. Then, HP lists the albums I downloaded as "Downloaded" but doesnt display the proper number of files (songs). for example, HP says that one of the album has 11/12 songs while I navigate the album and I see 12 files, all properly named (# - title.mp3). HP should see 12 files, especially if it retrieved the album!

For another album, HP says that I have 8/12 songs, while there is 12 files in the folder. Strangely for this album, the naming sequence seems a bit screwed up with the songs like:
Code:
01-title.mp3
02-title.mp3
03-title.mp3
...
10-title.mp3
11-title.mp3
11-title.mp3

Yes, the last two songs have the same number.. Nevertheless, HP shouldn't say there is only 8 songs when only the last 2 files are messed up..

I also see this in the logs:

Code:
No accurate album match found for Gwen Stefani, The Sweet Escape - not writing metadata

I doubt the info for such a recent album couldnt be found on the DB.. But if true, does it mean that HP copied and renamed the files to their final destination without writing the metadata (ID3 tags) in the mp3 files??


- steve1977 - 2011-12-28

lpallard Wrote:First problem: Importing the existing collection (see previous post) Wink

Second problem: The error messages in the logs (again ee previous post) Wink

Same bug as the one that SleepyP and me are experiencing. Would be great if you can add to my existing bug report on GIT. This one is quite annoying and is related inproper scanning of some artists despite being 100% properly tagged.

lpallard Wrote:I initially had 3 missing albums of a single artist. I used HP to retrieve the missing albums via SABnzbd+. Works well, a bit slow to process, but works. Then, HP lists the albums I downloaded as "Downloaded" but doesnt display the proper number of files (songs). for example, HP says that one of the album has 11/12 songs while I navigate the album and I see 12 files, all properly named (# - title.mp3). HP should see 12 files, especially if it retrieved the album!

Don't know.

lpallard Wrote:For another album, HP says that I have 8/12 songs, while there is 12 files in the folder. Strangely for this album, the naming sequence seems a bit screwed up with the songs like:
Code:
01-title.mp3
02-title.mp3
03-title.mp3
...
10-title.mp3
11-title.mp3
11-title.mp3

Yes, the last two songs have the same number.. Nevertheless, HP shouldn't say there is only 8 songs when only the last 2 files are messed up..

Quite sure that this is related to the mess-up of the last file names. It cannot find a version with 11 titles in the database and then gives up. Can you try whether it works with a 12-title version? Also try a 13-title version?


In general most of these issues are addressed by bug reports already. Would be fantastic to add to existing bug reports to give more weight. Also, hope that some additional developers join this project. It is fantastic, but hasnt seen much (if any) development over the last 3 months...


- lpallard - 2011-12-28

I added a comment to your ticket on Git....

I sincerely hope the devs do something.. This application has so much potential!

We really need it.. Smile


- Jupiter - 2012-01-01

I searched this thread for information on torrents, but couldn't find anything relevant to the problem I'm having.

Problem 1: If NZB's AND torrents are set on, it searches for an NZB, but then doesn't seem to search for a torrent if one isn't found. Looking in the log, it seems as though it found an NZB but it was out of retention, so at that point it gave up and didn't attempt a torrent download.

Problem 2: When trying to test this, I changed the settings so as not to search for NZB's. This resulted in it finding and downloading a torrent, but uTorrent won't actually load it as it causes an error "Unable to load (torrent): torrent is not valid bencoding!"

Are there any solutions to either of these problems? Headphones is great when it picks up music from NZBs, but unfortunately unlike movies or tv, music still seems to be largely the domain of torrents.


- frieten - 2012-01-01

meh i've had enough of this program lol far to annoying and buggy right now, i think its just due to stupid MUSICBRAINZ. annoying i can't select manually or input the actual artist ID so it finds the right one Rolleyes


- lpallard - 2012-01-01

Yeah not sure how the musicbrainz database is reliable but I've been playing with it for 2 days and I'm really not satisfied with the results..

I'm using picard 0.16 to prepare my files for import into headphones but half or more of my files are not properly treated by picard.. I end up with orphaned files (that is files that picard thinks they don't belong to the album and send them into a totally different album resulting in some 400+ albums instead of 276), and some compilations are not recognized...

For example, the platinum collection from Alicia keys .. it imports all 40 files to an album from the artist Alaska? And tells me that none of the files are properly named.. of course its not even the right artist!!

I'm wondering how many other files I might have let go the same way within albums..?


- lpallard - 2012-01-02

lpallard Wrote:Yeah not sure how the musicbrainz database is reliable but I've been playing with it for 2 days and I'm really not satisfied with the results..

I'm using picard 0.16 to prepare my files for import into headphones but half or more of my files are not properly treated by picard.. I end up with orphaned files (that is files that picard thinks they don't belong to the album and send them into a totally different album resulting in some 400+ albums instead of 276), and some compilations are not recognized...

For example, the platinum collection from Alicia keys .. it imports all 40 files to an album from the artist Alaska? And tells me that none of the files are properly named.. of course its not even the right artist!!

I'm wondering how many other files I might have let go the same way within albums..?

OK I've done my effort at least.... Ive spent several (too shy to say how much exactly) but I retagged all my songs and reorganized everything. According to Picard and the musicbrains DB, most of my albums were screwed with missing songs, wrong titles, not good number of songs, etc..... anyways, I;ve cleaned up everything and deleted the DB in headphones, and re-imported everything. Right now, the list is much better, but somehow there is still some bugs.

For example, An album was correctly identified, processed and retagged by Picard. Once imported in HP, it did not appear in the artist's album list (are Picard and headphones using the same database or what?) and and worst, one of the songs of that album was transferred in a different album which normally contains a song with a very similar title...

Am I confusing anybody?


- lpallard - 2012-01-02

OK after the cleanup of the last few days with MusicBrainz Picard, and trying the application (Headphones) I am in a better position to comment on the problems and bugs.

1-The application fails to retrieve some albums, especially compilations or "deluxe" albums. A good example is "Greatest hits... So Far!!!" from Pink. HP never retrieved the album, and reallocated the songs to different albums of the same artist. So I ended up with albums that had more songs than the album normally would contain, and worst, some songs took precedence over songs that should have been in the album at first.

2-Some artists are not identified at all... Again, HP added Pink as Mr. Pink (!?!? what??) The tags in the songs were all properly tagged by Picard and Picard detected the songs as from Pink, no doubt there.. Then I had to add Pink manually and HP detected the albums but not properly (see #1 above)..

3-Some cover arts retrieved by HP from the web are just a small white dot (43 Byte file)..

4-I download an album via HP, it goes to SAB, gets processed, and HP says that there are only 5 songs out of 13 ?? I go in the album folder and there are 13 files.. HP cannot even deal with its own stuff?

Until these bugs are fixed, I stopped using headphones, there are too many bugs to be a viable solution. Anybody cares to help the devs, please give me specific instructions as to how to troubleshoot and debug, I am more than willing to help, but I am not a programmer so please keep that in mind.

Looking forward to replies!

BTW: 2 more problems:

1-Yesterday HP warned me that an update was available. I clicked on the "Update" link but nothing updated. Then I restarted HP from a console to see the output, and I was getting errors like "error your local changes to the following files would be overwritten by merge". It was on the webservice.py file. I deleted the file and performed the update again, and it seems to have worked. probably a permission problem, but again, this never happened with Sickbeard, Couchpotato, SAB, etc... So maybe something to look into.

2-Every time I shutdown, I get a white page saying "Illegal end of headers." Not sure what that means but I thought to report it.