diff options
author | Chocobozzz <me@florianbigard.com> | 2023-01-27 08:34:16 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-01-27 08:34:16 +0100 |
commit | a2be43f5700460d3afdc194abc788690b79e66cd (patch) | |
tree | 005de26e549da0b20e1ec7bc5e293a6603cc958d /server/lib | |
parent | 647c2b7d0448e68d8c8ade52d9568e9b33f8638d (diff) | |
parent | 8059e050ef4e800c95851ac97abbb2330fe17882 (diff) | |
download | PeerTube-a2be43f5700460d3afdc194abc788690b79e66cd.tar.gz PeerTube-a2be43f5700460d3afdc194abc788690b79e66cd.tar.zst PeerTube-a2be43f5700460d3afdc194abc788690b79e66cd.zip |
Merge branch 'release/5.0.0' into develop
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/live/live-manager.ts | 4 | ||||
-rw-r--r-- | server/lib/object-storage/urls.ts | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/server/lib/live/live-manager.ts b/server/lib/live/live-manager.ts index 9ea983119..fa4e1df07 100644 --- a/server/lib/live/live-manager.ts +++ b/server/lib/live/live-manager.ts | |||
@@ -487,7 +487,9 @@ class LiveManager { | |||
487 | ? VideoStorage.OBJECT_STORAGE | 487 | ? VideoStorage.OBJECT_STORAGE |
488 | : VideoStorage.FILE_SYSTEM | 488 | : VideoStorage.FILE_SYSTEM |
489 | 489 | ||
490 | playlist.assignP2PMediaLoaderInfoHashes(video, allResolutions) | 490 | if (playlist.storage === VideoStorage.FILE_SYSTEM) { |
491 | playlist.assignP2PMediaLoaderInfoHashes(video, allResolutions) | ||
492 | } | ||
491 | 493 | ||
492 | return playlist.save() | 494 | return playlist.save() |
493 | } | 495 | } |
diff --git a/server/lib/object-storage/urls.ts b/server/lib/object-storage/urls.ts index a47a98b98..b8ef94559 100644 --- a/server/lib/object-storage/urls.ts +++ b/server/lib/object-storage/urls.ts | |||
@@ -57,5 +57,7 @@ function getBaseUrl (bucketInfo: BucketInfo, baseUrl?: string) { | |||
57 | 57 | ||
58 | const regex = new RegExp('https?://[^/]+') | 58 | const regex = new RegExp('https?://[^/]+') |
59 | function replaceByBaseUrl (fileUrl: string, baseUrl: string) { | 59 | function replaceByBaseUrl (fileUrl: string, baseUrl: string) { |
60 | if (!fileUrl) return fileUrl | ||
61 | |||
60 | return fileUrl.replace(regex, baseUrl) | 62 | return fileUrl.replace(regex, baseUrl) |
61 | } | 63 | } |