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)



- ghostelement - 2011-07-10

How about the ability to search for high quality album art and then embed it into the MP3 files?


- thezoggy - 2011-07-10

ghostelement Wrote:How about the ability to search for high quality album art and then embed it into the MP3 files?

that would eat up a bunch of hd space...
why not just store 1 copy in the root folder vs # of copies in the file.
Then xbmc/mediabrowser/ whatever could actually use the data


- ghostelement - 2011-07-10

thezoggy Wrote:that would eat up a bunch of hd space...
why not just store 1 copy in the root folder vs # of copies in the file.
Then xbmc/mediabrowser/ whatever could actually use the data

Because if anyone in your house uses windows media player, that folder.jpg will get overwritten with a stupid 200x200 image. Super annoying. If the image is in the ID3 tag, it won't get overwritten, and XBMC can still use it.


- daemox - 2011-07-10

Hey Rembo10,

I just found out about Headphones courtesy of Mar2zz. Wrote up a little news article about it at my site, and just wanted to say I'm excited about this project. Fired it up last night, and will be keeping it running and watching it progress.

Looking great so far, cheers!

http://www.ainer.org/news/headphones-sick-beard-and-couch-potato-like-application-for-music


- thezoggy - 2011-07-10

just to note... change the id3 tags of a mp3 file the .sfv included with the release becomes worthless.. thus maybe you should have it delete the .sfv files after an update.. or regen new ones


- rembo10 - 2011-07-11

Hey Daemox -

Thanks for the write up! I really appreciate it. You nailed exactly what I was going for. This version was definitely a proof of concept and I'm going to build it into a nice little app.

Speaking of which I finally got around to adding the 'History' and 'Upcoming' features: http://github.com/rembo10/headphones

Sorry it's taking so long to get auto-updating working. I have to sort of rearrange all my code to make it work, but it's coming soon for sure.

EDIT: You can also enable a webroot via the 'http_root' option in the config.ini. It should automatically be added to the config but if not, just add the line: http_root = '/headphones' (or whatever) under [General]


- typhoe - 2011-07-11

rembo10 Wrote:Speaking of which I finally got around to adding the 'History' and 'Upcoming' features

Hi rembo10,

nice progress, and thank you! It still looks very promising!

But I notice that the 'home' tab doesn't work anymore (just did a git update).
The 'home' links to the last seleted tab.
For ex 'http://my_ip/upcoming'
Removing the /upcoming displays the 'Home' tab again...

Regards!


- rembo10 - 2011-07-11

typhoe Wrote:Hi rembo10,

nice progress, and thank you! It still looks very promising!

But I notice that the 'home' tab doesn't work anymore (just did a git update).
The 'home' links to the last seleted tab.
For ex 'http://my_ip/upcoming'
Removing the /upcoming displays the 'Home' tab again...

Regards!

Noticed that too. Fix is already up :-)

OCD ftw


- typhoe - 2011-07-11

rembo10 Wrote:Noticed that too. Fix is already up :-)

OCD ftw

Indeed! Thank you! :-)


- darkscout - 2011-07-11

Is there a way to get it to search without year? For some reason most uploaders on NZBMatrix don't include the year. On other sites it's hit or miss. Especially with the one test band Metallica. They just released a ton of stuff that was remastered in 2010 so it has that year.

I added this to the code:
Code:
        for use_year in [True, False]:
            if use_year:
                term1 = re.sub('[\.\-]', ' ', '%s %s %s' % (clname, clalbum, year)).encode('utf-8')
            else:
                term1 = re.sub('[\.\-]', ' ', '%s %s' % (clname, clalbum)).encode('utf-8')
            term = string.replace(term1, '"', '')

And it seems to work much better.

Also, could we get NZBsRus added as a provider?
https://www.nzbsrus.com/rssfeed.php?cat=&sub=[sub]&i=[id]&h=[hash]

[sub]=
16: Lossless
15: MP3

[cat]=54 searches all music.
It has some extra stuff that isn't in MP3/Lossless. I think they're just bootlegs and compilations.


- rembo10 - 2011-07-12

darkscout Wrote:Is there a way to get it to search without year?

Also, could we get NZBsRus added as a provider?

Yeah - I had originally set it to search just Artist & Album Name, but it was a problem for artists with self-titled albums (e.g. searching for Bon Iver - Bon Iver, Bon Iver would download For Emma, For Ever Ago)

That's why I added it in, but making it optional could work if you're having trouble downloading.

I'll add some more providers soon - i'm making everything a lot more accessible in terms of adding features, etc.


- HenryFord - 2011-07-12

steve1977 Wrote:As long as no exe, just install Activepython. There is a free version for personal use. Check out http://www.activestate.com/activepython. Once you have it installed, there you can basically just start the .py-file by double-click like an exe-file.
If you just install python 2.7 (not sure about earlier versions), you can also do that... the extension will be registered with Windows.

I will check this prog. out tonight - and I think about compiling it as a Win32 binary and hosting it - will built it every night then and offer it on my server, if it's fine with the developer of course.

I have a little bit of spare time and I'm very keen on compiling python to Win32 - if you want help with this, just give me a heads up Smile
There is also the possibility to create a setup package - just tell me what you want Smile

Edit:
Argh - I ran into an error while compiling. The compiling itself works out great, everything seems to be functional, except I get this traceback:
Code:
[12/Jul/2011:13:32:39] ENGINE Error in background task thread function <bound me
thod Autoreloader.run of <cherrypy.process.plugins.Autoreloader object at 0x0000
000002940198>>.
Traceback (most recent call last):
  File "cherrypy\process\plugins.pyc", line 474, in run
  File "cherrypy\process\plugins.pyc", line 598, in run
  File "cherrypy\process\plugins.pyc", line 589, in sysfiles
  File "email\__init__.pyc", line 79, in __getattr__
ImportError: No module named message
I can't figure out the error right now - can someone push me in the right direction?

If the database, logging, etc. works out right now, I unfortunately cannot say at this point - this will have to wait until tonight.

Edit2:
Just before you ask: I will not distribute the files before the developer says it's okay to do so.


- rembo10 - 2011-07-12

HenryFord Wrote:If you just install python 2.7 (not sure about earlier versions), you can also do that... the extension will be registered with Windows.

I will check this prog. out tonight - and I think about compiling it as a Win32 binary and hosting it - will built it every night then and offer it on my server, if it's fine with the developer of course.

I have a little bit of spare time and I'm very keen on compiling python to Win32 - if you want help with this, just give me a heads up Smile
There is also the possibility to create a setup package - just tell me what you want Smile

Edit:
Argh - I ran into an error while compiling. The compiling itself works out great, everything seems to be functional, except I get this traceback:
Code:
[12/Jul/2011:13:32:39] ENGINE Error in background task thread function <bound me
thod Autoreloader.run of <cherrypy.process.plugins.Autoreloader object at 0x0000
000002940198>>.
Traceback (most recent call last):
  File "cherrypy\process\plugins.pyc", line 474, in run
  File "cherrypy\process\plugins.pyc", line 598, in run
  File "cherrypy\process\plugins.pyc", line 589, in sysfiles
  File "email\__init__.pyc", line 79, in __getattr__
ImportError: No module named message
I can't figure out the error right now - can someone push me in the right direction?

If the database, logging, etc. works out right now, I unfortunately cannot say at this point - this will have to wait until tonight.

Edit2:
Just before you ask: I will not distribute the files before the developer says it's okay to do so.

Yeah I don't mind. (consider this my express written consent :-))

It looks like it's having trouble with the cherrypy reloader. I kept that on so it's easier for me to make changes without having to manually kill the app every time.

Try this.... in headphones.py, change:

cherrypy.config.update({
'server.thread_pool': 10,
'server.socket_port': int(settings['http_port']),
'server.socket_host': settings['http_host']
})

to:

cherrypy.config.update({
'server.thread_pool': 10,
'server.socket_port': int(settings['http_port']),
'server.socket_host': settings['http_host'],
'engine.autoreload_on': False
})

If that doesn't work, I have another idea, but that should be the easiest. In future versions I will add that line in automatically if it's being run as an exe.


- rembo10 - 2011-07-12

On another note, I made some cool changes. There's a new library scanner ( powered by beets & mutagen), I updated the filter so no more duplicates, and it finally works with non-US releases (yay!), and some other little cosmetic changes:

Headphones - Github

Much more to come.

Top Priority: Getting it to auto update
Also: Showing which albums/songs you currently have

If anyone wants to donate $5 to the Get Headphones a Website Fund, it would be much appreciated. Here's a paypal link: Donate!


- HenryFord - 2011-07-12

rembo10 Wrote:If that doesn't work, I have another idea, but that should be the easiest. In future versions I will add that line in automatically if it's being run as an exe.
It did work Smile

I compiled the newest version.
You can find the zip here:
http://www.henryford.tk/tools/headphones_win32build.zip

Just unzip and run headphones.exe - if anything goes wrong, just let me know!