Browse Source

WIP add a quick debug plugin

plugins
Zykino 3 years ago
parent
commit
67b8732c13
3 changed files with 42 additions and 0 deletions
  1. +23
    -0
      prismedia/plugins/consumers/debug.py
  2. +9
    -0
      prismedia/plugins/consumers/debug.yapsy-plugin
  3. +10
    -0
      prismedia/video.py

+ 23
- 0
prismedia/plugins/consumers/debug.py View File

@ -0,0 +1,23 @@
#!/usr/bin/env python
# coding: utf-8
import pluginInterfaces as pi
import utils
import video as vid
class Debug(pi.IConsumerPlugin):
"""
Plugin to help knowing the state of prismedia and its variables.
"""
def prepare_options(self, video, options):
print("Debug plugin prepare_options:")
print("Video: ", video)
print("Options: ", options)
return True
def finished(self, video, options):
print("Debug plugin finished:")
print("Video: ", video)
print("Options: ", options)

+ 9
- 0
prismedia/plugins/consumers/debug.yapsy-plugin View File

@ -0,0 +1,9 @@
[Core]
Name = debug
Module = debug
[Documentation]
Author = Zykino
Version = 0.1
Website = https://git.lecygnenoir.info/LecygneNoir/prismedia
Description = Show status of elements

+ 10
- 0
prismedia/video.py View File

@ -10,6 +10,9 @@ class Platform(object):
self.publishAt = None
self.url = None
def __repr__(self):
return str(self.__dict__)
# TODO: Add container for `with-*` and a `isValid` method to check that all `with-*` options are present
# TODO: We need some list (using enum?) for the commons licences, language, privacy, categories options
class Video(object):
@ -109,3 +112,10 @@ class Video(object):
@name.setter
def name(self, value):
self._name = value
def __repr__(self):
result = "{\n"
for key in self.__dict__:
result += "\t'" + key + "': " + str(self.__dict__[key]) + ",\n"
result += "}\n"
return result

Loading…
Cancel
Save