April 4Apr 4 Author @Jonae , after investigating further, I believe your issue might be the same as another report I received. Currently, statistics only record data while you have the Unraid Dashboard open in your browser. Once you close it or navigate to another page, data collection stops.That would explain why it "works for a while then stops". When you change permissions and open the Dashboard to check, it starts recording because the page is open. When you close the browser, it stops, and it seems like a permissions issue but it's actually not.This is a known limitation that I'm actively working on fixing. The next update will include a background process that collects data independently 24/7, regardless of whether you have the browser open. Stay tuned!
April 4Apr 4 15 hours ago, Lazaros Chalkidis said:@Jonae i did some testing on my own setup to try to reproduce this.I tested with both root:root and nobody:users ownership on the Stream Viewer folder, and statistics kept writing normally in both cases. This is because the Unraid webGUI runs PHP as root, so file permissions alone shouldn't cause this issue.That said, I'd like to dig deeper into your specific case. Could you run the following in the Unraid terminal and paste it here?Check database health:sqlite3 /mnt/user/appdata/Stream-Viewer/streamviewer.db "PRAGMA integrity_check;"Check if there are recent records:sqlite3 /mnt/user/appdata/Stream-Viewer/streamviewer.db "SELECT * FROM watch_history ORDER BY id DESC LIMIT 3;"Check file status:ls -la /mnt/user/appdata/Stream-Viewer/Also:Do you have any backup plugins (like CA Appdata Backup) that might be copying the Stream-Viewer folder while the plugin is running? SQLite uses a single file as its database, and if another process reads or copies that file at the same time the plugin is writing to it, the database can get locked and stop accepting new data until the lock is released.Share the output and any screenshots, that will help narrow it down.i have CA Appdata Backup but it runs once a day at midnight... it should not interfere with the plugin... theoretically :) but today nothing was logged :( Edited April 4Apr 4 by Jonae
April 4Apr 4 Author Your database is healthy (integrity check passed) and the 3 records are all from the same session, which confirms what I mentioned in my previous reply. Statistics currently only record while the Dashboard is open in your browser. I'm working on a background process for the next update that will fix this. Regarding CA Appdata Backup, that's not the issue here.
April 4Apr 4 3 hours ago, Lazaros Chalkidis said:Your database is healthy (integrity check passed) and the 3 records are all from the same session, which confirms what I mentioned in my previous reply. Statistics currently only record while the Dashboard is open in your browser. I'm working on a background process for the next update that will fix this. Regarding CA Appdata Backup, that's not the issue here.thaks for the quick replay
April 5Apr 5 Hello, first of all, thank you for your work on this plugin!I’m currently using Jellyfin, and I noticed what seems to be a bug in the statistics section.When someone watches a TV series and multiple episodes are played consecutively in the same session, the recent history only displays the first episode that was played. In my opinion, it should instead show one entry/session per episode watched.There doesn’t seem to be any issue on the Unraid dashboard side, as it correctly displays the title of the episode currently being played.
April 5Apr 5 Author 1 hour ago, kacktoz said:Hello, first of all, thank you for your work on this plugin!I’m currently using Jellyfin, and I noticed what seems to be a bug in the statistics section.When someone watches a TV series and multiple episodes are played consecutively in the same session, the recent history only displays the first episode that was played. In my opinion, it should instead show one entry/session per episode watched.There doesn’t seem to be any issue on the Unraid dashboard side, as it correctly displays the title of the episode currently being played.Hello @kacktoz, thanks for the report! This is a confirmed Jellyfin specific issue. When Jellyfin autoplays the next episode, it keeps the same session ID, so the statistics tracker sees it as one continuous session instead of separate episodes. The dashboard shows correctly because it reads the live session title, but the history only records the final episode title.Fix is coming in the next update.
April 6Apr 6 Author Hey everyone, v2026.04.06 is out.Biggest addition is a header streaming indicator. You'll see a small cast icon with a purple badge up in the header bar whenever something is playing, regardless of which page you're on. It shows the active stream count and clicking it takes you straight to the Statistics page. You can turn it off from Settings if it bothers you.The other big change is under the hood. Statistics recording now runs through a background poll daemon instead of relying on the browser. This means sessions get recorded even if you don't have a tab open. The daemon starts and stops on its own when you toggle statistics in settings, and if you're upgrading it'll pick up automatically and clean up old cron entries.Also squashed a few bugs:Jellyfin/Emby autoplay was merging consecutive episodes into a single session. Each episode now gets its own entry.Multiple crond processes could spawn when saving settings, plus some syslog noise from cron. Both sorted.The user activity chart was cutting off usernames when you had a lot of users. Container height now scales with the number of entries.Mobile was a pain. The dashboard widget and the statistics page both had horizontal scroll issues on phones. Should be properly contained now.Some smaller stuff: settings page got restyled buttons, widget settings are reordered to make more sense, and the header icon picks up your theme colors automatically.Let me know if anything breaks.
April 9Apr 9 Stream viewer stats seem to not be working for me i have it enabled but it never generates any data in any tab and just says loading at the top. I see in the settings it says "Records to SQLite" do i need to install my own and point the database path to it or is it prebuilt into the plugin
April 9Apr 9 Author Hey @derriang, no you don't need to install anything separately, SQLite is built into the plugin. From the screenshot it looks like the page is stuck on loading. Try hitting the refresh icon in the top right corner of the statistics page first, that should kick it into loading the data. If that doesn't help: 1. Go to Settings, toggle statistics off, hit Apply 2. Toggle it back on, hit Apply again 3. Wait a couple of minutes and check if data starts showing up If it's still stuck, open the Unraid terminal and run: ps aux | grep streamviewer_poll That will tell us if the daemon is actually running. Paste the output here and I'll take a look.
April 9Apr 9 The refresh icon doesnt do anything for me and ive tried toggling it off and on a few time already
April 9Apr 9 Author OK the daemon is running so that's good. Let's check a couple of things. Run these in the terminal:ls -la /mnt/user/appdata/Stream-Viewer/And then:cat /tmp/streamviewer_cache/header_countAlso open the browser console (F12 > Console tab) while on the statistics page and tell me if there are any red errors showing up.
April 9Apr 9 well this apparently is the problem just checked in my appdata after i got the error and i have no Stream-Viewer folder in it also no red errors in console Edited April 9Apr 9 by derriang
April 9Apr 9 Author One more thing, can you run:ls /mnt/user/appdata/I want to make sure that folder actually exists on your system. Some setups have appdata in a different location.
April 9Apr 9 8 minutes ago, Lazaros Chalkidis said:One more thing, can you run:ls /mnt/user/appdata/I want to make sure that folder actually exists on your system. Some setups have appdata in a different location.It does not do i just create it?
April 9Apr 9 Author That explains it. The plugin expects that folder to exist but your system doesn't have it. Create it manually for now:mkdir -p /mnt/user/appdata/Stream-ViewerThen go to Settings, toggle statistics off and on, hit Apply. Data should start showing up within a couple of minutes.Let me know if it works after that.I'll fix this in the next update so the plugin creates the full path automatically.
April 9Apr 9 2 minutes ago, Lazaros Chalkidis said:That explains it. The plugin expects that folder to exist but your system doesn't have it. Create it manually for now:mkdir -p /mnt/user/appdata/Stream-ViewerThen go to Settings, toggle statistics off and on, hit Apply. Data should start showing up within a couple of minutes.Let me know if it works after that.I'll fix this in the next update so the plugin creates the full path automatically.ok will wait a few min i do however get red errors in console now that i didnt have before
April 9Apr 9 Author Those errors might just be because the database was just created and has no data yet. Give it 2 3 minutes for the daemon to record some sessions, then refresh the page completely (Ctrl+F5). The errors should go away once there's data in the database.If they persist after that, right-click one of the red lines, copy the response, and paste it here so I can see the actual error message.
April 9Apr 9 nothing seems to be generating int the Stream-Viewer folder its still empty this is one of the red errorsContent-Security-Policy: Ignoring ‘block-all-mixed-content’ because mixed content display upgrading makes block-all-mixed-content obsolete. StreamViewerTool[UnifiedMount] Mounted 5 components auto-mount-Wq-TItQE.js:51979:11XHRGEThttps://10.0.1.70/plugins/streamviewer/streamviewer_api.php?action=get_stats&_svt=b874116311fa2840805a3dacce312c2723e7551cadc9f713&period=30d[HTTP/2 400 39ms]GEThttps://10.0.1.70/plugins/streamviewer/streamviewer_api.php?action=get_stats&_svt=b874116311fa2840805a3dacce312c2723e7551cadc9f713&period=30dStatus400VersionHTTP/2Transferred400 B (29 B size)Referrer Policysame-originDNS ResolutionSystemXHRGEThttps://10.0.1.70/plugins/streamviewer/streamviewer_api.php?action=get_daily_chart&_svt=b874116311fa2840805a3dacce312c2723e7551cadc9f713&period=30d[HTTP/2 400 37ms]XHRGEThttps://10.0.1.70/plugins/streamviewer/streamviewer_api.php?action=get_top_media&_svt=b874116311fa2840805a3dacce312c2723e7551cadc9f713&period=30d&limit=5[HTTP/2 400 40ms]XHRGEThttps://10.0.1.70/plugins/streamviewer/streamviewer_api.php?action=get_top_users&_svt=b874116311fa2840805a3dacce312c2723e7551cadc9f713&period=30d&limit=5[HTTP/2 400 38ms]XHRGEThttps://10.0.1.70/plugins/streamviewer/streamviewer_api.php?action=get_history&_svt=b874116311fa2840805a3dacce312c2723e7551cadc9f713&period=30d&page=1&per_page=10[HTTP/2 400 48ms][setServer]Object { array: {…}, apiKey: "", apiVersion: "4.10.0+81808ad", avatar: "", caseModel: "RSV-L4500", config: {…}, connectPluginInstalled: "dynamix.unraid.net.plg", connectPluginVersion: "4.32.1", csrf: "CF95AAC1DF5BE889", dateTimeFormat: {…}, … }purchase-BesuGs_3.js:4843:13[ThemeInitializer] Theme initialized successfully auto-mount-Wq-TItQE.js:52290:15Result: CA Background Scan StreamViewerTool:1592:13[setServer]Object { cloud: {…} }purchase-BesuGs_3.js:4843:13mutateServerStateFromApiObject { config: {…}, info: {…}, owner: {…}, registration: {…}, vars: {…} }purchase-BesuGs_3.js:4996:13mutatedData Edited April 9Apr 9 by derriang
April 9Apr 9 Author You mentioned you toggled it off and on before, but that was before the folder existed. Now that you created it, try once more: toggle statistics off, Apply, then back on, Apply. Wait a minute and check if a .db file appeared: ls -la /mnt/user/appdata/Stream-Viewer/ Also run this so we can see what the config says: cat /boot/config/plugins/streamviewer/streamviewer.cfg | grep STATS
April 9Apr 9 Author Sorry for all the back and forth. One last thing, run this in the terminal:php -r "require '/usr/local/emhttp/plugins/streamviewer/streamviewer_api.php'; echo (new StreamViewerEndpoint())->cronPoll();" 2>&1This will either fix it or show us exactly what's going wrong. Paste whatever it prints.
April 9Apr 9 1 minute ago, Lazaros Chalkidis said:Sorry for all the back and forth. One last thing, run this in the terminal:php -r "require '/usr/local/emhttp/plugins/streamviewer/streamviewer_api.php'; echo (new StreamViewerEndpoint())->cronPoll();" 2>&1This will either fix it or show us exactly what's going wrong. Paste whatever it prints.That didnt output anything for me in the terminalEdit: sorry looks like it output 1 Edited April 9Apr 9 by derriang added photo
April 9Apr 9 Author No output means it's failing silently. Let's check if SQLite is available. Run:php -r "echo class_exists('SQLite3') ? 'yes' : 'no';"And also:php -r "try { \$db = new SQLite3('/mnt/user/appdata/Stream-Viewer/test.db'); echo 'ok'; \$db->close(); unlink('/mnt/user/appdata/Stream-Viewer/test.db'); } catch(Exception \$e) { echo \$e->getMessage(); }"
April 9Apr 9 2 minutes ago, Lazaros Chalkidis said:No output means it's failing silently. Let's check if SQLite is available. Run:php -r "echo class_exists('SQLite3') ? 'yes' : 'no';"And also:php -r "try { \$db = new SQLite3('/mnt/user/appdata/Stream-Viewer/test.db'); echo 'ok'; \$db->close(); unlink('/mnt/user/appdata/Stream-Viewer/test.db'); } catch(Exception \$e) { echo \$e->getMessage(); }"
April 9Apr 9 Author Good news, cronPoll returned 1 and SQLite works fine. Check if the database was created just now:ls -la /mnt/user/appdata/Stream-Viewer/
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.