]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add more logs when storing master playlist in s3
authorChocobozzz <me@florianbigard.com>
Thu, 25 May 2023 07:58:08 +0000 (09:58 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 25 May 2023 07:58:08 +0000 (09:58 +0200)
server/lib/live/shared/muxing-session.ts

index 434b308e6133eacf8860f3b3db3fd64d0e2ed3e8..02691b65144d37bbc6a006af132f15096e5f86b3 100644 (file)
@@ -8,12 +8,7 @@ import { computeOutputFPS } from '@server/helpers/ffmpeg'
 import { logger, loggerTagsFactory, LoggerTagsFn } from '@server/helpers/logger'
 import { CONFIG } from '@server/initializers/config'
 import { MEMOIZE_TTL, P2P_MEDIA_LOADER_PEER_VERSION, VIDEO_LIVE } from '@server/initializers/constants'
-import {
-  removeHLSFileObjectStorageByPath,
-  storeHLSFileFromContent,
-  storeHLSFileFromFilename,
-  storeHLSFileFromPath
-} from '@server/lib/object-storage'
+import { removeHLSFileObjectStorageByPath, storeHLSFileFromContent, storeHLSFileFromPath } from '@server/lib/object-storage'
 import { VideoFileModel } from '@server/models/video/video-file'
 import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist'
 import { MStreamingPlaylistVideo, MUserId, MVideoLiveVideo } from '@server/types/models'
@@ -190,7 +185,10 @@ class MuxingSession extends EventEmitter {
 
       try {
         if (this.streamingPlaylist.storage === VideoStorage.OBJECT_STORAGE) {
-          const url = await storeHLSFileFromFilename(this.streamingPlaylist, this.streamingPlaylist.playlistFilename)
+          const masterContent = await readFile(path, 'utf-8')
+          logger.debug('Uploading live master playlist on object storage for %s', this.videoUUID, { masterContent, ...this.lTags() })
+
+          const url = await storeHLSFileFromContent(this.streamingPlaylist, this.streamingPlaylist.playlistFilename, masterContent)
 
           this.streamingPlaylist.playlistUrl = url
         }