Jump to content

New Statistics plugin


reggi

Recommended Posts

bolderbast

Thanks @@Luke.

 

I am fully aware that running the latest and greatest comes with risks of (minor) breakage. The way I see it, is that I can help devs by reporting any issues in an early stage. I suppose at some point you will also be moving to the newer version?

 

You refer to it as a defect in the newer ".net core runtime". Is there a bugreport for it, and do you have a link to it? Then maybe I can subscribe/upvote, and help get it resolved.

Again, thanks for your reply!

Link to comment
Share on other sites

Thanks @@Luke.

 

I am fully aware that running the latest and greatest comes with risks of (minor) breakage. The way I see it, is that I can help devs by reporting any issues in an early stage. I suppose at some point you will also be moving to the newer version?

 

You refer to it as a defect in the newer ".net core runtime". Is there a bugreport for it, and do you have a link to it? Then maybe I can subscribe/upvote, and help get it resolved.

Again, thanks for your reply!

 

Thank you for the help. We do not have a bug report yet because we only made this determination two days ago. In the coming days we will test a nightly build to see if it has already been resolved. If not then we'll file a bug report. But even that takes a little time because we have to be able to prove in standalone fashion that there is a defect. Otherwise they may not even look at it, and/or I'll look like I don't know what I'm doing. So hopefully a nightly build will have already resolved it otherwise i will have to write a test application to demonstrate it.

  • Like 1
Link to comment
Share on other sites

Okay it runs a lot longer now but after 3 minutes it fails with a new error:

2017-12-13 19:28:52.929 Error TaskManager: Error
    *** Error Report ***
    Version: 3.2.50.5
    Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -restartpath /usr/lib/emby-server/restart.sh
    Operating system: Unix 3.14.79.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: False
    Mono: 4.8.1 (Stable 4.8.1.0/22a39d7 Tue May 2 23:01:00 UTC 2017)
    Processor count: 4
    Program data path: /var/lib/emby-server
    Application directory: /usr/lib/emby-server/bin
    System.InvalidOperationException: Sequence contains no elements
     at System.Linq.Enumerable.Aggregate[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`3[T1,T2,TResult] func) [0x00039] in <2392cff65f724abaaed9de072f62bc4a>:0
     at Statistics.Helpers.Calculator.CalculateNewestAddedMovie () [0x0004e] in <591fb3c002924c30a49ce3a64f6a7408>:0
     at Statistics.ScheduledTasks.CalculateStatsTask+<MediaBrowser-Model-Tasks-IScheduledTask-Execute>d__20.MoveNext () [0x00328] in <591fb3c002924c30a49ce3a64f6a7408>:0
    --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker+<ExecuteInternal>c__async2.MoveNext () [0x0019c] in <559a7a0820074d71aeeb7e2707584cf4>:0
    System.InvalidOperationException
     at System.Linq.Enumerable.Aggregate[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`3[T1,T2,TResult] func) [0x00039] in <2392cff65f724abaaed9de072f62bc4a>:0
     at Statistics.Helpers.Calculator.CalculateNewestAddedMovie () [0x0004e] in <591fb3c002924c30a49ce3a64f6a7408>:0
     at Statistics.ScheduledTasks.CalculateStatsTask+<MediaBrowser-Model-Tasks-IScheduledTask-Execute>d__20.MoveNext () [0x00328] in <591fb3c002924c30a49ce3a64f6a7408>:0
    --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker+<ExecuteInternal>c__async2.MoveNext () [0x0019c] in <559a7a0820074d71aeeb7e2707584cf4>:0
    
Link to comment
Share on other sites

Happy2Play

 

Okay it runs a lot longer now but after 3 minutes it fails with a new error:

2017-12-13 19:28:52.929 Error TaskManager: Error
    *** Error Report ***
    Version: 3.2.50.5
    Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -restartpath /usr/lib/emby-server/restart.sh
    Operating system: Unix 3.14.79.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: False
    Mono: 4.8.1 (Stable 4.8.1.0/22a39d7 Tue May 2 23:01:00 UTC 2017)
    Processor count: 4
    Program data path: /var/lib/emby-server
    Application directory: /usr/lib/emby-server/bin
    System.InvalidOperationException: Sequence contains no elements
     at System.Linq.Enumerable.Aggregate[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`3[T1,T2,TResult] func) [0x00039] in <2392cff65f724abaaed9de072f62bc4a>:0
     at Statistics.Helpers.Calculator.CalculateNewestAddedMovie () [0x0004e] in <591fb3c002924c30a49ce3a64f6a7408>:0
     at Statistics.ScheduledTasks.CalculateStatsTask+<MediaBrowser-Model-Tasks-IScheduledTask-Execute>d__20.MoveNext () [0x00328] in <591fb3c002924c30a49ce3a64f6a7408>:0
    --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker+<ExecuteInternal>c__async2.MoveNext () [0x0019c] in <559a7a0820074d71aeeb7e2707584cf4>:0
    System.InvalidOperationException
     at System.Linq.Enumerable.Aggregate[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`3[T1,T2,TResult] func) [0x00039] in <2392cff65f724abaaed9de072f62bc4a>:0
     at Statistics.Helpers.Calculator.CalculateNewestAddedMovie () [0x0004e] in <591fb3c002924c30a49ce3a64f6a7408>:0
     at Statistics.ScheduledTasks.CalculateStatsTask+<MediaBrowser-Model-Tasks-IScheduledTask-Execute>d__20.MoveNext () [0x00328] in <591fb3c002924c30a49ce3a64f6a7408>:0
    --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker+<ExecuteInternal>c__async2.MoveNext () [0x0019c] in <559a7a0820074d71aeeb7e2707584cf4>:0
    

 

I don't know the non Windows versions, but are you running Mono or Net Core

Edited by Happy2Play
Link to comment
Share on other sites

That is because all your movies and episodes have a createdDate of 1/1/0001 00:00:00 and I remove them before calculation the newest added episode.

 

@@Luke

Any idea why @@Kiina episodes and movies all have a CreatedDate of DateTime.MinValue? 

I perform the following query: 

 

var movies = GetAllMovies().Where(x => x.DateCreated != DateTime.MinValue).ToList();
if (movies.Any())
{ 
    ...

When I filter out the MinValue's the list is empty.

Link to comment
Share on other sites

  • 2 weeks later...
sscheib

Hello,

 

I have the following issue:

Last time the background calculation task ran it got an error from the TVDB API so no calculations could be made for the show progress. This is mostly because the TVDB server gave a 500 response. 

You have to run the task again, if the problem persists wait a bit longer before running the task again.

 

 

I tried to run scheduled task a couple of times over the last few weeks - never got sucessful.

 

 

// EDIT:

This error happens when i press "View user-based show progress"

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

PenkethBoy

Hi @@reggi

 

hope you are enjoying the holidays 

 

Luke has updated some things in 60.3 released a bit earlier and unfortunately as he predicted plugins need a tweak

 

error from my log when trying to run the plugin

2017-12-26 22:49:25.947 Info TaskManager: Executing Calculate statistics for all users
2017-12-26 22:49:25.951 Info HttpServer: HTTP GET http://192.168.1.80:9096/emby/ScheduledTasks?isHidden=false. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
2017-12-26 22:49:25.953 Info HttpServer: HTTP Response 200 to 192.168.1.56. Time: 2ms. http://192.168.1.80:9096/emby/ScheduledTasks?isHidden=false 
2017-12-26 22:49:26.017 Info HttpClient: GET: https://thetvdb.com/api/Updates.php?type=all&time=1514304286
2017-12-26 22:49:26.804 Info HttpClient: GET: https://thetvdb.com/api/Updates.php?type=none
2017-12-26 22:49:28.006 Error TaskManager: Error
	*** Error Report ***
	Version: 3.2.60.3
	Command line: D:\Emby-Beta\system\EmbyServer.dll D:\Emby-Beta\system\EmbyServer.dll D:\Emby-Beta\system\EmbyServer.dll D:\Emby-Beta\system\EmbyServer.dll D:\Emby-Beta\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows NT 6.2.9200.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Processor count: 8
	Program data path: D:\Emby-Beta
	Application directory: D:\Emby-Beta\system
	System.MissingMethodException: Method not found: 'MediaBrowser.Controller.Entities.UserItemData MediaBrowser.Controller.Library.IUserDataManager.GetUserData(MediaBrowser.Controller.Entities.IHasUserData, MediaBrowser.Controller.Entities.IHasUserData)'.
	   at Statistics.Helpers.Calculator.<CalculateLastSeenMovies>b__5_0(Movie m)
	   at System.Linq.EnumerableSorter`2.ComputeKeys(TElement[] elements, Int32 count)
	   at System.Linq.EnumerableSorter`1.ComputeMap(TElement[] elements, Int32 count)
	   at System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count, Int32 minIdx, Int32 maxIdx)
	   at System.Linq.OrderedEnumerable`1.ToList(Int32 minIdx, Int32 maxIdx)
	   at System.Linq.OrderedPartition`1.ToList()
	   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
	   at Statistics.Helpers.Calculator.CalculateLastSeenMovies()
	   at Statistics.ScheduledTasks.CalculateStatsTask.<>c__DisplayClass20_1.<MediaBrowser.Model.Tasks.IScheduledTask.Execute>b__0()
	   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
	   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Statistics.ScheduledTasks.CalculateStatsTask.<MediaBrowser-Model-Tasks-IScheduledTask-Execute>d__20.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__68.MoveNext()
	System.MissingMethodException
	   at Statistics.Helpers.Calculator.<CalculateLastSeenMovies>b__5_0(Movie m)
	   at System.Linq.EnumerableSorter`2.ComputeKeys(TElement[] elements, Int32 count)
	   at System.Linq.EnumerableSorter`1.ComputeMap(TElement[] elements, Int32 count)
	   at System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count, Int32 minIdx, Int32 maxIdx)
	   at System.Linq.OrderedEnumerable`1.ToList(Int32 minIdx, Int32 maxIdx)
	   at System.Linq.OrderedPartition`1.ToList()
	   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
	   at Statistics.Helpers.Calculator.CalculateLastSeenMovies()
	   at Statistics.ScheduledTasks.CalculateStatsTask.<>c__DisplayClass20_1.<MediaBrowser.Model.Tasks.IScheduledTask.Execute>b__0()
	   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
	   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Statistics.ScheduledTasks.CalculateStatsTask.<MediaBrowser-Model-Tasks-IScheduledTask-Execute>d__20.MoveNext()
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
	   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
	   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__68.MoveNext()
	
2017-12-26 22:49:28.006 Info TaskManager: Calculate statistics for all users Failed after 0 minute(s) and 2 seconds
2017-12-26 22:49:28.045 Info ServerManager: Sending web socket message NotificationAdded
2017-12-26 22:49:28.046 Info ServerManager: Sending web socket message ScheduledTaskEnded 

No rush for me - when you get the time to fix

 

Now where did i put my whiskey  :P

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

Where the heck is the plugin folder in a macOS installation? 

 

Do you really need access to the plugin folder?

Link to comment
Share on other sites

jrcorwin

Do you really need access to the plugin folder?

 

Probably not. :) Hoping to try this plugin. Trying to make sure I am not missing any files from scanning in my content. 

 

Edit: Crap...sorry. I didn't realize it was already in the catalog. I thought it was a manual install. Sorry about that. I should have looked a bit deeper and read more before posting. 

Edited by jrcorwin
Link to comment
Share on other sites

jscoys

Hello @@reggi, we’ve got this error with server 3.2.60.3 beta and plugin version 2.0.2.0:

 

« Calculate statistics for all users failed.: Method not found: 'MediaBrowser.Controller.Entities.UserItemData MediaBrowser.Controller.Library.IUserDataManager.GetUserData(MediaBrowser.Controller.Entities.IHasUserData, MediaBrowser.Controller.Entities.IHasUserData)'. »

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

jscoys

Hello @@reggi, we’ve got this error with server 3.2.60.3 beta and plugin version 2.0.2.0:

 

« Calculate statistics for all users failed.: Method not found: 'MediaBrowser.Controller.Entities.UserItemData MediaBrowser.Controller.Library.IUserDataManager.GetUserData(MediaBrowser.Controller.Entities.IHasUserData, MediaBrowser.Controller.Entities.IHasUserData)'. »

 

 

Sent from my iPhone using Tapatalk

News on it? It’s throwing an error every nights...

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Good day,

 

I uninstall it, till reggi update the plugin, I am sure when he have time he will post about it.

 

My best

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