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:
parent
684cdacbbd
commit
90a8bd305d
40 changed files with 638 additions and 395 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue