Merge remote-tracking branch 'tocsick/master' into develop

This commit is contained in:
rembo10
2014-05-03 18:40:11 -07:00
5 changed files with 29 additions and 2 deletions

View File

@@ -816,6 +816,14 @@
</div>
</fieldset>
<fieldset>
<h3>MPC</h3>
<div class="checkbox row">
<input type="checkbox" name="mpc_enabled" id="mpc" value="1" ${config['mpc_enabled']} /><label>Enable MPC Update</label>
</div>
</fieldset>
<fieldset>
</td>
</tr>
</table>

View File

@@ -285,6 +285,7 @@ SONGKICK_ENABLED = False
SONGKICK_APIKEY = None
SONGKICK_LOCATION = None
SONGKICK_FILTER_ENABLED = False
MPC_ENABLED = False
CACHE_SIZEMB = 32
JOURNAL_MODE = None

View File

@@ -169,6 +169,17 @@ class PROWL:
self.notify('ZOMG Lazors Pewpewpew!', 'Test Message')
class MPC:
def __init__(self):
pass
def notify( self ):
subprocess.call( ["mpc", "update"] )
class XBMC:
def __init__(self):

View File

@@ -490,6 +490,10 @@ def doPostProcessing(albumid, albumpath, release, tracks, downloaded_track_list,
boxcar = notifiers.BOXCAR()
boxcar.notify('Headphones processed: ' + pushmessage, "Download and Postprocessing completed", release['AlbumID'])
if headphones.MPC_ENABLED:
mpc = notifiers.MPC()
mpc.notify()
def embedAlbumArt(artwork, downloaded_track_list):
logger.info('Embedding album art')

View File

@@ -1090,7 +1090,8 @@ class WebInterface(object):
"songkick_filter_enabled": checked(headphones.SONGKICK_FILTER_ENABLED),
"cache_sizemb": headphones.CACHE_SIZEMB,
"file_permissions": headphones.FILE_PERMISSIONS,
"folder_permissions": headphones.FOLDER_PERMISSIONS
"folder_permissions": headphones.FOLDER_PERMISSIONS,
"mpc_enabled": checked(headphones.MPC_ENABLED)
}
# Need to convert EXTRAS to a dictionary we can pass to the config: it'll come in as a string like 2,5,6,8
@@ -1127,7 +1128,7 @@ class WebInterface(object):
osx_notify_enabled=0, osx_notify_onsnatch=0, osx_notify_app=None, boxcar_enabled=0, boxcar_onsnatch=0, boxcar_token=None, mirror=None, customhost=None, customport=None, customsleep=None, hpuser=None, hppass=None,
preferred_bitrate_high_buffer=None, preferred_bitrate_low_buffer=None, preferred_bitrate_allow_lossless=0, cache_sizemb=None, enable_https=0, https_cert=None, https_key=None, file_permissions=None, folder_permissions=None,
plex_enabled=0, plex_server_host=None, plex_client_host=None, plex_username=None, plex_password=None, plex_update=0, plex_notify=0,
songkick_enabled=0, songkick_apikey=None, songkick_location=None, songkick_filter_enabled=0, encoder_multicore=False, encoder_multicore_count=0, **kwargs):
songkick_enabled=0, songkick_apikey=None, songkick_location=None, songkick_filter_enabled=0, encoder_multicore=False, encoder_multicore_count=0, mpc_enabled=False, **kwargs ):
headphones.HTTP_HOST = http_host
headphones.HTTP_PORT = http_port
@@ -1297,6 +1298,8 @@ class WebInterface(object):
headphones.BOXCAR_ONSNATCH = boxcar_onsnatch
headphones.BOXCAR_TOKEN = boxcar_token
headphones.MPC_ENABLED = mpc_enabled
headphones.MIRROR = mirror
headphones.CUSTOMHOST = customhost
headphones.CUSTOMPORT = customport