append filename to debrid meta streams

This commit is contained in:
TheBeastLT
2023-11-01 17:19:27 +02:00
parent 5c2b5a59be
commit f9a28c15c2
2 changed files with 4 additions and 8 deletions

View File

@@ -12,10 +12,7 @@ export function chunkArray(arr, size) {
export function streamFilename(stream) {
const titleParts = stream.title.replace(/\n👤.*/s, '').split('\n');
const filePath = titleParts.pop();
const filename = titleParts.length
? filePath.split('/').pop()
: filePath;
const filename = titleParts.pop().split('/').pop();
return encodeURIComponent(filename)
}