aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/sync-channel.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-09-16 09:37:07 +0200
committerChocobozzz <me@florianbigard.com>2022-09-16 09:37:07 +0200
commit3204f4d17dec79413a94eae8a71b72e0c7ec7ba5 (patch)
treeb6f5a2c3d6e55676972e671fb0ef429a7bdd975b /server/lib/sync-channel.ts
parentc95fbe65530191d7be22341815ecb743c139396f (diff)
downloadPeerTube-3204f4d17dec79413a94eae8a71b72e0c7ec7ba5.tar.gz
PeerTube-3204f4d17dec79413a94eae8a71b72e0c7ec7ba5.tar.zst
PeerTube-3204f4d17dec79413a94eae8a71b72e0c7ec7ba5.zip
Fix sync import of latest videos
Diffstat (limited to 'server/lib/sync-channel.ts')
-rw-r--r--server/lib/sync-channel.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/lib/sync-channel.ts b/server/lib/sync-channel.ts
index 3a81daac0..6cd1fc26d 100644
--- a/server/lib/sync-channel.ts
+++ b/server/lib/sync-channel.ts
@@ -93,7 +93,10 @@ async function skipImport (channel: MChannel, targetUrl: string, onlyAfter?: Dat
93 93
94 const videoInfo = await youtubeDL.getInfoForDownload() 94 const videoInfo = await youtubeDL.getInfoForDownload()
95 95
96 if (videoInfo.originallyPublishedAt.getTime() < onlyAfter.getTime()) { 96 const onlyAfterWithoutTime = new Date(onlyAfter)
97 onlyAfterWithoutTime.setHours(0, 0, 0)
98
99 if (videoInfo.originallyPublishedAtWithoutTime.getTime() >= onlyAfterWithoutTime.getTime()) {
97 return true 100 return true
98 } 101 }
99 } 102 }