Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated my Sick Beard tweaks to include proper name for config file. #359

Closed
wants to merge 1 commit into from
Closed

Updated my Sick Beard tweaks to include proper name for config file. #359

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 23, 2012

Added a new pull request, deprecation the old #33. This time, I've included the old fix, but also made sure that the config file is called sickbeard.ini, instead of config.ini.

Does any other script need to be altered to take into account that the file is renamed to sickbeard.ini?

Also, I plan for a later pull to add a API key to Sick Beard. Just no sure how the SABnzbd+ key is set. Any help is appreciated.

Ed1t: Also added my tweaks of #38 to make sure there is only one log dir. And Sick Beard puts its log files into the same directory as the other addons.

@lsellens
Copy link
Contributor

there is another error in the SABnzbd-suite I noticed that prevents changes made in the config gui for doing anything
in /storage/.xbmc/addons/service.downloadmanager.SABnzbd-Suite/bin/SABnzbd-Suite.service
around line 174
SABNZBD_USER=grep SABNZBD_USER $SABNZBD_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,",,g"
SABNZBD_PWD=grep SABNZBD_PWD $SABNZBD_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,",,g"
SABNZBD_IP=grep SABNZBD_IP $SABNZBD_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,",,g"

should be

SABNZBD_USER=grep SABNZBD_USER $SABNZBDSUITE_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,",,g"
SABNZBD_PWD=grep SABNZBD_PWD $SABNZBDSUITE_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,",,g"
SABNZBD_IP=grep SABNZBD_IP $SABNZBDSUITE_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,",,g"

$SABNZBD_SETTINGS points to sabnzbd.ini correct variable is $SABNZBDSUITE_SETTINGS to point to the settings.xml file

@stefansaraev
Copy link
Contributor

better optimize these greps:

cat "$ADDON_DIR/settings-default.xml" | awk -F" '{print $2"=""$4"""}' | sed '/^=/d' > /var/config/sabnzbd.conf.default
cat "$SABNZBDSUITE_SETTINGS" | awk -F" '{print $2"=""$4"""}' | sed '/^=/d' > /var/config/sabnzbd.conf

then source both files:

. /var/config/sabnzbd.conf.default
. /var/config/sabnzbd.conf

this way you have access to ALL setting variables, even if they're still not set. and you don't have to care about new ones you add later

for example see how sraue did it in OE settings addon, or vdr / tvheadend addons

EDIT: this also helps when a new config option is added to settings-defaults, but is not yet available via $ADDON_SETTINGS (example: you update defaults, user has addon installed already so defaults not copied over)

EDIT2: I mean $SABNZBDSUITE_SETTINGS not $ADDON_SETTINGS. sorry

@lsellens
Copy link
Contributor

I see what your saying, but those variables are used not only in the sabnzdb config file but also in headphones sickbeard and couchpotato so I believe there are a lot more changes necessary then the ones you posted. The SABnzbd-Suite.service looks like it could use quite a bit of optimizations. I would just like to see these lines fixed because how it is now the settings gui does nothing. I would also like to be able in the gui to pick which parts of the suite auto launch. Right now the only ones I use are sickbeard and couchpotato so I comment out the lines that launch headphones and sabnzbd.

edit: Maybe I didnt see what you were saying before but I think I do now. I wasn't thinking ahead for changes made to the add-on. I'm no expert bash scripter I'll leave that up to someone else, but these changes at least make the add-on settings function.

@ghost
Copy link
Author

ghost commented Apr 16, 2012

I'll update this with the latest changes. I think it's bad practice to not use sickbeard.ini as the config file name for Sick Beard.

@ghost
Copy link
Author

ghost commented Apr 20, 2012

Redid the whole pull request. Since logs have been previously set by @Sirenum's patch.

Also, update the package rev. Please review.

@sraue
Copy link
Contributor

sraue commented Apr 22, 2012

this will break the userconfigs which are already done from many ppl... i am unsure if we should do this actually (maybe with openelec-2.1)

@ghost ghost closed this Apr 22, 2012
@ghost ghost reopened this Apr 22, 2012
@ghost
Copy link
Author

ghost commented Apr 22, 2012

Maybe 2.1 is a good idea. So that we at least keep the consistency :)

@ghost ghost closed this Jun 16, 2012
ghollingworth pushed a commit to FiveNinjas/LibreELEC.tv.old that referenced this pull request May 23, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants