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

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

src/s/y/SynoDLNAtrakt-HEAD/synodlnatrakt/main.py   SynoDLNAtrakt(Download)
        if not os.path.exists(m.path):
            logger.debug(u"{0} seems to be an orphan...".format(m.path))
            db.session.delete(m)
 
    episode = db.session.query(db.TVEpisodes).all()
    for m in episode:
        #path = m.path.replace("/volume1/", "/Volumes/")
        if not os.path.exists(m.path):
            logger.debug(u"{0} seems to be an orphan...".format(m.path))
            db.session.delete(m)
        if count is None or count is 0:
            logger.debug(u"{0} seems to be an empty TVShow...".format(m.name))
            db.session.delete(m)
    db.session.commit()
 

src/s/y/SynoDLNAtrakt-HEAD/synodlnatrakt/web.py   SynoDLNAtrakt(Download)
    if mediatype == "movie":
        result = db.session.query(db.Movies).filter(db.Movies.synoindex == synoindex).first()
    db.session.delete(result)
    db.session.commit()
    return {"status": "success"}