Jump to content

New Statistics plugin


reggi

Recommended Posts

testingtv
6 minutes ago, hackthis02 said:

Okay, that means your server has German selected at the default language? If so, the plugin isn't using that setting.

Yes, currently the default language is set to German.

As far as I understand there is currently no way to use the de.xml?

 

  EDIT:

On 4/18/2022 at 4:03 AM, Happy2Play said:

Having series in different languages would appear to be an issue also.

Seems like I read over that little sentence here.

Edited by testingtv
Link to comment
Share on other sites

Happy2Play

I am guessing the original plugin would just pull its own statistical info in one language no matter the user/media language.  Where using the data Emby already has cached can be problematic in native languages.

So this may be a issue as you have global language, per library language and per item language.  So each level can inherit from the highest level if not specifically set.

Not a programmer but any **.xml (two letter language code) would need to be read.

Shouldn't see this issue in 4.7 as there is a none language specific episodes-official.json and a specific language one.

Link to comment
Share on other sites

Happy2Play

Just have to see if hackthis02 can come up with a solution for this language issue.  As it was just an idea of using existing Emby cached data instead of polling TVDB specifically with plugin also. 

But can see the advantages now for its own data.

Issue is we don't know when TVDB is going to shutdown legacy apis.  And would not expect dev of this project to have to pay for TVDB data when legacy apis are shutdown, as Emby is already caching it.

Link to comment
Share on other sites

hackthis02
1 hour ago, testingtv said:

Yes, currently the default language is set to German.

As far as I understand there is currently no way to use the de.xml?

 

  EDIT:

Seems like I read over that little sentence here.

I just pushed 2.1.2.0. Which should use the preferred display language. 🤞

Link to comment
Share on other sites

Happy2Play
13 minutes ago, hackthis02 said:

I just pushed 2.1.2.0. Which should use the preferred display language. 🤞

Could be all my test/dummy data but task fails now.

2022-04-21 18:03:37.426 Error TaskManager: Error
	*** Error Report ***
	Version: 4.6.7.0
	Command line: C:\Users\Media\Desktop\Stable\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows 10.0.22598
	Framework: .NET Core 3.1.21
	OS/Process: x64/x64
	Runtime: C:/Users/Media/Desktop/Stable/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: C:\Users\Media\Desktop\Stable\programdata
	Application path: C:\Users\Media\Desktop\Stable\system
	System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
	   at Statistics.Helpers.Calculator.CalculateMovieCodecs()
	   at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
	Source: statistics
	TargetSite: statistics.Models.Configuration.ValueGroup CalculateMovieCodecs()
	
2022-04-21 18:03:37.426 Debug TaskManager: Calculate statistics for all users Failed after 0 minute(s) and 6 seconds

2.1.1.0 does not have this issue though.

Edited by Happy2Play
Link to comment
Share on other sites

DarWun
13 hours ago, Happy2Play said:

This assumes you are stable 4.6.7.0.  Will not work on beta 4.7 as Emby changes to v4 api and receives json files instead of xml.  Currently old version of plugin will be needed to use old method on 4.7 beta server.

I missed the part about it only working on stable 4.6.7.0. I am running beta 4.7. That explains why I'm not seeing correct episode counts.

Link to comment
Share on other sites

hackthis02
15 hours ago, Happy2Play said:

Could be all my test/dummy data but task fails now.

2022-04-21 18:03:37.426 Error TaskManager: Error
	*** Error Report ***
	Version: 4.6.7.0
	Command line: C:\Users\Media\Desktop\Stable\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows 10.0.22598
	Framework: .NET Core 3.1.21
	OS/Process: x64/x64
	Runtime: C:/Users/Media/Desktop/Stable/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: C:\Users\Media\Desktop\Stable\programdata
	Application path: C:\Users\Media\Desktop\Stable\system
	System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
	   at Statistics.Helpers.Calculator.CalculateMovieCodecs()
	   at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
	Source: statistics
	TargetSite: statistics.Models.Configuration.ValueGroup CalculateMovieCodecs()
	
2022-04-21 18:03:37.426 Debug TaskManager: Calculate statistics for all users Failed after 0 minute(s) and 6 seconds

2.1.1.0 does not have this issue though.

 

15 hours ago, testingtv said:

I guess I will wait for the 4.7 full release then.

I just pushed a reworked how it finds the xml file. Please report back any issues.

Link to comment
Share on other sites

KLF&TLF

Hi, I was notified last night to restate the server as there was a new Stats update. I have done that and it is now running V2.1.3.0 but either I have something wrong somewhere or the update has overlooked something. 

Previously if you went to the Stats it showed how many episodes you had collected and watched of each series now its not doing that. I have show missing episodes (yes I am still working on my back log) in my library configuration but now when I go to Stats it only shows the files I have, it is not even showing what I have watched. 

I have restarted 4 times, down a full power cycle thinking that might have helped but I am still stuck  like this.

For example:

100 Foot Wave, 11.22.63 and 1883 - I have watched and have all episodes but if I take 30 Rock I have only watched say 4 seasons and technically I am missing 1 episode as the last episode is a double and therefore Emby reports it as missing or not an episode (in this case). 

 

However, upon looking further for an example of a double episode I have identified that this latest update has affected the missing episodes option. - Sorry 

Screen Shot 2022-04-23 at 10.39.42 am.png

Screen Shot 2022-04-23 at 10.42.14 am.png

Screen Shot 2022-04-23 at 10.42.28 am.png

Screen Shot 2022-04-23 at 10.44.15 am.png

Screen Shot 2022-04-23 at 10.44.40 am.png

  • Agree 1
Link to comment
Share on other sites

Happy2Play
8 hours ago, hackthis02 said:

 

I just pushed a reworked how it finds the xml file. Please report back any issues.

Failed scan resolved, still have not checked language issue.

Link to comment
Share on other sites

KLF&TLF

I am on Version 4.6.7.0 but you can delete my post because for some bizarre reason it is all working fine again. The only difference now is within the series it is not showing the missing episode if the one before was a double.

The only thing I did was stayed out of Emby for 45 mins before going back in and re-running my scheduled tasks 

Link to comment
Share on other sites

Happy2Play
8 hours ago, hackthis02 said:
On 4/21/2022 at 5:59 PM, hackthis02 said:

I just pushed 2.1.2.0. Which should use the preferred display language. 🤞

 

I just pushed a reworked how it finds the xml file. Please report back any issues.

A quick test appears to be working.

2022-04-22 18:10:18.687 Debug Statistics: C:\Users\Media\Desktop\Stable\programdata\cache\tvdb\74875\en.xml
2022-04-22 18:10:18.694 Debug Statistics: The Closer
2022-04-22 18:10:18.694 Debug Statistics: 109
2022-04-22 18:10:18.694 Debug Statistics: C:\Users\Media\Desktop\Stable\programdata\cache\tvdb\79755\de.xml
2022-04-22 18:10:18.695 Debug Statistics: Afro Samurai
2022-04-22 18:10:18.695 Debug Statistics: 5

 

 

  • Thanks 1
Link to comment
Share on other sites

DarWun

Is there a way to stop this plugin from updating on the Beta 4.7 builds until it gets upgraded to address the .json files changes? I've rolled back to 4.0.20, as that is the last build where episode counts were correct for TV series. I've changed permissions of statistics.dll to read only to prevent the plugin from being updated. But Emby keeps trying (and failing) to update it anyway. This is a good workaround for me...but it would be nice to get rid of the errors in the activity log due to failed upgrades.

Link to comment
Share on other sites

Happy2Play
2 hours ago, DarWun said:

Is there a way to stop this plugin from updating on the Beta 4.7 builds until it gets upgraded to address the .json files changes? I've rolled back to 4.0.20, as that is the last build where episode counts were correct for TV series. I've changed permissions of statistics.dll to read only to prevent the plugin from being updated. But Emby keeps trying (and failing) to update it anyway. This is a good workaround for me...but it would be nice to get rid of the errors in the activity log due to failed upgrades.

Just don't restart your server, and if you need to restart your server just ensure you copy old dll into plugin folder before you restart.  Just have to live with dashboard saying you need to restart. And ensure you have "Allow the server to restart automatically to apply updates" disabled.

Other option would be killing the hidden scheduled task in the API but not ideal on a beta server.

But this is a unique issue needing a beta server to be on an older release plugin.  Unless @hackthis02 was willing to version v2.0.20 to a higher number (without any changes) and post the dll here as a temporary workaround.  But I know devs want to release 4.7 as soon as possible.

Link to comment
Share on other sites

DarWun
43 minutes ago, Happy2Play said:

Just don't restart your server, and if you need to restart your server just ensure you copy old dll into plugin folder before you restart.  Just have to live with dashboard saying you need to restart. And ensure you have "Allow the server to restart automatically to apply updates" disabled.

Other option would be killing the hidden scheduled task in the API but not ideal on a beta server.

But this is a unique issue needing a beta server to be on an older release plugin.  Unless @hackthis02 was willing to version v2.0.20 to a higher number (without any changes) and post the dll here as a temporary workaround.  But I know devs want to release 4.7 as soon as possible.

Unfortunately, the plugin gets updated even without restarting the server. This is on the Synology platform. After rolling back to v2.0.20 and rebooting the plugin update downloads. Emby notifies me that a server restart is required. I leave the server running overnight without restarting, and the next morning the plugin has been updated anyway. 

Link to comment
Share on other sites

Happy2Play
12 minutes ago, DarWun said:

I leave the server running overnight without restarting, and the next morning the plugin has been updated anyway.

Does the dashboard still show restart required?

But to me it sound like it restarted per the setting.

Allow the server to restart automatically to apply updates
The server will only restart during idle periods, when no users are active.

But yes, the plugin auto downloads and updates in the folder but cannot be use the new version as it has to be "Loaded" in the startup process ie requiring a restart.

2022-04-24 19:53:35.012 Info App: Loading statistics, Version=2.0.20.0

I can't see Synology acting any different but will let my test system sit overnight on v2.0.20. 

  • Thanks 1
Link to comment
Share on other sites

testingtv
On 4/22/2022 at 6:13 PM, hackthis02 said:

 

I just pushed a reworked how it finds the xml file. Please report back any issues.

Sorry for the late reply, works fine so far. Thanks for the fast fix!

Link to comment
Share on other sites

DarWun
9 hours ago, Happy2Play said:

Does the dashboard still show restart required?

But to me it sound like it restarted per the setting.

Allow the server to restart automatically to apply updates
The server will only restart during idle periods, when no users are active.

 

Well, that explains the update overnight. The option to restart automatically to apply updates was enabled. I had disabled it quite a while back as there was an issue with Emby not actually restarting (i.e. it would shutdown but not startup again) around the time that Emby was first migrated to the Package Center. It must have been enabled again after an update and I never noticed.

Thanks @Happy2Play.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
DarWun

@Happy2PlayOut of curiousity, have you been seeing ridiculously high aired episode counts for any series being reported by the Statistics plug-in over the last couple of days? Yesterday, I noticed that the Statistics plug-in (ver 2.0.20.0) was showing that episodes were missing for two series that I know for a fact are complete. I checked the each series thinking that some episodes may have been accidentally deleted. But all episodes are present and accounted for. I then noticed that the total number of episodes aired being reported by the Statistics plug-in are way higher for those series with missing episodes than they should be. That is why the Statistics plug-in is reporting the series as being incomplete.

Flash forward to today. The number of series with incorrect aired episode counts went from two to ten (for context, there are 70 complete series in my library). Rescanning does not correct the issue. As an example, the Statistics plug-in is reporting that the number of aired episodes for Lost to be 394...only 120 episodes aired.

Link to comment
Share on other sites

Happy2Play
6 minutes ago, DarWun said:

@Happy2PlayOut of curiousity, have you been seeing ridiculously high aired episode counts for any series being reported by the Statistics plug-in over the last couple of days? Yesterday, I noticed that the Statistics plug-in (ver 2.0.20.0) was showing that episodes were missing for two series that I know for a fact are complete. I checked the each series thinking that some episodes may have been accidentally deleted. But all episodes are present and accounted for. I then noticed that the total number of episodes aired being reported by the Statistics plug-in are way higher for those series with missing episodes than they should be. That is why the Statistics plug-in is reporting the series as being incomplete.

Flash forward to today. The number of series with incorrect aired episode counts went from two to ten (for context, there are 70 complete series in my library). Rescanning does not correct the issue. As an example, the Statistics plug-in is reporting that the number of aired episodes for Lost to be 394...only 120 episodes aired.

No I am not currently seeing any issue like this.

image.png.ca8cd0a3b6c1a848317cf29dbdb25067.png

  • Like 1
Link to comment
Share on other sites

DarWun

Weird. Not sure what could be causing this on my setup "out of the blue". There is nothing in the Emby log that looks out of place, and the downloaded en.zip files look okay. In the screenshot below the aired episode count for Life on Mars is okay, but for Lost, Lovejoy, and Magnum, P.I. they are way off. I'm going to remove one of the problematic series from the library and readd it to see if the count corrects itself.

Screenshot 2022-05-06 144726.jpg

Link to comment
Share on other sites

hackthis02
Just now, DarWun said:

Weird. Not sure what could be causing this on my setup "out of the blue". There is nothing in the Emby log that looks out of place, and the downloaded en.zip files look okay. In the screenshot below the aired episode count for Life on Mars is okay, but for Lost, Lovejoy, and Magnum, P.I. they are way off. I'm going to remove one of the problematic series from the library and readd it to see if the count corrects itself.

Screenshot 2022-05-06 144726.jpg

Before you go remove and added series. Try uninstalling and reinstalling the plugin. If I recall you're on the beta and had to revert to and older version.

  • Thanks 1
Link to comment
Share on other sites

hackthis02
48 minutes ago, DarKni8 said:

Is this plugin same as in official catalog? 

Yes

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