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.
Files changed (57) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +1 -0
  3. package/config.xml +1 -1
  4. package/css/style.css +5 -0
  5. package/index.html +42 -40
  6. package/js/app.js +3 -3
  7. package/js/downloads.js +16 -16
  8. package/js/epg.js +2 -3
  9. package/js/hubpreview.js +1 -1
  10. package/js/i18n.js +108 -0
  11. package/js/iptv.js +13 -13
  12. package/js/jellyfin.js +19 -19
  13. package/js/lang/ar.js +1941 -0
  14. package/js/lang/de.js +1941 -0
  15. package/js/lang/es.js +1941 -0
  16. package/js/lang/fi.js +1941 -0
  17. package/js/lang/fr.js +1941 -0
  18. package/js/lang/he.js +1941 -0
  19. package/js/lang/hi.js +1941 -0
  20. package/js/lang/it.js +1941 -0
  21. package/js/lang/ja.js +1941 -0
  22. package/js/lang/ko.js +1941 -0
  23. package/js/lang/languages.js +21 -0
  24. package/js/lang/pl.js +1941 -0
  25. package/js/lang/pt-BR.js +1941 -0
  26. package/js/lang/ru.js +1941 -0
  27. package/js/lang/tr.js +1941 -0
  28. package/js/lang/zh-CN.js +1941 -0
  29. package/js/local.js +9 -9
  30. package/js/netfolders.js +13 -13
  31. package/js/player-audio.js +17 -17
  32. package/js/player-controls.js +100 -100
  33. package/js/player-core.js +59 -57
  34. package/js/player-lang.js +22 -22
  35. package/js/player-quality.js +15 -15
  36. package/js/player-store.js +13 -13
  37. package/js/player-subs.js +69 -69
  38. package/js/plex.js +11 -11
  39. package/js/stremio-account.js +8 -8
  40. package/js/stremio-sync.js +5 -5
  41. package/js/stremio.js +78 -76
  42. package/js/stvod.js +4 -4
  43. package/js/trakt.js +23 -23
  44. package/js/tvapps.js +4 -4
  45. package/js/util.js +38 -26
  46. package/js/view-core.js +93 -93
  47. package/js/view-detail.js +124 -126
  48. package/js/view-discover.js +27 -27
  49. package/js/view-guide.js +13 -13
  50. package/js/view-home.js +124 -118
  51. package/js/view-search.js +25 -25
  52. package/js/view-settings.js +658 -642
  53. package/js/xtvod.js +2 -2
  54. package/js/youtube.js +17 -17
  55. package/js/ytplay.js +11 -6
  56. package/package.json +1 -1
  57. package/tizenbrew.html +1 -1
package/js/xtvod.js CHANGED
@@ -256,7 +256,7 @@ var XtVod = (function () {
256
256
  var pic = link(i.cover_big || i.movie_image);
257
257
  if (pic) { m.poster = pic; }
258
258
  var secs = +i.duration_secs || 0;
259
- if (secs > 0) { m.runtime = Math.round(secs / 60) + ' min'; }
259
+ if (secs > 0) { m.runtime = U.t('{n} min', { n: Math.round(secs / 60) }); }
260
260
  var y = yearOf(i.releasedate || i.release_date);
261
261
  if (y) { m.releaseInfo = y; m.year = y; }
262
262
  return m;
@@ -271,7 +271,7 @@ var XtVod = (function () {
271
271
  var y = yearOf(i.releaseDate || i.release_date);
272
272
  if (y) { m.releaseInfo = y; m.year = y; }
273
273
  m.videos = episodes(r).map(function (e) {
274
- var ei = e.info || {}, v = { id: showId + ':' + e.season + ':' + e.episode, season: e.season, episode: e.episode, title: ('' + (e.title || '')).trim() || 'Episode ' + e.episode };
274
+ var ei = e.info || {}, v = { id: showId + ':' + e.season + ':' + e.episode, season: e.season, episode: e.episode, title: ('' + (e.title || '')).trim() || U.t('Episode {n}', { n: e.episode }) };
275
275
  if (ei.plot) { v.overview = ('' + ei.plot).slice(0, 1000); }
276
276
  if (link(ei.movie_image)) { v.thumbnail = link(ei.movie_image); }
277
277
  var rel = Date.parse(ei.releasedate || ei.air_date || '');
package/js/youtube.js CHANGED
@@ -12,17 +12,17 @@ var YouTube = (function () {
12
12
  var MAX_CATALOGS = 40;
13
13
  var KINDS = ['auto', 'videos', 'channels', 'live'];
14
14
  var SORTS = ['relevance', 'date', 'views', 'rating'];
15
- var KIND_NAMES = { auto: 'Auto (what the source is)', videos: 'Videos', channels: 'Channels', live: 'Live now' };
16
- var SORT_NAMES = { relevance: 'Relevance', date: 'Upload date', views: 'View count', rating: 'Rating' };
15
+ var KIND_NAMES = { auto: U.t('Auto (what the source is)'), videos: U.t('Videos'), channels: U.t('Channels'), live: U.t('Live now') };
16
+ var SORT_NAMES = { relevance: U.t('Relevance'), date: U.t('Upload date'), views: U.t('View count'), rating: U.t('Rating') };
17
17
  // SponsorBlock's sections, what each is called, and what's done with it by default:
18
18
  // skip (jump over it), ask (a "Skip …" button), show (on the progress bar only), off.
19
19
  // The highlight is a button on the UP bar; a whole-video label, a note when it starts.
20
20
  var SB_CATS = ['sponsor', 'selfpromo', 'interaction', 'intro', 'outro', 'preview', 'music_offtopic', 'filler', 'poi_highlight', 'exclusive_access'];
21
- var SB_NAMES = { sponsor: 'Sponsor', selfpromo: 'Self-promotion', interaction: 'Interaction reminder', intro: 'Intro', outro: 'Endcards / credits',
22
- preview: 'Preview / recap', music_offtopic: 'Non-music section', filler: 'Filler / tangent', poi_highlight: 'Highlight', exclusive_access: 'Exclusive access' };
21
+ var SB_NAMES = { sponsor: U.t('Sponsor'), selfpromo: U.t('Self-promotion'), interaction: U.t('Interaction reminder'), intro: U.t('Intro'), outro: U.t('Endcards / credits'),
22
+ preview: U.t('Preview / recap'), music_offtopic: U.t('Non-music section'), filler: U.t('Filler / tangent'), poi_highlight: U.t('Highlight'), exclusive_access: U.t('Exclusive access') };
23
23
  var SB_DEFAULTS = { sponsor: 'skip', selfpromo: 'ask', interaction: 'ask', intro: 'show', outro: 'show', preview: 'show', music_offtopic: 'show', filler: 'show',
24
24
  poi_highlight: 'show', exclusive_access: 'show' };
25
- var SB_MODE_NAMES = { skip: 'Skip', ask: 'Ask (a Skip button)', show: 'Show on the bar', off: 'Off' };
25
+ var SB_MODE_NAMES = { skip: U.t('Skip'), ask: U.t('Ask (a Skip button)'), show: U.t('Show on the bar'), off: U.t('Off') };
26
26
  function sbModesFor(cat) { return (cat === 'poi_highlight' || cat === 'exclusive_access') ? ['show', 'off'] : ['skip', 'ask', 'show', 'off']; }
27
27
 
28
28
  // ----- your catalogs -----
@@ -152,9 +152,9 @@ var YouTube = (function () {
152
152
  extra: search ? [{ name: 'search', isRequired: true }, { name: 'skip' }] : [{ name: 'skip' }] });
153
153
  });
154
154
  if (searchOn()) {
155
- out.push({ type: 'YouTube', id: 'ytk_search_videos', name: 'Videos', extra: [{ name: 'search', isRequired: true }, { name: 'skip' }] });
156
- out.push({ type: 'YouTube', id: 'ytk_search_channels', name: 'Channels', extra: [{ name: 'search', isRequired: true }, { name: 'skip' }] });
157
- out.push({ type: 'YouTube', id: 'ytk_search_live', name: 'Live now', extra: [{ name: 'search', isRequired: true }, { name: 'skip' }] });
155
+ out.push({ type: 'YouTube', id: 'ytk_search_videos', name: U.t('Videos'), extra: [{ name: 'search', isRequired: true }, { name: 'skip' }] });
156
+ out.push({ type: 'YouTube', id: 'ytk_search_channels', name: U.t('Channels'), extra: [{ name: 'search', isRequired: true }, { name: 'skip' }] });
157
+ out.push({ type: 'YouTube', id: 'ytk_search_live', name: U.t('Live now'), extra: [{ name: 'search', isRequired: true }, { name: 'skip' }] });
158
158
  }
159
159
  return out;
160
160
  }
@@ -178,7 +178,7 @@ var YouTube = (function () {
178
178
  return ready.then(function () { return U.getJSON(proxy() + '/ytlist?' + q + (wantBrand() ? '&brand=1' : '') + (originalTitles() ? '&orig=1' : ''), 25000, 4 * 1024 * 1024); });
179
179
  }
180
180
  // A video's title and picture, with DeArrow's (when it has them and they're turned on).
181
- function titleOf(it) { var b = it.brand; return (b && typeof b.title === 'string' && b.title && dearrow().titles) ? b.title : (it.title || 'YouTube video'); }
181
+ function titleOf(it) { var b = it.brand; return (b && typeof b.title === 'string' && b.title && dearrow().titles) ? b.title : (it.title || U.t('YouTube video')); }
182
182
  function thumbOf(it) { var b = it.brand; return (b && typeof b.thumbAt === 'number' && dearrow().thumbs) ? dearrowThumb(it.id, b.thumbAt) : it.thumb; }
183
183
 
184
184
  // What a list item becomes on a card. Video items are kept (by id) for their pages.
@@ -187,10 +187,10 @@ var YouTube = (function () {
187
187
  var desc = [it.by, it.length, it.views, it.ago].filter(Boolean).join(' · ');
188
188
  if (it.kind === 'video') {
189
189
  var name = titleOf(it), poster = thumbOf(it);
190
- if (name !== it.title && it.title) { desc = 'On YouTube: “' + it.title + '”' + (desc ? ' · ' + desc : ''); }
191
- if (it.live) { desc = '● LIVE now' + (desc ? ' · ' + desc : ''); }
190
+ if (name !== it.title && it.title) { desc = U.t('On YouTube: “{title}”', { title: it.title }) + (desc ? ' · ' + desc : ''); }
191
+ if (it.live) { desc = '● ' + U.t('LIVE now') + (desc ? ' · ' + desc : ''); }
192
192
  var m = { id: 'ytk:v:' + it.id, type: type, name: name, poster: it.thumb, posterShape: 'landscape',
193
- background: 'https://i.ytimg.com/vi/' + it.id + '/hqdefault.jpg', description: desc, releaseInfo: it.live ? '● LIVE' : (it.ago || '') };
193
+ background: 'https://i.ytimg.com/vi/' + it.id + '/hqdefault.jpg', description: desc, releaseInfo: it.live ? '● ' + U.t('LIVE') : (it.ago || '') };
194
194
  if (poster !== it.thumb) { m._cardImage = poster; m._posterAlt = it.thumb; } // (DeArrow's on the card; not made yet: YouTube's)
195
195
  _known.set(m.id, { meta: m, item: it });
196
196
  return m;
@@ -255,10 +255,10 @@ var YouTube = (function () {
255
255
  : Promise.resolve(null));
256
256
  var brand = (base || !dearrow().titles) ? Promise.resolve(null) : videoExtras(m[2]).then(function (x) { return x && x.brand; });
257
257
  return Promise.all([details, brand]).then(function (both) {
258
- var d = both[0], b = both[1], yt = (d && d.title) || 'YouTube video', better = b && b.title;
258
+ var d = both[0], b = both[1], yt = (d && d.title) || U.t('YouTube video'), better = b && b.title;
259
259
  var out = base || { id: id, type: 'YouTube', name: better || yt, poster: 'https://i.ytimg.com/vi/' + m[2] + '/mqdefault.jpg',
260
260
  posterShape: 'landscape', background: 'https://i.ytimg.com/vi/' + m[2] + '/hqdefault.jpg',
261
- description: (better && d && d.title ? 'On YouTube: “' + d.title + '” · ' : '') + (d ? [d.by, d.description].filter(Boolean).join(' · ') : '') };
261
+ description: (better && d && d.title ? U.t('On YouTube: “{title}”', { title: d.title }) + ' · ' : '') + (d ? [d.by, d.description].filter(Boolean).join(' · ') : '') };
262
262
  out.videos = [{ id: id, title: out.name, streams: [{ name: 'YouTube', ytId: m[2] }] }];
263
263
  return out;
264
264
  });
@@ -275,8 +275,8 @@ var YouTube = (function () {
275
275
  description: head.description || '',
276
276
  videos: live.map(function (v) {
277
277
  var vm = toMeta(v, 'YouTube');
278
- return { id: vm.id, title: '● LIVE ' + vm.name, season: 1, episode: 0, released: now, thumbnail: v.thumb, live: true,
279
- overview: ['Live now', v.views].filter(Boolean).join(' · ') };
278
+ return { id: vm.id, title: '● ' + U.t('LIVE') + ' ' + vm.name, season: 1, episode: 0, released: now, thumbnail: v.thumb, live: true,
279
+ overview: [U.t('Live now'), v.views].filter(Boolean).join(' · ') };
280
280
  }).concat(vids.map(function (v, i) {
281
281
  var vm = toMeta(v, 'YouTube');
282
282
  return { id: vm.id, title: vm.name, season: 1, episode: i + 1, released: agoToDate(v.ago), thumbnail: v.thumb,
@@ -287,7 +287,7 @@ var YouTube = (function () {
287
287
  // A video's source: its YouTube id (played through the service, see Stremio.youTubeSource).
288
288
  function streams(id) {
289
289
  var m = ('' + id).match(/^ytk:v:([A-Za-z0-9_-]{11})$/);
290
- return Promise.resolve(m ? [{ name: 'YouTube', title: 'Plays through StremioK’s YouTube service', ytId: m[1] }] : []);
290
+ return Promise.resolve(m ? [{ name: 'YouTube', title: U.t('Plays through StremioK’s YouTube service'), ytId: m[1] }] : []);
291
291
  }
292
292
 
293
293
  // ----- copying a YouTubio addon's catalogs -----
package/js/ytplay.js CHANGED
@@ -278,15 +278,20 @@ var YTPlay = (function () {
278
278
 
279
279
  // What to tell you when the service doesn't answer. what: 'channel' | 'trailer'
280
280
  function unavailableMessage(what) {
281
- var thing = what === 'trailer' ? 'Trailers play' : what === 'video' ? 'YouTube videos play' : 'YouTube channels play';
281
+ // (each said whole: what plays through the service, and why it didn't answer)
282
282
  if (MODE === 'tizenbrew') {
283
- return thing + ' through StremioK’s YouTube service, which TizenBrew hasn’t started. ' +
284
- 'Close StremioK and open it again from TizenBrew; if that doesn’t help, update TizenBrew.';
283
+ return what === 'trailer' ? U.t('Trailers play through StremioK’s YouTube service, which TizenBrew hasn’t started. Close StremioK and open it again from TizenBrew; if that doesn’t help, update TizenBrew.')
284
+ : what === 'video' ? U.t('YouTube videos play through StremioK’s YouTube service, which TizenBrew hasn’t started. Close StremioK and open it again from TizenBrew; if that doesn’t help, update TizenBrew.')
285
+ : U.t('YouTube channels play through StremioK’s YouTube service, which TizenBrew hasn’t started. Close StremioK and open it again from TizenBrew; if that doesn’t help, update TizenBrew.');
285
286
  }
286
287
  if (MODE === 'wgt') {
287
- return thing + ' through StremioK’s YouTube service, which didn’t start. Try again, or restart StremioK.';
288
+ return what === 'trailer' ? U.t('Trailers play through StremioK’s YouTube service, which didn’t start. Try again, or restart StremioK.')
289
+ : what === 'video' ? U.t('YouTube videos play through StremioK’s YouTube service, which didn’t start. Try again, or restart StremioK.')
290
+ : U.t('YouTube channels play through StremioK’s YouTube service, which didn’t start. Try again, or restart StremioK.');
288
291
  }
289
- return thing + ' through StremioK’s YouTube service, which runs on the TV (not in a browser).';
292
+ return what === 'trailer' ? U.t('Trailers play through StremioK’s YouTube service, which runs on the TV (not in a browser).')
293
+ : what === 'video' ? U.t('YouTube videos play through StremioK’s YouTube service, which runs on the TV (not in a browser).')
294
+ : U.t('YouTube channels play through StremioK’s YouTube service, which runs on the TV (not in a browser).');
290
295
  }
291
296
 
292
297
  // One look at the service, without starting it: resolves true / false.
@@ -296,7 +301,7 @@ var YTPlay = (function () {
296
301
 
297
302
  // For Settings: how StremioK was installed.
298
303
  function installLabel() {
299
- return MODE === 'tizenbrew' ? 'TizenBrew module' : MODE === 'wgt' ? 'Sideloaded app (.wgt)' : 'Browser (development)';
304
+ return MODE === 'tizenbrew' ? U.t('TizenBrew module') : MODE === 'wgt' ? U.t('Sideloaded app (.wgt)') : U.t('Browser (development)');
300
305
  }
301
306
 
302
307
  return { ensureService: ensureService, resolverUrl: resolverUrl, infoUrl: infoUrl, canPlay: canPlay, liveOpen: liveOpen, hlsMaster: hlsMaster, aiomAddons: aiomAddons, stalkerList: stalkerList, stalkerVod: stalkerVod, drmLicense: drmLicense, stalkerPlayUrl: stalkerPlayUrl, stalkerGenres: stalkerGenres, stalkerLink: stalkerLink, xtvodAsk: xtvodAsk, epgLoad: epgLoad, epgGet: epgGet, epgFiles: epgFiles, epgClear: epgClear, entryOpen: entryOpen, entryGive: entryGive, entrySeen: entrySeen, entryPoll: entryPoll, entryClose: entryClose, subsUrl: subsUrl, audioLang: audioLang, setAudioLang: setAudioLang, installMode: function () { return MODE; },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stremiok",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "description": "StremioK streaming client for Tizen 3.0+ Samsung TVs (TizenBrew app module).",
5
5
  "packageType": "app",
6
6
  "appName": "StremioK",
package/tizenbrew.html CHANGED
@@ -10,7 +10,7 @@
10
10
  // from there: it opens this version's own copy (npm/stremiok@<version>/index.html), whose
11
11
  // files all come from that address. build.sh stamps the ?v= below.
12
12
  (function () {
13
- var v = '?v=2.3.4'.slice(3), l = location, rest = (l.search || '') + (l.hash || '');
13
+ var v = '?v=2.3.5'.slice(3), l = location, rest = (l.search || '') + (l.hash || '');
14
14
  var m = /^(\/module\/npm%2F[^\/%@]+)\//i.exec(l.pathname || '');
15
15
  l.replace(m ? m[1] + '%40' + v + '/index.html' + rest : 'index.html' + rest);
16
16
  })();