Skip to content

Commit

Permalink
Fix type mismatch error.
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMasterK committed Jul 28, 2023
1 parent 8aefd70 commit 37b2fca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/me/kavin/piped/utils/VideoHelpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,15 @@ public static void insertVideo(Video video) {
"(:uploader_id,:duration,:is_short,:thumbnail,:title,:uploaded,:views,:id) ON CONFLICT (id) DO UPDATE SET " +
"duration = excluded.duration, title = excluded.title, views = excluded.views"
)
.setParameter("uploader_id", video.getChannel())
.setParameter("uploader_id", video.getChannel().getUploaderId())
.setParameter("duration", video.getDuration())
.setParameter("is_short", video.isShort())
.setParameter("thumbnail", video.getThumbnail())
.setParameter("title", video.getTitle())
.setParameter("uploaded", video.getUploaded())
.setParameter("views", video.getViews())
.setParameter("id", video.getId()).executeUpdate();
.setParameter("id", video.getId())
.executeUpdate();
tr.commit();
} catch (Exception e) {
tr.rollback();
Expand Down

0 comments on commit 37b2fca

Please sign in to comment.