Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[PLUGIN] Stream Viewer

Featured Replies

  • 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!

  • Replies 102
  • Views 3.5k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • NachoServer
    NachoServer

    Dude, love the plugin, thanks for all the awesome work! Easy to setup, miles ahead of the previous deprecated plugin I was using, and looking forward to checking out the stats after I have some data

  • Lazaros Chalkidis
    Lazaros Chalkidis

    Hello @NachoServer, thanks for the kind words, really appreciate it! Yes, the server name badge color was changed intentionally in this update. It used to match the server type color (orange for Plex,

  • Hello @Lazaros Chalkidis , thank's for this plugin. Working fine and easy to configure. Just a detail, I'm french and I noticed that a character (quote) is not shown correctly:

Posted Images

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.

image.png

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 by Jonae

  • 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.

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

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.

  • 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.

  • 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.

header-badge.png

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.

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

Screenshot 2026-04-08 220204.png

  • 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.

The refresh icon doesnt do anything for me and ive tried toggling it off and on a few time already

Screenshot 2026-04-08 222107.png

  • 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_count

Also open the browser console (F12 > Console tab) while on the statistics page and tell me if there are any red errors showing up.

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

Screenshot 2026-04-08 223134.png

Edited by derriang

  • 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.

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?

  • 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-Viewer

Then 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.

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-Viewer

Then 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

Screenshot 2026-04-08 225340.png

  • 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.

nothing seems to be generating int the Stream-Viewer folder its still empty this is one of the red errors

Screenshot 2026-04-08 230826.png

Content-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:11

XHRGET

https://10.0.1.70/plugins/streamviewer/streamviewer_api.php?action=get_stats&_svt=b874116311fa2840805a3dacce312c2723e7551cadc9f713&period=30d

[HTTP/2 400 39ms]

GET

https://10.0.1.70/plugins/streamviewer/streamviewer_api.php?action=get_stats&_svt=b874116311fa2840805a3dacce312c2723e7551cadc9f713&period=30d

Status

400

VersionHTTP/2

Transferred400 B (29 B size)

Referrer Policysame-origin

DNS ResolutionSystem

XHRGET

https://10.0.1.70/plugins/streamviewer/streamviewer_api.php?action=get_daily_chart&_svt=b874116311fa2840805a3dacce312c2723e7551cadc9f713&period=30d

[HTTP/2 400 37ms]

XHRGET

https://10.0.1.70/plugins/streamviewer/streamviewer_api.php?action=get_top_media&_svt=b874116311fa2840805a3dacce312c2723e7551cadc9f713&period=30d&limit=5

[HTTP/2 400 40ms]

XHRGET

https://10.0.1.70/plugins/streamviewer/streamviewer_api.php?action=get_top_users&_svt=b874116311fa2840805a3dacce312c2723e7551cadc9f713&period=30d&limit=5

[HTTP/2 400 38ms]

XHRGET

https://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:15

Result: CA Background Scan StreamViewerTool:1592:13

[setServer]

Object { cloud: {…} }

purchase-BesuGs_3.js:4843:13

mutateServerStateFromApi

Object { config: {…}, info: {…}, owner: {…}, registration: {…}, vars: {…} }

purchase-BesuGs_3.js:4996:13

mutatedData

Edited by derriang

  • 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

ive already tried it a few times after ive created the folder and just done it again

Screenshot 2026-04-08 232655.png

  • 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>&1

This will either fix it or show us exactly what's going wrong. Paste whatever it prints.

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>&1

This will either fix it or show us exactly what's going wrong. Paste whatever it prints.

That didnt output anything for me in the terminal

Edit: sorry looks like it output 1

Screenshot 2026-04-08 233515.png

Edited by derriang
added photo

  • 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(); }"

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(); }"

Screenshot 2026-04-08 233755.png

  • 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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.