Skip to content

Commit

Permalink
don't destructure and re-structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mchangrh committed Oct 20, 2021
1 parent a316403 commit 6caab2e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/routes/voteOnSponsorTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ function getYouTubeVideoInfo(videoID: VideoID, ignoreCache = false): Promise<API
const videoDurationChanged = (segmentDuration: number, APIDuration: number) => (APIDuration > 0 && Math.abs(segmentDuration - APIDuration) > 2);

async function checkVideoDurationChange(UUID: SegmentUUID) {
const row = await db.prepare("get", `select "videoDuration", "videoID", "service" from "sponsorTimes" where "UUID" = ?`, [UUID]);
const { videoDuration, videoID, service } = row;
const { videoDuration, videoID, service } = await db.prepare("get", `select "videoDuration", "videoID", "service" from "sponsorTimes" where "UUID" = ?`, [UUID]);
let apiVideoInfo: APIVideoInfo = null;
if (service == Service.YouTube) {
// don't use cache since we have no information about the video length
Expand Down

0 comments on commit 6caab2e

Please sign in to comment.