Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(47)  |  Call(47)  |  Derive(0)  |  Import(0)

src/s/y/SynoDLNAtrakt-HEAD/synodlnatrakt/versioncheck.py   SynoDLNAtrakt(Download)
def checkGithub():
 
    # Get the latest commit available from github
    url = 'https://api.github.com/repos/%s/synodlnatrakt/commits/%s' % (user, branch)
    logger.info('Retrieving latest version information from github')
    # See how many commits behind we are
    if config.current_version:
        logger.info('Comparing currently installed version with latest github version')
        url = 'https://api.github.com/repos/%s/synodlnatrakt/compare/%s...%s' % (
            user, config.current_version, config.latest_version)
 
        if config.commits_behind >= 1:
            logger.info('New version is available. You are %s commits behind' % config.commits_behind)
        elif config.commits_behind == 0:
            logger.info('SynoDLNAtrakt is up to date')
        elif config.commits_behind == -1:
            logger.info('You are running an unknown version of SynoDLNAtrakt. Run the updater to identify your version')

src/s/y/SynoDLNAtrakt-HEAD/synodlnatrakt/helper.py   SynoDLNAtrakt(Download)
 
    if not os.path.exists(config.accesslog):
        logger.info(u"{0} doesn't exist please check your settings and make sure you enabled MediaServers Debug mode".format(
            config.accesslog))
        sys.exit(1)
 
    logger.info(u"Starting SynoDLNAtrakt...")
 
    if os.path.exists(config.accesslog):
        logger.info(u"Parsing MediaServer log file from: {0}".format(config.accesslog))
        for line in open(config.accesslog):
            try:
            except:
                logger.error(u"Unable to parse line: {0}".format(line))
        logger.info(u"Parsing: {0} gave {1} entry(s)".format(config.accesslog, len(idtimes)))
 
        if config.delete_logs and len(idtimes) > 0:
            # truncate accesslog (just clean it)
            open(config.accesslog, 'w').close()
            logger.info(u"{0} moved to backup directory: {1}".format(config.accesslog, newlogpath))
        return idtimes
    else:

src/s/y/SynoDLNAtrakt-HEAD/synodlnatrakt/main.py   SynoDLNAtrakt(Download)
def delete_orphans():
    logger.info("DELETING ORPHAN DATABASE ENTRYS...")
    movies = db.session.query(db.Movies).all()
    for m in movies:
        #path = m.path.replace("/volume1/", "/Volumes/")
def restart():
    logger.info(u"restarting SynoDLNAtrakt...")
    args = [sys.executable, os.path.join(config.basedir, "SynoDLNAtrakt.py"), "restart", "--config={0}".format(config.cfg_path)]
    logger.debug(u"restart args: {0}".format(args))
    #/var/packages/synodlnatrakt/scripts/start-stop-status start
def scanlogs(force=False):
    if force:
        logger.info(u"FORCING SCROBBLE...")
    logger.info(u"READLOG STARTED")
    logelement = helper.parseLog()
        if m:
            if not m.progress:
                logger.info(u"generate new Mediaelement for: {0}".format(key))
                m.generate()
                if m.progress > config.min_progress:

src/s/y/SynoDLNAtrakt-HEAD/synodlnatrakt/mediaimport.py   SynoDLNAtrakt(Download)
            m = Episode(episode.id, None, database=True)
            if m.path:
                logger.info(u"loaded Mediaelement from db: {0}".format(episode.id))
            else:
                m.generate()
def search(searchstring, max_entrys=20):
    counter = 0
    logger.info(u"searching for files which contain: '{0}'".format(searchstring))
    result = (
        pgsql.session.query(pgsql.Video)
 
        if m.path:
            logger.info(u"loaded Mediaelement from db: {0}".format(entry.id))
        else:
            m.generate()
            m = Movie(movie.id, None, database=True)
            if m.path:
                logger.info(u"loaded Mediaelement from db: {0}".format(movie.id))
            else:
                m.generate()
        if m:
            if m.path:
                logger.info(u"loaded Mediaelement from db: {0}".format(entry.id))
            else:
                m.generate()

src/s/y/SynoDLNAtrakt-HEAD/synodlnatrakt/trakt.py   SynoDLNAtrakt(Download)
def sendRequest(mediaelement, returnStatus=False):
    if mediaelement.progress < config.min_progress and mediaelement.progress > 7:
        response = watching(mediaelement)
    elif mediaelement.progress < 7:
        logger.info(u"not scrobbleing because you watched less than 7%")