stremiok 2.3.7 → 2.4.0
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 +7 -3
- package/config.xml +1 -1
- package/css/style.css +14 -0
- package/index.html +46 -43
- package/js/app.js +15 -1
- package/js/hubpreview.js +8 -1
- package/js/i18n.js +3 -2
- package/js/iptv.js +12 -5
- package/js/lang/ar.js +96 -1
- package/js/lang/ca.js +2125 -0
- package/js/lang/de.js +96 -1
- package/js/lang/es.js +96 -1
- package/js/lang/fi.js +96 -1
- package/js/lang/fr.js +96 -1
- package/js/lang/he.js +96 -1
- package/js/lang/hi.js +96 -1
- package/js/lang/it.js +96 -1
- package/js/lang/ja.js +96 -1
- package/js/lang/ko.js +96 -1
- package/js/lang/languages.js +1 -0
- package/js/lang/pl.js +96 -1
- package/js/lang/pt-BR.js +96 -1
- package/js/lang/ru.js +96 -1
- package/js/lang/tr.js +96 -1
- package/js/lang/zh-CN.js +96 -1
- package/js/nuvio-import.js +152 -0
- package/js/nuvio-sync.js +269 -0
- package/js/player-core.js +1 -0
- package/js/player-store.js +4 -1
- package/js/profiles.js +158 -0
- package/js/stremio.js +4 -1
- package/js/util.js +19 -3
- package/js/view-core.js +89 -10
- package/js/view-detail.js +11 -10
- package/js/view-home.js +2 -1
- package/js/view-search.js +15 -1
- package/js/view-settings.js +399 -4
- package/js/views.js +1 -1
- package/js/ytplay.js +6 -1
- package/package.json +1 -1
- package/tizenbrew.html +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
What changed in each version of StremioK, newest first. How everything works is in the
|
|
4
4
|
[user guide](docs/USER-GUIDE.md).
|
|
5
5
|
|
|
6
|
+
## 2.4.0 — 2026-11-14
|
|
7
|
+
- **Profiles** (Settings › Profiles): up to 5, each with its own addons, settings, progress,
|
|
8
|
+
watched marks and sign-ins; playlists, drives, folders, plugins and API keys stay the TV's.
|
|
9
|
+
"Who's watching?" as StremioK opens; the badge in the top menu switches (#23).
|
|
10
|
+
- **A new profile from a Stremio or Nuvio account**, kept in sync with it (Nuvio: where you
|
|
11
|
+
stopped, watched marks and its Library), or from a configuration file. *Import profiles from
|
|
12
|
+
Nuvio* copies its profiles once, offering their plugins too.
|
|
13
|
+
- **Import addons from Nuvio** (Settings › Content › Addons), as from a Stremio account. Nuvio
|
|
14
|
+
features use Nuvio's published backend; StremioK isn't affiliated with Nuvio.
|
|
15
|
+
- **YouTube playlist links:** a playlist's page in *▶ Play a link*, or a YouTube page pasted into
|
|
16
|
+
Search, opens as its videos.
|
|
17
|
+
- **Largest playlist** (Settings › Content › IPTV): 20 MB and 30,000 channels by default; up to
|
|
18
|
+
100 MB and 150,000 channels for a bigger playlist, at a risk on older TVs.
|
|
19
|
+
|
|
20
|
+
## 2.3.8 — 2026-11-13
|
|
21
|
+
- **Catalan** (Settings › Appearance › *Language*), contributed by deivids84 (#22).
|
|
22
|
+
- **Fixed: Nuvio plugins finding nothing on some TVs:** every request a plugin made was refused
|
|
23
|
+
by StremioK's own service ("not allowed (origin)" in Diagnostics › Logs) (#21).
|
|
24
|
+
|
|
6
25
|
## 2.3.7 — 2026-11-13
|
|
7
26
|
- **Windows / NAS shares (SMB) and DLNA media servers** as network folders (Settings › Content ›
|
|
8
27
|
Network folders): a share's server, sign-in (or a guest) and one of its shares; or a media
|
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ video through Samsung's AVPlay API.
|
|
|
37
37
|
with SponsorBlock, DeArrow, chapters and captions.
|
|
38
38
|
- **Local:** the videos on a USB drive or a network folder (WebDAV, SMB, DLNA), matched to their titles.
|
|
39
39
|
- **Jellyfin, Emby and Plex:** your server's libraries on Home, its files as sources.
|
|
40
|
-
- **
|
|
40
|
+
- **17 languages** ([translating](docs/TRANSLATING.md)).
|
|
41
41
|
- **Nuvio plugins** (2017+ TVs): plugins made for the Nuvio apps as sources
|
|
42
42
|
([what they are, and the risks](docs/PLUGINS.md)).
|
|
43
43
|
- **Torrents**, through Stremio's streaming server or a TorrServer you run on your network.
|
|
@@ -99,8 +99,8 @@ responsibility.
|
|
|
99
99
|
|
|
100
100
|
- Under TizenBrew there's no TV player (only the `.wgt` has it): one audio track per file, no
|
|
101
101
|
built-in subtitle tracks, no PlayReady or Widevine channels; opening apps depends on TizenBrew.
|
|
102
|
-
- No StremioK account
|
|
103
|
-
only syncs are optional: Trakt and your Stremio account.
|
|
102
|
+
- No StremioK account: settings, addons and progress stay on the TV, in a profile per person if
|
|
103
|
+
you like. The only syncs are optional: Trakt and your Stremio account.
|
|
104
104
|
- Subtitles use an HTML overlay; gzipped (`.gz`) subtitle files aren't decoded.
|
|
105
105
|
- No playback speed control (the TV's player mutes audio at other speeds), and no
|
|
106
106
|
HDR / frame-rate mode switching (not available to web apps on Tizen 3).
|
|
@@ -120,6 +120,10 @@ Apache License 2.0: [js/vendor/SHAKA-LICENSE](js/vendor/SHAKA-LICENSE)), loaded
|
|
|
120
120
|
ClearKey channels. Nuvio plugins' runtime (`js/vendor/quickjs/`: quickjs-emscripten, cheerio,
|
|
121
121
|
crypto-js; MIT, with BSD and ISC parts, licenses there) loads only when a plugin runs.
|
|
122
122
|
|
|
123
|
+
Nuvio features use Nuvio's published backend
|
|
124
|
+
([self-host](https://github.com/NuvioMedia/self-host), Apache License 2.0); StremioK isn't
|
|
125
|
+
affiliated with Nuvio, and it may stop working if Nuvio changes it.
|
|
126
|
+
|
|
123
127
|
The service's SMB, DLNA and WebDAV Digest clients are adapted from
|
|
124
128
|
[Tessel](https://github.com/PatrickSt1991/tessel-tizen-tv) (© 2026 Patrick, MIT License).
|
|
125
129
|
|
package/config.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets"
|
|
3
|
-
id="http://stremiok.tizen/StremioKTizen" version="2.
|
|
3
|
+
id="http://stremiok.tizen/StremioKTizen" version="2.4.0" viewmodes="maximized">
|
|
4
4
|
<tizen:application id="StremioK01.StremioK" package="StremioK01" required_version="3.0"/>
|
|
5
5
|
<content src="index.html"/>
|
|
6
6
|
<feature name="http://tizen.org/feature/screen.size.all"/>
|
package/css/style.css
CHANGED
|
@@ -338,6 +338,19 @@ html, body {
|
|
|
338
338
|
|
|
339
339
|
/* --- Confirm modal --- */
|
|
340
340
|
.modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 45; background: rgba(0,0,0,0.72); display: flex; align-items: center; justify-content: center; }
|
|
341
|
+
/* Profiles (js/profiles.js): who's watching, the badge in the top menu and Settings › Profiles */
|
|
342
|
+
.pf-overlay { background: #0e1117; }
|
|
343
|
+
.pf-box { text-align: center; }
|
|
344
|
+
.pf-title { font-size: 44px; font-weight: 600; color: #e6e9ef; margin-bottom: 48px; }
|
|
345
|
+
.pf-row { display: flex; justify-content: center; flex-wrap: wrap; }
|
|
346
|
+
.pf-card { width: 200px; margin: 0 18px; padding: 22px 0 18px; border-radius: 18px; border: 4px solid transparent; }
|
|
347
|
+
.pf-card.focusable.focused { border-color: #fff; background: #1a1f2b; box-shadow: none; }
|
|
348
|
+
.pf-name { font-size: 26px; color: #c9cfda; margin-top: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
|
|
349
|
+
.pf-card.focused .pf-name { color: #fff; }
|
|
350
|
+
.pf-badge { display: inline-block; width: 40px; height: 40px; line-height: 40px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 20px; text-align: center; vertical-align: middle; }
|
|
351
|
+
.pf-badge.big { width: 130px; height: 130px; line-height: 130px; font-size: 60px; }
|
|
352
|
+
.pf-badge.small { width: 32px; height: 32px; line-height: 32px; font-size: 16px; }
|
|
353
|
+
.header .hchip.pf-chip { padding: 4px; }
|
|
341
354
|
.modal-box { width: 820px; background: #161b26; border: 2px solid #2a3346; border-radius: 16px; padding: 44px 48px; text-align: center; }
|
|
342
355
|
.modal-msg { font-size: 30px; line-height: 1.4; color: #e6e9ef; margin-bottom: 36px; }
|
|
343
356
|
.modal-row { display: flex; justify-content: center; }
|
|
@@ -541,6 +554,7 @@ html, body {
|
|
|
541
554
|
.src-s { background: #7b5bf5; }
|
|
542
555
|
.src-a { background: #0f9f8f; }
|
|
543
556
|
.src-c { background: #6b7280; }
|
|
557
|
+
.src-n { background: #d9480f; }
|
|
544
558
|
/* an IPTV channel card: what's on now (its TV guide), and how far along it is, along its top (its name is at the bottom) */
|
|
545
559
|
.card-epg { position: absolute; left: 0; right: 0; top: 0; padding: 5px 8px 4px; background: rgba(10, 12, 18, 0.82); }
|
|
546
560
|
.card-epg-t { font-size: 15px; color: #e6e9ef; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
package/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=1920, height=1080, user-scalable=no">
|
|
6
6
|
<title>StremioK</title>
|
|
7
|
-
<link rel="stylesheet" href="css/style.css?v=2.
|
|
8
|
-
<link rel="stylesheet" href="css/modern.css?v=2.
|
|
7
|
+
<link rel="stylesheet" href="css/style.css?v=2.4.0">
|
|
8
|
+
<link rel="stylesheet" href="css/modern.css?v=2.4.0">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<!-- CSS-applied sentinel (kept off-screen); app.js waits for its width before rendering -->
|
|
@@ -54,46 +54,49 @@
|
|
|
54
54
|
|
|
55
55
|
<!-- Load order matters: polyfills -> util -> iptv -> data -> input -> tvapps -> player parts -> player -> ytplay -> view parts -> views -> app -->
|
|
56
56
|
<!-- ?v= busts the TV webview cache on every release (keep in sync with package.json) -->
|
|
57
|
-
<script src="js/polyfills.js?v=2.
|
|
58
|
-
<script src="js/
|
|
59
|
-
<script src="js/
|
|
60
|
-
<script src="js/
|
|
61
|
-
<script src="js/
|
|
62
|
-
<script src="js/
|
|
63
|
-
<script src="js/
|
|
64
|
-
<script src="js/
|
|
65
|
-
<script src="js/
|
|
66
|
-
<script src="js/
|
|
67
|
-
<script src="js/
|
|
68
|
-
<script src="js/
|
|
69
|
-
<script src="js/
|
|
70
|
-
<script src="js/
|
|
71
|
-
<script src="js/
|
|
72
|
-
<script src="js/
|
|
73
|
-
<script src="js/
|
|
74
|
-
<script src="js/
|
|
75
|
-
<script src="js/player-
|
|
76
|
-
<script src="js/player-
|
|
77
|
-
<script src="js/player-
|
|
78
|
-
<script src="js/player-
|
|
79
|
-
<script src="js/player-
|
|
80
|
-
<script src="js/player-
|
|
81
|
-
<script src="js/player.js?v=2.
|
|
82
|
-
<script src="js/
|
|
83
|
-
<script src="js/
|
|
84
|
-
<script src="js/
|
|
85
|
-
<script src="js/
|
|
86
|
-
<script src="js/
|
|
87
|
-
<script src="js/stremio-
|
|
88
|
-
<script src="js/
|
|
89
|
-
<script src="js/
|
|
90
|
-
<script src="js/
|
|
91
|
-
<script src="js/view-
|
|
92
|
-
<script src="js/view-
|
|
93
|
-
<script src="js/view-
|
|
94
|
-
<script src="js/view-
|
|
95
|
-
<script src="js/
|
|
96
|
-
<script src="js/
|
|
97
|
-
<script src="js/
|
|
57
|
+
<script src="js/polyfills.js?v=2.4.0"></script>
|
|
58
|
+
<script src="js/profiles.js?v=2.4.0"></script>
|
|
59
|
+
<script src="js/lang/languages.js?v=2.4.0"></script>
|
|
60
|
+
<script src="js/i18n.js?v=2.4.0"></script>
|
|
61
|
+
<script src="js/util.js?v=2.4.0"></script>
|
|
62
|
+
<script src="js/iptv.js?v=2.4.0"></script>
|
|
63
|
+
<script src="js/xtvod.js?v=2.4.0"></script>
|
|
64
|
+
<script src="js/stvod.js?v=2.4.0"></script>
|
|
65
|
+
<script src="js/plugins.js?v=2.4.0"></script>
|
|
66
|
+
<script src="js/jellyfin.js?v=2.4.0"></script>
|
|
67
|
+
<script src="js/plex.js?v=2.4.0"></script>
|
|
68
|
+
<script src="js/epg.js?v=2.4.0"></script>
|
|
69
|
+
<script src="js/youtube.js?v=2.4.0"></script>
|
|
70
|
+
<script src="js/stremio.js?v=2.4.0"></script>
|
|
71
|
+
<script src="js/trakt.js?v=2.4.0"></script>
|
|
72
|
+
<script src="js/keys.js?v=2.4.0"></script>
|
|
73
|
+
<script src="js/focus.js?v=2.4.0"></script>
|
|
74
|
+
<script src="js/tvapps.js?v=2.4.0"></script>
|
|
75
|
+
<script src="js/player-core.js?v=2.4.0"></script>
|
|
76
|
+
<script src="js/player-store.js?v=2.4.0"></script>
|
|
77
|
+
<script src="js/player-lang.js?v=2.4.0"></script>
|
|
78
|
+
<script src="js/player-quality.js?v=2.4.0"></script>
|
|
79
|
+
<script src="js/player-subs.js?v=2.4.0"></script>
|
|
80
|
+
<script src="js/player-audio.js?v=2.4.0"></script>
|
|
81
|
+
<script src="js/player-controls.js?v=2.4.0"></script>
|
|
82
|
+
<script src="js/player.js?v=2.4.0"></script>
|
|
83
|
+
<script src="js/ytplay.js?v=2.4.0"></script>
|
|
84
|
+
<script src="js/netfolders.js?v=2.4.0"></script>
|
|
85
|
+
<script src="js/local.js?v=2.4.0"></script>
|
|
86
|
+
<script src="js/downloads.js?v=2.4.0"></script>
|
|
87
|
+
<script src="js/stremio-account.js?v=2.4.0"></script>
|
|
88
|
+
<script src="js/nuvio-import.js?v=2.4.0"></script>
|
|
89
|
+
<script src="js/nuvio-sync.js?v=2.4.0"></script>
|
|
90
|
+
<script src="js/stremio-sync.js?v=2.4.0"></script>
|
|
91
|
+
<script src="js/view-core.js?v=2.4.0"></script>
|
|
92
|
+
<script src="js/view-home.js?v=2.4.0"></script>
|
|
93
|
+
<script src="js/view-guide.js?v=2.4.0"></script>
|
|
94
|
+
<script src="js/view-detail.js?v=2.4.0"></script>
|
|
95
|
+
<script src="js/view-search.js?v=2.4.0"></script>
|
|
96
|
+
<script src="js/view-settings.js?v=2.4.0"></script>
|
|
97
|
+
<script src="js/view-discover.js?v=2.4.0"></script>
|
|
98
|
+
<script src="js/views.js?v=2.4.0"></script>
|
|
99
|
+
<script src="js/app.js?v=2.4.0"></script>
|
|
100
|
+
<script src="js/hubpreview.js?v=2.4.0"></script>
|
|
98
101
|
</body>
|
|
99
102
|
</html>
|
package/js/app.js
CHANGED
|
@@ -251,6 +251,14 @@ var App = (function () {
|
|
|
251
251
|
Keys.init();
|
|
252
252
|
Keys.setHandler(onKey);
|
|
253
253
|
Views.applyAppearance(); // background / accent color from Settings
|
|
254
|
+
// Who's watching (two or more profiles, unless you turned the question off; not when opened
|
|
255
|
+
// from a home bar tile): asked before anything else starts, so nothing is sent to Trakt,
|
|
256
|
+
// a Stremio account or a media server for the wrong person (js/profiles.js).
|
|
257
|
+
var fromTile = typeof HubPreview !== 'undefined' && HubPreview.fromTile && HubPreview.fromTile();
|
|
258
|
+
if (typeof Profiles !== 'undefined' && Profiles.ask() && !fromTile && Views.profilePicker) { Views.profilePicker(started); return; }
|
|
259
|
+
started();
|
|
260
|
+
}
|
|
261
|
+
function started() {
|
|
254
262
|
// The TV's database filled with old versions of what was saved: tidied up, once started
|
|
255
263
|
setTimeout(function () { if (U.bigStore && U.bigStore.tidyIfNeeded) { U.bigStore.tidyIfNeeded(); } }, 30000);
|
|
256
264
|
// New episodes out for the shows in Watching: said once, half a minute in (Home's ready)
|
|
@@ -275,6 +283,12 @@ var App = (function () {
|
|
|
275
283
|
StremioSync.sync().then(function () { if (_current === 'home' && !Player.isActive()) { Views.renderHome(); } });
|
|
276
284
|
}
|
|
277
285
|
serverMarks();
|
|
286
|
+
// ...and a Nuvio account's profile, both ways (js/nuvio-sync.js; at launch, every 15 minutes).
|
|
287
|
+
if (typeof NuvioSync !== 'undefined' && NuvioSync.isConnected()) { NuvioSync.start(function () { if (_current === 'home' && !Player.isActive()) { Views.renderHome(); } }); }
|
|
288
|
+
if (typeof HubPreview !== 'undefined') { HubPreview.start(); } // (the home bar's tiles: the profile in use's)
|
|
289
|
+
// A configuration file imported as this new profile (Settings › Import): listed to tick now.
|
|
290
|
+
var pending = U.store.get('stremiok.importpending', null);
|
|
291
|
+
if (typeof pending === 'string' && pending) { U.store.remove('stremiok.importpending'); if (Views.importText) { setTimeout(function () { Views.importText(pending); }, 500); } }
|
|
278
292
|
}
|
|
279
293
|
// Your media servers' watched marks: read at launch, when a server is added, reloaded or
|
|
280
294
|
// removed, on coming back to the foreground and every MARKS_EVERY (each one again once it's
|
|
@@ -359,4 +373,4 @@ var App = (function () {
|
|
|
359
373
|
};
|
|
360
374
|
})();
|
|
361
375
|
|
|
362
|
-
window.onload = function () { App.start();
|
|
376
|
+
window.onload = function () { App.start(); }; // (the home bar preview starts once StremioK has: see started())
|
package/js/hubpreview.js
CHANGED
|
@@ -70,6 +70,13 @@ var HubPreview = (function () {
|
|
|
70
70
|
if (req && req.appControl) { picked(req.appControl.data); }
|
|
71
71
|
} catch (e) {}
|
|
72
72
|
}
|
|
73
|
+
// Opened from one of its tiles (then straight to that title, no question first).
|
|
74
|
+
function fromTile() {
|
|
75
|
+
try {
|
|
76
|
+
var req = tizen.application.getCurrentApplication().getRequestedAppControl(), d = req && req.appControl && req.appControl.data;
|
|
77
|
+
return !!(d && d.some(function (x) { return x.key === 'PAYLOAD' || x.key === 'action_data'; }));
|
|
78
|
+
} catch (e) { return false; }
|
|
79
|
+
}
|
|
73
80
|
function start() {
|
|
74
81
|
if (!available()) { return; }
|
|
75
82
|
received(); // (opened from a tile)
|
|
@@ -77,5 +84,5 @@ var HubPreview = (function () {
|
|
|
77
84
|
try { document.addEventListener('visibilitychange', function () { if (U.isHidden()) { send(); } }, false); } catch (e2) {}
|
|
78
85
|
setTimeout(function () { if (Views.withShowInfo) { Views.withShowInfo(function () { send(); }); } else { send(); } }, 8000);
|
|
79
86
|
}
|
|
80
|
-
return { start: start, send: send, available: available, picked: picked, payload: payload };
|
|
87
|
+
return { start: start, send: send, available: available, picked: picked, payload: payload, fromTile: fromTile };
|
|
81
88
|
})();
|
package/js/i18n.js
CHANGED
|
@@ -51,12 +51,13 @@ var I18N = (function () {
|
|
|
51
51
|
// so it doesn't change on a later launch.
|
|
52
52
|
function choice() {
|
|
53
53
|
var p = null, ls = null;
|
|
54
|
-
|
|
54
|
+
var pk = (typeof Profiles !== 'undefined' && Profiles.key) ? Profiles.key(PREFS_KEY) : PREFS_KEY; // (the profile's own settings: js/profiles.js)
|
|
55
|
+
try { ls = window.localStorage; p = JSON.parse(ls.getItem(pk) || 'null'); } catch (e) {}
|
|
55
56
|
if (p && typeof p.lang === 'string') { return p.lang === 'auto' || known(p.lang) ? p.lang : 'auto'; }
|
|
56
57
|
var used = false;
|
|
57
58
|
try { for (var i = 0; ls && i < ls.length; i++) { if (/^stremiok\./.test(ls.key(i) || '')) { used = true; break; } } } catch (e2) {}
|
|
58
59
|
var c = used ? 'en' : 'auto';
|
|
59
|
-
try { p = (p && typeof p === 'object') ? p : {}; p.lang = c; ls.setItem(
|
|
60
|
+
try { p = (p && typeof p === 'object') ? p : {}; p.lang = c; ls.setItem(pk, JSON.stringify(p)); } catch (e3) {}
|
|
60
61
|
return c;
|
|
61
62
|
}
|
|
62
63
|
var _choice = choice(), _lang = _choice === 'auto' ? auto() : _choice;
|
package/js/iptv.js
CHANGED
|
@@ -13,9 +13,15 @@ var IPTV = (function () {
|
|
|
13
13
|
var PLAYLISTS_KEY = 'stremiok.iptv.playlists';
|
|
14
14
|
var CACHE_PREFIX = 'stremiok.iptv.cache.'; // one key per playlist id
|
|
15
15
|
var _cache = null; // merged { ts, channels, groups, byId, byGroup, catalogs }
|
|
16
|
-
// A playlist is downloaded up to
|
|
16
|
+
// A playlist is downloaded up to playlistMax() and kept to maxChannels() channels: bigger
|
|
17
17
|
// ones would exhaust an older TV's memory (both show in Settings > IPTV when they apply).
|
|
18
|
-
|
|
18
|
+
// Settings › Content › IPTV › Largest playlist: 20 MB (30,000 channels) unless raised, the
|
|
19
|
+
// channels in step (1,500 per MB), the download given longer (15 s per 20 MB).
|
|
20
|
+
var SIZE_KEY = 'stremiok.iptv.size', SIZES = [20, 40, 60, 100], CHANNELS_PER_MB = 1500;
|
|
21
|
+
function sizeMb() { var n = +U.store.get(SIZE_KEY, 20); return SIZES.indexOf(n) !== -1 ? n : 20; }
|
|
22
|
+
function setSizeMb(n) { n = +n; if (SIZES.indexOf(n) === -1 || n === 20) { U.store.remove(SIZE_KEY); } else { U.store.set(SIZE_KEY, n); } }
|
|
23
|
+
function playlistMax() { return sizeMb() * 1024 * 1024; }
|
|
24
|
+
function maxChannels() { return sizeMb() * CHANNELS_PER_MB; }
|
|
19
25
|
var _status = {}; // playlist id -> { url, count, groups, error, uncached, title, fetchedAt, stale }
|
|
20
26
|
var NAME_MAX = 60;
|
|
21
27
|
|
|
@@ -485,7 +491,7 @@ var IPTV = (function () {
|
|
|
485
491
|
return r.channels;
|
|
486
492
|
}
|
|
487
493
|
// The same, PARSE_CHUNK lines at a time with a pause between (the remote stays
|
|
488
|
-
// responsive while a
|
|
494
|
+
// responsive while a big playlist is read); onProgress(channels so far). Resolves
|
|
489
495
|
// { channels, dropped }. The text isn't kept once split.
|
|
490
496
|
var PARSE_CHUNK = 3000;
|
|
491
497
|
function parseM3UAsync(text, max, onProgress) {
|
|
@@ -576,7 +582,7 @@ var IPTV = (function () {
|
|
|
576
582
|
|
|
577
583
|
function finish(text, at) {
|
|
578
584
|
st.fetchedAt = at || 0;
|
|
579
|
-
return parseM3UAsync(text,
|
|
585
|
+
return parseM3UAsync(text, maxChannels(), function (n) { progress(playlist.id, n); }).then(function (r) {
|
|
580
586
|
if (r.dropped) { st.dropped = r.dropped; } // (kept to what the TV can hold; the rest dropped, and said so)
|
|
581
587
|
st.title = r.title || '';
|
|
582
588
|
st.guides = r.guides || [];
|
|
@@ -624,7 +630,7 @@ var IPTV = (function () {
|
|
|
624
630
|
});
|
|
625
631
|
}
|
|
626
632
|
function fetchIt() {
|
|
627
|
-
return (isStalker(playlist) ? stalkerText() : U.getText(playlist.url, 15000,
|
|
633
|
+
return (isStalker(playlist) ? stalkerText() : U.getText(playlist.url, 15000 * sizeMb() / 20, playlistMax())).then(function (text) {
|
|
628
634
|
var at = Date.now();
|
|
629
635
|
return writePersist(playlist.id, src, text, at).then(function (ok) {
|
|
630
636
|
st.uncached = !ok;
|
|
@@ -856,6 +862,7 @@ var IPTV = (function () {
|
|
|
856
862
|
macOf: macOf, stbUa: STB_UA, stalkerPortal: stalkerPortal, stalkerCheck: stalkerCheck, addStalker: addStalker, isStalker: isStalker, stalkerAll: stalkerAll, setStalkerAll: setStalkerAll, stalkerGroups: stalkerGroups, setStalkerGroups: setStalkerGroups,
|
|
857
863
|
xtreamParts: xtreamParts, xtreamUrl: xtreamUrl, xtreamCheck: xtreamCheck, addXtream: addXtream, xtreamFormat: xtreamFormat, setXtreamFormat: setXtreamFormat,
|
|
858
864
|
isFavorite: isFavorite, setFavorite: setFavorite, refreshEvery: refreshEvery, setRefreshEvery: setRefreshEvery, readAt: readAt,
|
|
865
|
+
sizeMb: sizeMb, setSizeMb: setSizeMb, maxChannels: maxChannels, SIZES: SIZES,
|
|
859
866
|
channels: function () { return _cache ? _cache.channels : []; }, channel: function (id) { return _cache ? _cache.byId[id] || null : null; }, isEnabled: isEnabled, reset: reset, status: status,
|
|
860
867
|
load: load, reload: reload, catalog: catalog, meta: meta, streams: streams, synthAddon: synthAddon, isReady: isReady,
|
|
861
868
|
onProgress: onProgress
|