def install_all_bundles(): removed = [] installed = [] for bundle in os.listdir(DOWNLOAD_TMP_DIR): tmppath = os.path.join(DOWNLOAD_TMP_DIR, bundle) bundlepath = os.path.join(LV2_PLUGIN_DIR, bundle) if os.path.exists(bundlepath): removed += remove_bundle_to_lilv_world(bundlepath, True) shutil.rmtree(bundlepath) shutil.move(tmppath, bundlepath) installed += add_bundle_to_lilv_world(bundlepath, True) # TODO - make ingen refresh lv2 world if len(installed) == 0: resp = { 'ok' : False, 'error' : "No plugins found in bundle", 'removed': removed, } else: resp = { 'ok' : True, 'removed' : removed, 'installed': installed, } return resp
def install_all_bundles(): removed = [] installed = [] for bundle in os.listdir(DOWNLOAD_TMP_DIR): tmppath = os.path.join(DOWNLOAD_TMP_DIR, bundle) bundlepath = os.path.join(LV2_PLUGIN_DIR, bundle) if os.path.exists(bundlepath): removed += remove_bundle_to_lilv_world(bundlepath, True) shutil.rmtree(bundlepath) shutil.move(tmppath, bundlepath) installed += add_bundle_to_lilv_world(bundlepath, True) # TODO - make ingen refresh lv2 world if len(installed) == 0: resp = { 'ok': False, 'error': "No plugins found in bundle", 'removed': removed, } else: resp = { 'ok': True, 'removed': removed, 'installed': installed, } return resp
def install_all_bundles(): """ Install all bundles available in installation temp dir into domain's directory Returns list of effects installed """ plugin_dir = PLUGIN_INSTALLATION_TMP_DIR effects = [] # TODO - rewrite for new API without modcommon for package in os.listdir(plugin_dir): bundle_path = join(PLUGIN_LIBRARY_DIR, package) if os.path.exists(bundle_path): uninstall_bundle(package) shutil.move(join(plugin_dir, package), PLUGIN_LIBRARY_DIR) lv2.add_bundle_to_lilv_world(join(PLUGIN_LIBRARY_DIR, package)) #effects += [] return effects
def saved_callback(bundlepath): if add_bundle_to_lilv_world(bundlepath): pass #self.host.add_bundle(bundlepath) self.screenshot_generator.schedule_screenshot(bundlepath)
def pedal_save_cb(bundlepath): if add_bundle_to_lilv_world(bundlepath): self.host.add_bundle(bundlepath) self.screenshot_generator.schedule_screenshot(bundlepath)