stremiok 2.3.4 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +14 -13
- package/config.xml +1 -1
- package/css/style.css +5 -0
- package/index.html +43 -40
- package/js/app.js +3 -3
- package/js/downloads.js +16 -16
- package/js/epg.js +2 -3
- package/js/hubpreview.js +1 -1
- package/js/i18n.js +108 -0
- package/js/iptv.js +13 -13
- package/js/jellyfin.js +19 -19
- package/js/lang/ar.js +1972 -0
- package/js/lang/de.js +1972 -0
- package/js/lang/es.js +1972 -0
- package/js/lang/fi.js +1972 -0
- package/js/lang/fr.js +1972 -0
- package/js/lang/he.js +1972 -0
- package/js/lang/hi.js +1972 -0
- package/js/lang/it.js +1972 -0
- package/js/lang/ja.js +1972 -0
- package/js/lang/ko.js +1972 -0
- package/js/lang/languages.js +21 -0
- package/js/lang/pl.js +1972 -0
- package/js/lang/pt-BR.js +1972 -0
- package/js/lang/ru.js +1972 -0
- package/js/lang/tr.js +1972 -0
- package/js/lang/zh-CN.js +1972 -0
- package/js/local.js +9 -9
- package/js/netfolders.js +13 -13
- package/js/player-audio.js +17 -17
- package/js/player-controls.js +100 -100
- package/js/player-core.js +90 -58
- package/js/player-lang.js +22 -22
- package/js/player-quality.js +15 -15
- package/js/player-store.js +13 -13
- package/js/player-subs.js +69 -69
- package/js/plex.js +11 -11
- package/js/plugins.js +270 -0
- package/js/stremio-account.js +8 -8
- package/js/stremio-sync.js +5 -5
- package/js/stremio.js +81 -78
- package/js/stvod.js +4 -4
- package/js/trakt.js +23 -23
- package/js/tvapps.js +4 -4
- package/js/util.js +48 -27
- package/js/vendor/quickjs/LICENSES.md +412 -0
- package/js/vendor/quickjs/crypto-js.js +6659 -0
- package/js/vendor/quickjs/plugin-worker-legacy.js +1364 -0
- package/js/vendor/quickjs/plugin-worker.js +8774 -0
- package/js/vendor/quickjs/quickjs.wasm +0 -0
- package/js/view-core.js +93 -93
- package/js/view-detail.js +132 -130
- package/js/view-discover.js +27 -27
- package/js/view-guide.js +13 -13
- package/js/view-home.js +124 -118
- package/js/view-search.js +25 -25
- package/js/view-settings.js +743 -643
- package/js/xtvod.js +2 -2
- package/js/youtube.js +17 -17
- package/js/ytplay.js +39 -9
- package/package.json +1 -1
- package/service/index.js +227 -13
- package/tizenbrew.html +1 -1
package/js/view-detail.js
CHANGED
|
@@ -73,17 +73,17 @@
|
|
|
73
73
|
var why = list.length ? '' : (Stremio.streamNotes ? Stremio.streamNotes(type, id) : []).slice(0, 3).map(function (n) { return n.addon + ' ' + n.title; }).join('; ');
|
|
74
74
|
U.log('sources', 'No playable source for “' + ((_d.meta && _d.meta.name) || id) + '” (' + type + ' ' + id + '): ' +
|
|
75
75
|
(list.length ? list.length + ' source(s), none playable here' : 'no addon sent any') + (why ? ' (' + why + ')' : ''));
|
|
76
|
-
U.toast('No playable source for this channel'
|
|
76
|
+
U.toast(why ? U.t('No playable source for this channel: {why}', { why: why }) : U.t('No playable source for this channel'), why ? 6000 : 3000); App.back(); return;
|
|
77
77
|
}
|
|
78
78
|
if (playable.length === 1) {
|
|
79
|
-
startPlayback(playable[0], id, _d.streamLabel || _d.meta.name || 'Live');
|
|
79
|
+
startPlayback(playable[0], id, _d.streamLabel || _d.meta.name || U.t('Live'));
|
|
80
80
|
} else if ((opts && opts.playBest) || _d.autoBest) { // (the remote's Play key)
|
|
81
81
|
var top = bestRow(rankRowsFor(list));
|
|
82
|
-
startPlayback(top ? top.st : playable[0], id, _d.streamLabel || _d.meta.name || 'Live');
|
|
82
|
+
startPlayback(top ? top.st : playable[0], id, _d.streamLabel || _d.meta.name || U.t('Live'));
|
|
83
83
|
} else {
|
|
84
84
|
drawDetail(); // multiple sources → straight to the source list
|
|
85
85
|
}
|
|
86
|
-
}, function () { if (!still()) { return; } U.spinner(false); U.toast('Could not load sources'); App.back(); });
|
|
86
|
+
}, function () { if (!still()) { return; } U.spinner(false); U.toast(U.t('Could not load sources')); App.back(); });
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// opts.resume: a Continue Watching entry to play straight away (see startResume).
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
_d.meta = Object.assign({ id: id, type: type }, _d.preview);
|
|
117
117
|
afterMeta();
|
|
118
118
|
} else {
|
|
119
|
-
U.toast('Could not load details');
|
|
119
|
+
U.toast(U.t('Could not load details'));
|
|
120
120
|
App.back();
|
|
121
121
|
}
|
|
122
122
|
});
|
|
@@ -207,14 +207,14 @@
|
|
|
207
207
|
}
|
|
208
208
|
// A season's name: a year ("2026"), "Videos" (a YouTube channel's undated list), or "Season 2".
|
|
209
209
|
function seasonName(sn) {
|
|
210
|
-
if (_d && _d.collection) { return 'Titles'; }
|
|
211
|
-
if (_d && _d.addonType) { return _d.yearSeasons ? '' + sn : 'Videos'; }
|
|
212
|
-
return sn >= 1900 && sn <= 2200 ? '' + sn : 'Season '
|
|
210
|
+
if (_d && _d.collection) { return U.t('Titles'); }
|
|
211
|
+
if (_d && _d.addonType) { return _d.yearSeasons ? '' + sn : U.t('Videos'); }
|
|
212
|
+
return sn >= 1900 && sn <= 2200 ? '' + sn : U.t('Season {n}', { n: sn });
|
|
213
213
|
}
|
|
214
214
|
// An episode as it's named on its own (the Play button, the player, Continue Watching): a
|
|
215
215
|
// YouTube channel's video by its title, an episode by its code ("S2E5").
|
|
216
216
|
function epName(v) {
|
|
217
|
-
return (_d && _d.addonType) ? (v.title || 'Video') : _d.meta.name + ' S' + seasonOf(v) + 'E' + (v.episode || '');
|
|
217
|
+
return (_d && _d.addonType) ? (v.title || U.t('Video')) : _d.meta.name + ' S' + seasonOf(v) + 'E' + (v.episode || '');
|
|
218
218
|
}
|
|
219
219
|
// Seasons that are years (a YouTube channel): the newest first.
|
|
220
220
|
function yearOrder() { return !!(_d && _d.yearSeasons); }
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
behaviorHints: (p.fileHints && typeof p.fileHints === 'object') ? p.fileHints : undefined }; // (its file: for subtitles made for it)
|
|
234
234
|
if (p.torrent && typeof p.torrent.infoHash === 'string') { // (a torrent: its link from the streaming server set now)
|
|
235
235
|
st = Stremio.torrentSource({ infoHash: p.torrent.infoHash, fileIdx: p.torrent.fileIdx, sources: p.torrent.sources, name: p.name, behaviorHints: st.behaviorHints });
|
|
236
|
-
if (!st.url) { U.toast('This one plays through a streaming server: Settings › Content › Streaming server', 6000); return; }
|
|
236
|
+
if (!st.url) { U.toast(U.t('This one plays through a streaming server: Settings › Content › Streaming server'), 6000); return; }
|
|
237
237
|
}
|
|
238
238
|
if (/^https:\/\/www\.youtube\.com\/watch\?v=[A-Za-z0-9_-]{11}$/.test(p.url || '')) { st._yt = true; st.ytPage = p.url; } // (a YouTube video: through the service again)
|
|
239
239
|
resumeSources(startPlayback(st, p.id, p.name, how), p.id);
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
var epTitle = ep.title || ep.name || '';
|
|
286
286
|
bits.push(epCode(ep) + (epTitle ? ' “' + epTitle + '”' : ''));
|
|
287
287
|
var aired = airsAt(ep);
|
|
288
|
-
if (aired > 0) { bits.push(
|
|
288
|
+
if (aired > 0) { bits.push(aired > Date.now() ? U.t('Airs {when}', { when: U.dayLabel(aired) }) : U.t('Aired {when}', { when: U.dayLabel(aired) })); }
|
|
289
289
|
if (ep.rating && !isNaN(parseFloat(ep.rating))) { bits.push('★ ' + ep.rating); }
|
|
290
290
|
} else {
|
|
291
291
|
if (meta.releaseInfo) { bits.push(meta.releaseInfo); }
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
var genres = (meta.genres && meta.genres.length) ? meta.genres : own.genres;
|
|
297
297
|
if (genres.length) { bits.push(genres.slice(0, 3).join(', ')); }
|
|
298
298
|
}
|
|
299
|
-
if (meta._from) { bits.push('Details: '
|
|
299
|
+
if (meta._from) { bits.push(U.t('Details: {addon}', { addon: meta._from })); } // (which addon: the highest in Settings › Addons that has them)
|
|
300
300
|
body.appendChild(U.el('div', 'detail-meta', bits.join(' · ')));
|
|
301
301
|
var ratings = U.el('div', 'detail-ratings');
|
|
302
302
|
body.appendChild(ratings);
|
|
@@ -410,7 +410,7 @@
|
|
|
410
410
|
function withTmdb() { return Stremio.hasTmdb() && /^tt\d+$/.test(_d.id || ''); }
|
|
411
411
|
function morePill() {
|
|
412
412
|
if (!withTmdb() && !hasAddonPeople(_d.meta)) { return null; }
|
|
413
|
-
var p = U.el('div', 'pill focusable more-pill', 'ⓘ Cast & more');
|
|
413
|
+
var p = U.el('div', 'pill focusable more-pill', U.t('ⓘ Cast & more'));
|
|
414
414
|
p.__onselect = function () { _d.moreFrom = _d.mode; _d.mode = 'more'; drawDetail(); };
|
|
415
415
|
if (_d._focusPill === 'more') { _d._epFocus = p; _d._focusPill = null; }
|
|
416
416
|
return p;
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
function ratingsPill() {
|
|
419
419
|
var integ = Stremio.getIntegrations();
|
|
420
420
|
if (!(integ.omdb || integ.tmdb) || !/^tt\d+$/.test(_d.id || '')) { return null; }
|
|
421
|
-
var p = U.el('div', 'pill focusable ratings-pill', '★ Episode ratings');
|
|
421
|
+
var p = U.el('div', 'pill focusable ratings-pill', U.t('★ Episode ratings'));
|
|
422
422
|
p.__onselect = function () { _d.moreFrom = _d.mode; _d.mode = 'ratings'; drawDetail(); };
|
|
423
423
|
if (_d._focusPill === 'ratings') { _d._epFocus = p; _d._focusPill = null; }
|
|
424
424
|
return p;
|
|
@@ -427,7 +427,7 @@
|
|
|
427
427
|
function morePanel() {
|
|
428
428
|
var panel = U.el('div', 'list-panel more-panel');
|
|
429
429
|
var rows = U.el('div', 'more-rows');
|
|
430
|
-
rows.appendChild(U.el('div', 'row-empty', 'Loading…'));
|
|
430
|
+
rows.appendChild(U.el('div', 'row-empty', U.t('Loading…')));
|
|
431
431
|
panel.appendChild(rows);
|
|
432
432
|
var page = _d;
|
|
433
433
|
var ep = shownEpisode();
|
|
@@ -439,16 +439,16 @@
|
|
|
439
439
|
if (_d !== page || _d.mode !== 'more') { return; }
|
|
440
440
|
U.clear(rows);
|
|
441
441
|
if (!people || !people.length) {
|
|
442
|
-
if (!theirs()) { rows.appendChild(U.el('div', 'row-empty', 'TMDB has nothing more for this episode.')); }
|
|
442
|
+
if (!theirs()) { rows.appendChild(U.el('div', 'row-empty', U.t('TMDB has nothing more for this episode.'))); }
|
|
443
443
|
focusLoaded(rows);
|
|
444
444
|
return;
|
|
445
445
|
}
|
|
446
|
-
rows.appendChild(buildRow('Cast & more', people.map(personCard)));
|
|
446
|
+
rows.appendChild(buildRow(U.t('Cast & more'), people.map(personCard)));
|
|
447
447
|
focusLoaded(rows);
|
|
448
448
|
}, function () {
|
|
449
449
|
if (_d !== page) { return; }
|
|
450
450
|
U.clear(rows);
|
|
451
|
-
if (!theirs()) { rows.appendChild(U.el('div', 'row-empty', 'Couldn\'t reach TMDB.')); }
|
|
451
|
+
if (!theirs()) { rows.appendChild(U.el('div', 'row-empty', U.t('Couldn\'t reach TMDB.'))); }
|
|
452
452
|
focusLoaded(rows);
|
|
453
453
|
});
|
|
454
454
|
return panel;
|
|
@@ -456,16 +456,16 @@
|
|
|
456
456
|
Stremio.tmdbTitleExtras(page.type, page.id, pageCancel()).then(function (x) {
|
|
457
457
|
if (_d !== page || _d.mode !== 'more') { return; }
|
|
458
458
|
U.clear(rows);
|
|
459
|
-
if (x && x.cast.length) { rows.appendChild(buildRow('Cast & more', x.cast.map(personCard))); }
|
|
459
|
+
if (x && x.cast.length) { rows.appendChild(buildRow(U.t('Cast & more'), x.cast.map(personCard))); }
|
|
460
460
|
var own = !(x && x.cast.length) && theirs(); // (no people from TMDB: the addon's)
|
|
461
461
|
if (x && x.collection) { rows.appendChild(buildRow(x.collection.name, x.collection.parts.map(tmdbCard))); }
|
|
462
|
-
if (x && x.similar.length) { rows.appendChild(buildRow('More like this', x.similar.map(tmdbCard))); }
|
|
463
|
-
if (!rows.firstChild && !own) { rows.appendChild(U.el('div', 'row-empty', 'TMDB has nothing more for this title.')); }
|
|
462
|
+
if (x && x.similar.length) { rows.appendChild(buildRow(U.t('More like this'), x.similar.map(tmdbCard))); }
|
|
463
|
+
if (!rows.firstChild && !own) { rows.appendChild(U.el('div', 'row-empty', U.t('TMDB has nothing more for this title.'))); }
|
|
464
464
|
focusLoaded(rows);
|
|
465
465
|
}, function (err) {
|
|
466
466
|
if (_d !== page || (err && err.cancelled)) { return; }
|
|
467
467
|
U.clear(rows);
|
|
468
|
-
if (!theirs()) { rows.appendChild(U.el('div', 'row-empty', 'Couldn\'t reach TMDB.')); }
|
|
468
|
+
if (!theirs()) { rows.appendChild(U.el('div', 'row-empty', U.t('Couldn\'t reach TMDB.'))); }
|
|
469
469
|
focusLoaded(rows);
|
|
470
470
|
});
|
|
471
471
|
return panel;
|
|
@@ -496,10 +496,10 @@
|
|
|
496
496
|
// Rows of them, by name (no photos): OK searches for the name. Whether there were any.
|
|
497
497
|
function appendAddonPeople(rows, meta) {
|
|
498
498
|
var o = addonLinks(meta), any = false;
|
|
499
|
-
[['Cast', o.cast, ''], ['Directors', o.directors, 'Director'], ['Writers', o.writers, 'Writer']].forEach(function (g) {
|
|
499
|
+
[[U.t('Cast'), o.cast, ''], [U.t('Directors'), o.directors, U.t('Director')], [U.t('Writers'), o.writers, U.t('Writer')]].forEach(function (g) {
|
|
500
500
|
if (!g[1].length) { return; }
|
|
501
501
|
any = true;
|
|
502
|
-
rows.appendChild(buildRow(g[0] + ' · from '
|
|
502
|
+
rows.appendChild(buildRow(g[0] + ' · ' + U.t('from {addon}', { addon: (meta && meta._from) || U.t('the addon') }), g[1].map(function (n) { return namedPersonCard(n, g[2]); })));
|
|
503
503
|
});
|
|
504
504
|
return any;
|
|
505
505
|
}
|
|
@@ -550,7 +550,7 @@
|
|
|
550
550
|
function peopleCard(p) {
|
|
551
551
|
var c = personCard({ id: p.id, name: p.name, photo: p.photo, character: p.dept });
|
|
552
552
|
c.__meta = { id: 'person:' + p.id, name: p.name, releaseInfo: p.dept,
|
|
553
|
-
description: p.knownFor && p.knownFor.length ? 'Known for: '
|
|
553
|
+
description: p.knownFor && p.knownFor.length ? U.t('Known for: {titles}', { titles: p.knownFor.join(', ') }) : '' };
|
|
554
554
|
return c;
|
|
555
555
|
}
|
|
556
556
|
|
|
@@ -575,9 +575,9 @@
|
|
|
575
575
|
U.spinner(true);
|
|
576
576
|
Stremio.tmdbImdbId(item.kind, item.tmdbId, pageCancel()).then(function (imdb) {
|
|
577
577
|
U.spinner(false);
|
|
578
|
-
if (!imdb) { U.toast('“
|
|
578
|
+
if (!imdb) { U.toast(U.t('“{name}” has no IMDb id, so the addons can\'t open it.', { name: item.name }), 3500); return; }
|
|
579
579
|
then(imdb);
|
|
580
|
-
}, function () { U.spinner(false); U.toast('Couldn\'t reach TMDB.'); });
|
|
580
|
+
}, function () { U.spinner(false); U.toast(U.t('Couldn\'t reach TMDB.')); });
|
|
581
581
|
}
|
|
582
582
|
|
|
583
583
|
// ----- a person's page (from the cast row) -----
|
|
@@ -594,7 +594,7 @@
|
|
|
594
594
|
drawPerson();
|
|
595
595
|
}, function () {
|
|
596
596
|
U.spinner(false);
|
|
597
|
-
if (_d === page) { U.toast('Couldn\'t load this person from TMDB.'); }
|
|
597
|
+
if (_d === page) { U.toast(U.t('Couldn\'t load this person from TMDB.')); }
|
|
598
598
|
});
|
|
599
599
|
}
|
|
600
600
|
function drawPerson() {
|
|
@@ -619,9 +619,9 @@
|
|
|
619
619
|
panel.appendChild(rows);
|
|
620
620
|
s.appendChild(panel);
|
|
621
621
|
if (p) {
|
|
622
|
-
if (p.movies.length) { rows.appendChild(buildRow('Movies', p.movies.map(tmdbCard))); }
|
|
623
|
-
if (p.series.length) { rows.appendChild(buildRow('Series', p.series.map(tmdbCard))); }
|
|
624
|
-
if (!p.movies.length && !p.series.length) { rows.appendChild(U.el('div', 'row-empty', 'No titles listed on TMDB.')); }
|
|
622
|
+
if (p.movies.length) { rows.appendChild(buildRow(U.t('Movies'), p.movies.map(tmdbCard))); }
|
|
623
|
+
if (p.series.length) { rows.appendChild(buildRow(U.t('Series'), p.series.map(tmdbCard))); }
|
|
624
|
+
if (!p.movies.length && !p.series.length) { rows.appendChild(U.el('div', 'row-empty', U.t('No titles listed on TMDB.'))); }
|
|
625
625
|
}
|
|
626
626
|
Focus.setScope(s, rows.querySelector('.focusable') || undefined);
|
|
627
627
|
restoreFocusKey(s);
|
|
@@ -669,7 +669,7 @@
|
|
|
669
669
|
}
|
|
670
670
|
scroll.appendChild(table);
|
|
671
671
|
panel.appendChild(scroll);
|
|
672
|
-
panel.appendChild(U.el('div', 'grid-legend', 'IMDb ratings where OMDb has them, else TMDB. OK on an episode opens it.'));
|
|
672
|
+
panel.appendChild(U.el('div', 'grid-legend', U.t('IMDb ratings where OMDb has them, else TMDB. OK on an episode opens it.')));
|
|
673
673
|
_d._epFocus = (_d.season != null && cells[_d.season + ':1']) || startCell;
|
|
674
674
|
U.settleAll(ss.map(function (sn) {
|
|
675
675
|
return function () {
|
|
@@ -758,7 +758,7 @@
|
|
|
758
758
|
return (meta.videos || []).filter(function (v) { return v && v.streams && v.streams.length; });
|
|
759
759
|
}
|
|
760
760
|
function fileLabel(v) {
|
|
761
|
-
var t = '' + (v.title || v.name || v.id || 'File');
|
|
761
|
+
var t = '' + (v.title || v.name || v.id || U.t('File'));
|
|
762
762
|
return t.split('/').pop();
|
|
763
763
|
}
|
|
764
764
|
function fileStreams(v) {
|
|
@@ -812,7 +812,7 @@
|
|
|
812
812
|
// ----- series: Resume / Play -----
|
|
813
813
|
function seasonOf(v) { return v.season === undefined ? 1 : v.season; }
|
|
814
814
|
function epCode(v) {
|
|
815
|
-
if (_d && _d.addonType) { var t = '' + (v.title || 'Video'); return '“' + (t.length > 40 ? t.slice(0, 39) + '…' : t) + '”'; } // (a YouTube channel's video)
|
|
815
|
+
if (_d && _d.addonType) { var t = '' + (v.title || U.t('Video')); return '“' + (t.length > 40 ? t.slice(0, 39) + '…' : t) + '”'; } // (a YouTube channel's video)
|
|
816
816
|
return 'S' + seasonOf(v) + 'E' + (v.episode || '?');
|
|
817
817
|
}
|
|
818
818
|
|
|
@@ -851,7 +851,7 @@
|
|
|
851
851
|
// watched all that's out): no Play, just when it airs.
|
|
852
852
|
var airs = airsAt(up.v);
|
|
853
853
|
if (_d.collection) { // (the next film you haven't watched: its page)
|
|
854
|
-
var open = U.el('div', 'pill focusable', '▶ Open “'
|
|
854
|
+
var open = U.el('div', 'pill focusable', '▶ ' + U.t('Open “{title}”', { title: up.v.title || up.v.name || '' }));
|
|
855
855
|
open.__onselect = function () { openTitle(up.v); };
|
|
856
856
|
row.appendChild(open);
|
|
857
857
|
var tpc = trailerPill();
|
|
@@ -859,7 +859,7 @@
|
|
|
859
859
|
return row;
|
|
860
860
|
}
|
|
861
861
|
if (!up.resume && !episodeWatched(up.v) && airs > Date.now()) {
|
|
862
|
-
row.appendChild(U.el('div', 'pill airs-pill', epCode(up.v)
|
|
862
|
+
row.appendChild(U.el('div', 'pill airs-pill', U.t('{ep} airs {when}', { ep: epCode(up.v), when: U.dayLabel(airs) })));
|
|
863
863
|
} else {
|
|
864
864
|
row.appendChild(playUpButton(up));
|
|
865
865
|
}
|
|
@@ -879,8 +879,8 @@
|
|
|
879
879
|
}
|
|
880
880
|
function playUpButton(up) {
|
|
881
881
|
var btn = U.el('div', 'pill focusable', up.resume
|
|
882
|
-
? '▶ Resume '
|
|
883
|
-
: '▶ Play '
|
|
882
|
+
? '▶ ' + U.t('Resume {ep} · {at}', { ep: epCode(up.v), at: U.fmtTime(up.resume.position) })
|
|
883
|
+
: '▶ ' + U.t('Play {ep}', { ep: epCode(up.v) }));
|
|
884
884
|
btn.__onselect = function () {
|
|
885
885
|
// resume the exact stream when one was saved; otherwise pick a source
|
|
886
886
|
if (up.resume && up.resume.url) { startResume(up.resume); }
|
|
@@ -895,7 +895,7 @@
|
|
|
895
895
|
if (up.resume && up.resume.position > 0) {
|
|
896
896
|
btn.__onlongpress = function () {
|
|
897
897
|
var code = epCode(up.v);
|
|
898
|
-
pickList((_d.meta.name || '') + ' ' + code, [['resume', 'Resume at '
|
|
898
|
+
pickList((_d.meta.name || '') + ' ' + code, [['resume', U.t('Resume at {at}', { at: U.fmtTime(up.resume.position) })], ['start', U.t('Play {ep} from the start', { ep: code })]], null, function (k) {
|
|
899
899
|
if (k === 'resume') { btn.__onselect(); return; }
|
|
900
900
|
if (up.resume.url) { startResume(Object.assign({}, up.resume, { fromStart: true })); }
|
|
901
901
|
else { openStreams(up.v.id, epName(up.v), false, { fromStart: true }); }
|
|
@@ -951,7 +951,7 @@
|
|
|
951
951
|
return (t.lang && mine.indexOf(t.lang) !== -1 && r < 3 ? 0 : 10) + r; // (yours first, ticket ads still last)
|
|
952
952
|
}
|
|
953
953
|
out.sort(function (a, b) { return (rank(a) - rank(b)) || (a.at - b.at); });
|
|
954
|
-
out.forEach(function (t, i) { if (!t.name) { t.name = out.length > 1 ? 'Trailer '
|
|
954
|
+
out.forEach(function (t, i) { if (!t.name) { t.name = out.length > 1 ? U.t('Trailer {n}', { n: i + 1 }) : U.t('Trailer'); } });
|
|
955
955
|
return out;
|
|
956
956
|
}
|
|
957
957
|
// Your languages, two-letter (TMDB's): the audio's, the subtitles' (and their second choice).
|
|
@@ -964,12 +964,11 @@
|
|
|
964
964
|
return out;
|
|
965
965
|
}
|
|
966
966
|
// A trailer as listed: its title, then its language, month and "unofficial", where known.
|
|
967
|
-
var MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
968
967
|
function trailerLabel(t) {
|
|
969
968
|
var bits = [t.name];
|
|
970
969
|
if (t.lang && Player.langName) { bits.push(Player.langName(t.lang)); }
|
|
971
970
|
var m = /^(\d{4})-(\d{2})/.exec(t.date || '');
|
|
972
|
-
if (m) { bits.push(
|
|
971
|
+
if (m) { bits.push(U.month(+m[2] - 1) + ' ' + m[1]); }
|
|
973
972
|
if (t.official === false) { bits.push('unofficial'); }
|
|
974
973
|
return bits.join(' · ');
|
|
975
974
|
}
|
|
@@ -978,25 +977,25 @@
|
|
|
978
977
|
// when it refuses (false: just that one, picked by hand).
|
|
979
978
|
function playTrailers(list, next) {
|
|
980
979
|
var meta = _d.meta, title = (meta && (meta.name || meta.title)) || '', passed = [], still = pageNow();
|
|
981
|
-
U.spinner(true, 'Opening trailer…');
|
|
980
|
+
U.spinner(true, U.t('Opening trailer…'));
|
|
982
981
|
YTPlay.ensureService().then(function () {
|
|
983
982
|
function tryAt(i) {
|
|
984
983
|
if (!still()) { U.spinner(false); return; }
|
|
985
984
|
if (i >= list.length) {
|
|
986
985
|
U.spinner(false);
|
|
987
|
-
U.toast(list.length === 1 ? '“
|
|
986
|
+
U.toast(list.length === 1 ? U.t('“{name}” isn’t available from YouTube to StremioK', { name: list[0].name }) : U.t('YouTube won’t give out any of this title’s {n} trailers to StremioK', { n: list.length }), 6000);
|
|
988
987
|
return;
|
|
989
988
|
}
|
|
990
989
|
var t = list[i], page = 'https://www.youtube.com/watch?v=' + t.id;
|
|
991
990
|
(YTPlay.canPlay ? YTPlay.canPlay(page) : Promise.resolve(true)).then(function (ok) {
|
|
992
991
|
if (!ok) {
|
|
993
992
|
U.log('youtube', 'Trailer “' + t.name + '” (' + t.id + ') of “' + title + '”: YouTube didn’t give it out' + (next && i + 1 < list.length ? '; trying the next one' : ''));
|
|
994
|
-
if (!next) { U.spinner(false); U.toast('“
|
|
993
|
+
if (!next) { U.spinner(false); U.toast(U.t('“{name}” isn’t available from YouTube to StremioK', { name: t.name }), 6000); return; }
|
|
995
994
|
passed.push(t);
|
|
996
995
|
tryAt(i + 1);
|
|
997
996
|
return;
|
|
998
997
|
}
|
|
999
|
-
if (passed.length) { U.toast('“
|
|
998
|
+
if (passed.length) { U.toast(U.t('“{name}” isn’t available from YouTube: playing “{other}”', { name: passed[0].name, other: t.name }), 6000); }
|
|
1000
999
|
playTrailer(t.id);
|
|
1001
1000
|
});
|
|
1002
1001
|
}
|
|
@@ -1025,11 +1024,11 @@
|
|
|
1025
1024
|
}
|
|
1026
1025
|
var list = trailersOf(_d.meta);
|
|
1027
1026
|
if (!list.length || typeof YTPlay === 'undefined') { return null; }
|
|
1028
|
-
var p = U.el('div', 'pill focusable trailer-pill', '▶ Trailer' + (list.length > 1 ? ' (' + list.length + ')' : ''));
|
|
1027
|
+
var p = U.el('div', 'pill focusable trailer-pill', '▶ ' + U.t('Trailer') + (list.length > 1 ? ' (' + list.length + ')' : ''));
|
|
1029
1028
|
p.__onselect = function () { playTrailers(list, true); };
|
|
1030
1029
|
if (list.length > 1) { // hold OK: the list, to pick one
|
|
1031
1030
|
p.__onlongpress = function () {
|
|
1032
|
-
pickList('Trailers', list.map(function (t, i) { return ['' + i, trailerLabel(t)]; }), '', function (k) { playTrailers([list[+k]], false); });
|
|
1031
|
+
pickList(U.t('Trailers'), list.map(function (t, i) { return ['' + i, trailerLabel(t)]; }), '', function (k) { playTrailers([list[+k]], false); });
|
|
1033
1032
|
};
|
|
1034
1033
|
}
|
|
1035
1034
|
if (_d._focusTrailer) { _d._epFocus = p; _d._focusTrailer = false; }
|
|
@@ -1059,7 +1058,7 @@
|
|
|
1059
1058
|
}
|
|
1060
1059
|
function epTrailerButton(ep, t) {
|
|
1061
1060
|
var season = seasonName(seasonOf(ep));
|
|
1062
|
-
var p = U.el('div', 'pill focusable trailer-pill', t.season ? '▶ ' + season
|
|
1061
|
+
var p = U.el('div', 'pill focusable trailer-pill', t.season ? '▶ ' + U.t('{season} trailer', { season: season }) : '▶ ' + U.t('Trailer'));
|
|
1063
1062
|
p.__onselect = function () { playTrailer(t.ytId, (_d.meta.name || _d.meta.title || '') + ' ' + (t.season ? season : epCode(ep))); };
|
|
1064
1063
|
if (_d._focusTrailer) { _d._epFocus = p; _d._focusTrailer = false; }
|
|
1065
1064
|
return p;
|
|
@@ -1069,13 +1068,13 @@
|
|
|
1069
1068
|
function playTrailer(ytId, label) {
|
|
1070
1069
|
var page = 'https://www.youtube.com/watch?v=' + ytId;
|
|
1071
1070
|
var meta = _d.meta, still = pageNow();
|
|
1072
|
-
U.spinner(true, 'Opening trailer…');
|
|
1071
|
+
U.spinner(true, U.t('Opening trailer…'));
|
|
1073
1072
|
YTPlay.ensureService().then(function () {
|
|
1074
1073
|
U.spinner(false);
|
|
1075
1074
|
if (!still()) { return; }
|
|
1076
1075
|
Player.play({
|
|
1077
1076
|
url: YTPlay.resolverUrl(page, 1080, false, ytLangFor(page)), variantUrl: YTPlay.resolverUrl(page), initialQualityHeight: 1080,
|
|
1078
|
-
ytLang: ytLangFor(page), type: _d.type, id: 'trailer:' + ytId, name: (label || meta.name || meta.title || '') + ' · Trailer',
|
|
1077
|
+
ytLang: ytLangFor(page), type: _d.type, id: 'trailer:' + ytId, name: (label || meta.name || meta.title || '') + ' · ' + U.t('Trailer'),
|
|
1079
1078
|
poster: meta.poster, streams: [], yt: page, trailer: true
|
|
1080
1079
|
}, function () { _d._focusTrailer = true; drawDetail(); }); // back on the page, on the Trailer button
|
|
1081
1080
|
}, function () {
|
|
@@ -1086,7 +1085,7 @@
|
|
|
1086
1085
|
|
|
1087
1086
|
function movieActions() {
|
|
1088
1087
|
var row = U.el('div', 'btn-row');
|
|
1089
|
-
var play = U.el('div', 'pill focusable', '▶ Play');
|
|
1088
|
+
var play = U.el('div', 'pill focusable', U.t('▶ Play'));
|
|
1090
1089
|
play.__onselect = function () { openStreams(_d.id, _d.meta.name, false, AUTO); };
|
|
1091
1090
|
play.__onplay = function () { openStreams(_d.id, _d.meta.name, false, PLAY_KEY); };
|
|
1092
1091
|
row.appendChild(play);
|
|
@@ -1104,7 +1103,7 @@
|
|
|
1104
1103
|
|
|
1105
1104
|
// Hide spoilers (Settings › Appearance): for an episode not watched yet, 'pictures' (its still
|
|
1106
1105
|
// blurred) or 'all' (its synopsis left out too); '' to show it.
|
|
1107
|
-
var SPOILER_TEXT = 'Synopsis hidden: not watched yet';
|
|
1106
|
+
var SPOILER_TEXT = U.t('Synopsis hidden: not watched yet');
|
|
1108
1107
|
function spoilerFor(v) {
|
|
1109
1108
|
var mode = Stremio.getPrefs().spoilers;
|
|
1110
1109
|
if (mode === 'off' || !v || _d.collection || episodeWatched(v)) { return ''; }
|
|
@@ -1146,28 +1145,28 @@
|
|
|
1146
1145
|
|
|
1147
1146
|
function seasonMenu(meta, sn, allSeasons) {
|
|
1148
1147
|
var on = !seasonWatched(meta, sn);
|
|
1149
|
-
var opts = [['season', (on ? 'Mark Season '
|
|
1148
|
+
var opts = [['season', (on ? U.t('Mark Season {n} watched', { n: sn }) : U.t('Mark Season {n} unwatched', { n: sn }))]];
|
|
1150
1149
|
// "up to here": the regular seasons before this one too (not specials, Season 0)
|
|
1151
1150
|
var earlier = allSeasons.filter(function (x) { return x > 0 && x < sn; });
|
|
1152
|
-
if (sn > 0 && earlier.length) { opts.push(['upto', 'Mark Seasons '
|
|
1151
|
+
if (sn > 0 && earlier.length) { opts.push(['upto', U.t('Mark Seasons {from}–{to} watched', { from: earlier[0], to: sn })]); }
|
|
1153
1152
|
var allOn = !seriesWatched(meta);
|
|
1154
|
-
opts.push(['all', allOn ? 'Mark whole series watched' : 'Mark whole series unwatched']);
|
|
1153
|
+
opts.push(['all', allOn ? U.t('Mark whole series watched') : U.t('Mark whole series unwatched')]);
|
|
1155
1154
|
var showId = (meta.id || _d.id || '').split(':')[0];
|
|
1156
1155
|
if (typeof Trakt !== 'undefined' && Trakt.isConnected() && Trakt.rate && /^tt\d+$/.test(showId)) { // (on Trakt: by the show's IMDb id)
|
|
1157
1156
|
var mine = Trakt.myRating('season', showId + ':' + sn);
|
|
1158
|
-
opts.push(['rate', mine ? 'Season
|
|
1157
|
+
opts.push(['rate', mine ? U.t('Season {n}: your rating {rating} · change', { n: sn, rating: mine }) : U.t('Rate Season {n} on Trakt', { n: sn })]);
|
|
1159
1158
|
}
|
|
1160
1159
|
pickList(seasonName(sn), opts, null, function (what) {
|
|
1161
1160
|
if (what === 'rate') { V.rateOnTrakt('season', showId + ':' + sn, (meta.name || '') + ' ' + seasonName(sn)); return; }
|
|
1162
1161
|
if (what === 'season') {
|
|
1163
|
-
markEpisodes(idsOf(seasonEpisodes(meta, sn)), on,
|
|
1162
|
+
markEpisodes(idsOf(seasonEpisodes(meta, sn)), on, on ? U.t('{season} marked watched', { season: seasonName(sn) }) : U.t('{season} marked unwatched', { season: seasonName(sn) }));
|
|
1164
1163
|
} else if (what === 'upto') {
|
|
1165
1164
|
markEpisodes(idsOf(meta.videos.filter(function (v) {
|
|
1166
1165
|
var x = (v.season === undefined ? 1 : v.season);
|
|
1167
1166
|
return x > 0 && x <= sn;
|
|
1168
|
-
})), true, 'Seasons '
|
|
1167
|
+
})), true, U.t('Seasons {from}–{to} marked watched', { from: earlier[0], to: sn }));
|
|
1169
1168
|
} else {
|
|
1170
|
-
markEpisodes(idsOf(meta.videos), allOn, allOn ? 'Whole series marked watched' : 'Whole series marked unwatched');
|
|
1169
|
+
markEpisodes(idsOf(meta.videos), allOn, allOn ? U.t('Whole series marked watched') : U.t('Whole series marked unwatched'));
|
|
1171
1170
|
}
|
|
1172
1171
|
_d.season = sn;
|
|
1173
1172
|
_d._focusSeason = sn;
|
|
@@ -1178,7 +1177,7 @@
|
|
|
1178
1177
|
function episodeMenu(meta, v) {
|
|
1179
1178
|
var on = !episodeWatched(v);
|
|
1180
1179
|
var code = epCode(v);
|
|
1181
|
-
var opts = [['details', 'Details'], ['one', on ? 'Mark '
|
|
1180
|
+
var opts = [['details', U.t('Details')], ['one', on ? U.t('Mark {ep} watched', { ep: code }) : U.t('Mark {ep} unwatched', { ep: code })]];
|
|
1182
1181
|
// every episode before this one (same order as Next), specials only within Season 0
|
|
1183
1182
|
var ord = orderedEpisodes(meta), at = ord.indexOf(v), before = [];
|
|
1184
1183
|
var sv = (v.season === undefined ? 1 : v.season);
|
|
@@ -1186,19 +1185,19 @@
|
|
|
1186
1185
|
var x = (ord[i].season === undefined ? 1 : ord[i].season);
|
|
1187
1186
|
if (x > 0 || sv === 0) { before.push(ord[i]); }
|
|
1188
1187
|
}
|
|
1189
|
-
if (before.length) { opts.push(['upto', 'Mark watched up to '
|
|
1188
|
+
if (before.length) { opts.push(['upto', U.t('Mark watched up to {ep}', { ep: code })]); }
|
|
1190
1189
|
// it and every episode after it (the same order; specials only within Season 0), when one is watched
|
|
1191
1190
|
var after = [v];
|
|
1192
1191
|
for (var j = at + 1; j < ord.length; j++) {
|
|
1193
1192
|
var y = (ord[j].season === undefined ? 1 : ord[j].season);
|
|
1194
1193
|
if (y > 0 || sv === 0) { after.push(ord[j]); }
|
|
1195
1194
|
}
|
|
1196
|
-
if (after.length > 1 && after.some(episodeWatched)) { opts.push(['fromhere', 'Mark unwatched from '
|
|
1195
|
+
if (after.length > 1 && after.some(episodeWatched)) { opts.push(['fromhere', U.t('Mark unwatched from {ep} on', { ep: code })]); }
|
|
1197
1196
|
pickList(meta.name + ' ' + code, opts, null, function (what) {
|
|
1198
1197
|
if (what === 'details') { openStreams(v.id, epName(v)); return; } // (its page: as OK on it)
|
|
1199
|
-
if (what === 'one') { markEpisodes([v.id], on, on ? 'Marked watched' : 'Marked unwatched'); }
|
|
1200
|
-
else if (what === 'fromhere') { markEpisodes(idsOf(after), false, 'Marked unwatched from '
|
|
1201
|
-
else { markEpisodes(idsOf(before.concat([v])), true, 'Marked watched up to '
|
|
1198
|
+
if (what === 'one') { markEpisodes([v.id], on, on ? U.t('Marked watched') : U.t('Marked unwatched')); }
|
|
1199
|
+
else if (what === 'fromhere') { markEpisodes(idsOf(after), false, U.t('Marked unwatched from {ep} on', { ep: code })); }
|
|
1200
|
+
else { markEpisodes(idsOf(before.concat([v])), true, U.t('Marked watched up to {ep}', { ep: code })); }
|
|
1202
1201
|
_d.target = v.id;
|
|
1203
1202
|
drawDetail();
|
|
1204
1203
|
});
|
|
@@ -1209,15 +1208,15 @@
|
|
|
1209
1208
|
function collectionMenu(meta, v) {
|
|
1210
1209
|
var on = !episodeWatched(v), name = v.title || v.name || '';
|
|
1211
1210
|
var before = orderedEpisodes(meta).slice(0, orderedEpisodes(meta).indexOf(v));
|
|
1212
|
-
var opts = [['one', on ? 'Mark watched' : 'Mark unwatched']];
|
|
1213
|
-
if (before.length) { opts.push(['upto', 'Mark watched up to “'
|
|
1214
|
-
opts.push(['open', 'Open its page']);
|
|
1211
|
+
var opts = [['one', on ? U.t('Mark watched') : U.t('Mark unwatched')]];
|
|
1212
|
+
if (before.length) { opts.push(['upto', U.t('Mark watched up to “{name}” ({n} films)', { name: name, n: before.length + 1 })]); }
|
|
1213
|
+
opts.push(['open', U.t('Open its page')]);
|
|
1215
1214
|
pickList(name, opts, null, function (what) {
|
|
1216
1215
|
if (what === 'open') { openTitle(v); return; }
|
|
1217
1216
|
var films = what === 'one' ? [v] : before.concat([v]), mark = what === 'one' ? on : true;
|
|
1218
1217
|
Player.setWatchedMany('movie', idsOf(films), mark);
|
|
1219
1218
|
if (mark) { films.forEach(function (f) { Player.removeProgress('movie', f.id); }); } // (off Continue Watching: watched)
|
|
1220
|
-
U.toast(what === 'one' ? (mark ? 'Marked watched' : 'Marked unwatched') : 'Marked watched up to “'
|
|
1219
|
+
U.toast(what === 'one' ? (mark ? U.t('Marked watched') : U.t('Marked unwatched')) : U.t('Marked watched up to “{name}”', { name: name }));
|
|
1221
1220
|
_d.target = v.id;
|
|
1222
1221
|
drawDetail();
|
|
1223
1222
|
});
|
|
@@ -1314,7 +1313,7 @@
|
|
|
1314
1313
|
var title = U.el('span', 'ep-title', (watched ? '✓ ' : '') + (_d.collection ? (v.title || v.name || '') + (yr ? ' (' + yr + ')' : '') : 'E' + (v.episode || '?') + ' ' + (v.title || v.name || '')));
|
|
1315
1314
|
var rating = U.el('span', 'ep-rating', '');
|
|
1316
1315
|
line.appendChild(title);
|
|
1317
|
-
if (unaired) { var when = U.dayLabel(airs); line.appendChild(U.el('span', 'ep-airs', 'Airs '
|
|
1316
|
+
if (unaired) { var when = U.dayLabel(airs); line.appendChild(U.el('span', 'ep-airs', U.t('Airs {when}', { when: when }))); }
|
|
1318
1317
|
line.appendChild(rating);
|
|
1319
1318
|
body.appendChild(line);
|
|
1320
1319
|
var ov = U.el('span', 'ep-ov', hide === 'all' ? SPOILER_TEXT : v.overview || '');
|
|
@@ -1409,14 +1408,13 @@
|
|
|
1409
1408
|
// (matched by the service's name) asks first, once, naming the exact app.
|
|
1410
1409
|
function openWhere(opens) {
|
|
1411
1410
|
function go() {
|
|
1412
|
-
U.toast('Opening '
|
|
1411
|
+
U.toast(U.t('Opening {app}…', { app: opens.app.name }), 2000);
|
|
1413
1412
|
TVApps.openTitle(opens.app, opens.data).then(null, function (e) {
|
|
1414
|
-
U.toast('Couldn\'t open '
|
|
1413
|
+
U.toast(U.t('Couldn\'t open {name}: {why}', { name: opens.app.name, why: e.message }), 4000);
|
|
1415
1414
|
});
|
|
1416
1415
|
}
|
|
1417
1416
|
if (!TVApps.isApproved || TVApps.isApproved(opens.app.id)) { go(); return; }
|
|
1418
|
-
confirm('Open “
|
|
1419
|
-
'StremioK will remember your answer for this app (Settings › Content › Streaming apps lists yours).', 'Open', function () {
|
|
1417
|
+
confirm(U.t('Open “{app}” ({id}) from “where to watch” sources? It isn’t one of your streaming apps; StremioK will remember your answer for this app (Settings › Content › Streaming apps lists yours).', { app: opens.app.name, id: opens.app.id }), U.t('Open'), function () {
|
|
1420
1418
|
TVApps.approve(opens.app.id); go();
|
|
1421
1419
|
});
|
|
1422
1420
|
}
|
|
@@ -1443,8 +1441,8 @@
|
|
|
1443
1441
|
// links that don't play here.
|
|
1444
1442
|
var TIERS = ['2160', '1440', '1080', '720', 'sd', 'other'];
|
|
1445
1443
|
var GROUPS = ['local', 'net', 'server', 'emby', 'plex', 'played'].concat(TIERS, ['ranked', 'unsuitable', 'worded', 'sized', 'bad', 'where']);
|
|
1446
|
-
var GROUP_TITLES = { local: 'On your USB drive', net: 'On your network folder', server: 'On your Jellyfin server', emby: 'On your Emby server', plex: 'On your Plex server', played: 'Played before', '2160': '4K', '1440': '1440p', '1080': '1080p', '720': '720p',
|
|
1447
|
-
sd: 'SD', other: 'Other', ranked: 'Sources', unsuitable: 'Marked not suitable', worded: 'Hidden by your words', sized: 'Outside your size limits', bad: 'Not working or not allowed on this TV', where: 'Where to watch · other apps' };
|
|
1444
|
+
var GROUP_TITLES = { local: U.t('On your USB drive'), net: U.t('On your network folder'), server: U.t('On your Jellyfin server'), emby: U.t('On your Emby server'), plex: U.t('On your Plex server'), played: U.t('Played before'), '2160': '4K', '1440': '1440p', '1080': '1080p', '720': '720p',
|
|
1445
|
+
sd: 'SD', other: U.t('Other'), ranked: U.t('Sources'), unsuitable: U.t('Marked not suitable'), worded: U.t('Hidden by your words'), sized: U.t('Outside your size limits'), bad: U.t('Not working or not allowed on this TV'), where: U.t('Where to watch · other apps') };
|
|
1448
1446
|
var KIND_SCORE = { remux: 4, bluray: 3, web: 2, hdtv: 1, '': 1.5, cam: -5 };
|
|
1449
1447
|
function tierOf(info) {
|
|
1450
1448
|
return info.res >= 2160 ? '2160' : info.res >= 1440 ? '1440' : info.res >= 1080 ? '1080' : info.res >= 720 ? '720' : info.res > 0 ? 'sd' : 'other';
|
|
@@ -1549,7 +1547,7 @@
|
|
|
1549
1547
|
else if (r.info.hdr) { bits.push('HDR'); }
|
|
1550
1548
|
var out = bits.join(' ');
|
|
1551
1549
|
if (r.info.cache > 0) { out += ' ⚡'; }
|
|
1552
|
-
if (r.group === 'played') { out += ' · played before'; }
|
|
1550
|
+
if (r.group === 'played') { out += ' · ' + U.t('played before'); }
|
|
1553
1551
|
return out;
|
|
1554
1552
|
}
|
|
1555
1553
|
|
|
@@ -1631,15 +1629,19 @@
|
|
|
1631
1629
|
U.store.set(UNSUIT_KEY, all);
|
|
1632
1630
|
}
|
|
1633
1631
|
// Hold OK on a source: Play from the start (a place to resume), Play through StremioK's service
|
|
1634
|
-
// (
|
|
1632
|
+
// (see serviceHlsOk), Not suitable (or back), and
|
|
1635
1633
|
// with a USB drive plugged in, Download to it (js/downloads.js). With only Not suitable to
|
|
1636
1634
|
// offer, it's asked at once.
|
|
1637
|
-
//
|
|
1638
|
-
//
|
|
1635
|
+
// A source on the internet (not YouTube, DRM, a USB file or the service's own links): Play
|
|
1636
|
+
// through StremioK's service, this once. An HLS one through its relay (Settings › Playback ›
|
|
1637
|
+
// Seeking & buffering › HLS through StremioK's service, for all of them; not under TizenBrew,
|
|
1638
|
+
// whose page player can't take it), a file through the file relay (player-core's fileViaService).
|
|
1639
1639
|
function serviceHlsOk(stream) {
|
|
1640
1640
|
if (!stream || stream._yt || stream._localFile || stream._drm || typeof YTPlay === 'undefined' || YTPlay.installMode() === 'browser') { return false; }
|
|
1641
1641
|
var url = '' + (stream.url || '');
|
|
1642
|
-
|
|
1642
|
+
if (!/^https?:\/\//i.test(url) || /^http:\/\/(localhost|127\.0\.0\.1)[:\/]/i.test(url) || /\.mpd(?:[?#]|$)/i.test(url)) { return false; }
|
|
1643
|
+
var hls = /\.m3u8?(?:[?#]|$)/i.test(url) || Stremio.streamInfo(stream).container === 'hls';
|
|
1644
|
+
return !hls || YTPlay.installMode() !== 'tizenbrew';
|
|
1643
1645
|
}
|
|
1644
1646
|
function sourceMenu(stream) {
|
|
1645
1647
|
var canStart = !howHere() && savedPlace(_d.streamId);
|
|
@@ -1647,10 +1649,10 @@
|
|
|
1647
1649
|
var canService = serviceHlsOk(stream);
|
|
1648
1650
|
if (!canStart && !canDownload && !canService) { toggleUnsuitable(stream); return; }
|
|
1649
1651
|
var unsuit = isUnsuitable(_d.id, stream), opts = [];
|
|
1650
|
-
if (canStart) { opts.push(['start', 'Play from the start']); }
|
|
1651
|
-
if (canService) { opts.push(['service', 'Play through StremioK’s service']); }
|
|
1652
|
-
if (canDownload) { opts.push(['download', '⬇ Download to USB drive']); }
|
|
1653
|
-
opts.push(['suit', unsuit ? 'Put back among the sources' : 'Not suitable']);
|
|
1652
|
+
if (canStart) { opts.push(['start', U.t('Play from the start')]); }
|
|
1653
|
+
if (canService) { opts.push(['service', U.t('Play through StremioK’s service')]); }
|
|
1654
|
+
if (canDownload) { opts.push(['download', U.t('⬇ Download to USB drive')]); }
|
|
1655
|
+
opts.push(['suit', unsuit ? U.t('Put back among the sources') : U.t('Not suitable')]);
|
|
1654
1656
|
pickList(Stremio.streamName(stream), opts, null, function (k) {
|
|
1655
1657
|
if (k === 'start') { startPlayback(stream, _d.streamId, _d.streamLabel || _d.meta.name, { fromStart: true }); }
|
|
1656
1658
|
else if (k === 'service') { startPlayback(stream, _d.streamId, _d.streamLabel || _d.meta.name, { viaService: true, fromStart: !!howHere() }); }
|
|
@@ -1661,7 +1663,7 @@
|
|
|
1661
1663
|
// What a download of this title's video is saved as (here, and from the player: ctx.downloadAs).
|
|
1662
1664
|
function downloadTitle(videoId) {
|
|
1663
1665
|
var meta = _d.meta || {}, ep = (_d.type === 'series' && videoId) ? ('' + videoId).match(/:(\d+):(\d+)$/) : null;
|
|
1664
|
-
var label = (meta.name || meta.title || _d.streamLabel || 'Video') + (meta.year ? ' (' + meta.year + ')' : '') +
|
|
1666
|
+
var label = (meta.name || meta.title || _d.streamLabel || U.t('Video')) + (meta.year ? ' (' + meta.year + ')' : '') +
|
|
1665
1667
|
(ep ? ' S' + (ep[1] < 10 ? '0' : '') + ep[1] + 'E' + (ep[2] < 10 ? '0' : '') + ep[2] : '');
|
|
1666
1668
|
return { type: _d.type, videoId: videoId, label: label, titleId: _d.id, name: meta.name || meta.title || '', poster: meta.poster || '', year: meta.year || meta.releaseInfo || '' };
|
|
1667
1669
|
}
|
|
@@ -1671,12 +1673,12 @@
|
|
|
1671
1673
|
}
|
|
1672
1674
|
function toggleUnsuitable(stream) {
|
|
1673
1675
|
var titleId = _d && _d.id, on = !isUnsuitable(titleId, stream), name = Stremio.streamName(stream);
|
|
1674
|
-
var msg = on ? 'Mark “
|
|
1675
|
-
: 'Put “
|
|
1676
|
-
confirm(msg, on ? 'Not suitable' : 'Put back', function () {
|
|
1676
|
+
var msg = on ? U.t('Mark “{name}” as not suitable for this title? It moves to the bottom of the list, and out of Played before.', { name: name })
|
|
1677
|
+
: U.t('Put “{name}” back among this title’s sources?', { name: name });
|
|
1678
|
+
confirm(msg, on ? U.t('Not suitable') : U.t('Put back'), function () {
|
|
1677
1679
|
setUnsuitable(titleId, stream, on);
|
|
1678
1680
|
if (on) { forgetPlayed(titleId, stream, Stremio.streamInfo(stream)); }
|
|
1679
|
-
U.toast(on ? 'Marked not suitable' : 'Back among the sources');
|
|
1681
|
+
U.toast(on ? U.t('Marked not suitable') : U.t('Back among the sources'));
|
|
1680
1682
|
if (_d && _d.id === titleId && _d.mode === 'streams' && _d.streams) {
|
|
1681
1683
|
_d.streams = sortStreams(_d.streams);
|
|
1682
1684
|
redrawKeepingFocus(); // (on the same source, in its new place)
|
|
@@ -1805,8 +1807,8 @@
|
|
|
1805
1807
|
var pend = _d.streamsPending || 0, label = _d.streamLabel || '';
|
|
1806
1808
|
var title = (_d.meta && (_d.meta.name || _d.meta.title)) || '';
|
|
1807
1809
|
var parts = [];
|
|
1808
|
-
if (label && label !== title) { parts.push('Sources for '
|
|
1809
|
-
if (pend) { parts.push(pend
|
|
1810
|
+
if (label && label !== title) { parts.push(U.t('Sources for {title}', { title: label })); }
|
|
1811
|
+
if (pend) { parts.push(U.tn(pend, '{n} more addon still loading…', '{n} more addons still loading…')); }
|
|
1810
1812
|
return parts.join(' · ');
|
|
1811
1813
|
}
|
|
1812
1814
|
// ----- the source filter: Addon ▾ / Resolution ▾ next to ▶ Play best (this title's, on _d) -----
|
|
@@ -1842,12 +1844,12 @@
|
|
|
1842
1844
|
function filterPill(kind, rows) {
|
|
1843
1845
|
var f = filterOf(), opts = filterOptions(kind, rows);
|
|
1844
1846
|
if (opts.length < 2 && !f[kind]) { return null; } // (no choice to make)
|
|
1845
|
-
var label = kind === 'addon' ? 'Addon: '
|
|
1847
|
+
var label = kind === 'addon' ? U.t('Addon: {which}', { which: f.addon || U.t('All') }) : U.t('Resolution: {which}', { which: f.res ? GROUP_TITLES[f.res] : U.t('All') });
|
|
1846
1848
|
var p = U.el('div', 'pill focusable filter-pill', label + ' ▾');
|
|
1847
1849
|
if (_d._focusPill === 'filter-' + kind) { _d._epFocus = p; _d._focusPill = null; }
|
|
1848
1850
|
p.__onselect = function () {
|
|
1849
1851
|
var total = rows.filter(function (r) { return matchFilter(r, filterOf(), kind) && (kind === 'addon' || r.group !== 'where'); }).length;
|
|
1850
|
-
pickList(kind === 'addon' ? 'Sources from' : 'Resolution', [['', 'All · ' + total]].concat(opts.map(function (o) { return [o[0], o[1] + ' · ' + o[2]]; })), f[kind], function (k) {
|
|
1852
|
+
pickList(kind === 'addon' ? U.t('Sources from') : U.t('Resolution'), [['', U.t('All') + ' · ' + total]].concat(opts.map(function (o) { return [o[0], o[1] + ' · ' + o[2]]; })), f[kind], function (k) {
|
|
1851
1853
|
var now = filterOf();
|
|
1852
1854
|
_d.filter = { addon: kind === 'addon' ? k : now.addon, res: kind === 'res' ? k : now.res };
|
|
1853
1855
|
_d._focusPill = 'filter-' + kind;
|
|
@@ -1863,7 +1865,7 @@
|
|
|
1863
1865
|
var best = (_d.streams && _d.streams.length) ? bestRow(filterRows(rankRowsFor(_d.streams))) : null;
|
|
1864
1866
|
if (best) { startPlayback(best.st, _d.streamId, _d.streamLabel || _d.meta.name, howHere()); }
|
|
1865
1867
|
else if (!_d.streams || _d.streamsPending > 0) { _d.autoBest = _d.streamId; }
|
|
1866
|
-
else { U.toast('Nothing here plays on this TV'); }
|
|
1868
|
+
else { U.toast(U.t('Nothing here plays on this TV')); }
|
|
1867
1869
|
}
|
|
1868
1870
|
function streamActionsBar() {
|
|
1869
1871
|
var row = U.el('div', 'btn-row streams-actions');
|
|
@@ -1871,12 +1873,12 @@
|
|
|
1871
1873
|
// ▶ Play best: the top of the ranking (focused when the page opens), within the filter
|
|
1872
1874
|
var best = allRows.length ? bestRow(filterRows(allRows)) : null;
|
|
1873
1875
|
if (best) {
|
|
1874
|
-
var pb = U.el('div', 'pill focusable play-best', '▶
|
|
1876
|
+
var pb = U.el('div', 'pill focusable play-best', '▶ ' + (howHere() ? U.t('Play best from the start') : U.t('Play best')) + ' · ' + describeRow(best));
|
|
1875
1877
|
pb.__onselect = function () { startPlayback(best.st, _d.streamId, _d.streamLabel || _d.meta.name, howHere()); };
|
|
1876
1878
|
var place = !howHere() && savedPlace(_d.streamId);
|
|
1877
1879
|
if (place) { // hold OK: resuming, or from the start
|
|
1878
1880
|
pb.__onlongpress = function () {
|
|
1879
|
-
pickList(_d.streamLabel || _d.meta.name || '', [['resume', 'Play best, resuming at '
|
|
1881
|
+
pickList(_d.streamLabel || _d.meta.name || '', [['resume', U.t('Play best, resuming at {at}', { at: U.fmtTime(place.position) })], ['start', U.t('Play best from the start')]], null, function (k) {
|
|
1880
1882
|
startPlayback(best.st, _d.streamId, _d.streamLabel || _d.meta.name, k === 'start' ? { fromStart: true } : null);
|
|
1881
1883
|
});
|
|
1882
1884
|
};
|
|
@@ -1912,11 +1914,11 @@
|
|
|
1912
1914
|
var panel = U.el('div', 'list-panel streams-panel');
|
|
1913
1915
|
var listScroll = U.el('div', 'list-scroll');
|
|
1914
1916
|
if (_d.streams === null) {
|
|
1915
|
-
panel.appendChild(U.el('div', 'detail-meta', 'Loading sources…'));
|
|
1917
|
+
panel.appendChild(U.el('div', 'detail-meta', U.t('Loading sources…')));
|
|
1916
1918
|
return panel;
|
|
1917
1919
|
}
|
|
1918
1920
|
if (!_d.streams.length) { // (asked again from here: an addon may have been slow or down)
|
|
1919
|
-
var none = U.el('div', 'detail-meta no-sources', Stremio.hasStreamAddons && !Stremio.hasStreamAddons() ? 'No sources found. Add a stream addon in Settings.' : 'No sources found.');
|
|
1921
|
+
var none = U.el('div', 'detail-meta no-sources', Stremio.hasStreamAddons && !Stremio.hasStreamAddons() ? U.t('No sources found. Add a stream addon in Settings.') : U.t('No sources found.'));
|
|
1920
1922
|
if (_d.embedded) { panel.appendChild(none); return panel; }
|
|
1921
1923
|
listScroll.appendChild(none); // (in the list, above Re-scan: the list sits at the panel's top)
|
|
1922
1924
|
(Stremio.streamNotes ? Stremio.streamNotes(addonType(), _d.streamId) : []).forEach(function (n) { // (why, when an addon says: AIOStreams)
|
|
@@ -1926,8 +1928,8 @@
|
|
|
1926
1928
|
listScroll.appendChild(note);
|
|
1927
1929
|
});
|
|
1928
1930
|
var again = U.el('div', 'stream focusable rescan-row');
|
|
1929
|
-
again.appendChild(document.createTextNode('↻ Re-scan for sources'));
|
|
1930
|
-
again.appendChild(U.el('span', 's-sub', 'Ask all stream addons again'));
|
|
1931
|
+
again.appendChild(document.createTextNode(U.t('↻ Re-scan for sources')));
|
|
1932
|
+
again.appendChild(U.el('span', 's-sub', U.t('Ask all stream addons again')));
|
|
1931
1933
|
again.__onselect = function () { rescanStreams(); };
|
|
1932
1934
|
if (!_d._epFocus) { _d._epFocus = again; }
|
|
1933
1935
|
listScroll.appendChild(again);
|
|
@@ -1951,7 +1953,7 @@
|
|
|
1951
1953
|
});
|
|
1952
1954
|
var gone = list.length - keptList.length;
|
|
1953
1955
|
if (gone) {
|
|
1954
|
-
listScroll.appendChild(U.el('div', 'streams-hidden',
|
|
1956
|
+
listScroll.appendChild(U.el('div', 'streams-hidden', U.tn(gone, '{n} source the TV can’t play is hidden', '{n} sources the TV can’t play are hidden') + ' ' + U.t('(Settings › Playback › Source ranking)')));
|
|
1955
1957
|
list = keptList; rows = keptRows;
|
|
1956
1958
|
}
|
|
1957
1959
|
}
|
|
@@ -1960,8 +1962,8 @@
|
|
|
1960
1962
|
if ((flt.addon || flt.res) && !_d.live) {
|
|
1961
1963
|
var fl = [], fr = [];
|
|
1962
1964
|
list.forEach(function (st, i) { if (rows[i] && matchFilter(rows[i], flt)) { fl.push(st); fr.push(rows[i]); } });
|
|
1963
|
-
listScroll.appendChild(U.el('div', 'streams-hidden', 'Showing
|
|
1964
|
-
[flt.addon, flt.res ? GROUP_TITLES[flt.res] : ''].filter(Boolean).join(' · ')
|
|
1965
|
+
listScroll.appendChild(U.el('div', 'streams-hidden', U.t('Showing {shown} of {all} sources: {filter} (Addon ▾ / Resolution ▾ above)', { shown: fl.length, all: list.length,
|
|
1966
|
+
filter: [flt.addon, flt.res ? GROUP_TITLES[flt.res] : ''].filter(Boolean).join(' · ') })));
|
|
1965
1967
|
list = fl; rows = fr;
|
|
1966
1968
|
}
|
|
1967
1969
|
if (_d._keepStream) {
|
|
@@ -2001,23 +2003,23 @@
|
|
|
2001
2003
|
var desc = Stremio.streamDescription(stream);
|
|
2002
2004
|
if (size && !/(TB|GB|MB)\b/i.test(desc)) { lines.push('💾 ' + size); }
|
|
2003
2005
|
if (desc) { lines.push(desc); }
|
|
2004
|
-
if (stream._addon) { lines.push('⚙️ ' + stream._addon + (stream._also ? ' · also on '
|
|
2005
|
-
if (stream._earlier) { lines.push('🕘 From earlier: you played it
|
|
2006
|
-
if (row && row.unsuitable) { lines.push('⛔ Marked not suitable for this title · hold OK to put it back'); }
|
|
2007
|
-
if (row && row.worded) { lines.push('🚫 Has your word “
|
|
2008
|
-
if (row && row.sized) { lines.push('📏 Outside your size limits:
|
|
2009
|
-
if (row && row.blocked) { lines.push('⚠ ' +
|
|
2010
|
-
if (row && row.bad.length) { lines.push('⚠ Marked “Not working” on this TV: '
|
|
2011
|
-
if (stream._torrent) { lines.push('🧲 A torrent, through your streaming server (Settings › Content › Streaming server)'); }
|
|
2006
|
+
if (stream._addon) { lines.push('⚙️ ' + stream._addon + (stream._also ? ' · ' + U.t('also on {addons}', { addons: stream._also.join(', ') }) : '')); }
|
|
2007
|
+
if (stream._earlier) { lines.push('🕘 ' + U.t('From earlier: you played it {when}; the addon didn’t answer in time just now, so it may no longer play', { when: U.dayLabel(stream._earlier) })); }
|
|
2008
|
+
if (row && row.unsuitable) { lines.push(U.t('⛔ Marked not suitable for this title · hold OK to put it back')); }
|
|
2009
|
+
if (row && row.worded) { lines.push('🚫 ' + U.t('Has your word “{word}” (Settings › Playback › Source ranking)', { word: row.worded })); }
|
|
2010
|
+
if (row && row.sized) { lines.push('📏 ' + U.t('Outside your size limits: {limit} (Settings › Playback › Source ranking)', { limit: row.sized })); }
|
|
2011
|
+
if (row && row.blocked) { lines.push('⚠ ' + U.t('{format} isn’t allowed (Settings › Playback › Formats)', { format: row.blocked })); }
|
|
2012
|
+
if (row && row.bad.length) { lines.push('⚠ ' + U.t('Marked “Not working” on this TV: {formats} (Settings › Playback › Formats)', { formats: row.bad.join(', ') })); }
|
|
2013
|
+
if (stream._torrent) { lines.push(U.t('🧲 A torrent, through your streaming server (Settings › Content › Streaming server)')); }
|
|
2012
2014
|
if (opens) {
|
|
2013
|
-
lines.push('▶
|
|
2015
|
+
lines.push('▶ ' + (opens.data ? U.t('OK opens it in {app}', { app: opens.app.name }) : U.t('OK opens {app}', { app: opens.app.name })));
|
|
2014
2016
|
} else if (!playable) {
|
|
2015
|
-
if (stream.infoHash) { lines.push('— torrent: plays through a streaming server (Settings › Content › Streaming server)'); }
|
|
2017
|
+
if (stream.infoHash) { lines.push(U.t('— torrent: plays through a streaming server (Settings › Content › Streaming server)')); }
|
|
2016
2018
|
else if (stream.externalUrl) {
|
|
2017
|
-
lines.push(
|
|
2018
|
-
? ': add it in Settings › Content › Streaming apps to open it from here' : ' (not playable here)'));
|
|
2019
|
+
lines.push((typeof TVApps !== 'undefined' && TVApps.available())
|
|
2020
|
+
? U.t('— another app: add it in Settings › Content › Streaming apps to open it from here') : U.t('— another app (not playable here)'));
|
|
2019
2021
|
}
|
|
2020
|
-
else { lines.push('— not directly playable on the TV'); }
|
|
2022
|
+
else { lines.push(U.t('— not directly playable on the TV')); }
|
|
2021
2023
|
}
|
|
2022
2024
|
var sub = U.el('span', 's-sub', lines.join('\n'));
|
|
2023
2025
|
sub.style.whiteSpace = 'pre-line';
|
|
@@ -2030,7 +2032,7 @@
|
|
|
2030
2032
|
}
|
|
2031
2033
|
node.__onselect = function () {
|
|
2032
2034
|
if (opens) { openWhere(opens); return; }
|
|
2033
|
-
if (!playable) { U.toast(stream.infoHash ? 'Torrents play through a streaming server: Settings › Content › Streaming server' : 'This source can’t play directly on the TV.', stream.infoHash ? 6000 : undefined); return; }
|
|
2035
|
+
if (!playable) { U.toast(stream.infoHash ? U.t('Torrents play through a streaming server: Settings › Content › Streaming server') : U.t('This source can’t play directly on the TV.'), stream.infoHash ? 6000 : undefined); return; }
|
|
2034
2036
|
startPlayback(stream, _d.streamId, _d.streamLabel || _d.meta.name, howHere());
|
|
2035
2037
|
};
|
|
2036
2038
|
return node;
|
|
@@ -2040,8 +2042,8 @@
|
|
|
2040
2042
|
// file's own embedded stream, which no stream addon provides.
|
|
2041
2043
|
if (!_d.embedded) {
|
|
2042
2044
|
rescan = U.el('div', 'stream focusable rescan-row');
|
|
2043
|
-
rescan.appendChild(document.createTextNode('↻ Re-scan for sources'));
|
|
2044
|
-
rescan.appendChild(U.el('span', 's-sub', 'Refresh the list from all stream addons'));
|
|
2045
|
+
rescan.appendChild(document.createTextNode(U.t('↻ Re-scan for sources')));
|
|
2046
|
+
rescan.appendChild(U.el('span', 's-sub', U.t('Refresh the list from all stream addons')));
|
|
2045
2047
|
rescan.__onselect = function () { rescanStreams(); };
|
|
2046
2048
|
listScroll.appendChild(rescan);
|
|
2047
2049
|
}
|
|
@@ -2073,7 +2075,7 @@
|
|
|
2073
2075
|
// so the player lists them first ("with this source").
|
|
2074
2076
|
function sourceSubsOf(st) {
|
|
2075
2077
|
return U.listOf(st && st.subtitles, 50, function (t) { return typeof t.url === 'string' && /^https?:\/\//i.test(t.url); }).map(function (t, i) {
|
|
2076
|
-
return { id: 'src:' + (t.id != null ? t.id : i), url: t.url, lang: typeof t.lang === 'string' ? t.lang : '', _addon: (st._addon || 'Source') + ' · with this source' };
|
|
2078
|
+
return { id: 'src:' + (t.id != null ? t.id : i), url: t.url, lang: typeof t.lang === 'string' ? t.lang : '', _addon: (st._addon || U.t('Source')) + ' · ' + U.t('with this source') };
|
|
2077
2079
|
});
|
|
2078
2080
|
}
|
|
2079
2081
|
// The player's "Select source" list: each source with the request headers it needs
|
|
@@ -2098,7 +2100,7 @@
|
|
|
2098
2100
|
function startPlayback(stream, videoId, label, how) {
|
|
2099
2101
|
if (stream && stream.infoHash) { // (a torrent: its link from the streaming server set now)
|
|
2100
2102
|
Stremio.torrentSource(stream);
|
|
2101
|
-
if (!stream.url) { U.toast('Torrents play through a streaming server: Settings › Content › Streaming server', 6000); return null; }
|
|
2103
|
+
if (!stream.url) { U.toast(U.t('Torrents play through a streaming server: Settings › Content › Streaming server'), 6000); return null; }
|
|
2102
2104
|
}
|
|
2103
2105
|
// VOD changes progress/watched state. Live playback does not, and keeping Home
|
|
2104
2106
|
// untouched lets us restore the exact originating card and scroll position.
|
|
@@ -2250,7 +2252,7 @@
|
|
|
2250
2252
|
var ch = _d && _d.channels;
|
|
2251
2253
|
if (!ch) { return; }
|
|
2252
2254
|
var n = ch.list.length;
|
|
2253
|
-
if (!(pos >= 1 && pos <= n)) { U.toast('No channel
|
|
2255
|
+
if (!(pos >= 1 && pos <= n)) { U.toast(U.t('No channel {n} here (1 to {max})', { n: pos, max: n }), 2000); return; }
|
|
2254
2256
|
if (_zap) { clearTimeout(_zap.timer); _zap = null; }
|
|
2255
2257
|
var m = ch.list[pos - 1].meta;
|
|
2256
2258
|
U.toast(pos + ' / ' + n + ' ' + (m.name || m.title || ''), 1600);
|
|
@@ -2278,14 +2280,14 @@
|
|
|
2278
2280
|
if (!ch || !Player.isActive()) { return; }
|
|
2279
2281
|
var gen = ++_tuneGen;
|
|
2280
2282
|
ch.tuning = idx;
|
|
2281
|
-
var m = ch.list[idx].meta, type = m.type || page.type, name = m.name || m.title || 'Live';
|
|
2282
|
-
U.spinner(true, 'Tuning to '
|
|
2283
|
+
var m = ch.list[idx].meta, type = m.type || page.type, name = m.name || m.title || U.t('Live');
|
|
2284
|
+
U.spinner(true, U.t('Tuning to {name}…', { name: name }));
|
|
2283
2285
|
Stremio.getStreams(type, m.id).then(function (list) {
|
|
2284
2286
|
if (gen !== _tuneGen) { return; } // (a later channel was chosen: its own answer handles the spinner)
|
|
2285
2287
|
ch.tuning = null;
|
|
2286
2288
|
if (_d !== page || !Player.isActive()) { U.spinner(false); return; } // left the player meanwhile
|
|
2287
2289
|
var playable = list.filter(Stremio.isPlayable);
|
|
2288
|
-
if (!playable.length) { U.spinner(false); U.toast('No playable source for '
|
|
2290
|
+
if (!playable.length) { U.spinner(false); U.toast(U.t('No playable source for {name}', { name: name })); return; }
|
|
2289
2291
|
ch.idx = idx;
|
|
2290
2292
|
page.id = m.id; page.type = type; page.meta = m; page.preview = m;
|
|
2291
2293
|
page.streamId = m.id; page.streamLabel = name; page.streams = list;
|
|
@@ -2295,7 +2297,7 @@
|
|
|
2295
2297
|
ch.tuning = null;
|
|
2296
2298
|
if (_d !== page || !Player.isActive()) { U.spinner(false); return; }
|
|
2297
2299
|
U.spinner(false);
|
|
2298
|
-
U.toast('Couldn\'t load '
|
|
2300
|
+
U.toast(U.t('Couldn\'t load {name}', { name: name }));
|
|
2299
2301
|
});
|
|
2300
2302
|
}
|
|
2301
2303
|
|
|
@@ -2318,12 +2320,12 @@
|
|
|
2318
2320
|
U.spinner(false);
|
|
2319
2321
|
var pick = pickLikeLast(_d.id, _d.streams);
|
|
2320
2322
|
if (!pick) {
|
|
2321
|
-
U.toast('No playable source for that episode');
|
|
2323
|
+
U.toast(U.t('No playable source for that episode'));
|
|
2322
2324
|
if (!Player.isActive()) { drawDetail(); }
|
|
2323
2325
|
return;
|
|
2324
2326
|
}
|
|
2325
2327
|
startPlayback(pick, v.id, _d.streamLabel);
|
|
2326
|
-
}, function () { if (!current()) { return; } U.spinner(false); U.toast('Failed to load that episode'); });
|
|
2328
|
+
}, function () { if (!current()) { return; } U.spinner(false); U.toast(U.t('Failed to load that episode')); });
|
|
2327
2329
|
}
|
|
2328
2330
|
|
|
2329
2331
|
// ----- binge: the next episode plays a source like the one you've been watching -----
|