示例#1
0
文件: webserver.py 项目: EQ4/mod-ui
    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
示例#2
0
    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
示例#3
0
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
示例#4
0
 def saved_callback(bundlepath):
     if add_bundle_to_lilv_world(bundlepath):
         pass  #self.host.add_bundle(bundlepath)
     self.screenshot_generator.schedule_screenshot(bundlepath)
示例#5
0
文件: session.py 项目: EQ4/mod-ui
 def saved_callback(bundlepath):
     if add_bundle_to_lilv_world(bundlepath):
         pass #self.host.add_bundle(bundlepath)
     self.screenshot_generator.schedule_screenshot(bundlepath)
示例#6
0
 def pedal_save_cb(bundlepath):
     if add_bundle_to_lilv_world(bundlepath):
         self.host.add_bundle(bundlepath)
     self.screenshot_generator.schedule_screenshot(bundlepath)