]> git.parisson.com Git - telemeta.git/commitdiff
fix plugin setup, allow fewer options for TS run
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 20 May 2019 08:16:41 +0000 (10:16 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 20 May 2019 08:16:41 +0000 (10:16 +0200)
app/bin/setup_plugins.sh
telemeta/management/commands/telemeta-run-timeside-experience.py

index ab6ed259b3a8f58385bf8d6f4fe5b1305b856ec4..59d7ab2045d1a9e7b8519fe6701ebfd82a3dca54 100755 (executable)
@@ -18,12 +18,9 @@ for dir in $(ls $plugins); do
                fi
 
                if [ -f $plugins/$dir/requirements.txt ]; then
-        echo $dir
+                               cd $plugins/$dir
         pip install -r $plugins/$dir/requirements.txt
-    fi
-
-               if [ -f $plugins/$dir/setup.py ]; then
-        echo $dir
+               elif [ -f $plugins/$dir/setup.py ]; then
         pip install -e $plugins/$dir/.
     fi
 done
index 1f578f822c6077cde69a907f5f23cd06b0f62315..9133089c23f8f2bca9377e258542f536a98589f3 100644 (file)
@@ -64,6 +64,9 @@ class Command(BaseCommand):
                             help='define the telemeta collection code')
 
     def create_selection(self):
+        if not self.selection_title and self.collection_code:
+            self.selection_title = self.collection_code
+
         if self.collection_code:
             selection_title = self.collection_code
             collection = MediaCollection.objects.get(code=self.collection_code)
@@ -106,7 +109,11 @@ class Command(BaseCommand):
                     except Preset.MultipleObjectsReturned:
                         print(Preset.objects.filter(processor=processor, parameters='{}'))
 
-        self.experience, c = Experience.objects.get_or_create(title=self.experience_title)
+        if self.experience_title:
+            self.experience, c = Experience.objects.get_or_create(title=self.experience_title)
+        else:
+            self.experience = Experience()
+            self.experience.save()
         for preset in presets:
             if not preset in self.experience.presets.all():
                 self.experience.presets.add(preset)