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()
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()
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()