diff --git a/Maraschino.py b/Maraschino.py index 927909e1..5897a122 100755 --- a/Maraschino.py +++ b/Maraschino.py @@ -43,31 +43,13 @@ def get_rundir(): def import_modules(): + for mod in maraschino.MODULES: + module = 'modules.{0}'.format(mod) + try: + __import__(module) + except ImportError: + pass """All modules that are available in Maraschino are at this point imported.""" - import modules.applications - import modules.controls - import modules.couchpotato - import modules.currently_playing - import modules.diskspace - import modules.headphones - import modules.index - import modules.ipcamera - import modules.library - import modules.log - import modules.nzbget - import modules.recently_added - import modules.remote - import modules.sabnzbd - import modules.script_launcher - import modules.search - import modules.sickbeard - import modules.trakt - import modules.traktplus - import modules.transmission - import modules.updater - import modules.utorrent - import modules.weather - import modules.xbmc_notify import mobile import xbmcmm @@ -80,6 +62,7 @@ def shutdown_session(exception=None): import maraschino + def main(): """Main function that is called at the startup of Maraschino.""" from optparse import OptionParser diff --git a/maraschino/__init__.py b/maraschino/__init__.py index 83f3f9f6..cb5ff8d2 100644 --- a/maraschino/__init__.py +++ b/maraschino/__init__.py @@ -6,6 +6,8 @@ import subprocess import threading import wsgiserver +import imp +import copy from Maraschino import app from Logger import maraschinoLogger from apscheduler.scheduler import Scheduler @@ -44,6 +46,8 @@ COMMITS_BEHIND = 0 COMMITS_COMPARE_URL = '' FIRST_RUN = 0 +MODULES = [] +MODULES_CONF = '' def initialize(): @@ -52,7 +56,7 @@ def initialize(): global __INITIALIZED__, app, FULL_PATH, RUNDIR, ARGS, DAEMON, PIDFILE, VERBOSE, LOG_FILE, LOG_DIR, logger, PORT, SERVER, DATABASE, AUTH, \ UPDATER, CURRENT_COMMIT, LATEST_COMMIT, COMMITS_BEHIND, COMMITS_COMPARE_URL, USE_GIT, WEBROOT, HOST, KIOSK, DATA_DIR, SCRIPT_DIR, \ - THREADS, FIRST_RUN + THREADS, FIRST_RUN, MODULES, MODULES_CONF if __INITIALIZED__: return False @@ -137,6 +141,31 @@ def initialize(): 'password': password } + #Modular modules + module_dir = os.path.join(DATA_DIR, 'modules') + for path, dirs, files in os.walk(module_dir): + for name in files: + if name.endswith('.ini'): + MODULES.append(name.replace('.ini', '')) + + for mod in MODULES: + ini_path = os.path.join(module_dir, "{0}.ini".format(mod)) + if os.path.getsize(ini_path) <= 0: + pass + else: + conf_imp = imp.load_source(mod, ini_path) + if isinstance(conf_imp.mod_conf, list): + try: + data + except NameError: + data = copy.deepcopy(conf_imp.mod_conf) + else: + data = copy.deepcopy(data) + copy.deepcopy(conf_imp.mod_conf) + else: + pass + conf_imp = '' + MODULES_CONF = data + # Set up web server if '--webroot' not in str(ARGS): WEBROOT = get_setting_value('maraschino_webroot') @@ -206,7 +235,6 @@ def start(): logger.log(' ##### IMPORTANT : WEBROOT DOES NOT WORK UNDER THE DEV SERVER #######', 'INFO') app.run(debug=True, port=PORT, host=HOST) - def stop(): """Shutdown Maraschino""" logger.log('Shutting down Maraschino...', 'INFO') diff --git a/maraschino/modules.py b/maraschino/modules.py index 12439c9d..e90d1327 100644 --- a/maraschino/modules.py +++ b/maraschino/modules.py @@ -25,701 +25,8 @@ # settings are also taken from the database - the values here are defaults # if static = True then poll and delay are ignored -AVAILABLE_MODULES = [ - { - 'name': 'couchpotato', - 'label': 'Manager - CouchPotato', - 'description': 'Manage CouchPotato from within Maraschino', - 'static': True, - 'poll': 0, - 'delay': 0, - 'settings': [ - { - 'key': 'couchpotato_api', - 'value': '', - 'description': 'CouchPotato API Key', - }, - { - 'key': 'couchpotato_user', - 'value': '', - 'description': 'CouchPotato Username', - }, - { - 'key': 'couchpotato_password', - 'value': '', - 'description': 'CouchPotato Password', - }, - { - 'key': 'couchpotato_ip', - 'value': '', - 'description': 'CouchPotato Hostname', - }, - { - 'key': 'couchpotato_port', - 'value': '', - 'description': 'CouchPotato Port', - }, - { - 'key': 'couchpotato_webroot', - 'value': '', - 'description': 'CouchPotato Webroot', - }, - { - 'key': 'couchpotato_https', - 'value': '0', - 'description': 'Use HTTPS', - 'type': 'bool', - }, - { - 'key': 'couchpotato_compact', - 'value': '0', - 'description': 'Compact view', - 'type': 'bool', - }, - ] - }, - { - 'name': 'headphones', - 'label': 'Manager - Headphones', - 'description': 'Manage Headphones from within Maraschino', - 'static': True, - 'poll': 0, - 'delay': 0, - 'settings': [ - { - 'key': 'headphones_host', - 'value': '', - 'description': 'Headphones Hostname', - }, - { - 'key': 'headphones_port', - 'value': '', - 'description': 'Headphones Port', - }, - { - 'key': 'headphones_webroot', - 'value': '', - 'description': 'Headphones Webroot', - }, - { - 'key': 'headphones_user', - 'value': '', - 'description': 'Headphones Username', - }, - { - 'key': 'headphones_password', - 'value': '', - 'description': 'Headphones Password', - }, - { - 'key': 'headphones_api', - 'value': '', - 'description': 'Headphones API Key', - }, - { - 'key': 'headphones_https', - 'value': '0', - 'description': 'Use HTTPS', - 'type': 'bool', - }, - { - 'key': 'headphones_compact', - 'value': '0', - 'description': 'Compact view', - 'type': 'bool', - }, - ] - }, - { - 'name': 'sickbeard', - 'label': 'Manager - Sickbeard', - 'description': 'Manage Sickbeard from within Maraschino', - 'static': True, - 'poll': 0, - 'delay': 0, - 'settings': [ - { - 'key': 'sickbeard_api', - 'value': '', - 'description': 'Sickbeard API Key', - }, - { - 'key': 'sickbeard_user', - 'value': '', - 'description': 'Sickbeard Username', - }, - { - 'key': 'sickbeard_password', - 'value': '', - 'description': 'Sickbeard Password', - }, - { - 'key': 'sickbeard_ip', - 'value': '', - 'description': 'Sickbeard Hostname', - }, - { - 'key': 'sickbeard_port', - 'value': '', - 'description': 'Sickbeard Port', - }, - { - 'key': 'sickbeard_webroot', - 'value': '', - 'description': 'Sickbeard Webroot', - }, - { - 'key': 'sickbeard_https', - 'value': '0', - 'description': 'Use HTTPS', - 'type': 'bool', - }, - { - 'key': 'sickbeard_compact', - 'value': '0', - 'description': 'Compact view', - 'type': 'bool', - }, - { - 'key': 'sickbeard_airdate', - 'value': '0', - 'description': 'Show air date', - 'type': 'bool', - }, - ] - }, - { - 'name': 'library', - 'label': 'XBMC - Library', - 'description': 'Allows you to browse your XBMC library and select items to play in XBMC.', - 'static': True, - 'poll': 0, - 'delay': 0, - 'settings': [ - { - 'key': 'library_show_info', - 'value': '0', - 'description': 'Show media information by default', - 'type': 'bool', - }, - { - 'key': 'library_ignore_the', - 'value': '1', - 'description': 'Ignore "The" in titles', - 'type': 'bool', - }, - { - 'key': 'library_show_power_buttons', - 'value': '1', - 'description': 'Show Power Controls', - 'type': 'bool', - }, - { - 'key': 'library_show_music', - 'value': '1', - 'description': 'Show music', - 'type': 'bool', - }, - { - 'key': 'library_show_pvr', - 'value': '0', - 'description': 'Show PVR (XBMC 12+ only)', - 'type': 'bool', - }, - { - 'key': 'library_show_files', - 'value': '1', - 'description': 'Show files', - 'type': 'bool', - }, - ] - }, - { - 'name': 'recently_added_albums', - 'label': 'XBMC - Recent Albums', - 'description': 'Shows you Albums recently added to your library.', - 'static': False, - 'poll': 350, - 'delay': 0, - 'settings': [ - { - 'key': 'num_recent_albums', - 'value': 3, - 'description': 'Number of albums to display', - }, - { - 'key': 'recently_added_albums_compact', - 'value': '0', - 'description': 'Compact view', - 'type': 'bool', - }, - { - 'key': 'recently_added_albums_info', - 'value': '0', - 'description': 'View information when selecting album', - 'type': 'bool', - }, - { - 'key': 'recently_added_albums_server', - 'value': '', - 'description': 'XBMC server', - 'type': 'select', - 'options': None, - 'xbmc_servers': True - }, - ] - }, - { - 'name': 'recently_added', - 'label': 'XBMC - Recent Episodes', - 'description': 'Shows you TV Episodes recently added to your library.', - 'static': False, - 'poll': 350, - 'delay': 0, - 'settings': [ - { - 'key': 'num_recent_episodes', - 'value': 3, - 'description': 'Number of episodes to display', - }, - { - 'key': 'recently_added_compact', - 'value': '0', - 'description': 'Compact view', - 'type': 'bool', - }, - { - 'key': 'recently_added_watched_episodes', - 'value': '1', - 'description': 'Show Watched Episodes', - 'type': 'bool', - }, - { - 'key': 'recently_added_info', - 'value': '0', - 'description': 'View information when selecting episode', - 'type': 'bool', - }, - { - 'key': 'recently_added_server', - 'value': '', - 'description': 'XBMC server', - 'type': 'select', - 'options': None, - 'xbmc_servers': True - }, - ] - }, - { - 'name': 'recently_added_movies', - 'label': 'XBMC - Recent Movies', - 'description': 'Shows you Movies recently added to your library.', - 'static': False, - 'poll': 350, - 'delay': 0, - 'settings': [ - { - 'key': 'num_recent_movies', - 'value': 3, - 'description': 'Number of movies to display', - }, - { - 'key': 'recently_added_movies_compact', - 'value': '0', - 'description': 'Compact view', - 'type': 'bool', - }, - { - 'key': 'recently_added_watched_movies', - 'value': '1', - 'description': 'Show Watched Movies', - 'type': 'bool', - }, - { - 'key': 'recently_added_movies_info', - 'value': '0', - 'description': 'View information when selecting movie', - 'type': 'bool', - }, - { - 'key': 'recently_added_movies_server', - 'value': '', - 'description': 'XBMC server', - 'type': 'select', - 'options': None, - 'xbmc_servers': True - }, - ] - }, - { - 'name': 'synopsis', - 'label': 'XBMC - Synopsis', - 'description': 'Shows you a plot synopsis of what you are currently watching.', - 'static': True, - 'poll': 0, - 'delay': 0, - }, - { - 'name': 'nzbget', - 'label': 'Usenet - NZBGet', - 'description': 'Shows you information about your NZBGet downloads.', - 'static': False, - 'poll': 10, - 'delay': 0, - 'settings': [ - { - 'key': 'nzbget_host', - 'value': '', - 'description': 'Hostname', - }, - { - 'key': 'nzbget_port', - 'value': '', - 'description': 'Port', - }, - { - 'key': 'nzbget_password', - 'value': '', - 'description': 'Password', - }, - { - 'key': 'nzbget_https', - 'value': '0', - 'description': 'Use HTTPS', - 'type': 'bool', - }, - ] - }, - { - 'name': 'sabnzbd', - 'label': 'Usenet - SABnzbd+', - 'description': 'Shows you information about your SABnzbd+ downloads.', - 'static': False, - 'poll': 10, - 'delay': 0, - 'settings': [ - { - 'key': 'sabnzbd_host', - 'value': '', - 'description': 'Hostname', - }, - { - 'key': 'sabnzbd_port', - 'value': '', - 'description': 'Port', - }, - { - 'key': 'sabnzbd_webroot', - 'value': '', - 'description': 'Webroot', - }, - { - 'key': 'sabnzbd_api', - 'value': '', - 'description': 'API Key', - }, - { - 'key': 'sabnzbd_https', - 'value': '0', - 'description': 'Use HTTPS', - 'type': 'bool', - }, - { - 'key': 'sabnzbd_show_empty', - 'value': '1', - 'description': 'Show module when queue is empty', - 'type': 'bool', - }, - ] - }, - { - 'name': 'transmission', - 'label': 'Torrent - Transmission', - 'description': 'Shows you information about your Transmission downloads.', - 'static': False, - 'poll': 10, - 'delay': 0, - 'settings': [ - { - 'key': 'transmission_ip', - 'value': '', - 'description': 'Transmission Hostname', - }, - { - 'key': 'transmission_port', - 'value': '9091', - 'description': 'Transmission Port', - }, - { - 'key': 'transmission_user', - 'value': '', - 'description': 'Transmission Username', - }, - { - 'key': 'transmission_password', - 'value': '', - 'description': 'Transmission Password', - }, - { - 'key': 'transmission_webroot', - 'value': '', - 'description': 'Transmission Webroot (Optional)', - }, - { - 'key': 'transmission_show_empty', - 'value': '1', - 'description': 'Show module with no active torrents', - 'type': 'bool', - }, - ] - }, - { - 'name': 'utorrent', - 'label': 'Torrent - uTorrent', - 'description': 'Shows information about uTorrent downloads', - 'static': False, - 'poll': 10, - 'delay': 0, - 'settings': [ - { - 'key': 'utorrent_ip', - 'value': '', - 'description': 'uTorrent Hostname', - }, - { - 'key': 'utorrent_port', - 'value': '8080', - 'description': 'uTorrent Port', - }, - { - 'key': 'utorrent_user', - 'value': '', - 'description': 'uTorrent Username', - }, - { - 'key': 'utorrent_password', - 'value': '', - 'description': 'uTorrent Password', - }, - ] - }, - { - 'name': 'traktplus', - 'label': 'Trakt.TV', - 'description': 'trakt.tv module', - 'static': False, - 'poll': 0, - 'delay': 10, - 'settings': [ - { - 'key': 'trakt_api_key', - 'value': '', - 'description': 'Trakt API Key', - 'link': 'http://trakt.tv/settings/api', - }, - { - 'key': 'trakt_username', - 'value': '', - 'description': 'Trakt Username', - }, - { - 'key': 'trakt_password', - 'value': '', - 'description': 'Trakt Password', - }, - { - 'key': 'trakt_default_view', - 'value': 'trending', - 'description': 'Default view', - 'type': 'select', - 'options': [ - {'value': 'trending_shows', 'label': 'Trending (TV Shows)'}, - {'value': 'trending_movies', 'label': 'Trending (Movies)'}, - {'value': 'activity_friends', 'label': 'Activity (Friends)'}, - {'value': 'activity_community', 'label': 'Activity (Community)'}, - {'value': 'friends', 'label': 'Friends'}, - {'value': 'calendar' , 'label': 'Calendar'}, - {'value': 'recommendations_shows' , 'label': 'Recommendations (TV Shows)'}, - {'value': 'recommendations_movies' , 'label': 'Recommendations (Movies)'}, - {'value': 'profile' , 'label': 'My profile'}, - ] - }, - { - 'key': 'trakt_default_media', - 'value': 'shows', - 'description': 'Default media type', - 'type': 'select', - 'options': [ - {'value': 'shows', 'label': 'Shows'}, - {'value': 'movies', 'label': 'Movies'}, - ] - }, - { - 'key': 'trakt_trending_limit', - 'value': '20', - 'description': 'How many trending items to display', - 'type': 'select', - 'options': [ - {'value': '20', 'label': '20'}, - {'value': '40', 'label': '40'}, - {'value': '60', 'label': '60'}, - ] - }, - ] - }, - { - 'name': 'trakt', - 'label': 'Trakt.TV - Shouts', - 'description': 'Shows you what people are saying about what you are watching and allows you to add your own comments.', - 'static': True, - 'poll': 0, - 'delay': 0, - 'settings': [ - { - 'key': 'trakt_api_key', - 'value': '', - 'description': 'Trakt API Key', - 'link': 'http://trakt.tv/settings/api', - }, - { - 'key': 'trakt_username', - 'value': '', - 'description': 'Trakt Username', - }, - { - 'key': 'trakt_password', - 'value': '', - 'description': 'Trakt Password', - }, - ] - }, - { - 'name': 'applications', - 'label': 'Utility - Applications', - 'description': 'Allows you to link to whatever applications you want (SabNZBd, SickBeard, etc.)', - 'static': True, - 'poll': 0, - 'delay': 0, - 'settings': [ - { - 'key': 'app_new_tab', - 'value': '0', - 'description': 'Open application in new tab.', - 'type': 'bool', - }, - ] - }, - { - 'name': 'diskspace', - 'label': 'Utility - Disk space', - 'description': 'Shows you available disk space on your various drives.', - 'static': False, - 'poll': 350, - 'delay': 0, - 'settings': [ - { - 'key': 'show_grouped_disks', - 'value': '0', - 'description': 'Show grouped disks outside of group.', - 'type': 'bool', - }, - { - 'key': 'use_binary_units', - 'value': '1', - 'description': 'Use binary storage units (eg. GiB rather than GB)', - 'type': 'bool', - }, - ] - }, - { - 'name':'ipcamera', - 'label':'Utility - IP Camera', - 'description':'Show and control your ip camera', - 'static': False, - 'poll': 0, - 'delay': 0, - 'settings': [ - { - 'key': 'ipcamera_ip', - 'value': '', - 'description': 'Ip', - }, - { - 'key': 'ipcamera_port', - 'value': '', - 'description': 'Port', - }, - { - 'key': 'ipcamera_username', - 'value': '', - 'description': 'Username', - }, - { - 'key': 'ipcamera_password', - 'value': '', - 'description': 'Password', - }, - { - 'key': 'ipcamera_type', - 'value': 'fosscammjeg', - 'description': 'Pick your camera', - 'type': 'select', - 'options': [ - {'value':'foscammjeg', 'label':'Foscam MJEG'}, - {'value':'foscammp4', 'label':'Foscam MP4'}, - ] - }, - ] - }, - { - 'name': 'script_launcher', - 'label': 'Utility - Script Launcher', - 'description': 'Runs scripts on same system Maraschino is located.', - 'static': False, - 'poll': 350, - 'delay': 0, - }, - { - 'name': 'weather', - 'label': 'Utility - Weather', - 'description': 'Weather details.', - 'static': False, - 'poll': 350, - 'delay': 0, - 'settings': [ - { - 'key': 'weather_location', - 'value': '', - 'description': 'weather.com area ID', - 'link': 'http://edg3.co.uk/snippets/weather-location-codes/', - }, - { - 'key': 'weather_use_celcius', - 'value': '0', - 'description': 'Temperature in C', - 'type': 'bool', - }, - { - 'key': 'weather_use_kilometers', - 'value': '0', - 'description': 'Wind Speed in Km', - 'type': 'bool', - }, - { - 'key': 'weather_time', - 'value': '0', - 'description': '24 hour time', - 'type': 'bool', - }, - { - 'key': 'weather_compact', - 'value': '0', - 'description': 'Compact view', - 'type': 'bool', - }, - ] - }, -] + +AVAILABLE_MODULES = copy.copy(maraschino.MODULES_CONF) MISC_SETTINGS = [ { @@ -817,6 +124,7 @@ }, ] + @app.route('/xhr/add_module_dialog') @requires_auth def add_module_dialog(): @@ -830,10 +138,7 @@ def add_module_dialog(): if module_on_page.name == available_module['name']: available_modules.remove(available_module) break - - return render_template('dialogs/add_module_dialog.html', - available_modules = available_modules, - ) + return render_template('dialogs/add_module_dialog.html', available_modules=available_modules) @app.route('/xhr/add_module', methods=['POST']) @requires_auth @@ -850,7 +155,6 @@ def add_module(): if not module_info: raise Exception - except: return jsonify({ 'status': 'error' }) @@ -883,9 +187,7 @@ def add_module(): # the rendered module if module_info['static'] and not 'settings' in module_info: - return render_template('placeholder_template.html', - module = module_info - ) + return render_template('placeholder_template.html', module=module_info) # otherwise return the rendered module settings dialog @@ -954,9 +256,7 @@ def module_settings_dialog(name): if 'xbmc_servers' in s: s['options'] = module_get_xbmc_servers() - return render_template('dialogs/module_settings_dialog.html', - module = module, - ) + return render_template('dialogs/module_settings_dialog.html', module=module) return jsonify({ 'status': 'error' }) diff --git a/maraschino/tools.py b/maraschino/tools.py index 9c1012ed..4891b770 100644 --- a/maraschino/tools.py +++ b/maraschino/tools.py @@ -151,6 +151,7 @@ def get_file_list(folder, extensions, prepend_path=True, prepend_path_minus_root return filelist + def convert_bytes(bytes, with_extension=True): bytes = float(bytes) if bytes >= 1099511627776: diff --git a/modules/applications.ini b/modules/applications.ini new file mode 100644 index 00000000..fe027236 --- /dev/null +++ b/modules/applications.ini @@ -0,0 +1,16 @@ +mod_conf = [{ + 'name': 'applications', + 'label': 'Utility - Applications', + 'description': 'Allows you to link to whatever applications you want (SabNZBd, SickBeard, etc.)', + 'static': True, + 'poll': 0, + 'delay': 0, + 'settings': [ + { + 'key': 'app_new_tab', + 'value': '0', + 'description': 'Open application in new tab.', + 'type': 'bool', + } + ] +}] \ No newline at end of file diff --git a/modules/applications.inic b/modules/applications.inic new file mode 100644 index 00000000..94c743a4 Binary files /dev/null and b/modules/applications.inic differ diff --git a/modules/controls.ini b/modules/controls.ini new file mode 100644 index 00000000..e69de29b diff --git a/modules/couchpotato.ini b/modules/couchpotato.ini new file mode 100644 index 00000000..27d7b634 --- /dev/null +++ b/modules/couchpotato.ini @@ -0,0 +1,52 @@ +mod_conf = [{ + 'name': 'couchpotato', + 'label': 'Manager - CouchPotato', + 'description': 'Manage CouchPotato from within Maraschino', + 'static': True, + 'poll': 0, + 'delay': 0, + 'settings': [ + { + 'key': 'couchpotato_api', + 'value': '', + 'description': 'CouchPotato API Key', + }, + { + 'key': 'couchpotato_user', + 'value': '', + 'description': 'CouchPotato Username', + }, + { + 'key': 'couchpotato_password', + 'value': '', + 'description': 'CouchPotato Password', + }, + { + 'key': 'couchpotato_ip', + 'value': '', + 'description': 'CouchPotato Hostname', + }, + { + 'key': 'couchpotato_port', + 'value': '', + 'description': 'CouchPotato Port', + }, + { + 'key': 'couchpotato_webroot', + 'value': '', + 'description': 'CouchPotato Webroot', + }, + { + 'key': 'couchpotato_https', + 'value': '0', + 'description': 'Use HTTPS', + 'type': 'bool', + }, + { + 'key': 'couchpotato_compact', + 'value': '0', + 'description': 'Compact view', + 'type': 'bool', + }, + ] +}] \ No newline at end of file diff --git a/modules/couchpotato.inic b/modules/couchpotato.inic new file mode 100644 index 00000000..e386826d Binary files /dev/null and b/modules/couchpotato.inic differ diff --git a/modules/currently_playing.ini b/modules/currently_playing.ini new file mode 100644 index 00000000..e69de29b diff --git a/modules/diskspace.ini b/modules/diskspace.ini new file mode 100644 index 00000000..67ea4d16 --- /dev/null +++ b/modules/diskspace.ini @@ -0,0 +1,22 @@ +mod_conf = [{ + 'name': 'diskspace', + 'label': 'Utility - Disk space', + 'description': 'Shows you available disk space on your various drives.', + 'static': False, + 'poll': 350, + 'delay': 0, + 'settings': [ + { + 'key': 'show_grouped_disks', + 'value': '0', + 'description': 'Show grouped disks outside of group.', + 'type': 'bool', + }, + { + 'key': 'use_binary_units', + 'value': '1', + 'description': 'Use binary storage units (eg. GiB rather than GB)', + 'type': 'bool', + } + ] + }] \ No newline at end of file diff --git a/modules/diskspace.inic b/modules/diskspace.inic new file mode 100644 index 00000000..66b6942c Binary files /dev/null and b/modules/diskspace.inic differ diff --git a/modules/headphones.ini b/modules/headphones.ini new file mode 100644 index 00000000..fbcf584d --- /dev/null +++ b/modules/headphones.ini @@ -0,0 +1,52 @@ +mod_conf = [{ + 'name': 'headphones', + 'label': 'Manager - Headphones', + 'description': 'Manage Headphones from within Maraschino', + 'static': True, + 'poll': 0, + 'delay': 0, + 'settings': [ + { + 'key': 'headphones_host', + 'value': '', + 'description': 'Headphones Hostname', + }, + { + 'key': 'headphones_port', + 'value': '', + 'description': 'Headphones Port', + }, + { + 'key': 'headphones_webroot', + 'value': '', + 'description': 'Headphones Webroot', + }, + { + 'key': 'headphones_user', + 'value': '', + 'description': 'Headphones Username', + }, + { + 'key': 'headphones_password', + 'value': '', + 'description': 'Headphones Password', + }, + { + 'key': 'headphones_api', + 'value': '', + 'description': 'Headphones API Key', + }, + { + 'key': 'headphones_https', + 'value': '0', + 'description': 'Use HTTPS', + 'type': 'bool', + }, + { + 'key': 'headphones_compact', + 'value': '0', + 'description': 'Compact view', + 'type': 'bool', + }, + ] + }] \ No newline at end of file diff --git a/modules/headphones.inic b/modules/headphones.inic new file mode 100644 index 00000000..d2a00fc9 Binary files /dev/null and b/modules/headphones.inic differ diff --git a/modules/index.ini b/modules/index.ini new file mode 100644 index 00000000..e69de29b diff --git a/modules/ipcamera.ini b/modules/ipcamera.ini new file mode 100644 index 00000000..d2e58f0f --- /dev/null +++ b/modules/ipcamera.ini @@ -0,0 +1,40 @@ +mod_conf = [{ + 'name':'ipcamera', + 'label':'Utility - IP Camera', + 'description':'Show and control your ip camera', + 'static': False, + 'poll': 0, + 'delay': 0, + 'settings': [ + { + 'key': 'ipcamera_ip', + 'value': '', + 'description': 'Ip', + }, + { + 'key': 'ipcamera_port', + 'value': '', + 'description': 'Port', + }, + { + 'key': 'ipcamera_username', + 'value': '', + 'description': 'Username', + }, + { + 'key': 'ipcamera_password', + 'value': '', + 'description': 'Password', + }, + { + 'key': 'ipcamera_type', + 'value': 'fosscammjeg', + 'description': 'Pick your camera', + 'type': 'select', + 'options': [ + {'value':'foscammjeg', 'label':'Foscam MJEG'}, + {'value':'foscammp4', 'label':'Foscam MP4'}, + ] + }, + ] + }] \ No newline at end of file diff --git a/modules/ipcamera.inic b/modules/ipcamera.inic new file mode 100644 index 00000000..133fbda3 Binary files /dev/null and b/modules/ipcamera.inic differ diff --git a/modules/library.ini b/modules/library.ini new file mode 100644 index 00000000..11d70132 --- /dev/null +++ b/modules/library.ini @@ -0,0 +1,46 @@ +mod_conf = [{ + 'name': 'library', + 'label': 'XBMC - Library', + 'description': 'Allows you to browse your XBMC library and select items to play in XBMC.', + 'static': True, + 'poll': 0, + 'delay': 0, + 'settings': [ + { + 'key': 'library_show_info', + 'value': '0', + 'description': 'Show media information by default', + 'type': 'bool', + }, + { + 'key': 'library_ignore_the', + 'value': '1', + 'description': 'Ignore "The" in titles', + 'type': 'bool', + }, + { + 'key': 'library_show_power_buttons', + 'value': '1', + 'description': 'Show Power Controls', + 'type': 'bool', + }, + { + 'key': 'library_show_music', + 'value': '1', + 'description': 'Show music', + 'type': 'bool', + }, + { + 'key': 'library_show_pvr', + 'value': '0', + 'description': 'Show PVR (XBMC 12+ only)', + 'type': 'bool', + }, + { + 'key': 'library_show_files', + 'value': '1', + 'description': 'Show files', + 'type': 'bool', + }, + ] + }] \ No newline at end of file diff --git a/modules/library.inic b/modules/library.inic new file mode 100644 index 00000000..2ac96425 Binary files /dev/null and b/modules/library.inic differ diff --git a/modules/log.ini b/modules/log.ini new file mode 100644 index 00000000..e69de29b diff --git a/modules/nzbget.ini b/modules/nzbget.ini new file mode 100644 index 00000000..48d8fb38 --- /dev/null +++ b/modules/nzbget.ini @@ -0,0 +1,31 @@ +mod_conf = [{ + 'name': 'nzbget', + 'label': 'Usenet - NZBGet', + 'description': 'Shows you information about your NZBGet downloads.', + 'static': False, + 'poll': 10, + 'delay': 0, + 'settings': [ + { + 'key': 'nzbget_host', + 'value': '', + 'description': 'Hostname', + }, + { + 'key': 'nzbget_port', + 'value': '', + 'description': 'Port', + }, + { + 'key': 'nzbget_password', + 'value': '', + 'description': 'Password', + }, + { + 'key': 'nzbget_https', + 'value': '0', + 'description': 'Use HTTPS', + 'type': 'bool', + }, + ] + }] \ No newline at end of file diff --git a/modules/nzbget.inic b/modules/nzbget.inic new file mode 100644 index 00000000..73e334b6 Binary files /dev/null and b/modules/nzbget.inic differ diff --git a/modules/recently_added.ini b/modules/recently_added.ini new file mode 100644 index 00000000..25a0e696 --- /dev/null +++ b/modules/recently_added.ini @@ -0,0 +1,117 @@ +mod_conf = [{ + 'name': 'recently_added_albums', + 'label': 'XBMC - Recent Albums', + 'description': 'Shows you Albums recently added to your library.', + 'static': False, + 'poll': 350, + 'delay': 0, + 'settings': [ + { + 'key': 'num_recent_albums', + 'value': 3, + 'description': 'Number of albums to display', + }, + { + 'key': 'recently_added_albums_compact', + 'value': '0', + 'description': 'Compact view', + 'type': 'bool', + }, + { + 'key': 'recently_added_albums_info', + 'value': '0', + 'description': 'View information when selecting album', + 'type': 'bool', + }, + { + 'key': 'recently_added_albums_server', + 'value': '', + 'description': 'XBMC server', + 'type': 'select', + 'options': None, + 'xbmc_servers': True + }, + ] + }, + { + 'name': 'recently_added', + 'label': 'XBMC - Recent Episodes', + 'description': 'Shows you TV Episodes recently added to your library.', + 'static': False, + 'poll': 350, + 'delay': 0, + 'settings': [ + { + 'key': 'num_recent_episodes', + 'value': 3, + 'description': 'Number of episodes to display', + }, + { + 'key': 'recently_added_compact', + 'value': '0', + 'description': 'Compact view', + 'type': 'bool', + }, + { + 'key': 'recently_added_watched_episodes', + 'value': '1', + 'description': 'Show Watched Episodes', + 'type': 'bool', + }, + { + 'key': 'recently_added_info', + 'value': '0', + 'description': 'View information when selecting episode', + 'type': 'bool', + }, + { + 'key': 'recently_added_server', + 'value': '', + 'description': 'XBMC server', + 'type': 'select', + 'options': None, + 'xbmc_servers': True, + }, + ] + }, + { + 'name': 'recently_added_movies', + 'label': 'XBMC - Recent Movies', + 'description': 'Shows you Movies recently added to your library.', + 'static': False, + 'poll': 350, + 'delay': 0, + 'settings': [ + { + 'key': 'num_recent_movies', + 'value': 3, + 'description': 'Number of movies to display', + }, + { + 'key': 'recently_added_movies_compact', + 'value': '0', + 'description': 'Compact view', + 'type': 'bool', + }, + { + 'key': 'recently_added_watched_movies', + 'value': '1', + 'description': 'Show Watched Movies', + 'type': 'bool', + }, + { + 'key': 'recently_added_movies_info', + 'value': '0', + 'description': 'View information when selecting movie', + 'type': 'bool', + }, + { + 'key': 'recently_added_movies_server', + 'value': '', + 'description': 'XBMC server', + 'type': 'select', + 'options': None, + 'xbmc_servers': True, + }, + ] + }] \ No newline at end of file diff --git a/modules/recently_added.inic b/modules/recently_added.inic new file mode 100644 index 00000000..f956be58 Binary files /dev/null and b/modules/recently_added.inic differ diff --git a/modules/remote.ini b/modules/remote.ini new file mode 100644 index 00000000..e69de29b diff --git a/modules/sabnzbd.ini b/modules/sabnzbd.ini new file mode 100644 index 00000000..20675382 --- /dev/null +++ b/modules/sabnzbd.ini @@ -0,0 +1,42 @@ +mod_conf = [ { + 'name': 'sabnzbd', + 'label': 'Usenet - SABnzbd+', + 'description': 'Shows you information about your SABnzbd+ downloads.', + 'static': False, + 'poll': 10, + 'delay': 0, + 'settings': [ + { + 'key': 'sabnzbd_host', + 'value': '', + 'description': 'Hostname', + }, + { + 'key': 'sabnzbd_port', + 'value': '', + 'description': 'Port', + }, + { + 'key': 'sabnzbd_webroot', + 'value': '', + 'description': 'Webroot', + }, + { + 'key': 'sabnzbd_api', + 'value': '', + 'description': 'API Key', + }, + { + 'key': 'sabnzbd_https', + 'value': '0', + 'description': 'Use HTTPS', + 'type': 'bool', + }, + { + 'key': 'sabnzbd_show_empty', + 'value': '1', + 'description': 'Show module when queue is empty', + 'type': 'bool', + }, + ] + }] \ No newline at end of file diff --git a/modules/sabnzbd.inic b/modules/sabnzbd.inic new file mode 100644 index 00000000..4dd7c5cb Binary files /dev/null and b/modules/sabnzbd.inic differ diff --git a/modules/script_launcher.ini b/modules/script_launcher.ini new file mode 100644 index 00000000..544cc330 --- /dev/null +++ b/modules/script_launcher.ini @@ -0,0 +1,8 @@ +mod_conf = [{ + 'name': 'script_launcher', + 'label': 'Utility - Script Launcher', + 'description': 'Runs scripts on same system Maraschino is located.', + 'static': False, + 'poll': 350, + 'delay': 0, + }] \ No newline at end of file diff --git a/modules/script_launcher.inic b/modules/script_launcher.inic new file mode 100644 index 00000000..ae996f0a Binary files /dev/null and b/modules/script_launcher.inic differ diff --git a/modules/search.ini b/modules/search.ini new file mode 100644 index 00000000..e69de29b diff --git a/modules/sickbeard.ini b/modules/sickbeard.ini new file mode 100644 index 00000000..a5877784 --- /dev/null +++ b/modules/sickbeard.ini @@ -0,0 +1,58 @@ +mod_conf = [{ + 'name': 'sickbeard', + 'label': 'Manager - Sickbeard', + 'description': 'Manage Sickbeard from within Maraschino', + 'static': True, + 'poll': 0, + 'delay': 0, + 'settings': [ + { + 'key': 'sickbeard_api', + 'value': '', + 'description': 'Sickbeard API Key', + }, + { + 'key': 'sickbeard_user', + 'value': '', + 'description': 'Sickbeard Username', + }, + { + 'key': 'sickbeard_password', + 'value': '', + 'description': 'Sickbeard Password', + }, + { + 'key': 'sickbeard_ip', + 'value': '', + 'description': 'Sickbeard Hostname', + }, + { + 'key': 'sickbeard_port', + 'value': '', + 'description': 'Sickbeard Port', + }, + { + 'key': 'sickbeard_webroot', + 'value': '', + 'description': 'Sickbeard Webroot', + }, + { + 'key': 'sickbeard_https', + 'value': '0', + 'description': 'Use HTTPS', + 'type': 'bool', + }, + { + 'key': 'sickbeard_compact', + 'value': '0', + 'description': 'Compact view', + 'type': 'bool', + }, + { + 'key': 'sickbeard_airdate', + 'value': '0', + 'description': 'Show air date', + 'type': 'bool', + }, + ] + }] \ No newline at end of file diff --git a/modules/sickbeard.inic b/modules/sickbeard.inic new file mode 100644 index 00000000..9d424090 Binary files /dev/null and b/modules/sickbeard.inic differ diff --git a/modules/synopsys.ini b/modules/synopsys.ini new file mode 100644 index 00000000..4fccfd42 --- /dev/null +++ b/modules/synopsys.ini @@ -0,0 +1,8 @@ +mod_conf = [{ + 'name': 'synopsis', + 'label': 'XBMC - Synopsis', + 'description': 'Shows you a plot synopsis of what you are currently watching.', + 'static': True, + 'poll': 0, + 'delay': 0, + }] \ No newline at end of file diff --git a/modules/synopsys.inic b/modules/synopsys.inic new file mode 100644 index 00000000..124df2e4 Binary files /dev/null and b/modules/synopsys.inic differ diff --git a/modules/trakt.ini b/modules/trakt.ini new file mode 100644 index 00000000..c5eb34f6 --- /dev/null +++ b/modules/trakt.ini @@ -0,0 +1,26 @@ +mod_conf = [{ + 'name': 'trakt', + 'label': 'Trakt.TV - Shouts', + 'description': 'Shows you what people are saying about what you are watching and allows you to add your own comments.', + 'static': True, + 'poll': 0, + 'delay': 0, + 'settings': [ + { + 'key': 'trakt_api_key', + 'value': '', + 'description': 'Trakt API Key', + 'link': 'http://trakt.tv/settings/api', + }, + { + 'key': 'trakt_username', + 'value': '', + 'description': 'Trakt Username', + }, + { + 'key': 'trakt_password', + 'value': '', + 'description': 'Trakt Password', + }, + ] + }] \ No newline at end of file diff --git a/modules/trakt.inic b/modules/trakt.inic new file mode 100644 index 00000000..237cb836 Binary files /dev/null and b/modules/trakt.inic differ diff --git a/modules/traktplus.ini b/modules/traktplus.ini new file mode 100644 index 00000000..a50df0af --- /dev/null +++ b/modules/traktplus.ini @@ -0,0 +1,64 @@ +mod_conf = [{ + 'name': 'traktplus', + 'label': 'Trakt.TV', + 'description': 'trakt.tv module', + 'static': False, + 'poll': 0, + 'delay': 10, + 'settings': [ + { + 'key': 'trakt_api_key', + 'value': '', + 'description': 'Trakt API Key', + 'link': 'http://trakt.tv/settings/api', + }, + { + 'key': 'trakt_username', + 'value': '', + 'description': 'Trakt Username', + }, + { + 'key': 'trakt_password', + 'value': '', + 'description': 'Trakt Password', + }, + { + 'key': 'trakt_default_view', + 'value': 'trending', + 'description': 'Default view', + 'type': 'select', + 'options': [ + {'value': 'trending_shows', 'label': 'Trending (TV Shows)'}, + {'value': 'trending_movies', 'label': 'Trending (Movies)'}, + {'value': 'activity_friends', 'label': 'Activity (Friends)'}, + {'value': 'activity_community', 'label': 'Activity (Community)'}, + {'value': 'friends', 'label': 'Friends'}, + {'value': 'calendar' , 'label': 'Calendar'}, + {'value': 'recommendations_shows' , 'label': 'Recommendations (TV Shows)'}, + {'value': 'recommendations_movies' , 'label': 'Recommendations (Movies)'}, + {'value': 'profile' , 'label': 'My profile'}, + ] + }, + { + 'key': 'trakt_default_media', + 'value': 'shows', + 'description': 'Default media type', + 'type': 'select', + 'options': [ + {'value': 'shows', 'label': 'Shows'}, + {'value': 'movies', 'label': 'Movies'}, + ] + }, + { + 'key': 'trakt_trending_limit', + 'value': '20', + 'description': 'How many trending items to display', + 'type': 'select', + 'options': [ + {'value': '20', 'label': '20'}, + {'value': '40', 'label': '40'}, + {'value': '60', 'label': '60'}, + ] + }, + ] + }] \ No newline at end of file diff --git a/modules/traktplus.inic b/modules/traktplus.inic new file mode 100644 index 00000000..0f326656 Binary files /dev/null and b/modules/traktplus.inic differ diff --git a/modules/transmission.ini b/modules/transmission.ini new file mode 100644 index 00000000..b88a55cf --- /dev/null +++ b/modules/transmission.ini @@ -0,0 +1,41 @@ +mod_conf = [{ + 'name': 'transmission', + 'label': 'Torrent - Transmission', + 'description': 'Shows you information about your Transmission downloads.', + 'static': False, + 'poll': 10, + 'delay': 0, + 'settings': [ + { + 'key': 'transmission_ip', + 'value': '', + 'description': 'Transmission Hostname', + }, + { + 'key': 'transmission_port', + 'value': '9091', + 'description': 'Transmission Port', + }, + { + 'key': 'transmission_user', + 'value': '', + 'description': 'Transmission Username', + }, + { + 'key': 'transmission_password', + 'value': '', + 'description': 'Transmission Password', + }, + { + 'key': 'transmission_webroot', + 'value': '', + 'description': 'Transmission Webroot (Optional)', + }, + { + 'key': 'transmission_show_empty', + 'value': '1', + 'description': 'Show module with no active torrents', + 'type': 'bool', + }, + ] + }] \ No newline at end of file diff --git a/modules/transmission.inic b/modules/transmission.inic new file mode 100644 index 00000000..4d0c563d Binary files /dev/null and b/modules/transmission.inic differ diff --git a/modules/updater.ini b/modules/updater.ini new file mode 100644 index 00000000..e69de29b diff --git a/modules/utorrent.ini b/modules/utorrent.ini new file mode 100644 index 00000000..c80864f0 --- /dev/null +++ b/modules/utorrent.ini @@ -0,0 +1,30 @@ +mod_conf = [{ + 'name': 'utorrent', + 'label': 'Torrent - uTorrent', + 'description': 'Shows information about uTorrent downloads', + 'static': False, + 'poll': 10, + 'delay': 0, + 'settings': [ + { + 'key': 'utorrent_ip', + 'value': '', + 'description': 'uTorrent Hostname', + }, + { + 'key': 'utorrent_port', + 'value': '8080', + 'description': 'uTorrent Port', + }, + { + 'key': 'utorrent_user', + 'value': '', + 'description': 'uTorrent Username', + }, + { + 'key': 'utorrent_password', + 'value': '', + 'description': 'uTorrent Password', + }, + ] + }] \ No newline at end of file diff --git a/modules/utorrent.inic b/modules/utorrent.inic new file mode 100644 index 00000000..4b0f5e8b Binary files /dev/null and b/modules/utorrent.inic differ diff --git a/modules/weather.ini b/modules/weather.ini new file mode 100644 index 00000000..8265e10c --- /dev/null +++ b/modules/weather.ini @@ -0,0 +1,40 @@ +mod_conf = [{ + 'name': 'weather', + 'label': 'Utility - Weather', + 'description': 'Weather details.', + 'static': False, + 'poll': 350, + 'delay': 0, + 'settings': [ + { + 'key': 'weather_location', + 'value': '', + 'description': 'weather.com area ID', + 'link': 'http://edg3.co.uk/snippets/weather-location-codes/', + }, + { + 'key': 'weather_use_celcius', + 'value': '0', + 'description': 'Temperature in C', + 'type': 'bool', + }, + { + 'key': 'weather_use_kilometers', + 'value': '0', + 'description': 'Wind Speed in Km', + 'type': 'bool', + }, + { + 'key': 'weather_time', + 'value': '0', + 'description': '24 hour time', + 'type': 'bool', + }, + { + 'key': 'weather_compact', + 'value': '0', + 'description': 'Compact view', + 'type': 'bool', + }, + ] + }] \ No newline at end of file diff --git a/modules/weather.inic b/modules/weather.inic new file mode 100644 index 00000000..57c80374 Binary files /dev/null and b/modules/weather.inic differ diff --git a/modules/xbmc_notify.ini b/modules/xbmc_notify.ini new file mode 100644 index 00000000..e69de29b