Jump to content

New Statistics plugin


Recommended Posts

PenkethBoy
Posted

@@reggi

 

Hi

 

Sorry to say but Luke has changed something in the latest beta server (1.9) - and the scheduled task for your plugin will not load

2018-05-27 22:34:36.739 Error App: Error creating Statistics.ScheduledTasks.CalculateStatsTask
	*** Error Report ***
	Version: 3.4.1.9
	Command line: 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.TypeLoadException: Could not load type 'MediaBrowser.Model.IO.IMemoryStreamFactory' from assembly 'MediaBrowser.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
	   at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
	   at System.Reflection.RuntimeConstructorInfo.get_Signature()
	   at System.Reflection.RuntimeConstructorInfo.GetParametersNoCopy()
	   at System.Reflection.RuntimeConstructorInfo.GetParameters()
	   at SimpleInjector.Advanced.AdvancedExtensions.Verify(IDependencyInjectionBehavior behavior, ConstructorInfo constructor)
	   at SimpleInjector.ContainerOptions.IsConstructableType(Type implementationType, String& errorMessage)
	   at SimpleInjector.Container.TryBuildInstanceProducerForConcreteUnregisteredType(Type type, InjectionConsumerInfo context)
	   at SimpleInjector.Container.GetInstanceProducerForType(Type serviceType, InjectionConsumerInfo consumer, Func`1 buildInstanceProducer)
	   at SimpleInjector.Container.GetInstanceForRootType(Type serviceType)
	   at SimpleInjector.Container.GetInstance(Type serviceType)
	   at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Tuple`2 typeInfo)
	System.TypeLoadException
	   at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
	   at System.Reflection.RuntimeConstructorInfo.get_Signature()
	   at System.Reflection.RuntimeConstructorInfo.GetParametersNoCopy()
	   at System.Reflection.RuntimeConstructorInfo.GetParameters()
	   at SimpleInjector.Advanced.AdvancedExtensions.Verify(IDependencyInjectionBehavior behavior, ConstructorInfo constructor)
	   at SimpleInjector.ContainerOptions.IsConstructableType(Type implementationType, String& errorMessage)
	   at SimpleInjector.Container.TryBuildInstanceProducerForConcreteUnregisteredType(Type type, InjectionConsumerInfo context)
	   at SimpleInjector.Container.GetInstanceProducerForType(Type serviceType, InjectionConsumerInfo consumer, Func`1 buildInstanceProducer)
	   at SimpleInjector.Container.GetInstanceForRootType(Type serviceType)
	   at SimpleInjector.Container.GetInstance(Type serviceType)
	   at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Tuple`2 typeInfo)
Happy2Play
Posted (edited)

@@reggi

 

Hi

 

Sorry to say but Luke has changed something in the latest beta server (1.9) - and the scheduled task for your plugin will not load

Actually change was in v3.4.1.3 as shown above(#748). But with the other project I didn't see this getting this fixed any time soon.

Edited by Happy2Play
Posted

It's probably an easy fix if he wants to update the plugin. @@reggi if you want to invite me to the source code repo I can make the change and then you can just publish to the catalog.

PenkethBoy
Posted

Actually change was in v3.4.1.3 as shown above(#748). But with the other project I didn't see this getting this fixed any time soon.

nope this is a new error specific to 1.9 nothing to do with 1.3

Happy2Play
Posted (edited)

nope this is a new error specific to 1.9 nothing to do with 1.3

Exact error I posted above and plugin hasn't worked since then as Emby can no longer create the Scheduled Task. At least on my test machines. Edited by Happy2Play
PenkethBoy
Posted

Exact error I posted above and plugin hasn't worked since then as Emby can no longer create the Scheduled Task.

Sorry Happy the plugin has been working for the last 5-6 server updates - this error only appears on 1.9 for me and worked fine on 1.8

Happy2Play
Posted (edited)

Sorry Happy the plugin has been working for the last 5-6 server updates - this error only appears on 1.9 for me and worked fine on 1.8

Hmm your lucky as I have had that error since 3.4.1.3. Edited by Happy2Play
Posted

@@Luke

I send you a PM with the GitHub access. I tried to look at the error without any luck really. Thanks for the help!

  • Like 1
Posted

HI everyone, 

 

I just updated the plugin again to version 2.0.5.0 with min Emby version of 3.4.1.9. Thanks @@Luke for the fix!

  • Like 1
PenkethBoy
Posted

@@reggi - thanks working again on 1.10

 

how's the stats server coming along?

  • Like 1
  • 2 weeks later...
Happy2Play
Posted

Looks like beta 3.4.1.14 broke the plugin again.

2018-06-10 17:33:36.832 Error TaskManager: Error
	*** Error Report ***
	Version: 3.4.1.14
	Command line: C:\Emby-Server\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: 12
	Program data path: C:\Emby-Server\programdata
	Application directory: C:\Emby-Server\system
	System.MissingMethodException: Method not found: 'Void MediaBrowser.Controller.Entities.InternalItemsQuery.set_ParentId(System.Nullable`1<System.Guid>)'.
	   at statistics.Calculators.BaseCalculator.GetPlayedEpisodeCount(Series show)
	   at System.Linq.Enumerable.Sum[TSource](IEnumerable`1 source, Func`2 selector)
	   at Statistics.Helpers.Calculator.CalculateTotalEpiosodesWatched()
	   at Statistics.ScheduledTasks.CalculateStatsTask.<>c__DisplayClass19_1.<MediaBrowser.Model.Tasks.IScheduledTask.Execute>b__0()
	   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
	--- End of stack trace from previous location where exception was thrown ---
	   at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
	System.MissingMethodException
	   at statistics.Calculators.BaseCalculator.GetPlayedEpisodeCount(Series show)
	   at System.Linq.Enumerable.Sum[TSource](IEnumerable`1 source, Func`2 selector)
	   at Statistics.Helpers.Calculator.CalculateTotalEpiosodesWatched()
	   at Statistics.ScheduledTasks.CalculateStatsTask.<>c__DisplayClass19_1.<MediaBrowser.Model.Tasks.IScheduledTask.Execute>b__0()
	   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
	--- End of stack trace from previous location where exception was thrown ---
	   at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
	
2018-06-10 17:33:36.832 Info TaskManager: Calculate statistics for all users Failed after 0 minute(s) and 8 seconds

 

  • Like 1
Posted

I took care of it for him, so he just has to publish an update. Thanks.

  • Like 1
Posted

I just pushed the new version that @@Luke fixed. So plugin will update to 2.0.5.1 now.

  • Like 2
Posted

Hi reggi - the latest emby beta (3.4.1.17) now uses URLs such as 

/web/index.html#!/itemdetails.html?id=

whereas the Statistics plugin creates them as 

/web/itemdetails.html?id=
  • Like 2
Posted

@zeroidea 

 

Thanks for the update, I will prepare an update for the plugin when I'm back home from holiday's (next week)

  • 1 month later...
riothamus
Posted

Just following up to see if there is an update on this.  I still see that the URL's generated by the statistics plugin are as before.

Happy2Play
Posted

Why not test the "Standalone embystat server" as it is being developed to replace the plugin.

  • 5 weeks later...
nick naim
Posted

@@reggi

 

I appreciate the statistics plugin and I am hesitant to move to the standalone server. Any chance you will still update the plugin to fix the URLs as zeroidea suggested? It would me much appreciated!

Posted

Hi,

  i have problem with statistics.

 

When refresh date i receive error message : "Calculate statistics for all users fallito"

 

SERVER LOG : 

2018-09-03 13:47:23.962 Info HttpClient: GET https://www.thetvdb.com/api/3B9470F2306003B8/series/290853/all/en.zip
2018-09-03 13:47:24.982 Info HttpClient: GET https://thetvdb.com/api/Updates.php?type=none
2018-09-03 13:47:27.400 Error TaskManager: Error
*** Error Report ***
Version: 3.6.0.33
Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb
Operating system: Unix 4.4.0.116
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Processor count: 8
Program data path: /var/lib/emby
Application directory: /opt/emby-server/system
System.MissingMethodException: Method not found: 'Int32 MediaBrowser.Controller.Library.ILibraryManager.GetCount(MediaBrowser.Controller.Entities.InternalItemsQuery)'.
   at statistics.Calculators.BaseCalculator.GetOwnedCount(Type type)
   at Statistics.Helpers.Calculator.CalculateTotalMovies()
   at Statistics.ScheduledTasks.CalculateStatsTask.<>c__DisplayClass19_1.<MediaBrowser.Model.Tasks.IScheduledTask.Execute>b__0()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
   at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
System.MissingMethodException
   at statistics.Calculators.BaseCalculator.GetOwnedCount(Type type)
   at Statistics.Helpers.Calculator.CalculateTotalMovies()
   at Statistics.ScheduledTasks.CalculateStatsTask.<>c__DisplayClass19_1.<MediaBrowser.Model.Tasks.IScheduledTask.Execute>b__0()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
   at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
 
2018-09-03 13:47:27.400 Info TaskManager: Calculate statistics for all users Failed after 0 minute(s) and 4 seconds
2018-09-03 13:47:27.402 Info TaskManager: ExecuteQueuedTasks


Please help me... 
 
  Ciro
Posted

Stats fails every day for me too - on latest beta.

  • Like 1
  • 3 weeks later...
Posted (edited)

Any idea how long for this fix ?

The calculate user stats still fails daily, and you cant click on them, had a beta update recently so on latest but its been an issue a while.

 

Method not found: 'System.Collections.Generic.IEnumerable`1<MediaBrowser.Controller.Entities.User> MediaBrowser.Controller.Library.IUserManager.get_Users()'.
at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

Edited by vaise
Posted

Hey guys, 

 

Since I don't have any time to keep the plugin up and running I have decided to discontinue the plugin. I'm working on EmbyStat now but even that has come to a break because I can't find the free time at the moment.

So if anyone want's to continue developing the plugin, you are more then welcome to send me a PM here or on GitHub

 

Most of the times it's just updating the Nuget packages.

 

I'll try to remove the plugin from the plugin list so nobody can install this broken plugin anymore. It is fairly easy to get it back up. 

 

Thanks for all the support and testing while developing this plugin!! 

And sorry for removing it from the plugin library.

Posted

I can help with compatibility updates until you release your standalone app. Is there a github repo?

Happy2Play
Posted

I can help with compatibility updates until you release your standalone app. Is there a github repo?

 

GitHub Repo

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