Jump to content

New Statistics plugin


reggi

Recommended Posts

PenkethBoy

@@reggi Just ran it again after a reboot of emby server(stable)

 

 

2017-03-21 19:14:07.4991 Info TaskManager: Executing Calculate statistics for all users
2017-03-21 19:14:07.5147 Info HttpServer: HTTP GET http://192.168.1.52:8096/emby/ScheduledTasks?isHidden=false. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36
2017-03-21 19:14:07.5147 Info HttpServer: HTTP Response 200 to 192.168.1.11. Time: 0ms. http://192.168.1.52:8096/emby/ScheduledTasks?isHidden=false
2017-03-21 19:14:08.7023 Info HttpClient: HttpClientManager GET: https://thetvdb.com/api/Updates.php?type=all&time=1490110537
2017-03-21 19:14:09.4993 Info HttpClient: HttpClientManager GET: https://www.thetvdb.com/api/3B9470F2306003B8/series/266189/all/en.zip
2017-03-21 19:14:10.3900 Info HttpClient: HttpClientManager GET: https://www.thetvdb.com/api/3B9470F2306003B8/series/283468/all/en.zip
2017-03-21 19:14:11.2495 Info HttpClient: HttpClientManager GET: https://www.thetvdb.com/api/3B9470F2306003B8/series/77544/all/en.zip
2017-03-21 19:14:12.2808 Info HttpClient: HttpClientManager GET: https://www.thetvdb.com/api/3B9470F2306003B8/series/121361/all/en.zip
2017-03-21 19:14:13.0622 Info HttpClient: HttpClientManager GET: https://thetvdb.com/api/Updates.php?type=none
2017-03-21 19:14:55.3010 Error TaskManager: Error
*** Error Report ***
Version: 3.2.7.0
Command line: C:\Users\TimSkull\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe
Operating system: Microsoft Windows NT 6.2.9200.0
64-Bit OS: True
64-Bit Process: True
Processor count: 8
Program data path: C:\Users\TimSkull\AppData\Roaming\Emby-Server
Application directory: C:\Users\TimSkull\AppData\Roaming\Emby-Server\System
System.InvalidOperationException: Nullable object must have a value.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Nullable`1.get_Value()
at Statistics.Helpers.Calculator.CalculateOldestMovie()
at Statistics.ScheduledTasks.CalculateStatsTask.d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Emby.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.d__68.MoveNext()
System.InvalidOperationException
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Nullable`1.get_Value()
at Statistics.Helpers.Calculator.CalculateOldestMovie()
at Statistics.ScheduledTasks.CalculateStatsTask.d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Emby.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.d__68.MoveNext()

2017-03-21 19:14:55.3010 Info TaskManager: Calculate statistics for all users Failed after 0 minute(s) and 47 seconds
2017-03-21 19:14:55.3479 Info ServerManager: Sending web socket message NotificationAdded
2017-03-21 19:14:55.3479 Info ServerManager: Sending web socket message ScheduledTaskEnded
2017-03-21 19:14:55.3479 Info TaskManager: ExecuteQueuedTasks

 

 

by the way the null object error is what the dashboard notification says

Link to comment
Share on other sites

PenkethBoy

age range by 

 

1) movie release date

2) movie added date

 

not stats but interesting :)

Link to comment
Share on other sites

reggi

Thanks for the log, seems that your calculations for oldest movie is crashing.

I'll take a look and make a new version for it to fix it

Link to comment
Share on other sites

PenkethBoy

@@reggi

 

Ok had a look and i had a test movie that (in separate library) was not recognised by emby

 

did an identify and it now has metadata and the plugin is working

 

but i have no general statistics on the first page just a circle of death

  • Like 1
Link to comment
Share on other sites

PenkethBoy

i have them now just re ran it again :)

 

think it was finger trouble by me :)

Link to comment
Share on other sites

reggi

hahaha, thanks for the update!!

 

I will check why it is failing anyway because it shouldn't do that.

Link to comment
Share on other sites

reggi

I did a quick update locally on the plugin. 

I'll post a plugin update tomorrow with the new stats included.

 

58d19a87c50a2_Screenshot_2.png

  • Like 2
Link to comment
Share on other sites

Tolotos

With the newest version 0.0.10.0 i get the following exception:

 

2017-03-21 22:27:49.4533 Error TaskManager: Error
*** Error Report ***
Version: 3.2.7.0
Command line: C:\Users\RGu\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service
Operating system: Microsoft Windows NT 6.2.9200.0
64-Bit OS: True
64-Bit Process: True
Processor count: 8
Program data path: C:\Users\RGu\AppData\Roaming\MediaBrowser-Server
Application directory: C:\Users\RGu\AppData\Roaming\MediaBrowser-Server\system
System.InvalidOperationException: Das Objekt mit Nullwert muss einen Wert haben.
  bei System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
  bei System.Nullable`1.get_Value()
  bei Statistics.Helpers.Calculator.CalculateOldestMovie()
  bei Statistics.ScheduledTasks.CalculateStatsTask.<Execute>d__12.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
  bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  bei Emby.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__68.MoveNext()
System.InvalidOperationException
  bei System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
  bei System.Nullable`1.get_Value()
  bei Statistics.Helpers.Calculator.CalculateOldestMovie()
  bei Statistics.ScheduledTasks.CalculateStatsTask.<Execute>d__12.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
  bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  bei Emby.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__68.MoveNext()
 
2017-03-21 22:27:49.4533 Info TaskManager: Calculate statistics for all users Failed after 0 minute(s) and 7 seconds
  • Like 1
Link to comment
Share on other sites

reggi

@@Tolotos

 

Thanks for reporting it. It's the same error as @@PenkethBoy got. It looks like it is crashing when you have a movie not yet included in your library.

I'm working on a fix at the moment and will upload 0.0.10.1 as soon as I can!

 

As a fix, try running the media scan task first.

Edited by reggi
Link to comment
Share on other sites

PenkethBoy

I did a quick update locally on the plugin. 

I'll post a plugin update tomorrow with the new stats included.

 

58d19a87c50a2_Screenshot_2.png

60 years and old..... :)

Link to comment
Share on other sites

Happy2Play

Unless this is updated in 0.0.10.1 the order needs updated (years then months) or just full years.

 

58d1a57891a45_oldest.jpg

Edited by Happy2Play
Link to comment
Share on other sites

Happy2Play

Not sure where this last seen date issue would come from. (a alternate test user)

 

58d1a65f2d7fa_lastseen.jpg

Edited by Happy2Play
Link to comment
Share on other sites

Diedrich

 

 

it depends what its trying to show - if its oldest (added) vs latest (Added) or is it based on release date of the movie

My intent of the feature request was for the release date. i.e. Snow White (1937) [Earliest], Underworld (2017) [Latest]
Link to comment
Share on other sites

Diedrich

I did a quick update locally on the plugin.

I'll post a plugin update tomorrow with the new stats included.

 

58d19a87c50a2_Screenshot_2.png

In your screenshot, notice that it left out the days (or months... I'm not sure what is missing).

 

You could also say "ago" - 60 years, 3 months ago

 

Using 'ago' also sounds better with newer content "92 days ago". Just my opinion. It's your code, brother. You make it how you want.

Link to comment
Share on other sites

Diedrich

v0.0.10.0 looks great! I wonder if the Views graph should have 'major' lines across the x-axis?

 

Statistics requests:

  • Most expensive movie to film (costliest) (I don't know if this is tracked by Emby or if you can pull it from another source. This will be the question for some of my requests.)
  • Movie with the largest box office revenue - Global, ??by country??
  • Number of box office tickets sold
  • Number of movies filmed per country (India, Canada, U.S., France, etc.)
  • Largest grossing box office weekend... example:

58d1d6744148f_chartoftheday_7268_the_big

  • Number of movies per Parental Rating (G,PG, NC-17, R, etc...)
  • Highest rated movie (IMDB, TheMovieDB or whatever Emby uses)
  • Number of movies per rating (5's, 6's, 7's, 8's, etc...)
  • Bar graph of movies per year (unfortunately the Emby Reports page does not include Collections but here's a quick example that I created in Excel.)

58d1df3c5a52b_MoviesByYear.png

Link to comment
Share on other sites

reggi

Wow, lots of feedback after a night for me :)

 

Thanks guys!!

 

@@PenkethBoy

"60 years and old" is a bug, it removes the day portion when days == 0, I'll have to fix that!

 

@@Happy2Play

1/1/0001 is the Mindate in .NET. Maybe in your db there are some lastplayed dates set on 1/1/0001, can you check that for me?

 

@

Well, since my native language is Dutch and my English is not that good I will follow your advice about how to write English ;)

 

Thanks for all the requests as well, I'll put them in my backlog and see what I can do. As for the graphs, my d3js skills are only at beginners level. So if someone knows/is a d3js ninja let me know!!

Since there is a big difference in Series and Movies stats I think I will make some separation as well in the general stat page.

 

 

Ow, and my colleague who is a CSS developer is helping me out with the mobile styling stuff. So there will be an update for that as well in the near future

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

Tolotos

@@Tolotos

 

Thanks for reporting it. It's the same error as @@PenkethBoy got. It looks like it is crashing when you have a movie not yet included in your library.

I'm working on a fix at the moment and will upload 0.0.10.1 as soon as I can!

 

As a fix, try running the media scan task first.

 

I started the library scan - no new movie/tv-show detected, but still the same error.

Link to comment
Share on other sites

Diedrich

A few versions back I had to delete the plugin, stop Emby, copy the dll and start Emby to get it to work.

Link to comment
Share on other sites

Diedrich

Ah! You know what would be awesome?! A six degrees of separation chart!

 

Movies would be connected by lines connecting an actor to another by a third actor who worked with the first. Here's an example

 

http://bl.ocks.org/paulovn/9686202

 

Or maybe it would be something more like this

https://bl.ocks.org/mbostock/4063550

Where you input the anchor actor and then input the 6th degree actor to show the relationship separation tree.

 

I'm getting my ideas from here https://github.com/d3/d3/wiki/Gallery

Edited by dvgmar
Link to comment
Share on other sites

reggi

@@Tolotos

 

I'll look into it in more detail, you can always downgrade one version if that one still works. Sorry I can't give you a quick fix version since I haven't found the time yet to search for the problem.

 

@

 

Thanks for the fancy graph ideas! :D When I can get a simple bar chart working I can look into some more fancy stuff.

Link to comment
Share on other sites

reggi

That's maybe a better idea.

I can remove the graph for now and fix all logged bugs and issues first.

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