Beispiel #1
0
    def pedalboard(self):
        bundlepath = self.get_argument('bundlepath')

        with open(DEFAULT_ICON_TEMPLATE, 'r') as fh:
            default_icon_template = squeeze(fh.read().replace("'", "\\'"))

        with open(DEFAULT_SETTINGS_TEMPLATE, 'r') as fh:
            default_settings_template = squeeze(fh.read().replace("'", "\\'"))

        try:
            pedalboard = get_pedalboard_info(bundlepath)
        except:
            print("ERROR in webserver.py: get_pedalboard_info failed")
            pedalboard = {
                'height': 0,
                'width': 0,
                'title': "",
                'connections': [],
                'plugins': [],
                'hardware': {},
            }

        context = {
            'default_icon_template': default_icon_template,
            'default_settings_template': default_settings_template,
            'pedalboard': b64encode(json.dumps(pedalboard).encode("utf-8"))
        }

        return context
Beispiel #2
0
 def openPedalboardLater(self, filename):
     try:
         self.fNextBundle   = QFileInfo(filename).absoluteFilePath()
         self.fCurrentTitle = get_pedalboard_info(self.fNextBundle)['name']
     except:
         self.fNextBundle   = ""
         self.fCurrentTitle = ""
Beispiel #3
0
 def openPedalboardLater(self, filename):
     try:
         self.fNextBundle = QFileInfo(filename).absoluteFilePath()
         self.fCurrentTitle = get_pedalboard_info(self.fNextBundle)['name']
     except:
         self.fNextBundle = ""
         self.fCurrentTitle = ""
Beispiel #4
0
    def pedalboard(self):
        context = self.index()
        bundlepath = self.get_argument('bundlepath')

        try:
            pedalboard = get_pedalboard_info(bundlepath)
        except:
            print("ERROR in webserver.py: get_pedalboard_info failed")
            pedalboard = {
                'height': 0,
                'width': 0,
                'title': "",
                'connections': [],
                'plugins': [],
                'hardware': {},
            }

        context['pedalboard'] = b64encode(json.dumps(pedalboard).encode("utf-8"))
        return context
Beispiel #5
0
 def get(self):
     bundlepath = os.path.abspath(self.get_argument('bundlepath'))
     self.write(get_pedalboard_info(bundlepath))