From e1a51657bc5b6cb31469759fc5677181781fe32e Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 20 May 2019 10:16:41 +0200 Subject: [PATCH] fix plugin setup, allow fewer options for TS run --- app/bin/setup_plugins.sh | 7 ++----- .../commands/telemeta-run-timeside-experience.py | 9 ++++++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/bin/setup_plugins.sh b/app/bin/setup_plugins.sh index ab6ed259..59d7ab20 100755 --- a/app/bin/setup_plugins.sh +++ b/app/bin/setup_plugins.sh @@ -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 diff --git a/telemeta/management/commands/telemeta-run-timeside-experience.py b/telemeta/management/commands/telemeta-run-timeside-experience.py index 1f578f82..9133089c 100644 --- a/telemeta/management/commands/telemeta-run-timeside-experience.py +++ b/telemeta/management/commands/telemeta-run-timeside-experience.py @@ -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) -- 2.39.5