stremiok 2.3.4 → 2.3.5
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 +9 -0
- package/README.md +1 -0
- package/config.xml +1 -1
- package/css/style.css +5 -0
- package/index.html +42 -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 +1941 -0
- package/js/lang/de.js +1941 -0
- package/js/lang/es.js +1941 -0
- package/js/lang/fi.js +1941 -0
- package/js/lang/fr.js +1941 -0
- package/js/lang/he.js +1941 -0
- package/js/lang/hi.js +1941 -0
- package/js/lang/it.js +1941 -0
- package/js/lang/ja.js +1941 -0
- package/js/lang/ko.js +1941 -0
- package/js/lang/languages.js +21 -0
- package/js/lang/pl.js +1941 -0
- package/js/lang/pt-BR.js +1941 -0
- package/js/lang/ru.js +1941 -0
- package/js/lang/tr.js +1941 -0
- package/js/lang/zh-CN.js +1941 -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 +59 -57
- 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/stremio-account.js +8 -8
- package/js/stremio-sync.js +5 -5
- package/js/stremio.js +78 -76
- package/js/stvod.js +4 -4
- package/js/trakt.js +23 -23
- package/js/tvapps.js +4 -4
- package/js/util.js +38 -26
- package/js/view-core.js +93 -93
- package/js/view-detail.js +124 -126
- 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 +658 -642
- package/js/xtvod.js +2 -2
- package/js/youtube.js +17 -17
- package/js/ytplay.js +11 -6
- package/package.json +1 -1
- package/tizenbrew.html +1 -1
package/js/view-search.js
CHANGED
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
|
|
22
22
|
// A link to play: http(s) only (no name:password@), else what's wrong with it.
|
|
23
23
|
function linkProblem(text) {
|
|
24
|
-
var why = U.urlProblem ? U.urlProblem(text) : (U.parseUrl(text) ? null : 'Not a link');
|
|
25
|
-
return why ? why + ' (a link starts with https:// or http://)' : null;
|
|
24
|
+
var why = U.urlProblem ? U.urlProblem(text) : (U.parseUrl(text) ? null : U.t('Not a link'));
|
|
25
|
+
return why ? why + ' ' + U.t('(a link starts with https:// or http://)') : null;
|
|
26
26
|
}
|
|
27
27
|
// Played as it is (nothing recorded): a YouTube video's page through StremioK's YouTube
|
|
28
28
|
// service, anything else straight to the player.
|
|
29
29
|
function playLink(text) {
|
|
30
30
|
var p = U.parseUrl(text);
|
|
31
|
-
if (!p) { U.toast('That isn’t a link StremioK can play'); return; }
|
|
31
|
+
if (!p) { U.toast(U.t('That isn’t a link StremioK can play')); return; }
|
|
32
32
|
var url = p.href, back = function () { var s = scr('search'); Focus.setScope(s, s.querySelector('.play-link') || undefined); };
|
|
33
33
|
var yt = url.match(/^https?:\/\/(?:www\.|m\.)?youtube\.com\/watch\?(?:.*&)?v=([A-Za-z0-9_-]{11})/) || url.match(/^https?:\/\/youtu\.be\/([A-Za-z0-9_-]{11})/);
|
|
34
34
|
if (yt) {
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
YTPlay.ensureService().then(function () {
|
|
37
37
|
if (gen !== _gen) { return; } // (Search left, or another search, meanwhile)
|
|
38
38
|
Player.play({ url: YTPlay.resolverUrl(page, 1080, false, ''), variantUrl: YTPlay.resolverUrl(page), initialQualityHeight: 1080, yt: page,
|
|
39
|
-
type: 'movie', id: 'link:yt:' + yt[1], name: 'YouTube video', streams: [], link: true, private: true }, back);
|
|
39
|
+
type: 'movie', id: 'link:yt:' + yt[1], name: U.t('YouTube video'), streams: [], link: true, private: true }, back);
|
|
40
40
|
}, function () { if (gen === _gen) { U.toast(YTPlay.unavailableMessage('video'), 6000); } });
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
var name = '';
|
|
44
44
|
try { name = decodeURIComponent((p.path || '').split('/').pop() || ''); } catch (e) { name = ''; }
|
|
45
|
-
Player.play({ url: url, type: 'movie', id: 'link:' + url.length + ':' + url.slice(-40), name: (name || p.host || 'Link').slice(0, 120), streams: [], link: true, private: true }, back);
|
|
45
|
+
Player.play({ url: url, type: 'movie', id: 'link:' + url.length + ':' + url.slice(-40), name: (name || p.host || U.t('Link')).slice(0, 120), streams: [], link: true, private: true }, back);
|
|
46
46
|
}
|
|
47
47
|
function searchHistory() { return U.store.get(SEARCH_HIST_KEY, []) || []; }
|
|
48
48
|
function rememberSearch(q) {
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
input.id = 'search-input';
|
|
68
68
|
input.type = 'text';
|
|
69
69
|
input.className = 'focusable';
|
|
70
|
-
input.placeholder = hasPeople() ? 'Search movies, series & people…' : 'Search movies & series…';
|
|
70
|
+
input.placeholder = hasPeople() ? U.t('Search movies, series & people…') : U.t('Search movies & series…');
|
|
71
71
|
input.__onselect = function () { input.focus(); };
|
|
72
|
-
var go = U.el('div', 'pill focusable search-go', 'Search');
|
|
72
|
+
var go = U.el('div', 'pill focusable search-go', U.t('Search'));
|
|
73
73
|
go.__onselect = function () { runSearch(input.value); };
|
|
74
74
|
|
|
75
75
|
// Enter runs the search. The keyboard's Done moves focus to Search, so one OK
|
|
@@ -89,18 +89,18 @@
|
|
|
89
89
|
bar.appendChild(input);
|
|
90
90
|
bar.appendChild(go);
|
|
91
91
|
// Search words from the phone: searched as soon as they arrive (Type it: the field)
|
|
92
|
-
var fromPhone = U.el('div', 'pill focusable search-go search-phone', '▣ From phone');
|
|
92
|
+
var fromPhone = U.el('div', 'pill focusable search-go search-phone', U.t('▣ From phone'));
|
|
93
93
|
fromPhone.__onselect = function () {
|
|
94
|
-
V.phoneEntry({ title: 'Search from your phone', what: 'search',
|
|
94
|
+
V.phoneEntry({ title: U.t('Search from your phone'), what: 'search',
|
|
95
95
|
onText: function (t) { input.value = t; runSearch(t); },
|
|
96
96
|
onType: function () { Focus.setFocus(input); } });
|
|
97
97
|
};
|
|
98
98
|
bar.appendChild(fromPhone);
|
|
99
99
|
// ▶ Play a link: typed, or sent from the phone (its QR)
|
|
100
|
-
var link = U.el('div', 'pill focusable search-go play-link', '▶ Play a link');
|
|
100
|
+
var link = U.el('div', 'pill focusable search-go play-link', U.t('▶ Play a link'));
|
|
101
101
|
link.__onselect = function () {
|
|
102
|
-
V.phoneEntry({ title: 'Play a link', what: 'link', typeTitle: 'Play a link', placeholder: 'https://…/film.mkv',
|
|
103
|
-
hint: 'A video’s direct link (an MKV or MP4 file, an HLS .m3u8) or a YouTube video’s page. It plays as it is, and nothing about it is recorded.',
|
|
102
|
+
V.phoneEntry({ title: U.t('Play a link'), what: 'link', typeTitle: U.t('Play a link'), placeholder: 'https://…/film.mkv',
|
|
103
|
+
hint: U.t('A video’s direct link (an MKV or MP4 file, an HLS .m3u8) or a YouTube video’s page. It plays as it is, and nothing about it is recorded.'),
|
|
104
104
|
validate: linkProblem, onText: playLink });
|
|
105
105
|
};
|
|
106
106
|
bar.appendChild(link);
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
|
|
109
109
|
var results = U.el('div', 'search-results');
|
|
110
110
|
results.id = 'search-results';
|
|
111
|
-
results.appendChild(U.el('div', 'search-empty', 'Type a title and press OK on Search. Results come from every addon catalog that supports search.'));
|
|
111
|
+
results.appendChild(U.el('div', 'search-empty', U.t('Type a title and press OK on Search. Results come from every addon catalog that supports search.')));
|
|
112
112
|
wrap.appendChild(results);
|
|
113
113
|
|
|
114
114
|
// Recent searches use the space to the right of the results grid.
|
|
@@ -136,12 +136,12 @@
|
|
|
136
136
|
var recent = _search.recent;
|
|
137
137
|
U.clear(recent);
|
|
138
138
|
var list = searchHistory();
|
|
139
|
-
if (list.length) { recent.appendChild(U.el('div', 'recent-title', 'Recent searches')); }
|
|
139
|
+
if (list.length) { recent.appendChild(U.el('div', 'recent-title', U.t('Recent searches'))); }
|
|
140
140
|
list.forEach(function (q, i) {
|
|
141
141
|
var it = U.el('div', 'recent-item focusable', q);
|
|
142
142
|
it.__onselect = function () { _search.input.value = q; Focus.setFocus(_search.go); };
|
|
143
143
|
it.__onlongpress = function () {
|
|
144
|
-
confirm('Remove “
|
|
144
|
+
confirm(U.t('Remove “{q}” from recent searches?', { q: q }), U.t('Remove'), function () {
|
|
145
145
|
forgetSearch(q);
|
|
146
146
|
renderRecent(i);
|
|
147
147
|
});
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
// answered, or names the ones that didn't.
|
|
190
190
|
var status = U.el('div', 'search-status');
|
|
191
191
|
status.appendChild(U.el('span', 'spin spin-small'));
|
|
192
|
-
var statusText = U.el('span', 'search-status-text', 'Searching “'
|
|
192
|
+
var statusText = U.el('span', 'search-status-text', U.t('Searching “{q}”…', { q: query }));
|
|
193
193
|
status.appendChild(statusText);
|
|
194
194
|
results.appendChild(status);
|
|
195
195
|
leaveSearch();
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
var gen = ++_gen, focused = false, found = 0, failed = 0, answered = 0, total = 0, silent = [];
|
|
198
198
|
function progress() {
|
|
199
199
|
if (gen !== _gen) { return; }
|
|
200
|
-
statusText.textContent = 'Searching “'
|
|
200
|
+
statusText.textContent = U.t('Searching “{q}”…', { q: query }) + ' ' + U.tn(total, '{answered} of {n} source answered', '{answered} of {n} sources answered', { answered: answered });
|
|
201
201
|
}
|
|
202
202
|
Stremio.searchSourcesForSearch().then(function (defs) {
|
|
203
203
|
if (gen !== _gen) { return; }
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
var cards = addCards(st, metas);
|
|
224
224
|
done(true);
|
|
225
225
|
if (!cards.length) { return; }
|
|
226
|
-
var row = buildRow(def.title + (metas.stale ? ' · from earlier: the addon sent nothing just now' : ''), cards);
|
|
226
|
+
var row = buildRow(def.title + (metas.stale ? ' · ' + U.t('from earlier: the addon sent nothing just now') : ''), cards);
|
|
227
227
|
row.__search = st;
|
|
228
228
|
slots[i].appendChild(row);
|
|
229
229
|
shown(cards);
|
|
@@ -237,10 +237,10 @@
|
|
|
237
237
|
return Stremio.tmdbPeople(query, 1, _searchCancel).then(function (r) {
|
|
238
238
|
if (gen !== _gen) { return; }
|
|
239
239
|
done(true);
|
|
240
|
-
var st = { def: { people: true, title: 'People' }, query: query, seen: {}, count: 0, page: 1, loading: false, done: r.page >= r.pages };
|
|
240
|
+
var st = { def: { people: true, title: U.t('People') }, query: query, seen: {}, count: 0, page: 1, loading: false, done: r.page >= r.pages };
|
|
241
241
|
var cards = addCards(st, r.people);
|
|
242
242
|
if (!cards.length) { return; }
|
|
243
|
-
var row = buildRow('People', cards);
|
|
243
|
+
var row = buildRow(U.t('People'), cards);
|
|
244
244
|
row.__search = st;
|
|
245
245
|
people.appendChild(row);
|
|
246
246
|
if (sameName(r.people[0].name, query)) { results.insertBefore(people, results.firstChild); }
|
|
@@ -253,20 +253,20 @@
|
|
|
253
253
|
if (silent.length && found) { // some rows are in: say which sources didn't answer
|
|
254
254
|
status.className = 'search-status search-status-warn';
|
|
255
255
|
U.clear(status);
|
|
256
|
-
status.appendChild(U.el('span', 'search-status-text', 'No answer from: '
|
|
256
|
+
status.appendChild(U.el('span', 'search-status-text', U.t('No answer from: {who} (try the search again)', { who: silent.join(', ') })));
|
|
257
257
|
} else if (status.parentNode) {
|
|
258
258
|
status.parentNode.removeChild(status);
|
|
259
259
|
}
|
|
260
260
|
if (!found) {
|
|
261
|
-
results.appendChild(U.el('div', 'search-empty', (failed && failed === defs.length) ? 'Search failed. Check your network.'
|
|
262
|
-
: (!defs.length && !people) ? 'Nothing to search: no addon can, or all are hidden (Settings › Home › Search results).'
|
|
263
|
-
: 'No results for “'
|
|
261
|
+
results.appendChild(U.el('div', 'search-empty', (failed && failed === defs.length) ? U.t('Search failed. Check your network.')
|
|
262
|
+
: (!defs.length && !people) ? U.t('Nothing to search: no addon can, or all are hidden (Settings › Home › Search results).')
|
|
263
|
+
: U.t('No results for “{q}”.', { q: query }) + (silent.length ? ' ' + U.t('No answer from: {who} (try again).', { who: silent.join(', ') }) : '')));
|
|
264
264
|
}
|
|
265
265
|
});
|
|
266
266
|
}, function () {
|
|
267
267
|
if (gen !== _gen) { return; }
|
|
268
268
|
if (status.parentNode) { status.parentNode.removeChild(status); }
|
|
269
|
-
results.appendChild(U.el('div', 'search-empty', 'Search failed. Check your network.'));
|
|
269
|
+
results.appendChild(U.el('div', 'search-empty', U.t('Search failed. Check your network.')));
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
272
|
// Cards for the new titles of a row (a title twice in one row shows once); people for
|