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)



- HenryFord - 2011-07-15

The binary is updated - you can reach it under the known link:
http://www.henryford.tk/tools/headphones_win32build.zip


- steve1977 - 2011-07-15

Just pulled the latest from GIT. Excited to see all the new developments. Thanks so much, awesome work!!! A few things for discussion, which may fall into feature requests / bugs:

1) "Haves" - not sure whether I understand how it is currently done. Few observations:
a) On the artist page, "haves" are still shown as either "skipped" or "wanted" and there is a separate column for "haves". Find this a bit confusing and the SB-way maybe a bit more intuitive
b) On the "home" page directly, "haves" are shown with some form of "scale", which appears more complex than it should. Wouldn't an easy 1/7 be much easier, while same coding required?
c) Also on the "artist page" a "scale" is used instead of an easy yes/no. I am not clear how this scale is built. For some albums, the scale far exceeds the frame. For others, the scale is only half-full although all individual songs will have a tick-mark in headphone. In general, I don't like the idea to check individual songs. Given many different releases with different number of songs and different songs, I would find it much better to see a simple "yes/no" for each album with at least one song matching.

2) Upcoming albums on "home" - if no album is upcoming in the near term, the latest album is shown. This can be even be a 2009 album. In the section "upcoming albums", only "upcoming" albums are shown, which is actually the way how it should be?

3) Upcoming album section - I find the album art here a big large.

4) Chosen release - which release are you pulling. It appears that it is always the "oldest" one. This is not bad per se and I am not difficult it would be to change this. I would find it best if the "oldest" one with album art is displayed (I love seeing the album art in artist view)

5) Album date - instead of showing the release date, I would find it much better to show the year-only (instead of full date) and show that for the release group rather than for a release (using MB terminology here)

6) Update does not work for me at all. It says "update", but nothing happens. I will need to re-start to get it working at all (and "update" did not happen).

7) Special character still don't appear to work for me. For example, I have a folder called "Beyoncé" and the "é" makes headphone crash.

8) Any chance to have headphone run "silent"?


I am running headphone on Win7x32 with PY-file from GIT. Thanks again so much for all this development effort!!!


- rembo10 - 2011-07-15

steve1977 Wrote:Just pulled the latest from GIT. Excited to see all the new developments. Thanks so much, awesome work!!! A few things for discussion, which may fall into feature requests / bugs:

1) "Haves" - not sure whether I understand how it is currently done. Few observations:
The 'Have' column just shows how much of an artists collection (or album on the artist page) that you currently have.

I originally coded it as just showing "1/7" or whatever, but I think this looks a lot nicer.

I fixed the overflow bug a few releases ago. As well as some updating issues. Are you running the most current version?

Quote:2) Upcoming albums on "home" - if no album is upcoming in the near term, the latest album is shown. This can be even be a 2009 album. In the section "upcoming albums", only "upcoming" albums are shown, which is actually the way how it should be?
Originally if there were no upcoming releases, it would just show 'None' in light gray. I thought it'd be a nice touch to just put in their latest album instead (in case you may have missed their last album).

Upcoming albums will show up in green, with a release date.

Quote:3) Upcoming album section - I find the album art here a big large.
Agreed. This is just temporary til I get a good layout. I'm also going to try to scrape for an album description, maybe an early review, metacritic score, etc.

Quote:4) Chosen release - which release are you pulling. It appears that it is always the "oldest" one. This is not bad per se and I am not difficult it would be to change this. I would find it best if the "oldest" one with album art is displayed (I love seeing the album art in artist view)
I'm picking the release that has an ASIN (Amazon ID) with the most number of tracks. I use the ASIN to get album art (although the whole album art process will improve). If no release has an ASIN, it'll take the album with the highest # of tracks.
Quote:5) Album date - instead of showing the release date, I would find it much better to show the year-only (instead of full date) and show that for the release group rather than for a release (using MB terminology here)
Some people like the full date, and I'd rather give more info than less.
Quote:6) Update does not work for me at all. It says "update", but nothing happens. I will need to re-start to get it working at all (and "update" did not happen).
Are you running the latest version? There were some update kinks that I think I have worked out (on OS X at least). Did you install via git clone or zip/tarball?
Quote:7) Special character still don't appear to work for me. For example, I have a folder called "Beyoncé" and the "é" makes headphone crash.
Yeah I've been having a lot of issues with unicode stuff, I may have fixed it in the latest version but I haven't gotten enough feedback to test.
Quote:8) Any chance to have headphone run "silent"?
Type 'python headphones.py --help' or 'python headphones.py -h' to get a list of all the arguments.
-q: quiet mode. no console logging
-d: daemon mode. i think this is what you want - ah but I'm not sure if windows supports daemonizing.
-p: forced port. usage '-p 8282' will force headphones to run on port 8282
--datadir: put the datadir (database, logs, config) in a specified directory
--config: specify a config file to use
--nolaunch: prevent the broswer from launching (also a config option)

Quote:I am running headphone on Win7x32 with PY-file from GIT. Thanks again so much for all this development effort!!!

No problem! Post any issues on GitHub: rembo10 - headphones... it's a lot easier for me to track


- unabatedshagie - 2011-07-16

Is there any way of excluding a directory from being scanned?

I don't want my compilation albums scanned as there are probably hundreds of artists on them that I don't want added (have lots of dance mix albums etc)


- david81 - 2011-07-16

rembo10 Wrote:Yeah I've been having a lot of issues with unicode stuff, I may have fixed it in the latest version but I haven't gotten enough feedback to test.

Still unable to complete a directory scan.

Code:
15-Jul-2011 19:43:03 - ERROR   :: CP Server Thread-4 : Unable to complete the scan: 'ascii' codec can't decode byte 0xc3 in position 42: ordinal not in range(128)

Tried the iTune scan option and got these results.

Image

Needless to say, I really have no idea what that stuff is Smile


- steve1977 - 2011-07-16

Thanks for your quick reply and your fantastic coding. Please find reactions below:

rembo10 Wrote:I originally coded it as just showing "1/7" or whatever, but I think this looks a lot nicer.

Agree. Maybe a combination of both would be best. For me, the way SB does it scale and "1/7" inside looks fantastic and is very handy.

Also, for the actual albums, a simple "yes/no" would in my view be much better. Given you pull the release with largest number of tracks, it will give the impression that my album is incomplete only because I bought the official US release rather than the special Australian edition with 3 bonus tracks.

*edited* Also, would be great if status "skipped/wanted" could show "have". Either based on the "yes/no" info above or even manually set by me for albums that headphone did not find, but I actually have it (similar to how SB does it).

rembo10 Wrote:I'm picking the release that has an ASIN (Amazon ID) with the most number of tracks. I use the ASIN to get album art (although the whole album art process will improve). If no release has an ASIN, it'll take the album with the highest # of tracks.

I love that, this is great. Not sure whether it fully works yet. Two examples:
a) "3 Doors Down - The Better Life" has an ASIN code (and headphone point to the right release in its link that has ASIN), but for some weird reason, neither headphone nor MB display album art. Any thoughts?
b) "Avril Lavigne - Let Go" shows a Japanese album art. The "linked" release has an ASIN, but shows a different album art (both in MB and ASIN). No idea where headphone pulls this different album art from.

rembo10 Wrote:Some people like the full date, and I'd rather give more info than less.

Ok, fair. Would still be great to pull release date from the release group rather than the release. This way, we would have a proper time when the album got released (rather than when the release with the largest number of tracks got released.

rembo10 Wrote:Are you running the latest version? There were some update kinks that I think I have worked out (on OS X at least). Did you install via git clone or zip/tarball?

Yes, the latest via zip. Will post a bug report on github.

rembo10 Wrote:Yeah I've been having a lot of issues with unicode stuff, I may have fixed it in the latest version but I haven't gotten enough feedback to test.

Let me look into it again. After you fixed the issue with " (e.g., "Weird Al" Yancovic), albums still did not got identified. Same holds true for any artist with non-latin characters.

*edited* While all non-latin letter release do not identify albums, also have problems with some other albums:
a) Dave Matthews - unclear why, but none of my DMB albums is identified properly. Any info I can provide on GIT-bug report that would be helpful. The tags are perfect (actually with MB Picard) and no idea why headphone does not pick them up.
b) Avril Lavigne - doesnt realize that I have "Goodbye Lullaby", most likely because I own the "deluxe edition", which includes "deluxe edition" in the album title. Any idea how to make headphone less sensitive about this?

rembo10 Wrote:Type 'python headphones.py --help' or 'python headphones.py -h' to get a list of all the arguments.
-q: quiet mode. no console logging
-d: daemon mode. i think this is what you want - ah but I'm not sure if windows supports daemonizing.
-p: forced port. usage '-p 8282' will force headphones to run on port 8282
--datadir: put the datadir (database, logs, config) in a specified directory
--config: specify a config file to use
--nolaunch: prevent the broswer from launching (also a config option)

Thanks. Actually, I am not runing .py manually, but in Win7 with activepython basically like an .exe. Is this still possible?

rembo10 Wrote:No problem! Post any issues on GitHub: rembo10 - headphones... it's a lot easier for me to track

Will do as long as they are for sure bugs. Of all my questions above, it appears that only update/unicode are bugs and the others more or less the way you envisioned it to be best.

Thanks again!!!


- HenryFord - 2011-07-16

steve1977 Wrote:Thanks. Actually, I am not runing .py manually, but in Win7 with activepython basically like an .exe. Is this still possible?
I do not understand this... Why do you need activepython for this? If you install Python, you can just double-click *.py-files without the need of any extra application. I honestly do think that ActivePython breaks some functionality as it implements python in a different way (check this site out:
http://www.activestate.com/activepython-3).

I suggest to just install Python 2.7 - if you double-click the py-file, it will start fine. In order to get python run quietly, you can just use pythonw.exe instead (i.e.: run the following command from the cmd-line:
"C:\Program Files\python27\pythonw.exe" $Path_To_Headphone.py

If you want this simpler, just create a *.bat-file with that statement - double-clicking the bat-file will run headphones without the console...


- Adeiko - 2011-07-16

Tried to install on my NAS Server with this guide:

http://dl.dropbox.com/u/5653370/syn_howto/HowTo%20-%20install%20Headphones.txt

But on when i try to start it, it comes with an ImportError: Cannot import name itunesimport

Image

anyone can help me?


- N3MIS15 - 2011-07-16

Adeiko Wrote:But on when i try to start it, it comes with an ImportError: Cannot import name itunesimport

I just got the same error updating from git master. reverted to my backup until its fixed.. (assuming its a bug)


- RuudBurger - 2011-07-16

Just wanted to test this out, got the same error Wink


- rembo10 - 2011-07-16

Sorry about that.... it's fixed now!

P.S. Thanks for being awesomely patient and putting up with all the error messages. Hopefully there are less of them now :-)


- joelones - 2011-07-16

I'm just using nzbs.org as a source and I think think there's something wrong.

I added the album "Foo Fighters - In Your Honor". Below is from the log.

Quote:16-Jul-2011 16:20:59 - INFO :: CP Server Thread-6 : Marking album: ca53cf4f-5c18-48c1-b5ac-ab333e6189d1as wanted...
16-Jul-2011 16:20:59 - INFO :: CP Server Thread-6 : Searching for Foo Fighters In Your Honor 2005 since it was marked as wanted
16-Jul-2011 16:20:59 - INFO :: CP Server Thread-6 : Parsing results from https://secure.nzbs.org/rss.php?dl=1&catid=5&i=XXXXX&h=XXXXXXXXXXXXXXXXXXXXXXXXXXXX=500&q=Foo+Fighters+In+Your+Honor+2005&action=search
16-Jul-2011 16:21:00 - INFO :: CP Server Thread-6 : No results found. list index out of range

Yet if you follow the result link above (keep it mind I removed my details so the link will not work) it produces a valid XML which has the correct link to the NZB in question but does not add it to Sabnzbd. Log says "list index out of range"

Code:
<rss xmlns:report="http://www.newzbin.com/DTD/2007/feeds/report/" version="2.0">
<channel>
<title>
Foo Fighters In Your Honor 2005 in Music-MP3 - NZBs(dot)ORG RSS Feed
</title>
<link>
https://nzbs.org/index.php?&action=search&q=Foo+Fighters+In+Your+Honor+2005&catid=5
</link>
<description>
Foo Fighters In Your Honor 2005 in Music-MP3 feed for NZBs(dot)ORG
</description>
<language>en-us</language>
<item>
<title>Foo Fighters-In Your Honor-2CD-2005-XXL</title>
<pubDate>Sun, 13 Jun 2010 11:03:10 +0000</pubDate>
<category>Music-MP3 (Alternative)</category>
<link>
https://nzbs.org/index.php?action=getnzb&nzbid=357003&i=XXXXX&h=XXXXXXXXXXXXXXXXXXXXXXXX
</link>
<description>
<![CDATA[
<b>Category:</b> <a href="https://nzbs.org/index.php?action=browse&amp;catid=5">Music-MP3 (Alternative)</a><br /><b>Size:</b> <a href="https://nzbs.org/index.php?action=view&amp;nzbid=357003&amp;filelist=1">147.3 MB</a><br /><b>Files:</b> 35 <small>(7 pars)</small><br /><b>Group:</b> a.b.sounds.mp3.complete_cd<br /><b>.NFO:</b> <a href="https://nzbs.org/index.php?action=view&amp;nzbid=357003&amp;nfo=1#nfo">View NFO</a><br /><b>Posted:</b> Sun June 13th 08:16:43 UTC<br /><b><a href="https://nzbs.org/cart.php?action=rsstomynzbs&nzbid=357003&amp;i=XXXXX&amp;h=XXXXXXXXXXXXXXXXXXXXXXXX">Add to My NZBs</a></b><br /><b><a href="https://nzbs.org/index.php?action=view&amp;nzbid=357003">View NZB</a></b><br />
]]>
</description>
<guid>
https://nzbs.org/index.php?action=getnzb&nzbid=357003&i=XXXXX&h=XXXXXXXXXXXXXXXXXXXXXXXX
</guid>
<report:id>357003</report:id>
<report:category parentID="3" id="5">Music-MP3</report:category>
<report:nzb>
https://nzbs.org/index.php?action=getnzb&nzbid=357003&i=XXXXX&h=XXXXXXXXXXXXXXXXXXXXXXXX
</report:nzb>
<report:poster>
<![CDATA[ Glory Glory Man Utd (the last ordinary day) ]]>
</report:poster>
<report:size type="bytes">154441572</report:size>
<report:postdate>Sun, 13 Jun 2010 08:16:43 +0000</report:postdate>
<report:genre>Alternative</report:genre>
</item>
</channel>
</rss>

Using linux (unraid) python 2.6.5.

Also, I noticed that the "Music Download Directory:" text box in "Download Settings" has a size limit, my absolute directory is above that limit. Can this be fixed.

Great work BTW.


- joelones - 2011-07-16

Just a question concerning the renaming and moving portion of the program. I am not using iTunes to sort my music rather a single directory.

It it possible to rename downloadeds nzbs to the following structure (or have that customized) "Artist/Album/01 Title.mp3"... and then move the files in question from "Music Download Directory" in "Download Settings" to the "Music Library" path? Is such thing already implemented? As I see an option to rename in "Renaming & Metadata".

Does the Renaming take place in Sabnzbd's "Music Download Directory" or the "Music Library" path?


- N3MIS15 - 2011-07-17

updated to newest and all is working well, except when i restart headphones i get "Illegal end of headers." screen. A quick refresh takes me back to home..

Also are there any plans to store the album art images localy?
And it would be nice to be able to add album art from a local source if headphones cant scrape it. Maybe if u have the album in your library scrape it from there?


- rembo10 - 2011-07-17

joelones Wrote:Just a question concerning the renaming and moving portion of the program. I am not using iTunes to sort my music rather a single directory.

It it possible to rename downloadeds nzbs to the following structure (or have that customized) "Artist/Album/01 Title.mp3"... and then move the files in question from "Music Download Directory" in "Download Settings" to the "Music Library" path? Is such thing already implemented? As I see an option to rename in "Renaming & Metadata".

Does the Renaming take place in Sabnzbd's "Music Download Directory" or the "Music Library" path?

That's a feature that's coming. Post-processing doesn't work yet, but if you check the config.ini you'll see there are two lines for folder format and file format. I'll make it a config option as soon as I get post-processing working right.

As for nzbs.org - I don't have an account and I never really heard back from anyone about it whether it was working or not. I can use what you posted to parse it right.

Btw, I removed the arbitrary limit on the music download dir. Will be in the next push.

N3MIS15 - What browser are you using? I sometimes get that on Safari when shutting it down, but never when restarting. Lemme look into this

I just changed the way it searches though, which I think is pretty awesome. You can set a desired bitrate and it'll try to find the closest match size-wise. Or you can search for best quality (with the option to include lossless).

The auto-detect works when you run the Music Scanner.

Check it out GitHub - Headphones

Image