vaise 307 Posted August 1, 2023 Share Posted August 1, 2023 18 minutes ago, TeamB said: how and where are you pulling this data from? try the query tab to write a query to give you the data you need. Yeah - I am not too technical there - I was literally copying the output from the app to excel as text, then trying to sort it there (the hours use is what I am after). I was using the user report, then changing the date from 01/01/2023 till now, and pulling that back, then copy and past from the browser. I am sure there are much better ways but the query option I have no idea wehere to start to get the same info. Link to comment Share on other sites More sharing options...
TeamB 2355 Posted August 1, 2023 Author Share Posted August 1, 2023 in the query tab run the following query SELECT UserId, SUM(PlayDuration - PauseDuration) AS PlayTime FROM PlaybackActivity WHERE DateCreated >= '2023-06-01' AND DateCreated < '2023-07-01' GROUP BY UserId ORDER BY PlayTime DESC make sure you check the box "Replace UserId with UserName" under the query box, PlayTime is seconds 1 Link to comment Share on other sites More sharing options...
vaise 307 Posted August 1, 2023 Share Posted August 1, 2023 1 hour ago, TeamB said: in the query tab run the following query SELECT UserId, SUM(PlayDuration - PauseDuration) AS PlayTime FROM PlaybackActivity WHERE DateCreated >= '2023-06-01' AND DateCreated < '2023-07-01' GROUP BY UserId ORDER BY PlayTime DESC make sure you check the box "Replace UserId with UserName" under the query box, PlayTime is seconds Thanks heaps for that - I have saved it for next time. Just change the dates and I am dandy. nice 1! Link to comment Share on other sites More sharing options...
CJTripper 9 Posted August 8, 2023 Share Posted August 8, 2023 I noted the Playback Reporting plugin (v 2.1.0.1) seems to have some compatibility issues with the latest Emby Server beta (Windows Emby Server Beta 4.8.0.40). After the upgrade to 4.8.0.40 (and multiple reboots), the Activity Log on my Emby Dashboard screen no longer displayed playback events. I found some errors in my logs indicating Playback Reporting errors when a movie or show was played by a user. I deleted the playback_reporting.dll file from the plugins folder and restarted the server, my dashboard activity is correctly logging the playback events again. Here is a snip of the event log error generated during a playback start: 2023-08-07 21:02:40.675 Error SessionManager: Error in event handler *** Error Report *** Version: 4.8.0.40 Command line: C:\Users\User\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp Operating system: Microsoft Windows 10.0.22621 Framework: .NET 6.0.20 OS/Process: x64/x64 Runtime: C:/Users/User/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll Processor count: 20 Data path: C:\Users\User\AppData\Roaming\Emby-Server\programdata Application path: C:\Users\User\AppData\Roaming\Emby-Server\system System.MissingMethodException: System.MissingMethodException: Method not found: 'Void SQLitePCL.pretty.IBindParameter.Bind(System.ReadOnlySpan`1<Char>)'. at playback_reporting.Data.SqliteExtensions.TryBind(IStatement statement, String name, String value) at playback_reporting.Data.ActivityRepository.<>c__DisplayClass18_0.<AddPlaybackAction>b__0(IDatabaseConnection db) at SQLitePCL.pretty.DatabaseConnection.<>c__DisplayClass18_0.<RunInTransaction>b__0(IDatabaseConnection db) at SQLitePCL.pretty.DatabaseConnection.RunInTransaction[T](IDatabaseConnection This, Func`2 f, TransactionMode mode) at SQLitePCL.pretty.DatabaseConnection.RunInTransaction(IDatabaseConnection This, Action`1 action, TransactionMode mode) at playback_reporting.Data.ActivityRepository.AddPlaybackAction(PlaybackInfo play_info) at playback_reporting.EventMonitorEntryPoint.ProcessSessions() at playback_reporting.EventMonitorEntryPoint._sessionManager_PlaybackStart(Object sender, PlaybackProgressEventArgs e) at MediaBrowser.Common.Events.EventHelper.<>c__DisplayClass1_0`1.<QueueEventIfNotNull>b__0() Source: playback_reporting TargetSite: Void TryBind(SQLitePCL.pretty.IStatement, System.String, System.String) Link to comment Share on other sites More sharing options...
Albertax 12 Posted August 8, 2023 Share Posted August 8, 2023 25 minutes ago, CJTripper said: I noted the Playback Reporting plugin (v 2.1.0.1) seems to have some compatibility issues with the latest Emby Server beta (Windows Emby Server Beta 4.8.0.40). After the upgrade to 4.8.0.40 (and multiple reboots), the Activity Log on my Emby Dashboard screen no longer displayed playback events. I found some errors in my logs indicating Playback Reporting errors when a movie or show was played by a user. I deleted the playback_reporting.dll file from the plugins folder and restarted the server, my dashboard activity is correctly logging the playback events again. Here is a snip of the event log error generated during a playback start: 2023-08-07 21:02:40.675 Error SessionManager: Error in event handler *** Error Report *** Version: 4.8.0.40 Command line: C:\Users\User\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp Operating system: Microsoft Windows 10.0.22621 Framework: .NET 6.0.20 OS/Process: x64/x64 Runtime: C:/Users/User/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll Processor count: 20 Data path: C:\Users\User\AppData\Roaming\Emby-Server\programdata Application path: C:\Users\User\AppData\Roaming\Emby-Server\system System.MissingMethodException: System.MissingMethodException: Method not found: 'Void SQLitePCL.pretty.IBindParameter.Bind(System.ReadOnlySpan`1<Char>)'. at playback_reporting.Data.SqliteExtensions.TryBind(IStatement statement, String name, String value) at playback_reporting.Data.ActivityRepository.<>c__DisplayClass18_0.<AddPlaybackAction>b__0(IDatabaseConnection db) at SQLitePCL.pretty.DatabaseConnection.<>c__DisplayClass18_0.<RunInTransaction>b__0(IDatabaseConnection db) at SQLitePCL.pretty.DatabaseConnection.RunInTransaction[T](IDatabaseConnection This, Func`2 f, TransactionMode mode) at SQLitePCL.pretty.DatabaseConnection.RunInTransaction(IDatabaseConnection This, Action`1 action, TransactionMode mode) at playback_reporting.Data.ActivityRepository.AddPlaybackAction(PlaybackInfo play_info) at playback_reporting.EventMonitorEntryPoint.ProcessSessions() at playback_reporting.EventMonitorEntryPoint._sessionManager_PlaybackStart(Object sender, PlaybackProgressEventArgs e) at MediaBrowser.Common.Events.EventHelper.<>c__DisplayClass1_0`1.<QueueEventIfNotNull>b__0() Source: playback_reporting TargetSite: Void TryBind(SQLitePCL.pretty.IStatement, System.String, System.String) I had the same issues with 40, and ended up rolling back. Link to comment Share on other sites More sharing options...
TeamB 2355 Posted August 8, 2023 Author Share Posted August 8, 2023 thanks for reporting, i will look into it but probably not until the weekend Link to comment Share on other sites More sharing options...
Luke 37179 Posted August 9, 2023 Share Posted August 9, 2023 Resolved for next build. Thanks. Link to comment Share on other sites More sharing options...
TeamB 2355 Posted August 9, 2023 Author Share Posted August 9, 2023 1 hour ago, Luke said: Resolved for next build. Thanks. does this mean no changes need for the plugin? Link to comment Share on other sites More sharing options...
Luke 37179 Posted August 9, 2023 Share Posted August 9, 2023 23 minutes ago, TeamB said: does this mean no changes need for the plugin? Correct. Link to comment Share on other sites More sharing options...
TeamB 2355 Posted August 9, 2023 Author Share Posted August 9, 2023 I released a new version with an updated plugin sdk and a bunch of changes to the DB system anyway that would get it back up and running 5 Link to comment Share on other sites More sharing options...
CJTripper 9 Posted August 11, 2023 Share Posted August 11, 2023 On 8/9/2023 at 12:08 AM, TeamB said: I released a new version with an updated plugin sdk and a bunch of changes to the DB system anyway that would get it back up and running Thanks, I installed the updated Playback Reporting plugin v2.1.0.2, and it appears to have resolved the Dashboard Activity logging issues with Emby Server beta 4.8.0.40 (on Windows). @TeamB- I appreciate your quick work to resolve the issue! Link to comment Share on other sites More sharing options...
browneye253 2 Posted August 15, 2023 Share Posted August 15, 2023 I noticed someone else asking about a query to view content that hasn't been watched and that not being possible without joining with the main emby tables. Is that something plugins don't have access to? I like many others am losing access to a lot of storage and trying to find a way to cull out inactive content. Thanks. 1 Link to comment Share on other sites More sharing options...
TeamB 2355 Posted August 15, 2023 Author Share Posted August 15, 2023 1 hour ago, browneye253 said: I like many others am losing access to a lot of storage and trying to find a way to cull out inactive content. how are you losing access to storage? 1 hour ago, browneye253 said: I noticed someone else asking about a query to view content that hasn't been watched and that not being possible without joining with the main emby tables. Is that something plugins don't have access to? no, a plugin can not access the emby database tables directly to join against. A plugin does have access to the internal API to extract info about play status etc so something would be written but that is not playback reporting. playback reporting was designed to monitor what your users are doing not what they are not doing. Link to comment Share on other sites More sharing options...
browneye253 2 Posted August 15, 2023 Share Posted August 15, 2023 1 hour ago, TeamB said: how are you losing access to storage? I was using Google Workspaces for storage but they have pulled back their unlimited storage option so I'm looking for ways to shrink my library. 1 Link to comment Share on other sites More sharing options...
seanbuff 842 Posted August 15, 2023 Share Posted August 15, 2023 3 hours ago, browneye253 said: I noticed someone else asking about a query to view content that hasn't been watched 1 hour ago, TeamB said: playback reporting was designed to monitor what your users are doing not what they are not doing. In saying that, if I am understanding the ask correctly - you can kinda use Playback Reporting to view items that haven't been watched by anyone. You can use the 'Played' tab in the plugin, select the movie/show, and see if it has or hasn't ever been watched. But yeah, it will be a pretty manual task to go through each item Link to comment Share on other sites More sharing options...
browneye253 2 Posted August 16, 2023 Share Posted August 16, 2023 I found that.. Movies wouldn't be too bad but TV was going to be a nightmare because it didn't show at the show level you had to drill down to the episode level. If that same view would show the users when I clicked the show level I could work with that for now. Link to comment Share on other sites More sharing options...
TeamB 2355 Posted August 16, 2023 Author Share Posted August 16, 2023 (edited) 9 minutes ago, browneye253 said: I found that.. Movies wouldn't be too bad but TV was going to be a nightmare because it didn't show at the show level you had to drill down to the episode level. If that same view would show the users when I clicked the show level I could work with that for now. it should show you counts at a TV Show level I think what you really want is a query that can tell you the most unplayed, i.e. you might have a TV Show with one one or two users that rewatch it regularly but it is still used a lot and you might want to keep that. The above will not tell you that. Edited August 16, 2023 by TeamB Link to comment Share on other sites More sharing options...
browneye253 2 Posted August 16, 2023 Share Posted August 16, 2023 @TeamBAwww.. I totally missed that it was an episode watched / total episode count. I caught the icon changing to green and expected to see that if they had watched. Looks like it's green if they've watched all episodes. Would love it if it was orange or some other color when it's a partial watch or if you wanted to get super fancy and change color on the percentage of total watched. Blue < 25% Orange < 75% Yellow < 100% Green = 100% So now... if I change the "Keep Data" to a year or two or forever with say 25 users would I be pushing anything database-wise or performance? Really appreciate the feedback and help. Link to comment Share on other sites More sharing options...
TeamB 2355 Posted August 16, 2023 Author Share Posted August 16, 2023 the watched states are directly from the emby db you dont need to change the keep data for as this data comes from the Emby main DB not the playback reporting DB. 1 Link to comment Share on other sites More sharing options...
browneye253 2 Posted August 16, 2023 Share Posted August 16, 2023 Excellent to hear... I was worried my Playback data was only a few months and it wouldn't be a real reflection of what my users have watched. If I'm understanding correctly if I look at TV show "X" it would be showing anybody over the life of the server that has watched the show? Link to comment Share on other sites More sharing options...
TeamB 2355 Posted August 16, 2023 Author Share Posted August 16, 2023 16 minutes ago, browneye253 said: Excellent to hear... I was worried my Playback data was only a few months and it wouldn't be a real reflection of what my users have watched. If I'm understanding correctly if I look at TV show "X" it would be showing anybody over the life of the server that has watched the show? yes correct, it uses play stats from emby so if that user has that item marked as watched in emby then that is what it is using in this report Link to comment Share on other sites More sharing options...
dual-o 19 Posted August 16, 2023 Share Posted August 16, 2023 On 8/9/2023 at 8:08 AM, TeamB said: I released a new version with an updated plugin sdk and a bunch of changes to the DB system anyway that would get it back up and running I have the memory leak issue since the update to 2.0.0.4 too. It was also reported here: On 8/14/2023 at 9:57 AM, Tux7501 said: Disregard my previous comment. It seems it quickly grew to 6GB but after 6-8 hours it’s still at 6GB which is fine. Not sure why the Playback Reporting plugin was causing this issue. Hopefully it’s fixed in future releases Do you need a github issue? @TeamB Link to comment Share on other sites More sharing options...
TeamB 2355 Posted August 16, 2023 Author Share Posted August 16, 2023 21 minutes ago, dual-o said: I have the memory leak issue since the update to 2.0.0.4 too. It was also reported here: Do you need a github issue? @TeamB what server version? Link to comment Share on other sites More sharing options...
TeamB 2355 Posted August 16, 2023 Author Share Posted August 16, 2023 I rolled back some changes I recently made to the DB code. It was just code clean up and I dont know if or why this was causing issues but for now rolling back. New Version 2.0.0.5 1 1 Link to comment Share on other sites More sharing options...
DoBoY1 5 Posted August 17, 2023 Share Posted August 17, 2023 13 hours ago, dual-o said: I have the memory leak issue since the update to 2.0.0.4 too. It was also reported here: Do you need a github issue? @TeamB I just wanted to confirm I also had the memory leak issue. Was causing my docker in unraid to crash at midnight during the scheduled job i guess? I un-installed the plugin and no more crashing. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now