示例#1
0
    def __init__(self):
        """Create a new gPodder API instance

        Connects to the database and loads the configuration.
        """
        util.make_directory(gpodder.home)
        gpodder.load_plugins()

        self._db = dbsqlite.Database(gpodder.database_file)
        self._config = config.Config(gpodder.config_file)
示例#2
0
文件: api.py 项目: xerxes2/gpodder
    def __init__(self):
        """Create a new gPodder API instance

        Connects to the database and loads the configuration.
        """
        util.make_directory(gpodder.home)
        gpodder.load_plugins()

        self._db = dbsqlite.Database(gpodder.database_file)
        self._config = config.Config(gpodder.config_file)
示例#3
0
    def __init__(self,
                 config_class=config.Config,
                 database_class=dbsqlite.Database,
                 model_class=model.Model):
        # Initialize the gPodder home directory
        util.make_directory(gpodder.home)

        # Open the database and configuration file
        self.db = database_class(gpodder.database_file)
        self.model = model_class(self.db)
        self.config = config_class(gpodder.config_file)

        # Load extension modules and install the extension manager
        gpodder.user_extensions = extensions.ExtensionManager(self)

        # Load installed/configured plugins
        gpodder.load_plugins()

        # Update the current device in the configuration
        self.config.mygpo.device.type = util.detect_device_type()
示例#4
0
    def __init__(self,
                 config_class=config.Config,
                 database_class=dbsqlite.Database,
                 model_class=model.Model):
        # Initialize the gPodder home directory
        util.make_directory(gpodder.home)

        # Load hook modules and install the hook manager
        gpodder.user_hooks = hooks.HookManager()

        # Load installed/configured plugins
        gpodder.load_plugins()

        # Open the database and configuration file
        self.db = database_class(gpodder.database_file)
        self.model = model_class(self.db)
        self.config = config_class(gpodder.config_file)

        # Update the current device in the configuration
        self.config.mygpo_device_type = util.detect_device_type()
示例#5
0
文件: core.py 项目: Dragontek/gpodder
    def __init__(self,
                 config_class=config.Config,
                 database_class=dbsqlite.Database,
                 model_class=model.Model):
        # Initialize the gPodder home directory
        util.make_directory(gpodder.home)

        # Open the database and configuration file
        self.db = database_class(gpodder.database_file)
        self.model = model_class(self.db)
        self.config = config_class(gpodder.config_file)

        # Load extension modules and install the extension manager
        gpodder.user_extensions = extensions.ExtensionManager(self)

        # Load installed/configured plugins
        gpodder.load_plugins()

        # Update the current device in the configuration
        self.config.mygpo.device.type = util.detect_device_type()

        # Initialize Flattr integration
        self.flattr = flattr.Flattr(self.config.flattr)