mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-16 00:25:31 +01:00
Browser launcher works now - launches browser automatically on first startup
This commit is contained in:
@@ -4,6 +4,7 @@ from cherrypy.process.plugins import Daemonizer
|
||||
from optparse import OptionParser
|
||||
from configobj import ConfigObj
|
||||
from configcreate import configCreate
|
||||
import webbrowser
|
||||
import webServer
|
||||
import time
|
||||
from threadtools import threadtool
|
||||
@@ -77,6 +78,16 @@ def serverstart():
|
||||
#Start threads
|
||||
threadtool(cherrypy.engine).subscribe()
|
||||
cherrypy.engine.timeout_monitor.unsubscribe()
|
||||
|
||||
|
||||
def browser():
|
||||
webbrowser.open('http://' + settings['http_host'] + ':' + settings['http_port'])
|
||||
|
||||
|
||||
if settings['launch_browser'] == '1':
|
||||
cherrypy.engine.subscribe('start', browser, priority=90)
|
||||
|
||||
|
||||
cherrypy.quickstart(webServer.Headphones(), config = conf)
|
||||
|
||||
|
||||
|
||||
@@ -340,7 +340,7 @@ class Headphones:
|
||||
config.exposed = True
|
||||
|
||||
|
||||
def configUpdate(self, http_host='127.0.0.1', http_username=None, http_port=8181, http_password=None, launch_browser=1,
|
||||
def configUpdate(self, http_host='127.0.0.1', http_username=None, http_port=8181, http_password=None, launch_browser=0,
|
||||
sab_host=None, sab_username=None, sab_apikey=None, sab_password=None, sab_category=None, music_download_dir=None,
|
||||
usenet_retention=None, nzbmatrix=0, nzbmatrix_username=None, nzbmatrix_apikey=None, include_lossless=0,
|
||||
flac_to_mp3=0, move_to_itunes=0, path_to_itunes=None, rename_mp3s=0, cleanup=0, add_album_art=0):
|
||||
|
||||
Reference in New Issue
Block a user