示例#1
0
    def save(self, movie, result):

        row = Db.query(MovieETA).filter_by(movieId=movie.id).first()
        if not row:
            row = MovieETA()
            Db.add(row)

        row.movieId = movie.id
        row.theater = result.get('theater')
        row.dvd = result.get('dvd')
        row.bluray = result.get('bluray')
        row.lastCheck = result.get('expires')
        Db.flush()
示例#2
0
    def save(self, movie, result):

        row = Db.query(MovieETA).filter_by(movieId = movie.id).first()
        if not row:
            row = MovieETA()
            Db.add(row)

        row.movieId = movie.id
        row.videoEtaId = result.get('id', 0)
        row.theater = result.get('theater', 0)
        row.dvd = result.get('dvd', 0)
        row.bluray = result.get('bluray', 0)
        row.lastCheck = int(time.time())
        Db.flush()
示例#3
0
文件: eta.py 项目: 05sonicblue/Gamez
    def save(self, movie, result):

        row = Db.query(MovieETA).filter_by(movieId = movie.id).first()
        if not row:
            row = MovieETA()
            Db.add(row)

        row.movieId = movie.id
        row.theater = result.get('theater')
        row.dvd = result.get('dvd')
        row.bluray = result.get('bluray')
        row.lastCheck = result.get('expires')
        Db.flush()