Because StreamFab now uses a full featured Chromium browser, you can install extensions.
I have installed BitWarden and ViolentMonkey. In ViolentMonkey, i installed Amazon Subtitle downloader and Netflix Subtitle downloader
So you can download external subs from within StreamFab and all modern players can use them or you remux them into your files manually
jpp72
... and after editing the Amazon subs downloader script to make it stop bastardising pristine TTML into SRT and appending stupid things to title (as well as making it recognise [cc] subs properly), it works rater well. Kudos on the legwork!
edits, if you want a copy:
[code]
--- original.js 2024-11-05 23:58:34.486865100 +0000
+++ edited.js 2024-11-06 00:01:47.064393295 +0000
@@ -206,18 +206,19 @@
onload: function(resp) {
progressBar.increment();
- var srt = xmlToSrt(resp.responseText, lang);
- if(srt === null) {
- srt = resp.responseText;
- title = title.replace(/\.[^\.]+$/, '.ttml2');
- }
+// var srt = xmlToSrt(resp.responseText, lang);
+// if(srt === null) {
+// srt = resp.responseText;
+// title = title.replace(/\.[^\.]+$/, '.ttml2');
+// }
+
if(downloadVars) {
- downloadVars.zip.file(title, srt);
+ downloadVars.zip.file(title, resp.responseText);
--downloadVars.subCounter;
if((downloadVars.subCounter|downloadVars.infoCounter) === 0)
downloadVars.zip.generateAsync({type:"blob"})
.then(function(content) {
- saveAs(content, sanitizeTitle(downloadVars.title) + '.zip');
+ saveAs(content, sanitizeTitle(downloadVars.title) + '.subs.zip');
progressBar.destroy();
});
}
@@ -269,7 +270,7 @@
title += '.' + epInfo.title;
}
title = sanitizeTitle(title);
- title += '.WEBRip.Amazon.';
+// title += '.WEBRip.Amazon.';
var languages = new Set();
var forced = info.forcedNarratives || [];
@@ -282,7 +283,7 @@
subs.forEach(function(subInfo) {
let lang = subInfo.languageCode;
if(subInfo.type === 'subtitle' || subInfo.type === 'subtitle') {}
- else if(subInfo.type === 'shd')
+ else if(subInfo.type === 'sdh')
lang += '[cc]';
else
lang += `[${subInfo.type}]`;
@@ -297,7 +298,7 @@
languages.add(lang);
++downloadVars.subCounter;
progressBar.incrementMax();
- downloadSubs(subInfo.url, title + lang + '.srt', downloadVars, lang);
+ downloadSubs(subInfo.url, title + '.' + lang + '.ttml', downloadVars, lang);
});
}
catch(e) {
[/code]