1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Dissociate video file names and video uuid

This commit is contained in:
Chocobozzz 2021-02-16 16:25:53 +01:00 committed by Chocobozzz
parent 684cdacbbd
commit 90a8bd305d
40 changed files with 638 additions and 395 deletions

View file

@ -116,8 +116,10 @@ async function run () {
console.log('Updating video and torrent files.')
const videos = await VideoModel.listLocal()
for (const video of videos) {
const localVideos = await VideoModel.listLocal()
for (const localVideo of localVideos) {
const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(localVideo.id)
console.log('Updating video ' + video.uuid)
video.url = getLocalVideoActivityPubUrl(video)
@ -125,7 +127,7 @@ async function run () {
for (const file of video.VideoFiles) {
console.log('Updating torrent file %s of video %s.', file.resolution, video.uuid)
await createTorrentAndSetInfoHash(video, file)
await createTorrentAndSetInfoHash(video, video, file)
}
for (const playlist of video.VideoStreamingPlaylists) {