Jump to content

New Statistics plugin


reggi

Recommended Posts

Jdiesel

Thanks again. I'd say the plugin is ready to me published in the app catalog at this point. 

  • Like 1
Link to comment
Share on other sites

@@reggi if there is any file system access make sure it is using IFileSystem and not System.IO.

  • Like 1
Link to comment
Share on other sites

legallink

@@reggi

 

I think if I were to choose a place, it would be on that same default "home screen" where instead of doing two click buttons for different user based statistics, you would choose it in a drop down menu, or even just adding an additional a top line menu of sorts....I recognize that this might fall outside of the plugin world or just be too complicated;

 

This plugin for plex is more of what I'm thinking (and yes that is much more elaborate than I think anyone needs)

 

https://jonnywong16.github.io/plexpy/#features

  • Like 1
Link to comment
Share on other sites

legallink

@@CBers yup I know.  Perhaps that wasn't helpful then at all.

 

@@reggi maybe I can lend thoughts more specifically.  I think I have clearly missed what input you were looking for.

  • Like 2
Link to comment
Share on other sites

reggi

@@Luke

I don't think I'm using System.IO but I will check again to be sure!

 

@legallink

Your input is good, I'm really stuck with the UI. So maybe a top menu would be better like you suggested. I'll check what's possible.

Link to comment
Share on other sites

reggi

@@Luke

I checked my code again and I'm using IFileSystem where needed. I'm always testing my plugin on a windows 10 machine and freenas 10 (docker container) and on both machines it runs smoothly.

So maybe we can publish this version to the catalog?

 

If @@legallink send me his idea I can implement a new GUI with the next version.

Link to comment
Share on other sites

CBers

Hey guys,

 

Sorry for the long silence period but I'm back on my feet now and got a smaller update ready.

 

Changelog

Mobile styling, the stats will now go full width when the screen get's to small. Mobile users, let me know what you think!  :D

 

@CBers

 

Don't know if you downloaded the 0.0.11.8 version already, there are some bugs in it so I fixed them in a new version you can find in this post

 

 

There are still a couple of issues in the mobile view:

 

Main page

 

The Media Qualities has the data out of the box

 

User-based show progress page 

 

The Watched and Collected column names are squashed

The Status column is cut off on the same page

There is a problem with "24:Legacy" Collected count - it shows "0 / -56 (0%)"

 

User-based statistics page

 

The Total Movies box has the data out of the top and bottom of the box

 

I've attached some screenshots to show you what I mean.

 

The boxes all look good on the desktop version, so by no means is this a reason NOT to go onto the plugin catalog :)

post-36-0-19523000-1494005210_thumb.png

post-36-0-28949800-1494005221_thumb.png

post-36-0-86376900-1494005231_thumb.png

Link to comment
Share on other sites

reggi

@@CBers

Thanks for teste, can you tell me what resolution the screen is?

Normally when the screen width is less than 900px the stats should show all in one column. Or your resolution is bigger or the old styling is still loaded in your view.

Link to comment
Share on other sites

CBers

It's a Nexus 6 and I think it's resolution is 1440 x 2560 pixels.

Link to comment
Share on other sites

reggi

I'll have to check if I can add some "mobile browser" media queries then. Because the media queries I wrote will not apply on your phone, hence your incorrect styling!

When I have found something I'll let you know

Link to comment
Share on other sites

Happy2Play

24: Legacy appear correctly for me. :)

 

24: Legacy 2017 12 / 12 (100%) 12 / 12 (100%) 7.2 Continuing

Link to comment
Share on other sites

CBers

24: Legacy appear correctly for me. :)

 

24: Legacy 2017 12 / 12 (100%) 12 / 12 (100%) 7.2 Continuing

Yeah well, your's would :)

  • Like 1
Link to comment
Share on other sites

reggi

I tried the plugin on my phone (Lumnia 950) with a screen resolution of 2560 x 1440 and the styling is working correctly.

Probably I have to change the media query, I'll contact my CSS colleague! 

 

@@CBers

For the negative collected count, I still have no idea how this happens but I'm searching for it!

post-33776-0-97943700-1494080226_thumb.png

post-33776-0-46286700-1494080228_thumb.png

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

CBers

I tried the plugin on my phone (Lumnia 950) with a screen resolution of 2560 x 1440 and the styling is working correctly.

Probably I have to change the media query, I'll contact my CSS colleague!

Thanks Reggi.

 

You might want to edit those images to remove your url.

 

Plus, you really need to read those 79 notifications :D

  • Like 1
Link to comment
Share on other sites

reggi

Thanks Reggi.

 

You might want to edit those images to remove your url.

 

Plus, you really need to read those 79 notifications :D

 

Thanks for the tip!! Forgot about the URL, please don't start DDOS'ing my server ;)

 

I'll read the notifications when I got the styling correct :D

  • Like 1
Link to comment
Share on other sites

MSattler

Hmmm 11.9 won't work for me.  It just fails instantly.

 

2017-05-07 10:38:14.8366 Info HttpServer: HTTP Response 200 to 192.168.1.57. Time: 1ms. http://192.168.1.125:8096/emby/ScheduledTasks?isHidden=false
2017-05-07 10:38:14.9339 Error TaskManager: Error
*** Error Report ***
Version: 3.2.14.0
Command line: B:\Users\Administrator\AppData\Roaming\Emby-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: B:\Users\Administrator\AppData\Roaming\Emby-Server
Application directory: B:\Users\Administrator\AppData\Roaming\Emby-Server\system
System.MissingMethodException: Method not found: 'Void MediaBrowser.Controller.Entities.InternalItemsQuery.set_LocationTypes(MediaBrowser.Model.Entities.LocationType[])'.
  at Statistics.Helpers.BaseCalculator.GetOwnedItems[T](Nullable`1 isPLayed)
  at Statistics.Helpers.BaseCalculator.GetAllOwnedEpisodes()
  at Statistics.Helpers.Calculator.CalculateMovieQualities()
  at Statistics.ScheduledTasks.CalculateStatsTask.<Execute>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.<ExecuteInternal>d__68.MoveNext()
System.MissingMethodException
  at Statistics.Helpers.BaseCalculator.GetOwnedItems[T](Nullable`1 isPLayed)
  at Statistics.Helpers.BaseCalculator.GetAllOwnedEpisodes()
  at Statistics.Helpers.Calculator.CalculateMovieQualities()
  at Statistics.ScheduledTasks.CalculateStatsTask.<Execute>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.<ExecuteInternal>d__68.MoveNext()
Link to comment
Share on other sites

MSattler

I'm seeing the same thing. Worked fine in v3.2.13.14 beta.

 

I'm using 3.2.14  Looks like something changed.

Link to comment
Share on other sites

reggi

Since the 3.2.14.0 update the plugin stopped working

 

@@Luke

I changed the query to IsVirtualItem = false but it's still failing

var query = new InternalItemsQuery(User)
{
    IncludeItemTypes = new[] { typeof(T).Name },
    IsPlayed = isPLayed,
    Recursive = true,
    SourceTypes = new[] { SourceType.Library },
    IsVirtualItem = false
};

return LibraryManager.GetItemsResult(query).Items.OfType<T>().ToList();

old code:

 var query = new InternalItemsQuery(User)
{
    IncludeItemTypes = new[] { typeof(T).Name },
    IsPlayed = isPLayed,
    Recursive = true,
    LocationTypes = new[] { LocationType.FileSystem, LocationType.Offline, LocationType.Remote },
    SourceTypes = new[] { SourceType.Library }
};

return LibraryManager.GetItemsResult(query).Items.OfType<T>().ToList();

Both queries throw the MissingMethodException

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