Jump to content

New Statistics plugin


reggi

Recommended Posts

hackthis02
6 hours ago, Happy2Play said:

Think this was mentioned in the Discord plugin also.  I am guessing it was built/updated against 4.6.0.50 versioning so you will have to wait for a new beta or migrate to that version.

But I rebuilt it against beta and isn't throwing any errors. If you really want it now.  Maintained the same version number as used in .50.

statistics.zip 45.69 kB · 0 downloads

Discord plugin?

Link to comment
Share on other sites

Happy2Play
14 minutes ago, hackthis02 said:

Discord plugin?

Ya the .48 crew feels left out. As they were in the same situation of new plugin not working on .48 pre release.

That is why I rebuilt it and posted it here.

https://emby.media/community/index.php?/topic/65998-new-statistics-plugin/&do=findComment&comment=1022840

 

Edited by Happy2Play
linked to previous post
Link to comment
Share on other sites

Brazer

Just updated the statistics plugin. Still failing on my side.

2021-05-22 02:11:15.732 Info App: Loading statistics, Version=2.0.20.0, Culture=neutral, PublicKeyToken=null from /var/lib/emby/plugins/Statistics.dll

 

2021-05-22 02:15:28.724 Error TaskManager: Error
	*** Error Report ***
	Version: 4.6.0.50
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb
	Operating system: Linux version 5.4.0-73-generic (buildd@lcy01-amd64-019) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021
	Framework: .NET Core 3.1.13
	OS/Process: x64/x64
	Runtime: opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: /var/lib/emby
	Application path: /opt/emby-server/system
	SQLitePCL.pretty.SQLiteException: Corrupt: database disk image is malformed
	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
	   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
	   at SQLitePCL.pretty.StatementImpl.MoveNext()
	   at Emby.Sqlite.SqliteExtensions.ExecuteQuery(IStatement This)+MoveNext()
	   at Emby.Server.Implementations.Data.SqliteItemRepository.QueryItemsInTransaction[T](InternalItemsQuery query, IDatabaseConnection db, String[] columnsToSelect, Func`5 rowReaderFn, Boolean singleResult, String methodName)
	   at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query)
	   at statistics.Calculators.BaseCalculator.GetItems[T]()
	   at statistics.Calculators.BaseCalculator.GetAllMovies()
	   at statistics.Calculators.BaseCalculator.GetAllBaseItems()
	   at Statistics.Helpers.Calculator.CalculateOverallTime(Boolean onlyPlayed)
	   at Statistics.ScheduledTasks.CalculateStatsTask.<>c__DisplayClass20_1.<MediaBrowser.Model.Tasks.IScheduledTask.Execute>b__0()
	   at System.Threading.Tasks.Task.InnerInvoke()
	   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, 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, Thread threadPoolThread)
	--- 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)
	Source: SQLitePCL.pretty
	TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)

 

Link to comment
Share on other sites

Happy2Play

 

6 minutes ago, Brazer said:

Just updated the statistics plugin. Still failing on my side.

2021-05-22 02:11:15.732 Info App: Loading statistics, Version=2.0.20.0, Culture=neutral, PublicKeyToken=null from /var/lib/emby/plugins/Statistics.dll

 


2021-05-22 02:15:28.724 Error TaskManager: Error
	*** Error Report ***
	Version: 4.6.0.50
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb
	Operating system: Linux version 5.4.0-73-generic (buildd@lcy01-amd64-019) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021
	Framework: .NET Core 3.1.13
	OS/Process: x64/x64
	Runtime: opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: /var/lib/emby
	Application path: /opt/emby-server/system
	SQLitePCL.pretty.SQLiteException: Corrupt: database disk image is malformed
	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
	   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
	   at SQLitePCL.pretty.StatementImpl.MoveNext()
	   at Emby.Sqlite.SqliteExtensions.ExecuteQuery(IStatement This)+MoveNext()
	   at Emby.Server.Implementations.Data.SqliteItemRepository.QueryItemsInTransaction[T](InternalItemsQuery query, IDatabaseConnection db, String[] columnsToSelect, Func`5 rowReaderFn, Boolean singleResult, String methodName)
	   at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query)
	   at statistics.Calculators.BaseCalculator.GetItems[T]()
	   at statistics.Calculators.BaseCalculator.GetAllMovies()
	   at statistics.Calculators.BaseCalculator.GetAllBaseItems()
	   at Statistics.Helpers.Calculator.CalculateOverallTime(Boolean onlyPlayed)
	   at Statistics.ScheduledTasks.CalculateStatsTask.<>c__DisplayClass20_1.<MediaBrowser.Model.Tasks.IScheduledTask.Execute>b__0()
	   at System.Threading.Tasks.Task.InnerInvoke()
	   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, 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, Thread threadPoolThread)
	--- 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)
	Source: SQLitePCL.pretty
	TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)

 

@Lukewould this still be the same as previous "Corrupt: database disk image is malformed"?

Failed library scans - Emby Server - Emby Community

Link to comment
Share on other sites

jordy
18 hours ago, Happy2Play said:

Think this was mentioned in the Discord plugin also.  I am guessing it was built/updated against 4.6.0.50 versioning so you will have to wait for a new beta or migrate to that version.

But I rebuilt it against beta and isn't throwing any errors. If you really want it now.  Maintained the same version number as used in .50.

statistics.zip 45.69 kB · 2 downloads

Thanks.

Link to comment
Share on other sites

Brazer

Just be be clear @Happy2Play/ @Luke, the "Corrupt: database disk image is malformed" error when scanning statistics is due to a corrupt library.db?

Link to comment
Share on other sites

Happy2Play
3 minutes ago, Brazer said:

Just be be clear @Happy2Play/ @Luke, the "Corrupt: database disk image is malformed" error when scanning statistics is due to a corrupt library.db?

I would uninstall the plugin, restart and see if you same/similar result happen.  You should see that error say refreshing a item or maybe  library scans.

Edited by Happy2Play
Link to comment
Share on other sites

Brazer

@Happy2Play that error only happens when I run the statistics plugin scheduled task. I have not seen any other "Corrupt: database disk image is malformed" errors in the logs. Running a full library refresh does not result in a "Corrupt: database disk image is malformed" error.

Link to comment
Share on other sites

Happy2Play
2 minutes ago, Brazer said:

@Happy2Play that error only happens when I run the statistics plugin scheduled task. I have not seen any other "Corrupt: database disk image is malformed" errors in the logs. Running a full library refresh does not result in a "Corrupt: database disk image is malformed" error.

The tasks runs without issue on both beta and stable for me, so that would suggest there is corruption in your library.db.  But I believe this is the first time we have seen a plugin report this.

Link to comment
Share on other sites

Brazer

@Happy2PlayI renamed the library.db file. Restarted Emby server. Emby was blank. No Libraries. Is this normal. Do I have to add all my libraries back?

Link to comment
Share on other sites

8 minutes ago, Brazer said:

@Happy2PlayI renamed the library.db file. Restarted Emby server. Emby was blank. No Libraries. Is this normal. Do I have to add all my libraries back?

No, but you'll need to run a library scan if you do that.

Link to comment
Share on other sites

2 minutes ago, Brazer said:

@Luke well that is the problem. There is no libraries to scan.

OK normally this isn't necessary when deleting the library db but in this case I guess you'll need to set them up again.

Link to comment
Share on other sites

Brazer

@Luke I was not prepared to do that. So I fixed the corrupt library.db. Issue is fixed. Statistics is working 100% now. 

 

 sqlite3 library.db ".recover" | sqlite3 fixed.db

 

  • Like 1
Link to comment
Share on other sites

Happy2Play
2 hours ago, Brazer said:

@Happy2PlayI renamed the library.db file. Restarted Emby server. Emby was blank. No Libraries. Is this normal. Do I have to add all my libraries back?

Sort of yes as a library scan repopulates everything.  Dashboard-Library will show all of your libraries as they are configured in programdata\root\default

Link to comment
Share on other sites

DarWun
On 5/20/2021 at 11:20 PM, hackthis02 said:

Alright, I just pushed an update for 4.6.0.50. You can grab it in the catalog or just wait for it to get pushed to your sever.
@magelo @jordy @David Patt @DarWun

Thanks @hackthis02. It's good to have it back!

  • Agree 1
Link to comment
Share on other sites

magelo
On 5/20/2021 at 11:20 PM, hackthis02 said:

Alright, I just pushed an update for 4.6.0.50. You can grab it in the catalog or just wait for it to get pushed to your sever.
@magelo @jordy @David Patt @DarWun

Statistic plugin was updated earlier today (2021/05/22 10:20 EDT) automatically. It is working again. Thanks.

Link to comment
Share on other sites

  • 3 months later...
ChaoOos

Hello,

I have the problem that the resolution of some movies is incorrectly recognized. Some movies that have a resolution of 1080p are mapped to 720p. The same also applies to other resolutions.
According to which criteria are movies classified?

Link to comment
Share on other sites

hackthis02
2 hours ago, ChaoOos said:

Hello,

I have the problem that the resolution of some movies is incorrectly recognized. Some movies that have a resolution of 1080p are mapped to 720p. The same also applies to other resolutions.
According to which criteria are movies classified?

The plug-in uses the data from Emby. Go to the pages of the videos that you think are incorrect and confirm that Emby thinks they are the same resolution as you do.

Link to comment
Share on other sites

Happy2Play
4 hours ago, ChaoOos said:

Hello,

I have the problem that the resolution of some movies is incorrectly recognized. Some movies that have a resolution of 1080p are mapped to 720p. The same also applies to other resolutions.
According to which criteria are movies classified?

Can you go over a specific example, but am guessing these are odd resolution items correct?

Link to comment
Share on other sites

ChaoOos

Here I have 2 examples: A 720p (Fall Paladin) movie that is displayed in 480p and a 1080p (Alice im Wunderland) that is displayed in 720p. With the 480p films you can see from the Bluray cover that Emby actually recognizes them correctly.image.thumb.png.1124511ab3a1f98f97cace67eea70a9f.png

image.thumb.png.0f70981783e11dde5122574c597abb68.png
image.png.b5471bf65caeb8f3a9809d65eb3ec227.png
image.png.2463a41bbade979bba315cfb05d22418.pngimage.thumb.png.893d924ad87d6bb31c1ae010abf4dbd1.pngimage.thumb.png.e1bb38975d0017176e86085b3a424738.png

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