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

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (/forumdisplay.php?fid=116)
+--- Thread: Headphones - Music albums & artists auto download program (/showthread.php?tid=103688)



RE: Headphones - Music albums & artists auto download program - Dilligaf - 2012-07-08 21:50

(2012-07-08 18:41)Finchy Wrote:  Thanks for that. I'm not getting it working, what am I doing wrong?
[Image: capture37.jpg]

I have put a copy of the srvany.zip files into the Headphones folder.

Huh

Edit: I don't have the headphones.exe, just the .py btw. I can't find where to download one with an .exe

Not sure, works here. You need srvany.exe and instsrv.exe in the resource kit location. You could always download and install the RK, link in program. It will install just tell it to continue when prompted that windows is wrong version. Then point RK line to Prog Files(x86)/resoiurceKit/tools folder. Are you right clicking and running as administrator? (I think that's needed) again CRS. I use the Python version and feel that is better than the .exe version as updates are quicker. Probably run as administratolr problem?? Leave user/pass blank and click system account in services.msc for credentials. Disable what's running on 8181 temporarily to get Headphones to run once and it should create config.ini in headphones directory, then edit port in config file and re enable what ever was running on 8181. Does clicking on the red I in the pic give more failure info? Looking again at pic you may need quotes around path statements with spaces in them eg. Program Files. Actually you should move Headphones to c:\Headphones as the config.ini will never be written to Program Files as MS has denied write to there.

Mike



Could also try Non sucking service manager http://nssm.cc/ I have NOT used this but it might be easier. The way I posted uses Microsoft tools.

Mike


RE: Headphones - Music albums & artists auto download program - Finchy - 2012-07-08 22:15

Hmmm, no, that's not worked. Still saying installation has failed due to an unexpected error. I'm using the admin username and password for the account credentials


RE: Headphones - Music albums & artists auto download program - Dilligaf - 2012-07-08 22:38

(2012-07-08 22:15)Finchy Wrote:  Hmmm, no, that's not worked. Still saying installation has failed due to an unexpected error. I'm using the admin username and password for the account credentials

Did you move it out of program files? You definitely need to do that. No spaces in paths!! And Windows won't let programs write to Program Files.


If you right click on headphones.py and run with python.exe (may need to browse to it) does the command window tell you anything? If the cmd window doesn't stay open you can open a command window by shift+right click on the headphones folder and "open in command window" then run "c:\python27\python.exe c:\headphones\headphones.py" minus quotes and paths adjusted for your system.
If you right click on headphones.py and run with python.exe (may need to browse to it) does the command window tell you anything? If the cmd window doesn't stay open you can open a command window by shift+right click on the headphones folder and "open in command window" then run "c:\python27\python.exe c:\headphones\headphones.py" minus quotes and paths adjusted for your system.


RE: Headphones - Music albums & artists auto download program - Finchy - 2012-07-09 08:36

Ah, no, I didn't know there couldn't be any spaces in the paths. OK, so I've moved the Headphones folder into the Python one but it's still not playing ball;

[Image: capture38.jpg]

Re the config file, I copied over the config file from the test Headphones on my laptop which did use the exe so I could edit the port number.


RE: Headphones - Music albums & artists auto download program - Dilligaf - 2012-07-09 16:44

(2012-07-09 08:36)Finchy Wrote:  Ah, no, I didn't know there couldn't be any spaces in the paths. OK, so I've moved the Headphones folder into the Python one but it's still not playing ball;

[Image: capture38.jpg]

Re the config file, I copied over the config file from the test Headphones on my laptop which did use the exe so I could edit the port number.

The pic looks OK. Try moving srvany, anyServiceInstaller and instserv to their own directory, maybe it's confusing them to be in the path or something. Look into the Windows logs to try and find the reason for failure. It's really very simple, I don't understand why it's failing. If all else fails you can try to download and install the Windows 2003 Resource kit, it's where srvany and instserv came from, I have used just the files in the .zip and had success. You are running as Administrator aren't you? If you run the command manually does it work? "c:\python27\python.exe c:\headphones\headphones.py" minus quotes and paths adjusted for your system. I really don't think it matters but you may want to try putting the headphones directory on the root of c:\

Mike


RE: Headphones - Music albums & artists auto download program - HenryFord - 2012-07-09 19:14

(2012-07-08 20:07)Finchy Wrote:  There isn't a config file in there yet, presumably it creates it on first run, but I've not been able to run it #catch22!
Well... shut down sickbeard for a moment, start headphones, change the port, restart headphones, start sickbeard again...

What exactly are the incompatibility errors you are getting?

Instead of using the service-installer, wouldn't it be better to use the task scheduler? I mean - it does the same thing, and should be hassle-free...
Another point: Do you have the UAC enabled?


RE: Headphones - Music albums & artists auto download program - rflores2323 - 2012-07-09 23:33

I have headphones installed on ubuntu 10.04 and want it to startup on boot. I have checked in the init.d folder and I do not not have a headphones startup script. I do however have a init.ubuntu script in my headphones folder. Can I use this file to make the scipt ,rename it to headphones, and place it in my init.d folder? Also should I run this as root or my user xbmc since headphones is installed in my home folder?

The below is what shows up for this file.

Code:
# path to app
APP_PATH=/usr/local/sbin/headphones

# path to python bin
DAEMON=/usr/bin/python

# startup args
DAEMON_OPTS=" Headphones.py -q"

# script name
NAME=headphones

# app name
DESC=headphones

# user
RUN_AS=root

PID_FILE=/var/run/headphones.pid



RE: Headphones - Music albums & artists auto download program - Finchy - 2012-07-09 23:41

Ah, ok, so I've shutdown Sickbeard, moved Headphones out of the "Program Files" folder and run Headphones.py. It's running, I've updated it (as it says it doesn't know what version it is), and now it's let me change to port 8185. Looks like it might be working, got to leave it for tonight, but will carry on tomorrow night.

Re the Windows version with the .exe - when I run it a seperate old fashioned looking windows opened up with it says it's not a compatible version. It ran ok in a restricted IE but didn't look right! Presumably it's for normal Windows and not Server/WHS.

Thanks for the help guys, btw!


RE: Headphones - Music albums & artists auto download program - spookystew - 2012-07-10 04:49

(2012-07-09 23:33)rflores2323 Wrote:  I have headphones installed on ubuntu 10.04 and want it to startup on boot. I have checked in the init.d folder and I do not not have a headphones startup script. I do however have a init.ubuntu script in my headphones folder. Can I use this file to make the scipt ,rename it to headphones, and place it in my init.d folder? Also should I run this as root or my user xbmc since headphones is installed in my home folder?

The below is what shows up for this file.

This is the way I did it. I used Ainer's awesome script for sickbeard (all credit goes to him, I merely hamfisted my way through it), modified the paths within to start Headphones, and boom, all done. I have used this same script for headphones, Sickbeard, and CouchPotato, and it works great. I didn't change all the references to Sickbeard in this script, obviously, as I was lazy and they weren't critical to change. After it's all done, save it, and drop it in the init.d folder...like a boss. Wink

I have encased the areas you need to change in **the asteriks** (be sure to remove the **'s from the code). Double check it, but I think I highlighted all the areas I changed. After it's done save it as whatever (I just named them headphones, sickbeard, etc.), drop it in the init.d folder and reboot to make sure it works.

EDIT: I forgot to mention I am running xbmcbuntu, if it matters.
DOUBLE EDIT: Make sure when you're done, you go to your init.d file, right click on your newly created script, and make sure "make the file executable" is checked.

Code:
#! /bin/sh

# Author: daemox
# Basis: Parts of the script based on and inspired by work from
#               tret (sabnzbd.org), beckstown (xbmc.org),
#               and midgetspy (sickbeard.com).
# Fixes: Alek (ainer.org), James (ainer.org), Tophicles (ainer.org),
#               croontje (sickbeard.com)
# Contact: http://www.ainer.org
# Version: 3.1

### BEGIN INIT INFO
# Provides:          headphones
# Required-Start:    $local_fs $network $remote_fs
# Required-Stop:     $local_fs $network $remote_fs
# Should-Start:      $NetworkManager
# Should-Stop:       $NetworkManager
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts and stops headphones
# Description:       Automatic music downloader for SABnzbd. For more information see:
#                       http://http://headphones.codeshy.com/forum/
### END INIT INFO

#Required -- Must Be Changed!
USER="**YOUR USERNAME**" #Set Linux Mint, Ubuntu, or Debian user name here.

#Required -- Defaults Provided (only change if you know you need to).
HOST="**127.0.0.1**" #Set headphones address here.
PORT="**8084**" #Set headphones port here.

#Optional -- Unneeded unless you have added a user name and password to Headphones.
SBUSR="" #Set Headphones user name (if you use one) here.
SBPWD="" #Set Headphones password (if you use one) here.

#Script -- No changes needed below.
case "$1" in
start)
#Start Sick Beard and send all messages to /dev/null.
cd **/home/$USER/.headphones**
echo "Starting Headphones...like a boss"
sudo -u $USER -EH nohup python **/home/$USER/.headphones/Headphones.py** -q > /dev/null 2>&1 &
;;
stop)
#Shutdown Sick Beard and delete the index.html files that wget generates.
echo "Stopping Headphones...LIKE A BOSS"
wget -q --user=$SBUSR --password=$SBPWD "http://$HOST:$PORT/home/shutdown/" --delete-after
sleep 6s
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac

exit 0



RE: Headphones - Music albums & artists auto download program - rflores2323 - 2012-07-12 14:22

I was wondering if rembo was going to add http://www.theaudiodb.com/


RE: Headphones - Music albums & artists auto download program - Mrkennedy - 2012-07-14 12:55

Hi first time of downloading this and trying it out.

Is there a way to sort out the music in Artist folders, and not put them in album title. Say Bon Jovi not 8 different albums of Bon Jovi.

So like

BON JOVI
..Album1
mp3.1
mp3.2

..Album2


Also having problems grabbing certain albums. I know they are in nzb.org/.su as searched for them. But they are not showing up in headphones saying no such album.

Edit, changed the settings to inc lossless and now have found them, but they are 500mb instead of the normal 100mb. It looks like because the file was bon.jovi or bon-jovi and not Bon Jovi which is what it is looking for. Is there a way to search for key words and not the exact word?

And is there a way to search for mp3 first and if no match then search for flac etc



thanks


RE: Headphones - Music albums & artists auto download program - l0spepes - 2012-08-03 20:56

I'm having a hard time getting HEADPHONES to snatch the following albums:

Rick Ross God Forgives I Don't
Drake So Far Gone

HEADPHONES is not finding any results for any of them, but if I do a manual search on NZBMAtrix and NZB.su, I do see them there.

Any idea anyone?


RE: Headphones - Music albums & artists auto download program - skabyss - 2012-08-03 21:56

Post a bug report at http://headphones.codeshy.com/forum/

Just be sure to read how to properly report a bug! You'll need your log Wink


RE: Headphones - Music albums & artists auto download program - bisk - 2012-08-11 18:05

I'd like to maintain two separate libraries, one FLAC (for XBMC) and the other MP3 (for my iOS devices). I've got Headphones setup to only download the FLAC version of albums and then I've got the post-processing setup to use ffmpeg to re-encode the FLAC files to 320kbps VPR MP3s. The issue is that it would appear that the MP3 file replaces the FLAC file that was downloaded.

Here's what I would like to accomplish
1. Download the FLAC album, rename, tag and put it into \\Server\MusicLosses\Artist\Album
2. Convert the FLAC album to VBR MP3
3. Save the MP3 album in \\Server\Music\Artist\Album

Is this possible? I'm assuming that I need to setup the Advanced Encoding Options? Would you recommend that I use ffmpeg or Lame?


RE: Headphones - Music albums & artists auto download program - rembo10 - 2012-08-14 08:06

bisk: there are two ways i can see solving this. one is to put a "do not delete original files" under the encoding options..... then allow for multiple destination directories based on file type.

a second solution would be to allow for plug-ins, where you can write your own custom post processing code and stick it into various places

just of the top of my head, i can think of problems when the original folder contains mp3s & flac files - but this is probably a good option to have (especially a 'do not delete' option) when people want to retain both formats