Jump to content

New Statistics plugin


reggi

Recommended Posts

our user data database is currently designed to hold current playstate of library items. it's not really intended to provide a history, although it's something that could be added.

Link to comment
Share on other sites

If they are reporting correctly by only sending start and stop events based on user playback starting/stopping, then playcount shouldn't be artificially incremented. if they're not then yes that would happen.

So adjusting the stream via fastfwd/rewind shouldnt send a start event? It is the start event that increments that play count. So apps should only report the initial start and last stop? Just trying to see how we should handle this.

 

If m.lastposition = 0 then m.reportplayback("start")

 

Okay, fixed this on roku now. Manually adjusting the stream via rewind/fastfwd will not influence the playcount now. If lastposition is 0 the video is newly started.

 

Trying to help this plugin work correctly with the roku, and other apps regarding playcount honesty. This post isnt off-topic, persay.

Edited by speechles
Link to comment
Share on other sites

our user data database is currently designed to hold current playstate of library items. it's not really intended to provide a history, although it's something that could be added.

 

I think that would really help in gauging how busy the server is.

Link to comment
Share on other sites

@@reggi

 

How about statistics on which platform and which app was used to play things with? So you can see android was used to play 19 things. The emby androidTV app played 17 of them. The emby android app played 2. So you can see how you and users of your server consume their media, not just when.

 

Sent from my Nexus 7 using Tapatalk

Edited by speechles
  • Like 2
Link to comment
Share on other sites

Actually I forgot there is the activity log that is on the front page of the server dashboard so you can just query that interface.

Link to comment
Share on other sites

@@reggi

 

How about statistics on which platform and which app was used to play things with? So you can see android was used to play 19 things. The emby androidTV app played 17 of them. The emby android app played 2. So you can see how you and users of your server consume their media, not just when.

 

Sent from my Nexus 7 using Tapatalk

 

Good idea, i'll try to include that in the next release :)

 

Actually I forgot there is the activity log that is on the front page of the server dashboard so you can just query that interface.

 

Good idea, but when there is a "... stopped played" activity, doesn't that just mean the playcount is increased by one?

If so, I just can keep using the playcount instead of looping over the activity log. Or am I wrong? 

Link to comment
Share on other sites

@@reggi No, it is the "started" activity which increases it. This is how the server works, so everytime you see "started" in the recent activity would increase the playcount. The roku app had a bug where fastfwd/rewind was causing multiple start reporting which was incorrectly increasing playcount. This is how I know starts increases playcount, as multiple stops do not. So if you want to match accurate playcounts to server activity use "started".

 

Also the platform/app details would also look cool as a pie chart. Then you can see which platform and app has been getting the biggest slice of the pie.

 

Sent from my Nexus 7 using Tapatalk

Edited by speechles
Link to comment
Share on other sites

@@reggi No, it is the "started" activity which increases it. This is how the server works, so everytime you see "started" in the recent activity would increase the playcount. The roku app had a bug where fastfwd/rewind was causing multiple start reporting which was incorrectly increasing playcount. This is how I know starts increases playcount, as multiple stops do not. So if you want to match accurate playcounts to server activity use "started".

 

Also the platform/app details would also look cool as a pie chart. Then you can see which platform and app has been getting the biggest slice of the pie.

 

Sent from my Nexus 7 using Tapatalk

 

Is resumed not a "started" ??

 

Or is that handled differently ??

Link to comment
Share on other sites

Resume is a started yeah. So resume will still count as a 2nd playcount. But resume after fastfwd & rewind or pause & unpause isnt if you havent left the video player.

 

Sent from my Nexus 7 using Tapatalk

Edited by speechles
Link to comment
Share on other sites

To all developers around

 

Is there an interface so I can collect all played dates of a certain BaseItem object (or Movie and Episode)?

I can only find the playCount and LastPlayedDate with the IUserDataManager.GetUserData(User, BaseItem) function but not all played dates. If a user watched a movie yesterday and the same movie today I will need the two dates to make my graphs correct.

 

Maybe a solution is looping over all ActivityLogs and check all "Started" logs. But I don't really like that (too much processing power for looping over all logs)

Link to comment
Share on other sites

our user data database is currently designed to hold current playstate of library items. it's not really intended to provide a history, although it's something that could be added.

Link to comment
Share on other sites

the IActivityManager though has more events. look at the regular activity log in emby reports.

Link to comment
Share on other sites

Hi,

 

I made a new update for the plugin

 

Changelog

 

- Added "all users" to dropdown

- Changed graphs layout

- "Views per ..." has 3 different styles (12 months, 20 weeks, 7 days) 

- Fixed some javascript bugs

- Fixed statistics calculations

 

I looked into the request about a Pie chart per used Devices/OS. Still working on it.

I'm thinking about moving the "Top xxx genres" to 2 different Pie charts aswell as the "Top movie years" statistic.

 

When you select the 12 months option but you haven't watched anything in 2015 then the chart will start from January 2016 instead of going all the way 12 months back showing just empty bars.

Also with the "Views per day of the week" graph, If you haven't watched anything on Sunday yet there will be only 6 bars in the chart. I'm searching for a way to fix this!

 

 

57533e4a3a21a_Screenshot_5.png

 

Issues/thoughts are always welcome :)

Statistics 0.0.2.zip

Edited by reggi
  • Like 5
Link to comment
Share on other sites

  • 3 weeks later...

Oh wow, I love this.

This should be native in Emby TBH, plus you made it very easy to use for us noobs!

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...
  • 1 month later...

Yes a new version will be required. I will offer to update it if the plugin is open source.

 

Reggi has not been online since June.  Any chance that we can get a FR in for something similar?

 

This plugin was a great way to understand what my kids are watching, etc.

 

Thanks!

Link to comment
Share on other sites

I sent him a PM inquiring about the source code so hopefully he will respond and then I can quickly get that back up and running.

Link to comment
Share on other sites

Hi guys, 

 

First of all thanks for the interest in my plugin. Even if it is still in a very Alpha version.

After a long visit in the hospital I'm starting to get back on my feet. So that's why I didn't respond or updated the plugin lately. 

 

I'm in contact with Luke to make the code open source and I will try to start updating the plugin more and more in the future.

  • Like 6
Link to comment
Share on other sites

Hi everyone,

 

I made a new update for the plugin so that it will work again in the current last stable version of Emby (3.1.2.0)

Nothing new is added to the plugin, just fixed some lib calls.

 

I also made a public repo on github with the code, you can find it here:

https://github.com/mregni/statistics-for-emby-server 

 

I still have to do a LOT of refactoring!! I will try to do this before added new stats.

 

 

Issues/thoughts are always welcome :) 

Statistics 0.0.3.zip

Edited by reggi
  • Like 5
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...