diff --git a/prismedia/core.py b/prismedia/core.py index 58587f8..0f1be83 100644 --- a/prismedia/core.py +++ b/prismedia/core.py @@ -3,6 +3,7 @@ # NOTE: Since we use config file to set some defaults values, it is not possible to use the standard syntax with brackets, we use parenthesis instead. # If we were to use them we would overide configuration file values with default values of cli. +# TODO: change `youtube-at` and `peertube-at` that are not easely expendable as options in my opinion """ prismedia - tool to upload videos to different platforms (historicaly Peertube and Youtube) @@ -151,13 +152,20 @@ def main(): loadPlugins(basePluginsPath) manager = PluginManagerSingleton.get() + # TODO: add the arguments’s verification (copy/adapt the Schema table) options = docopt(__doc__, version=VERSION) print(options) + # Treat options that do not involve if options.get('--list-plugins'): listPlugins() exit(0) + if options.get('--hearthbeat'): + for plugin in manager.getPluginsOfCategory(pi.PluginTypes.PLATFORM): + plugin.plugin_object.hearthbeat() + exit(0) + print() print("# Plugins") #def test_loadPlugins(arg): diff --git a/prismedia/plugins/platforms/peertube.py b/prismedia/plugins/platforms/peertube.py index d040f9a..3788098 100644 --- a/prismedia/plugins/platforms/peertube.py +++ b/prismedia/plugins/platforms/peertube.py @@ -421,6 +421,7 @@ class Peertube(pi.IPlatformPlugin): """ If needed for your platform, use a bit of the api so the platform is aware the keys are still in use. """ + print("Hearthbeat for peertube (nothing to do)") pass