コード例 #1
0
ファイル: webserve.py プロジェクト: lgordon/headphones
	def musicScan(self, path):
		headphones.MUSIC_DIR = path
		headphones.config_write()
		try:	
			threading.Thread(target=importer.scanMusic, args=[path]).start()
		except Exception, e:
			logger.error('Unable to complete the scan: %s' % e)
コード例 #2
0
 def musicScan(self, path, redirect=None):
   headphones.MUSIC_DIR = path
   headphones.config_write()
   try:
     threading.Thread(target=librarysync.libraryScan).start()
   except Exception, e:
     logger.error('Unable to complete the scan: %s' % e)
コード例 #3
0
ファイル: webserve.py プロジェクト: kiteboy/headphones
	def musicScan(self, path, redirect=None, autoadd=0):
		headphones.ADD_ARTISTS = autoadd
		headphones.MUSIC_DIR = path
		headphones.config_write()
		try:	
			threading.Thread(target=librarysync.libraryScan).start()
		except Exception, e:
			logger.error('Unable to complete the scan: %s' % e)
コード例 #4
0
ファイル: webserve.py プロジェクト: The-Hero/headphones
 def musicScan(self, path, scan=0, redirect=None, autoadd=0):
     headphones.ADD_ARTISTS = autoadd
     headphones.MUSIC_DIR = path
     headphones.config_write() 
     if scan:
         try:    
             threading.Thread(target=librarysync.libraryScan).start()
         except Exception, e:
             logger.error('Unable to complete the scan: %s' % e)
コード例 #5
0
ファイル: webserve.py プロジェクト: zebulon501/headphones
	def configUpdate(self, http_host='0.0.0.0', 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, download_dir=None, blackhole=0, blackhole_dir=None,
		usenet_retention=None, nzbmatrix=0, nzbmatrix_username=None, nzbmatrix_apikey=None, newznab=0, newznab_host=None, newznab_apikey=None,
		nzbsorg=0, nzbsorg_uid=None, nzbsorg_hash=None, newzbin=0, newzbin_uid=None, newzbin_password=None, preferred_quality=0, preferred_bitrate=None, detect_bitrate=0, move_files=0, 
		rename_files=0, correct_metadata=0, cleanup_files=0, add_album_art=0, embed_album_art=0, destination_dir=None, folder_format=None, file_format=None, include_extras=0, interface=None, log_dir=None,
		encode=0, encoder=None, bitrate=None, encoderfolder=None, advancedencoder=None):

		headphones.HTTP_HOST = http_host
		headphones.HTTP_PORT = http_port
		headphones.HTTP_USERNAME = http_username
		headphones.HTTP_PASSWORD = http_password
		headphones.LAUNCH_BROWSER = launch_browser
		headphones.SAB_HOST = sab_host
		headphones.SAB_USERNAME = sab_username
		headphones.SAB_PASSWORD = sab_password		
		headphones.SAB_APIKEY = sab_apikey
		headphones.SAB_CATEGORY = sab_category
		headphones.DOWNLOAD_DIR = download_dir
		headphones.BLACKHOLE = blackhole
		headphones.BLACKHOLE_DIR = blackhole_dir
		headphones.USENET_RETENTION = usenet_retention
		headphones.NZBMATRIX = nzbmatrix
		headphones.NZBMATRIX_USERNAME = nzbmatrix_username
		headphones.NZBMATRIX_APIKEY = nzbmatrix_apikey
		headphones.NEWZNAB = newznab
		headphones.NEWZNAB_HOST = newznab_host
		headphones.NEWZNAB_APIKEY = newznab_apikey
		headphones.NZBSORG = nzbsorg
		headphones.NZBSORG_UID = nzbsorg_uid
		headphones.NZBSORG_HASH = nzbsorg_hash
		headphones.NEWZBIN = newzbin
		headphones.NEWZBIN_UID = newzbin_uid
		headphones.NEWZBIN_PASSWORD = newzbin_password
		headphones.PREFERRED_QUALITY = int(preferred_quality)
		headphones.PREFERRED_BITRATE = preferred_bitrate
		headphones.DETECT_BITRATE = detect_bitrate
		headphones.MOVE_FILES = move_files
		headphones.CORRECT_METADATA = correct_metadata
		headphones.RENAME_FILES = rename_files
		headphones.CLEANUP_FILES = cleanup_files
		headphones.ADD_ALBUM_ART = add_album_art
		headphones.EMBED_ALBUM_ART = embed_album_art
		headphones.DESTINATION_DIR = destination_dir
		headphones.FOLDER_FORMAT = folder_format
		headphones.FILE_FORMAT = file_format
		headphones.INCLUDE_EXTRAS = include_extras
		headphones.INTERFACE = interface
		headphones.LOG_DIR = log_dir
		headphones.ENCODE = encode
		headphones.ENCODER = encoder
		headphones.BITRATE = bitrate
		headphones.ENCODERFOLDER = encoderfolder
		headphones.ADVANCEDENCODER = advancedencoder
		
		headphones.config_write()

		raise cherrypy.HTTPRedirect("config")
コード例 #6
0
ファイル: webserve.py プロジェクト: DaChouffe/headphones
	def configUpdate(self, http_host='0.0.0.0', 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, download_dir=None, blackhole=0, blackhole_dir=None,
		usenet_retention=None, nzbmatrix=0, nzbmatrix_username=None, nzbmatrix_apikey=None, newznab=0, newznab_host=None, newznab_apikey=None,
		nzbsorg=0, nzbsorg_uid=None, nzbsorg_hash=None, prefer_lossless=0, flac_to_mp3=0, move_files=0, music_dir=None, rename_files=0, cleanup_files=0, add_album_art=0):
		
		headphones.HTTP_HOST = http_host
		headphones.HTTP_PORT = http_port
		headphones.HTTP_USERNAME = http_username
		headphones.HTTP_PASSWORD = http_password
		headphones.LAUNCH_BROWSER = launch_browser
		headphones.SAB_HOST = sab_host
		headphones.SAB_USERNAME = sab_username
		headphones.SAB_PASSWORD = sab_password		
		headphones.SAB_APIKEY = sab_apikey
		headphones.SAB_CATEGORY = sab_category
		headphones.DOWNLOAD_DIR = download_dir
		headphones.BLACKHOLE = blackhole
		headphones.BLACKHOLE_DIR = blackhole_dir
		headphones.USENET_RETENTION = usenet_retention
		headphones.NZBMATRIX = nzbmatrix
		headphones.NZBMATRIX_USERNAME = nzbmatrix_username
		headphones.NZBMATRIX_APIKEY = nzbmatrix_apikey
		headphones.NEWZNAB = newznab
		headphones.NEWZNAB_HOST = newznab_host
		headphones.NEWZNAB_APIKEY = newznab_apikey
		headphones.NZBSORG = nzbsorg
		headphones.NZBSORG_UID = nzbsorg_uid
		headphones.NZBSORG_HASH = nzbsorg_hash
		headphones.PREFER_LOSSLESS = prefer_lossless
		headphones.FLAC_TO_MP3 = flac_to_mp3
		headphones.MOVE_FILES = move_files
		headphones.MUSIC_DIR = music_dir
		headphones.RENAME_FILES = rename_files
		headphones.CLEANUP_FILES = cleanup_files
		headphones.ADD_ALBUM_ART = add_album_art
		
		headphones.config_write()

		raise cherrypy.HTTPRedirect("config")
コード例 #7
0
ファイル: webserve.py プロジェクト: redglory/headphones
    def configUpdate(
        self,
        http_host="0.0.0.0",
        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,
        download_dir=None,
        blackhole=0,
        blackhole_dir=None,
        usenet_retention=None,
        nzbmatrix=0,
        nzbmatrix_username=None,
        nzbmatrix_apikey=None,
        newznab=0,
        newznab_host=None,
        newznab_apikey=None,
        nzbsorg=0,
        nzbsorg_uid=None,
        nzbsorg_hash=None,
        newzbin=0,
        newzbin_uid=None,
        newzbin_password=None,
        preferred_quality=0,
        preferred_bitrate=None,
        detect_bitrate=0,
        move_files=0,
        torrentblackhole_dir=None,
        download_torrent_dir=None,
        numberofseeders=10,
        use_isohunt=0,
        use_kat=0,
        use_mininova=0,
        rename_files=0,
        correct_metadata=0,
        cleanup_files=0,
        add_album_art=0,
        embed_album_art=0,
        embed_lyrics=0,
        destination_dir=None,
        folder_format=None,
        file_format=None,
        include_extras=0,
        interface=None,
        log_dir=None,
        encode=0,
        encoder=None,
        bitrate=None,
        samplingfrequency=None,
        encoderfolder=None,
        advancedencoder=None,
        encoderoutputformat=None,
        encodervbrcbr=None,
        encoderquality=None,
        encoderlossless=0,
    ):

        headphones.HTTP_HOST = http_host
        headphones.HTTP_PORT = http_port
        headphones.HTTP_USERNAME = http_username
        headphones.HTTP_PASSWORD = http_password
        headphones.LAUNCH_BROWSER = launch_browser
        headphones.SAB_HOST = sab_host
        headphones.SAB_USERNAME = sab_username
        headphones.SAB_PASSWORD = sab_password
        headphones.SAB_APIKEY = sab_apikey
        headphones.SAB_CATEGORY = sab_category
        headphones.DOWNLOAD_DIR = download_dir
        headphones.BLACKHOLE = blackhole
        headphones.BLACKHOLE_DIR = blackhole_dir
        headphones.USENET_RETENTION = usenet_retention
        headphones.NZBMATRIX = nzbmatrix
        headphones.NZBMATRIX_USERNAME = nzbmatrix_username
        headphones.NZBMATRIX_APIKEY = nzbmatrix_apikey
        headphones.NEWZNAB = newznab
        headphones.NEWZNAB_HOST = newznab_host
        headphones.NEWZNAB_APIKEY = newznab_apikey
        headphones.NZBSORG = nzbsorg
        headphones.NZBSORG_UID = nzbsorg_uid
        headphones.NZBSORG_HASH = nzbsorg_hash
        headphones.NEWZBIN = newzbin
        headphones.NEWZBIN_UID = newzbin_uid
        headphones.NEWZBIN_PASSWORD = newzbin_password
        headphones.TORRENTBLACKHOLE_DIR = torrentblackhole_dir
        headphones.NUMBEROFSEEDERS = numberofseeders
        headphones.DOWNLOAD_TORRENT_DIR = download_torrent_dir
        headphones.ISOHUNT = use_isohunt
        headphones.KAT = use_kat
        headphones.MININOVA = use_mininova
        headphones.PREFERRED_QUALITY = int(preferred_quality)
        headphones.PREFERRED_BITRATE = preferred_bitrate
        headphones.DETECT_BITRATE = detect_bitrate
        headphones.MOVE_FILES = move_files
        headphones.CORRECT_METADATA = correct_metadata
        headphones.RENAME_FILES = rename_files
        headphones.CLEANUP_FILES = cleanup_files
        headphones.ADD_ALBUM_ART = add_album_art
        headphones.EMBED_ALBUM_ART = embed_album_art
        headphones.EMBED_LYRICS = embed_lyrics
        headphones.DESTINATION_DIR = destination_dir
        headphones.FOLDER_FORMAT = folder_format
        headphones.FILE_FORMAT = file_format
        headphones.INCLUDE_EXTRAS = include_extras
        headphones.INTERFACE = interface
        headphones.LOG_DIR = log_dir
        headphones.ENCODE = encode
        headphones.ENCODER = encoder
        headphones.BITRATE = int(bitrate)
        headphones.SAMPLINGFREQUENCY = int(samplingfrequency)
        headphones.ENCODERFOLDER = encoderfolder
        headphones.ADVANCEDENCODER = advancedencoder
        headphones.ENCODEROUTPUTFORMAT = encoderoutputformat
        headphones.ENCODERVBRCBR = encodervbrcbr
        headphones.ENCODERQUALITY = int(encoderquality)
        headphones.ENCODERLOSSLESS = encoderlossless

        headphones.config_write()

        raise cherrypy.HTTPRedirect("config")
コード例 #8
0
ファイル: webserve.py プロジェクト: redglory/headphones
 def importItunes(self, path):
     headphones.PATH_TO_XML = path
     headphones.config_write()
     threading.Thread(target=importer.itunesImport, args=[path]).start()
     time.sleep(10)
     raise cherrypy.HTTPRedirect("home")
コード例 #9
0
ファイル: webserve.py プロジェクト: redglory/headphones
 def importLastFM(self, username):
     headphones.LASTFM_USERNAME = username
     headphones.config_write()
     threading.Thread(target=lastfm.getArtists).start()
     time.sleep(10)
     raise cherrypy.HTTPRedirect("home")
コード例 #10
0
ファイル: webserve.py プロジェクト: Romijn/headphones
    def configUpdate(self, http_host='0.0.0.0', http_username=None, http_port=8181, http_password=None, launch_browser=0, api_enabled=0, api_key=None, download_scan_interval=None, nzb_search_interval=None, libraryscan_interval=None,
        sab_host=None, sab_username=None, sab_apikey=None, sab_password=None, sab_category=None, download_dir=None, blackhole=0, blackhole_dir=None,
        usenet_retention=None, nzbmatrix=0, nzbmatrix_username=None, nzbmatrix_apikey=None, newznab=0, newznab_host=None, newznab_apikey=None,
        nzbsorg=0, nzbsorg_uid=None, nzbsorg_hash=None, newzbin=0, newzbin_uid=None, newzbin_password=None, preferred_quality=0, preferred_bitrate=None, detect_bitrate=0, move_files=0, 
        torrentblackhole_dir=None, download_torrent_dir=None, numberofseeders=10, use_isohunt=0, use_kat=0, use_mininova=0, 
        rename_files=0, correct_metadata=0, cleanup_files=0, add_album_art=0, embed_album_art=0, embed_lyrics=0, destination_dir=None, folder_format=None, file_format=None, include_extras=0, autowant_upcoming=False, autowant_all=False, interface=None, log_dir=None,
        music_encoder=0, encoder=None, bitrate=None, samplingfrequency=None, encoderfolder=None, advancedencoder=None, encoderoutputformat=None, encodervbrcbr=None, encoderquality=None, encoderlossless=0,
        prowl_enabled=0, prowl_onsnatch=0, prowl_keys=None, prowl_priority=0, xbmc_enabled=0, xbmc_host=None, xbmc_username=None, xbmc_password=None, xbmc_update=0, xbmc_notify=0, 
        nma_enabled=False, nma_apikey=None, nma_priority=0, mirror=None, customhost=None, customport=None, customsleep=None, hpuser=None, hppass=None):

        headphones.HTTP_HOST = http_host
        headphones.HTTP_PORT = http_port
        headphones.HTTP_USERNAME = http_username
        headphones.HTTP_PASSWORD = http_password
        headphones.LAUNCH_BROWSER = launch_browser
        headphones.API_ENABLED = api_enabled
        headphones.API_KEY = api_key
        headphones.DOWNLOAD_SCAN_INTERVAL = download_scan_interval
        headphones.SEARCH_INTERVAL = nzb_search_interval
        headphones.LIBRARYSCAN_INTERVAL = libraryscan_interval
        headphones.SAB_HOST = sab_host
        headphones.SAB_USERNAME = sab_username
        headphones.SAB_PASSWORD = sab_password      
        headphones.SAB_APIKEY = sab_apikey
        headphones.SAB_CATEGORY = sab_category
        headphones.DOWNLOAD_DIR = download_dir
        headphones.BLACKHOLE = blackhole
        headphones.BLACKHOLE_DIR = blackhole_dir
        headphones.USENET_RETENTION = usenet_retention
        headphones.NZBMATRIX = nzbmatrix
        headphones.NZBMATRIX_USERNAME = nzbmatrix_username
        headphones.NZBMATRIX_APIKEY = nzbmatrix_apikey
        headphones.NEWZNAB = newznab
        headphones.NEWZNAB_HOST = newznab_host
        headphones.NEWZNAB_APIKEY = newznab_apikey
        headphones.NZBSORG = nzbsorg
        headphones.NZBSORG_UID = nzbsorg_uid
        headphones.NZBSORG_HASH = nzbsorg_hash
        headphones.NEWZBIN = newzbin
        headphones.NEWZBIN_UID = newzbin_uid
        headphones.NEWZBIN_PASSWORD = newzbin_password
        headphones.TORRENTBLACKHOLE_DIR = torrentblackhole_dir
        headphones.NUMBEROFSEEDERS = numberofseeders
        headphones.DOWNLOAD_TORRENT_DIR = download_torrent_dir
        headphones.ISOHUNT = use_isohunt
        headphones.KAT = use_kat
        headphones.MININOVA = use_mininova
        headphones.PREFERRED_QUALITY = int(preferred_quality)
        headphones.PREFERRED_BITRATE = preferred_bitrate
        headphones.DETECT_BITRATE = detect_bitrate
        headphones.MOVE_FILES = move_files
        headphones.CORRECT_METADATA = correct_metadata
        headphones.RENAME_FILES = rename_files
        headphones.CLEANUP_FILES = cleanup_files
        headphones.ADD_ALBUM_ART = add_album_art
        headphones.EMBED_ALBUM_ART = embed_album_art
        headphones.EMBED_LYRICS = embed_lyrics
        headphones.DESTINATION_DIR = destination_dir
        headphones.FOLDER_FORMAT = folder_format
        headphones.FILE_FORMAT = file_format
        headphones.INCLUDE_EXTRAS = include_extras
        headphones.AUTOWANT_UPCOMING = autowant_upcoming
        headphones.AUTOWANT_ALL = autowant_all
        headphones.INTERFACE = interface
        headphones.LOG_DIR = log_dir
        headphones.MUSIC_ENCODER = music_encoder
        headphones.ENCODER = encoder
        headphones.BITRATE = int(bitrate)
        headphones.SAMPLINGFREQUENCY = int(samplingfrequency)
        headphones.ENCODERFOLDER = encoderfolder
        headphones.ADVANCEDENCODER = advancedencoder
        headphones.ENCODEROUTPUTFORMAT = encoderoutputformat
        headphones.ENCODERVBRCBR = encodervbrcbr
        headphones.ENCODERQUALITY = int(encoderquality)
        headphones.ENCODERLOSSLESS = encoderlossless
        headphones.PROWL_ENABLED = prowl_enabled
        headphones.PROWL_ONSNATCH = prowl_onsnatch
        headphones.PROWL_KEYS = prowl_keys
        headphones.PROWL_PRIORITY = prowl_priority
        headphones.XBMC_ENABLED = xbmc_enabled
        headphones.XBMC_HOST = xbmc_host
        headphones.XBMC_USERNAME = xbmc_username
        headphones.XBMC_PASSWORD = xbmc_password
        headphones.XBMC_UPDATE = xbmc_update
        headphones.XBMC_NOTIFY = xbmc_notify
        headphones.NMA_ENABLED = nma_enabled
        headphones.NMA_APIKEY = nma_apikey
        headphones.NMA_PRIORITY = nma_priority
        headphones.MIRROR = mirror
        headphones.CUSTOMHOST = customhost
        headphones.CUSTOMPORT = customport
        headphones.CUSTOMSLEEP = customsleep
        headphones.HPUSER = hpuser
        headphones.HPPASS = hppass
        
        headphones.config_write()

        raise cherrypy.HTTPRedirect("config")
コード例 #11
0
ファイル: webserve.py プロジェクト: cybrosis/headphones
    def configUpdate(self, http_host='0.0.0.0', http_username=None, http_port=8181, http_password=None, launch_browser=0, api_enabled=0, api_key=None, 
        download_scan_interval=None, nzb_search_interval=None, libraryscan_interval=None, sab_host=None, sab_username=None, sab_apikey=None, sab_password=None, 
        sab_category=None, download_dir=None, blackhole=0, blackhole_dir=None, usenet_retention=None, nzbmatrix=0, nzbmatrix_username=None, nzbmatrix_apikey=None, 
        newznab=0, newznab_host=None, newznab_apikey=None, newznab_enabled=0, nzbsorg=0, nzbsorg_uid=None, nzbsorg_hash=None, newzbin=0, newzbin_uid=None, 
        newzbin_password=None, preferred_quality=0, preferred_bitrate=None, detect_bitrate=0, move_files=0, torrentblackhole_dir=None, download_torrent_dir=None, 
        numberofseeders=10, use_isohunt=0, use_kat=0, use_mininova=0, waffles=0, waffles_uid=None, waffles_passkey=None, whatcd=0, whatcd_username=None, whatcd_password=None,
        rutracker=0, rutracker_user=None, rutracker_password=None, rename_files=0, correct_metadata=0, cleanup_files=0, add_album_art=0, embed_album_art=0, embed_lyrics=0, 
        destination_dir=None, lossless_destination_dir=None, folder_format=None, file_format=None, include_extras=0, single=0, ep=0, compilation=0, soundtrack=0, live=0,
        remix=0, spokenword=0, audiobook=0, autowant_upcoming=False, autowant_all=False, interface=None, log_dir=None, cache_dir=None, music_encoder=0, encoder=None, bitrate=None, 
        samplingfrequency=None, encoderfolder=None, advancedencoder=None, encoderoutputformat=None, encodervbrcbr=None, encoderquality=None, encoderlossless=0, 
        delete_lossless_files=0, prowl_enabled=0, prowl_onsnatch=0, prowl_keys=None, prowl_priority=0, xbmc_enabled=0, xbmc_host=None, xbmc_username=None, xbmc_password=None, 
        xbmc_update=0, xbmc_notify=0, nma_enabled=False, nma_apikey=None, nma_priority=0, nma_onsnatch=0, synoindex_enabled=False, mirror=None, customhost=None, customport=None, 
        customsleep=None, hpuser=None, hppass=None, preferred_bitrate_high_buffer=None, preferred_bitrate_low_buffer=None, cache_sizemb=None, **kwargs):

        headphones.HTTP_HOST = http_host
        headphones.HTTP_PORT = http_port
        headphones.HTTP_USERNAME = http_username
        headphones.HTTP_PASSWORD = http_password
        headphones.LAUNCH_BROWSER = launch_browser
        headphones.API_ENABLED = api_enabled
        headphones.API_KEY = api_key
        headphones.DOWNLOAD_SCAN_INTERVAL = download_scan_interval
        headphones.SEARCH_INTERVAL = nzb_search_interval
        headphones.LIBRARYSCAN_INTERVAL = libraryscan_interval
        headphones.SAB_HOST = sab_host
        headphones.SAB_USERNAME = sab_username
        headphones.SAB_PASSWORD = sab_password      
        headphones.SAB_APIKEY = sab_apikey
        headphones.SAB_CATEGORY = sab_category
        headphones.DOWNLOAD_DIR = download_dir
        headphones.BLACKHOLE = blackhole
        headphones.BLACKHOLE_DIR = blackhole_dir
        headphones.USENET_RETENTION = usenet_retention
        headphones.NZBMATRIX = nzbmatrix
        headphones.NZBMATRIX_USERNAME = nzbmatrix_username
        headphones.NZBMATRIX_APIKEY = nzbmatrix_apikey
        headphones.NEWZNAB = newznab
        headphones.NEWZNAB_HOST = newznab_host
        headphones.NEWZNAB_APIKEY = newznab_apikey
        headphones.NEWZNAB_ENABLED = newznab_enabled
        headphones.NZBSORG = nzbsorg
        headphones.NZBSORG_UID = nzbsorg_uid
        headphones.NZBSORG_HASH = nzbsorg_hash
        headphones.NEWZBIN = newzbin
        headphones.NEWZBIN_UID = newzbin_uid
        headphones.NEWZBIN_PASSWORD = newzbin_password
        headphones.TORRENTBLACKHOLE_DIR = torrentblackhole_dir
        headphones.NUMBEROFSEEDERS = numberofseeders
        headphones.DOWNLOAD_TORRENT_DIR = download_torrent_dir
        headphones.ISOHUNT = use_isohunt
        headphones.KAT = use_kat
        headphones.MININOVA = use_mininova
        headphones.WAFFLES = waffles
        headphones.WAFFLES_UID = waffles_uid
        headphones.WAFFLES_PASSKEY = waffles_passkey
        headphones.RUTRACKER = rutracker
        headphones.RUTRACKER_USER = rutracker_user
        headphones.RUTRACKER_PASSWORD = rutracker_password
        headphones.WHATCD = whatcd
        headphones.WHATCD_USERNAME = whatcd_username
        headphones.WHATCD_PASSWORD = whatcd_password
        headphones.PREFERRED_QUALITY = int(preferred_quality)
        headphones.PREFERRED_BITRATE = preferred_bitrate
        headphones.PREFERRED_BITRATE_HIGH_BUFFER = preferred_bitrate_high_buffer
        headphones.PREFERRED_BITRATE_LOW_BUFFER = preferred_bitrate_low_buffer
        headphones.DETECT_BITRATE = detect_bitrate
        headphones.MOVE_FILES = move_files
        headphones.CORRECT_METADATA = correct_metadata
        headphones.RENAME_FILES = rename_files
        headphones.CLEANUP_FILES = cleanup_files
        headphones.ADD_ALBUM_ART = add_album_art
        headphones.EMBED_ALBUM_ART = embed_album_art
        headphones.EMBED_LYRICS = embed_lyrics
        headphones.DESTINATION_DIR = destination_dir
        headphones.LOSSLESS_DESTINATION_DIR = lossless_destination_dir
        headphones.FOLDER_FORMAT = folder_format
        headphones.FILE_FORMAT = file_format
        headphones.INCLUDE_EXTRAS = include_extras
        headphones.AUTOWANT_UPCOMING = autowant_upcoming
        headphones.AUTOWANT_ALL = autowant_all
        headphones.INTERFACE = interface
        headphones.LOG_DIR = log_dir
        headphones.CACHE_DIR = cache_dir
        headphones.MUSIC_ENCODER = music_encoder
        headphones.ENCODER = encoder
        headphones.BITRATE = int(bitrate)
        headphones.SAMPLINGFREQUENCY = int(samplingfrequency)
        headphones.ENCODERFOLDER = encoderfolder
        headphones.ADVANCEDENCODER = advancedencoder
        headphones.ENCODEROUTPUTFORMAT = encoderoutputformat
        headphones.ENCODERVBRCBR = encodervbrcbr
        headphones.ENCODERQUALITY = int(encoderquality)
        headphones.ENCODERLOSSLESS = int(encoderlossless)
        headphones.DELETE_LOSSLESS_FILES = int(delete_lossless_files)
        headphones.PROWL_ENABLED = prowl_enabled
        headphones.PROWL_ONSNATCH = prowl_onsnatch
        headphones.PROWL_KEYS = prowl_keys
        headphones.PROWL_PRIORITY = prowl_priority
        headphones.XBMC_ENABLED = xbmc_enabled
        headphones.XBMC_HOST = xbmc_host
        headphones.XBMC_USERNAME = xbmc_username
        headphones.XBMC_PASSWORD = xbmc_password
        headphones.XBMC_UPDATE = xbmc_update
        headphones.XBMC_NOTIFY = xbmc_notify
        headphones.NMA_ENABLED = nma_enabled
        headphones.NMA_APIKEY = nma_apikey
        headphones.NMA_PRIORITY = nma_priority
        headphones.NMA_ONSNATCH = nma_onsnatch
        headphones.SYNOINDEX_ENABLED = synoindex_enabled
        headphones.MIRROR = mirror
        headphones.CUSTOMHOST = customhost
        headphones.CUSTOMPORT = customport
        headphones.CUSTOMSLEEP = customsleep
        headphones.HPUSER = hpuser
        headphones.HPPASS = hppass
        headphones.CACHE_SIZEMB = cache_sizemb

        # Handle the variable config options. Note - keys with False values aren't getting passed
        
        headphones.EXTRA_NEWZNABS = []
        
        for kwarg in kwargs:
            if kwarg.startswith('newznab_host'):
                newznab_number = kwarg[12:]
                newznab_host = kwargs['newznab_host' + newznab_number]
                newznab_api = kwargs['newznab_api' + newznab_number]
                try:
                    newznab_enabled = int(kwargs['newznab_enabled' + newznab_number])
                except KeyError:
                    newznab_enabled = 0
                
                headphones.EXTRA_NEWZNABS.append((newznab_host, newznab_api, newznab_enabled))
                
        # Convert the extras to list then string. Coming in as 0 or 1
        temp_extras_list = []
        extras_list = [single, ep, compilation, soundtrack, live, remix, spokenword, audiobook]
        
        i = 1
        for extra in extras_list:
            if extra:
                temp_extras_list.append(i)
            i+=1
        
        headphones.EXTRAS = ','.join(str(n) for n in temp_extras_list)    
        
        # Write the config
        headphones.config_write()

        #reconfigure musicbrainz database connection with the new values
        mb.startmb()

        raise cherrypy.HTTPRedirect("config")
コード例 #12
0
ファイル: webserve.py プロジェクト: michelvvl/headphones
    def configUpdate(self,
                     http_host='0.0.0.0',
                     http_username=None,
                     http_port=8181,
                     http_password=None,
                     launch_browser=0,
                     api_enabled=0,
                     api_key=None,
                     download_scan_interval=None,
                     nzb_search_interval=None,
                     libraryscan_interval=None,
                     sab_host=None,
                     sab_username=None,
                     sab_apikey=None,
                     sab_password=None,
                     sab_category=None,
                     download_dir=None,
                     blackhole=0,
                     blackhole_dir=None,
                     usenet_retention=None,
                     nzbmatrix=0,
                     nzbmatrix_username=None,
                     nzbmatrix_apikey=None,
                     newznab=0,
                     newznab_host=None,
                     newznab_apikey=None,
                     newznab_enabled=0,
                     nzbsorg=0,
                     nzbsorg_uid=None,
                     nzbsorg_hash=None,
                     newzbin=0,
                     newzbin_uid=None,
                     newzbin_password=None,
                     preferred_quality=0,
                     preferred_bitrate=None,
                     detect_bitrate=0,
                     move_files=0,
                     torrentblackhole_dir=None,
                     download_torrent_dir=None,
                     numberofseeders=10,
                     use_isohunt=0,
                     use_kat=0,
                     use_mininova=0,
                     waffles=0,
                     waffles_uid=None,
                     waffles_passkey=None,
                     whatcd=0,
                     whatcd_username=None,
                     whatcd_password=None,
                     rutracker=0,
                     rutracker_user=None,
                     rutracker_password=None,
                     rename_files=0,
                     correct_metadata=0,
                     cleanup_files=0,
                     add_album_art=0,
                     embed_album_art=0,
                     embed_lyrics=0,
                     destination_dir=None,
                     lossless_destination_dir=None,
                     folder_format=None,
                     file_format=None,
                     include_extras=0,
                     single=0,
                     ep=0,
                     compilation=0,
                     soundtrack=0,
                     live=0,
                     remix=0,
                     spokenword=0,
                     audiobook=0,
                     autowant_upcoming=False,
                     autowant_all=False,
                     interface=None,
                     log_dir=None,
                     cache_dir=None,
                     music_encoder=0,
                     encoder=None,
                     xldprofile=None,
                     bitrate=None,
                     samplingfrequency=None,
                     encoderfolder=None,
                     advancedencoder=None,
                     encoderoutputformat=None,
                     encodervbrcbr=None,
                     encoderquality=None,
                     encoderlossless=0,
                     delete_lossless_files=0,
                     prowl_enabled=0,
                     prowl_onsnatch=0,
                     prowl_keys=None,
                     prowl_priority=0,
                     xbmc_enabled=0,
                     xbmc_host=None,
                     xbmc_username=None,
                     xbmc_password=None,
                     xbmc_update=0,
                     xbmc_notify=0,
                     nma_enabled=False,
                     nma_apikey=None,
                     nma_priority=0,
                     nma_onsnatch=0,
                     synoindex_enabled=False,
                     mirror=None,
                     customhost=None,
                     customport=None,
                     customsleep=None,
                     hpuser=None,
                     hppass=None,
                     preferred_bitrate_high_buffer=None,
                     preferred_bitrate_low_buffer=None,
                     cache_sizemb=None,
                     **kwargs):

        headphones.HTTP_HOST = http_host
        headphones.HTTP_PORT = http_port
        headphones.HTTP_USERNAME = http_username
        headphones.HTTP_PASSWORD = http_password
        headphones.LAUNCH_BROWSER = launch_browser
        headphones.API_ENABLED = api_enabled
        headphones.API_KEY = api_key
        headphones.DOWNLOAD_SCAN_INTERVAL = download_scan_interval
        headphones.SEARCH_INTERVAL = nzb_search_interval
        headphones.LIBRARYSCAN_INTERVAL = libraryscan_interval
        headphones.SAB_HOST = sab_host
        headphones.SAB_USERNAME = sab_username
        headphones.SAB_PASSWORD = sab_password
        headphones.SAB_APIKEY = sab_apikey
        headphones.SAB_CATEGORY = sab_category
        headphones.DOWNLOAD_DIR = download_dir
        headphones.BLACKHOLE = blackhole
        headphones.BLACKHOLE_DIR = blackhole_dir
        headphones.USENET_RETENTION = usenet_retention
        headphones.NZBMATRIX = nzbmatrix
        headphones.NZBMATRIX_USERNAME = nzbmatrix_username
        headphones.NZBMATRIX_APIKEY = nzbmatrix_apikey
        headphones.NEWZNAB = newznab
        headphones.NEWZNAB_HOST = newznab_host
        headphones.NEWZNAB_APIKEY = newznab_apikey
        headphones.NEWZNAB_ENABLED = newznab_enabled
        headphones.NZBSORG = nzbsorg
        headphones.NZBSORG_UID = nzbsorg_uid
        headphones.NZBSORG_HASH = nzbsorg_hash
        headphones.NEWZBIN = newzbin
        headphones.NEWZBIN_UID = newzbin_uid
        headphones.NEWZBIN_PASSWORD = newzbin_password
        headphones.TORRENTBLACKHOLE_DIR = torrentblackhole_dir
        headphones.NUMBEROFSEEDERS = numberofseeders
        headphones.DOWNLOAD_TORRENT_DIR = download_torrent_dir
        headphones.ISOHUNT = use_isohunt
        headphones.KAT = use_kat
        headphones.MININOVA = use_mininova
        headphones.WAFFLES = waffles
        headphones.WAFFLES_UID = waffles_uid
        headphones.WAFFLES_PASSKEY = waffles_passkey
        headphones.RUTRACKER = rutracker
        headphones.RUTRACKER_USER = rutracker_user
        headphones.RUTRACKER_PASSWORD = rutracker_password
        headphones.WHATCD = whatcd
        headphones.WHATCD_USERNAME = whatcd_username
        headphones.WHATCD_PASSWORD = whatcd_password
        headphones.PREFERRED_QUALITY = int(preferred_quality)
        headphones.PREFERRED_BITRATE = preferred_bitrate
        headphones.PREFERRED_BITRATE_HIGH_BUFFER = preferred_bitrate_high_buffer
        headphones.PREFERRED_BITRATE_LOW_BUFFER = preferred_bitrate_low_buffer
        headphones.DETECT_BITRATE = detect_bitrate
        headphones.MOVE_FILES = move_files
        headphones.CORRECT_METADATA = correct_metadata
        headphones.RENAME_FILES = rename_files
        headphones.CLEANUP_FILES = cleanup_files
        headphones.ADD_ALBUM_ART = add_album_art
        headphones.EMBED_ALBUM_ART = embed_album_art
        headphones.EMBED_LYRICS = embed_lyrics
        headphones.DESTINATION_DIR = destination_dir
        headphones.LOSSLESS_DESTINATION_DIR = lossless_destination_dir
        headphones.FOLDER_FORMAT = folder_format
        headphones.FILE_FORMAT = file_format
        headphones.INCLUDE_EXTRAS = include_extras
        headphones.AUTOWANT_UPCOMING = autowant_upcoming
        headphones.AUTOWANT_ALL = autowant_all
        headphones.INTERFACE = interface
        headphones.LOG_DIR = log_dir
        headphones.CACHE_DIR = cache_dir
        headphones.MUSIC_ENCODER = music_encoder
        headphones.ENCODER = encoder
        headphones.XLDPROFILE = xldprofile
        headphones.BITRATE = int(bitrate)
        headphones.SAMPLINGFREQUENCY = int(samplingfrequency)
        headphones.ENCODERFOLDER = encoderfolder
        headphones.ADVANCEDENCODER = advancedencoder
        headphones.ENCODEROUTPUTFORMAT = encoderoutputformat
        headphones.ENCODERVBRCBR = encodervbrcbr
        headphones.ENCODERQUALITY = int(encoderquality)
        headphones.ENCODERLOSSLESS = int(encoderlossless)
        headphones.DELETE_LOSSLESS_FILES = int(delete_lossless_files)
        headphones.PROWL_ENABLED = prowl_enabled
        headphones.PROWL_ONSNATCH = prowl_onsnatch
        headphones.PROWL_KEYS = prowl_keys
        headphones.PROWL_PRIORITY = prowl_priority
        headphones.XBMC_ENABLED = xbmc_enabled
        headphones.XBMC_HOST = xbmc_host
        headphones.XBMC_USERNAME = xbmc_username
        headphones.XBMC_PASSWORD = xbmc_password
        headphones.XBMC_UPDATE = xbmc_update
        headphones.XBMC_NOTIFY = xbmc_notify
        headphones.NMA_ENABLED = nma_enabled
        headphones.NMA_APIKEY = nma_apikey
        headphones.NMA_PRIORITY = nma_priority
        headphones.NMA_ONSNATCH = nma_onsnatch
        headphones.SYNOINDEX_ENABLED = synoindex_enabled
        headphones.MIRROR = mirror
        headphones.CUSTOMHOST = customhost
        headphones.CUSTOMPORT = customport
        headphones.CUSTOMSLEEP = customsleep
        headphones.HPUSER = hpuser
        headphones.HPPASS = hppass
        headphones.CACHE_SIZEMB = int(cache_sizemb)

        # Handle the variable config options. Note - keys with False values aren't getting passed

        headphones.EXTRA_NEWZNABS = []

        for kwarg in kwargs:
            if kwarg.startswith('newznab_host'):
                newznab_number = kwarg[12:]
                newznab_host = kwargs['newznab_host' + newznab_number]
                newznab_api = kwargs['newznab_api' + newznab_number]
                try:
                    newznab_enabled = int(kwargs['newznab_enabled' +
                                                 newznab_number])
                except KeyError:
                    newznab_enabled = 0

                headphones.EXTRA_NEWZNABS.append(
                    (newznab_host, newznab_api, newznab_enabled))

        # Convert the extras to list then string. Coming in as 0 or 1
        temp_extras_list = []
        extras_list = [
            single, ep, compilation, soundtrack, live, remix, spokenword,
            audiobook
        ]

        i = 1
        for extra in extras_list:
            if extra:
                temp_extras_list.append(i)
            i += 1

        headphones.EXTRAS = ','.join(str(n) for n in temp_extras_list)

        # Write the config
        headphones.config_write()

        #reconfigure musicbrainz database connection with the new values
        mb.startmb()

        raise cherrypy.HTTPRedirect("config")
コード例 #13
0
ファイル: webserve.py プロジェクト: michelvvl/headphones
 def importItunes(self, path):
     headphones.PATH_TO_XML = path
     headphones.config_write()
     threading.Thread(target=importer.itunesImport, args=[path]).start()
     time.sleep(10)
     raise cherrypy.HTTPRedirect("home")
コード例 #14
0
ファイル: webserve.py プロジェクト: michelvvl/headphones
 def importLastFM(self, username):
     headphones.LASTFM_USERNAME = username
     headphones.config_write()
     threading.Thread(target=lastfm.getArtists).start()
     raise cherrypy.HTTPRedirect("home")
コード例 #15
0
ファイル: webserve.py プロジェクト: kiteboy/headphones
	def configUpdate(self, http_host='0.0.0.0', http_username=None, http_port=8181, http_password=None, launch_browser=0, api_enabled=0, api_key=None, download_scan_interval=None, nzb_search_interval=None, libraryscan_interval=None,
		sab_host=None, sab_username=None, sab_apikey=None, sab_password=None, sab_category=None, download_dir=None, blackhole=0, blackhole_dir=None,
		usenet_retention=None, nzbmatrix=0, nzbmatrix_username=None, nzbmatrix_apikey=None, newznab=0, newznab_host=None, newznab_apikey=None,
		nzbsorg=0, nzbsorg_uid=None, nzbsorg_hash=None, newzbin=0, newzbin_uid=None, newzbin_password=None, preferred_quality=0, preferred_bitrate=None, detect_bitrate=0, move_files=0, 
		torrentblackhole_dir=None, download_torrent_dir=None, numberofseeders=10, use_isohunt=0, use_kat=0, use_mininova=0, 
		rename_files=0, correct_metadata=0, cleanup_files=0, add_album_art=0, embed_album_art=0, embed_lyrics=0, destination_dir=None, folder_format=None, file_format=None, include_extras=0, autowant_upcoming=False, autowant_all=False, interface=None, log_dir=None,
		music_encoder=0, encoder=None, bitrate=None, samplingfrequency=None, encoderfolder=None, advancedencoder=None, encoderoutputformat=None, encodervbrcbr=None, encoderquality=None, encoderlossless=0,
		prowl_enabled=0, prowl_onsnatch=0, prowl_keys=None, prowl_priority=0, xbmc_enabled=0, xbmc_host=None, xbmc_username=None, xbmc_password=None, xbmc_update=0, xbmc_notify=0, 
		nma_enabled=False, nma_apikey=None, nma_priority=0, mirror=None, customhost=None, customport=None, customsleep=None, hpuser=None, hppass=None):

		headphones.HTTP_HOST = http_host
		headphones.HTTP_PORT = http_port
		headphones.HTTP_USERNAME = http_username
		headphones.HTTP_PASSWORD = http_password
		headphones.LAUNCH_BROWSER = launch_browser
		headphones.API_ENABLED = api_enabled
		headphones.API_KEY = api_key
		headphones.DOWNLOAD_SCAN_INTERVAL = download_scan_interval
		headphones.SEARCH_INTERVAL = nzb_search_interval
		headphones.LIBRARYSCAN_INTERVAL = libraryscan_interval
		headphones.SAB_HOST = sab_host
		headphones.SAB_USERNAME = sab_username
		headphones.SAB_PASSWORD = sab_password		
		headphones.SAB_APIKEY = sab_apikey
		headphones.SAB_CATEGORY = sab_category
		headphones.DOWNLOAD_DIR = download_dir
		headphones.BLACKHOLE = blackhole
		headphones.BLACKHOLE_DIR = blackhole_dir
		headphones.USENET_RETENTION = usenet_retention
		headphones.NZBMATRIX = nzbmatrix
		headphones.NZBMATRIX_USERNAME = nzbmatrix_username
		headphones.NZBMATRIX_APIKEY = nzbmatrix_apikey
		headphones.NEWZNAB = newznab
		headphones.NEWZNAB_HOST = newznab_host
		headphones.NEWZNAB_APIKEY = newznab_apikey
		headphones.NZBSORG = nzbsorg
		headphones.NZBSORG_UID = nzbsorg_uid
		headphones.NZBSORG_HASH = nzbsorg_hash
		headphones.NEWZBIN = newzbin
		headphones.NEWZBIN_UID = newzbin_uid
		headphones.NEWZBIN_PASSWORD = newzbin_password
		headphones.TORRENTBLACKHOLE_DIR = torrentblackhole_dir
		headphones.NUMBEROFSEEDERS = numberofseeders
		headphones.DOWNLOAD_TORRENT_DIR = download_torrent_dir
		headphones.ISOHUNT = use_isohunt
		headphones.KAT = use_kat
		headphones.MININOVA = use_mininova
		headphones.PREFERRED_QUALITY = int(preferred_quality)
		headphones.PREFERRED_BITRATE = preferred_bitrate
		headphones.DETECT_BITRATE = detect_bitrate
		headphones.MOVE_FILES = move_files
		headphones.CORRECT_METADATA = correct_metadata
		headphones.RENAME_FILES = rename_files
		headphones.CLEANUP_FILES = cleanup_files
		headphones.ADD_ALBUM_ART = add_album_art
		headphones.EMBED_ALBUM_ART = embed_album_art
		headphones.EMBED_LYRICS = embed_lyrics
		headphones.DESTINATION_DIR = destination_dir
		headphones.FOLDER_FORMAT = folder_format
		headphones.FILE_FORMAT = file_format
		headphones.INCLUDE_EXTRAS = include_extras
		headphones.AUTOWANT_UPCOMING = autowant_upcoming
		headphones.AUTOWANT_ALL = autowant_all
		headphones.INTERFACE = interface
		headphones.LOG_DIR = log_dir
		headphones.MUSIC_ENCODER = music_encoder
		headphones.ENCODER = encoder
		headphones.BITRATE = int(bitrate)
		headphones.SAMPLINGFREQUENCY = int(samplingfrequency)
		headphones.ENCODERFOLDER = encoderfolder
		headphones.ADVANCEDENCODER = advancedencoder
		headphones.ENCODEROUTPUTFORMAT = encoderoutputformat
		headphones.ENCODERVBRCBR = encodervbrcbr
		headphones.ENCODERQUALITY = int(encoderquality)
		headphones.ENCODERLOSSLESS = encoderlossless
		headphones.PROWL_ENABLED = prowl_enabled
		headphones.PROWL_ONSNATCH = prowl_onsnatch
		headphones.PROWL_KEYS = prowl_keys
		headphones.PROWL_PRIORITY = prowl_priority
		headphones.XBMC_ENABLED = xbmc_enabled
		headphones.XBMC_HOST = xbmc_host
		headphones.XBMC_USERNAME = xbmc_username
		headphones.XBMC_PASSWORD = xbmc_password
		headphones.XBMC_UPDATE = xbmc_update
		headphones.XBMC_NOTIFY = xbmc_notify
		headphones.NMA_ENABLED = nma_enabled
		headphones.NMA_APIKEY = nma_apikey
		headphones.NMA_PRIORITY = nma_priority
		headphones.MIRROR = mirror
		headphones.CUSTOMHOST = customhost
		headphones.CUSTOMPORT = customport
		headphones.CUSTOMSLEEP = customsleep
		headphones.HPUSER = hpuser
		headphones.HPPASS = hppass
		
		headphones.config_write()

		raise cherrypy.HTTPRedirect("config")
コード例 #16
0
    def configUpdate(self,
                     http_host='0.0.0.0',
                     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,
                     download_dir=None,
                     blackhole=0,
                     blackhole_dir=None,
                     usenet_retention=None,
                     nzbmatrix=0,
                     nzbmatrix_username=None,
                     nzbmatrix_apikey=None,
                     newznab=0,
                     newznab_host=None,
                     newznab_apikey=None,
                     nzbsorg=0,
                     nzbsorg_uid=None,
                     nzbsorg_hash=None,
                     newzbin=0,
                     newzbin_uid=None,
                     newzbin_password=None,
                     preferred_quality=0,
                     preferred_bitrate=None,
                     detect_bitrate=0,
                     move_files=0,
                     torrentblackhole_dir=None,
                     download_torrent_dir=None,
                     numberofseeders=10,
                     use_isohunt=0,
                     use_kat=0,
                     use_mininova=0,
                     rename_files=0,
                     correct_metadata=0,
                     cleanup_files=0,
                     add_album_art=0,
                     embed_album_art=0,
                     embed_lyrics=0,
                     destination_dir=None,
                     folder_format=None,
                     file_format=None,
                     include_extras=0,
                     interface=None,
                     log_dir=None,
                     encode=0,
                     encoder=None,
                     bitrate=None,
                     samplingfrequency=None,
                     encoderfolder=None,
                     advancedencoder=None,
                     encoderoutputformat=None,
                     encodervbrcbr=None,
                     encoderquality=None,
                     encoderlossless=0):

        headphones.HTTP_HOST = http_host
        headphones.HTTP_PORT = http_port
        headphones.HTTP_USERNAME = http_username
        headphones.HTTP_PASSWORD = http_password
        headphones.LAUNCH_BROWSER = launch_browser
        headphones.SAB_HOST = sab_host
        headphones.SAB_USERNAME = sab_username
        headphones.SAB_PASSWORD = sab_password
        headphones.SAB_APIKEY = sab_apikey
        headphones.SAB_CATEGORY = sab_category
        headphones.DOWNLOAD_DIR = download_dir
        headphones.BLACKHOLE = blackhole
        headphones.BLACKHOLE_DIR = blackhole_dir
        headphones.USENET_RETENTION = usenet_retention
        headphones.NZBMATRIX = nzbmatrix
        headphones.NZBMATRIX_USERNAME = nzbmatrix_username
        headphones.NZBMATRIX_APIKEY = nzbmatrix_apikey
        headphones.NEWZNAB = newznab
        headphones.NEWZNAB_HOST = newznab_host
        headphones.NEWZNAB_APIKEY = newznab_apikey
        headphones.NZBSORG = nzbsorg
        headphones.NZBSORG_UID = nzbsorg_uid
        headphones.NZBSORG_HASH = nzbsorg_hash
        headphones.NEWZBIN = newzbin
        headphones.NEWZBIN_UID = newzbin_uid
        headphones.NEWZBIN_PASSWORD = newzbin_password
        headphones.TORRENTBLACKHOLE_DIR = torrentblackhole_dir
        headphones.NUMBEROFSEEDERS = numberofseeders
        headphones.DOWNLOAD_TORRENT_DIR = download_torrent_dir
        headphones.ISOHUNT = use_isohunt
        headphones.KAT = use_kat
        headphones.MININOVA = use_mininova
        headphones.PREFERRED_QUALITY = int(preferred_quality)
        headphones.PREFERRED_BITRATE = preferred_bitrate
        headphones.DETECT_BITRATE = detect_bitrate
        headphones.MOVE_FILES = move_files
        headphones.CORRECT_METADATA = correct_metadata
        headphones.RENAME_FILES = rename_files
        headphones.CLEANUP_FILES = cleanup_files
        headphones.ADD_ALBUM_ART = add_album_art
        headphones.EMBED_ALBUM_ART = embed_album_art
        headphones.EMBED_LYRICS = embed_lyrics
        headphones.DESTINATION_DIR = destination_dir
        headphones.FOLDER_FORMAT = folder_format
        headphones.FILE_FORMAT = file_format
        headphones.INCLUDE_EXTRAS = include_extras
        headphones.INTERFACE = interface
        headphones.LOG_DIR = log_dir
        headphones.ENCODE = encode
        headphones.ENCODER = encoder
        headphones.BITRATE = int(bitrate)
        headphones.SAMPLINGFREQUENCY = int(samplingfrequency)
        headphones.ENCODERFOLDER = encoderfolder
        headphones.ADVANCEDENCODER = advancedencoder
        headphones.ENCODEROUTPUTFORMAT = encoderoutputformat
        headphones.ENCODERVBRCBR = encodervbrcbr
        headphones.ENCODERQUALITY = int(encoderquality)
        headphones.ENCODERLOSSLESS = encoderlossless

        headphones.config_write()

        raise cherrypy.HTTPRedirect("config")