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)



- shinedou - 2011-07-17

I am definitely liking what I am seeing with this software. I would still like to see an option where lossless is a standalone choice. With the new setting "Highest Quality including Lossless" I am getting the .mp3 when the lossless is available.


- N3MIS15 - 2011-07-17

I'm running firefox5(restarted smoothly on ie8), just updated (2 commits behind) and still happening


- avus m3 - 2011-07-17

Wow, another great app to look into!


- thezoggy - 2011-07-17

just curious if this app is derived off sickbeard or couchpotato's code..


- Adeiko - 2011-07-17

rembo10 Wrote: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 :-)

No problem! Now at least i got it opening, will try more this afternoon Smile

Thanks for the fast answer!


- DejaVu - 2011-07-17

Top stuff Rembo10. Will upgrade now.

Really loving this program - although I have yet to work out everything properly. Smile


- gobbledigook - 2011-07-17

hi thereSmile

this looks fantastic, and is something i've been looking for for years!!

i am have had some trouble starting as daemon... i installed using the ubuntu script and left all defaults except asked it to start as a daemon. it doesn't actually start:

Code:
server@server:~$ sudo /etc/init.d/headphones stop
Stopping headphones
start-stop-daemon: warning: failed to kill 24147: No such process
1 pids were not killed
No process in pidfile '/var/run/headphones.pid' found running; none killed.
server@server:~$ sudo /etc/init.d/headphones start
Starting headphones
server@server:~$ cat /var/run/headphones.pid
24409

but if i start from the CLI it runs fine Smile will try adding as a daemon the manual way... let you know how i get on Smile

EDIT: added as a daemon as per here and still not working for meSad where am i going wrong Huh
Code:
server@server:~/.headphones$ sudo cp headphonesinit.d /etc/init.d/headphones
server@server:~/.headphones$ sudo chmod +x /etc/init.d/headphones
server@server:~/.headphones$ sudo update-rc.d /etc/init.d/headphones defaults
update-rc.d: /etc/init.d//etc/init.d/headphones: file does not exist
server@server:~/.headphones$ sudo update-rc.d /etc/init.d/headphones defaults
update-rc.d: /etc/init.d//etc/init.d/headphones: file does not exist
server@server:~/.headphones$ sudo update-rc.d headphones defaults
System start/stop links for /etc/init.d/headphones already exist.
server@server:~$ sudo /etc/init.d/headphones start
Starting headphones
server@server:~$ sudo /etc/init.d/headphones stop
Stopping headphones
start-stop-daemon: warning: failed to kill 24679: No such process
1 pids were not killed
No process in pidfile '/var/run/headphones.pid' found running; none killed.

here is the log... but it only contains data from when i started from CLI
Code:
17-Jul-2011 14:38:50 - INFO    :: MainThread : Checking to see if the database has all tables....
17-Jul-2011 14:38:51 - DEBUG   :: MainThread : Trying to execute: "git rev-parse HEAD" with shell in /home/server/.headphones
17-Jul-2011 14:38:51 - DEBUG   :: MainThread : Git output: 9011d3e4493afba88ada7e78412d28ece52a8152

17-Jul-2011 14:38:51 - INFO    :: MainThread : Headphones is already up-to-date.
17-Jul-2011 14:38:51 - INFO    :: MainThread : Starting Headphones on port: 8181

any ideas where i'm going wrong? extra info i can give?

thanx!


- darkscout - 2011-07-17

http://pastebin.com/KPHAzrnV

Is my init.d. It works fine. I modeled it after my couchpotato/sickbeard ones.
-
The diff really doesn't show what the error could be:
http://pastebin.com/AeSjnvxV

What does 'ps auxww | grep -i headphones.py' return?


- gobbledigook - 2011-07-17

thanx for your swift reply Smile

Here is my init.d script, copied from the install path so i don't think there will be an issue http://pastebin.com/F6pYs7JE

ok after a reboot i get:
Code:
server@server:~$ ps auxww | grep -i headphones.py
server    2283  0.0  0.0   9140  1044 pts/0    S+   15:40   0:00 grep --color=auto -i headphones.py
but the webui doesn't load... and the log is not updated, so:
Code:
server@server:~$ sudo /etc/init.d/headphones stop
Stopping headphones
start-stop-daemon: warning: failed to kill 1187: No such process
1 pids were not killed
No process in pidfile '/var/run/headphones.pid' found running; none killed.
server@server:~$ sudo /etc/init.d/headphones start
Starting headphones
server@server:~$ ps auxww | grep -i headphones.py
server    2350  0.0  0.0   9140  1040 pts/0    R+   15:43   0:00 grep --color=auto -i headphones.py
but i still can't access the wubui.

after stopping and then starting from terminal:
Code:
server@server:~/.headphones$ ./Headphones.py
Traceback (most recent call last):
  File "./Headphones.py", line 105, in <module>
    main()
  File "./Headphones.py", line 73, in main
    headphones.initialize()
  File "/home/server/.headphones/headphones/__init__.py", line 224, in initialize
    logger.headphones_log.initLogger(quiet=QUIET)
  File "/home/server/.headphones/headphones/logger.py", line 29, in initLogger
    filehandler = handlers.RotatingFileHandler(self.filename, maxBytes=self.max_size, backupCount=self.max_files)
  File "/usr/lib/python2.7/logging/handlers.py", line 118, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/handlers.py", line 65, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/__init__.py", line 893, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 912, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/home/server/.headphones/logs/headphones.log'
server@server:~/.headphones$ sudo ./Headphones.py
17-Jul-2011 15:45:22 - INFO :: MainThread : Checking to see if the database has all tables....
17-Jul-2011 15:45:23 - INFO :: MainThread : Headphones is already up-to-date.
17-Jul-2011 15:45:23 - INFO :: MainThread : Starting Headphones on port: 8181
and
Code:
server@server:~$ ps auxww | grep -i headphones.py
root      2384  0.0  0.0  21660  1284 pts/0    S+   15:48   0:00 sudo ./Headphones.py
root      2386  0.6  0.5 174760 23180 pts/0    Sl+  15:48   0:00 python ./Headphones.py
server    2576  0.0  0.0   9136   948 pts/1    R+   15:49   0:00 grep --color=auto -i headphones.py

i think that's pretty comprehensive Smile


- darkscout - 2011-07-17

The problem is you ran Headphones as root once, so all the settings files and such got run as root. Which is why when you run it as server, it fails. It's not running so it's correct in saying that it can't stop it.

Since it fails from the command line, it's going to fail from init.d.

You need to do a 'chown -R server /home/server/.headphones'

then 'service headphones start'. The webui should load then.


- gobbledigook - 2011-07-17

darkscout Wrote:The problem is you ran Headphones as root once.....

You need to do a 'chown -R server /home/server/.headphones'

yes i was coming to that conclusion myself, but i don't know when it happened... i didn't run the install script as root. chown didn't work for me, but manually installing from tarball then copying and editing the init file myself etc... worked so all good Smile maybe i shouldn't be so lazy!

thanx! for your helpSmile


- Mar2zz - 2011-07-17

It's really recommended to install headphones through git (git clone https://github.com/rembo10/headphones.git). That way it's easier to keep up with changes (cd /path/to/headphones && git pull makes your install up2date in seconds).

A few days ago Rembo10 changed headphones.py to Headphones.py, so the initscript wasn't working anymore. It's fixed now, but people who installed earlier as daemons should change the following in /etc/init.d/headphones:
Code:
# startup args
DAEMON_OPTS="headphones.py -q"
to
Code:
# startup args
DAEMON_OPTS="Headphones.py -q"



- HenryFord - 2011-07-18

I updated the windows-build, you can access it as always here:
http://www.henryford.tk/tools/headphones_win32build.zip


- rflores2323 - 2011-07-18

I keep getting an error message below. I am on ubuntu 10.04

I installed it like below
git clone https://github.com/rembo10/headphones.git /home/xbmc/headphones

browse to folder and then double cllick on Headphones.py and run it.

and I try to go to http://192.168.1.11:8181/home and get the below
Quote:500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
File "/music/cherrypy/_cprequest.py", line 645, in respond
File "/music/cherrypy/lib/encoding.py", line 188, in __call__
File "/music/cherrypy/_cpdispatch.py", line 29, in __call__
File "/music/headphones/webserve.py", line 38, in home
OperationalError: unable to open database file

I then run from terminal and get the below

Quote:xbmc@xbmc-desktop:~$ cd /home/xbmc/headphones
xbmc@xbmc-desktop:~/headphones$ python Headphones.py
Traceback (most recent call last):
File "Headphones.py", line 105, in <module>
main()
File "Headphones.py", line 73, in main
headphones.initialize()
File "/home/xbmc/headphones/headphones/__init__.py", line 224, in initialize
logger.headphones_log.initLogger(quiet=QUIET)
File "/home/xbmc/headphones/headphones/logger.py", line 29, in initLogger
filehandler = handlers.RotatingFileHandler(self.filename, maxBytes=self.max_size, backupCount=self.max_files)
File "/usr/lib/python2.6/logging/handlers.py", line 107, in __init__
BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
File "/usr/lib/python2.6/logging/handlers.py", line 59, in __init__
logging.FileHandler.__init__(self, filename, mode, encoding, delay)
File "/usr/lib/python2.6/logging/__init__.py", line 819, in __init__
StreamHandler.__init__(self, self._open())
File "/usr/lib/python2.6/logging/__init__.py", line 838, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/home/xbmc/headphones/logs/headphones.log'

How do I set permissions? and what files/folders need it? Also how do I set up the init.d script so that headphones launches on reboot?


- rembo10 - 2011-07-19

rflores2323 Wrote:I keep getting an error message below. I am on ubuntu 10.04

I installed it like below
git clone https://github.com/rembo10/headphones.git /home/xbmc/headphones

browse to folder and then double cllick on Headphones.py and run it.

and I try to go to http://192.168.1.11:8181/home and get the below


I then run from terminal and get the below



How do I set permissions? and what files/folders need it? Also how do I set up the init.d script so that headphones launches on reboot?

I'm not sure about the init.d - I just put a plist file (which is included - just change the path to headphones) in my LaunchAgents folder, but I'm on OS X.

Definitely a permissions issue. Maybe try:
git clone git://github.com/rembo10/headphones /home/xbmc/headphones

See if you get the same permissions errors