Beispiel #1
0
        databaselog.info("Upgraded database from version %s to %s",
                app.db.startup_version, app.db.current_version)
    databaselog.print_old_log_entries()
    models.initialize()
    if DEBUG_DB_MEM_USAGE:
        util.db_mem_usage_test()
        mem_usage_test_event.set()
    app.item_info_cache = iteminfocache.ItemInfoCache()
    app.item_info_cache.load()

    logging.info("Loading video converters...")
    conversions.conversion_manager.startup()
    app.device_manager = devices.DeviceManager()
    app.device_tracker = devicetracker.DeviceTracker()

    searchengines.create_engines()
    setup_global_feeds()
    # call fix_database_inconsistencies() ASAP after the manual feed is set up
    fix_database_inconsistencies()
    logging.info("setup tabs...")
    setup_tabs()
    logging.info("setup theme...")
    setup_theme()
    install_message_handler()
    downloader.init_controller()

    eventloop.add_urgent_call(check_firsttime, "check first time")

def fix_database_inconsistencies():
    item.fix_non_container_parents()
    item.move_orphaned_items()
Beispiel #2
0
def setup():
    searchengines.create_engines()
    app.controller = FakeController()
Beispiel #3
0
        util.db_mem_usage_test()
        mem_usage_test_event.set()

    # MetadataProgressUpdater needs to be installed before ItemInfoCache,
    # since ItemInfoCache may create items if it uses failsafe mode
    app.metadata_progress_updater = metadataprogress.MetadataProgressUpdater()
    app.item_info_cache = iteminfocache.ItemInfoCache()
    app.item_info_cache.load()
    dbupgradeprogress.upgrade_end()

    logging.info("Loading video converters...")
    conversions.conversion_manager.startup()
    app.device_manager = devices.DeviceManager()
    app.device_tracker = devicetracker.DeviceTracker()

    searchengines.create_engines()
    setup_global_feeds()
    # call fix_database_inconsistencies() ASAP after the manual feed is set up
    fix_database_inconsistencies()
    logging.info("setup tabs...")
    setup_tabs()
    logging.info("setup theme...")
    setup_theme()
    install_message_handler()
    itemsource.setup_handlers()
    downloader.init_controller()

    # Call this late, after the message handlers have been installed.
    app.sharing_tracker = sharing.SharingTracker()
    app.sharing_manager = sharing.SharingManager()
    app.transcode_manager = transcode.TranscodeManager()
Beispiel #4
0
def setup():
    searchengines.create_engines()
    app.controller = FakeController()