Fix type mismatch error.

This commit is contained in:
Kavin 2023-07-28 11:50:21 +01:00
parent 8aefd7023d
commit 37b2fca2fd
No known key found for this signature in database
GPG key ID: 6E4598CA5C92C41F

View file

@ -164,14 +164,15 @@ public class VideoHelpers {
"(:uploader_id,:duration,:is_short,:thumbnail,:title,:uploaded,:views,:id) ON CONFLICT (id) DO UPDATE SET " + "(: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" "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("duration", video.getDuration())
.setParameter("is_short", video.isShort()) .setParameter("is_short", video.isShort())
.setParameter("thumbnail", video.getThumbnail()) .setParameter("thumbnail", video.getThumbnail())
.setParameter("title", video.getTitle()) .setParameter("title", video.getTitle())
.setParameter("uploaded", video.getUploaded()) .setParameter("uploaded", video.getUploaded())
.setParameter("views", video.getViews()) .setParameter("views", video.getViews())
.setParameter("id", video.getId()).executeUpdate(); .setParameter("id", video.getId())
.executeUpdate();
tr.commit(); tr.commit();
} catch (Exception e) { } catch (Exception e) {
tr.rollback(); tr.rollback();