seriesmarker.persistence.factory.base_factory module¶
-
class
BaseFactory
[source]¶ Bases:
object
Base class of factories, offers common operations.
-
_handle_list_attribute
(items, pytvdb_values, cls)[source]¶ Maps simple list attributes (containing strings) between pytvdbapi and seriesmarker.
This method compares a list of strings, given by the pytvdbapi-object, with a given list of objects in the database. It creates and adds a new object, of the given class, to the database if the pytvdbapi-list contains an unknown string. It respectively removes objects from the database if a related string can not be found at the pytvdbapi-list.
Note
This method is intended to be used for simple data from TheTVDB, only. It applies to data, which has no relation to other objects and thus no dependencies, which need to be resolved on removal from the database.
Todo
Logging should be used to list differences on update of series/episodes.
Parameters:
-