Jump to content

Developing a standalone embystat server


reggi

Recommended Posts

reggi

For null ref error @rdmiller13 is having, some data is missing that I need to convert to a local user. I will add some default fallback data in the converter so it won't crash again.

@varmandra, server id is missing indeed in the external links, I'll add them asap.

Link to comment
Share on other sites

Hi Reggi,

Great you're back 😀
I've tested a bit and am a bit mystified - but I'm a bit rusty, so it can easily be me doing something wrong.

First the cool facts:

  • Virtual machine under VMware 15, 
  • Virtual Hardware: Intel(R) Xeon(R) W-2123 CPU @ 3.60GHz, 2GB RAM
  • OS: Windows 10 Pro, 21H1.
  • Emby Server 4.6.4.0
    This server is the same (just newer) as when I tested the previous EmbyStat beta.
    No changes to libraries or anything.
  • Emby Server and EmbyStat on the same server.

Not quite sure if it's me or EmbyStat - but I cannot make EmbyStat discover my Movies on my Windows 10 sandbox.
I've made a fresh install (upgrade gave exceptions) and the install ran without problems.

Under initial setup I had to type in IP and Port for Emby Server.
But when running the movie sync job, I get "Found 0 root items".
(The progress bar btw never stop running - staying at 0% progress.)

Which is pretty confusing to me since EmbyStat is able to discover my 5 Emby libraries.
And Emby can play the movies.

I have tried to disable Windows firewall - no difference.

This is what I see in Emby Server log:
2021-08-04 11:38:15.280 Info Server: http/1.1 GET http://xxx.xxx.xxx.xxx:8096/Library/MediaFolders. UserAgent: EmbyStat/1.0
2021-08-04 11:38:15.320 Info Server: http/1.1 Response 200 to xxx.xxx.xxx.xxx. Time: 40ms. http://xxx.xxx.xxx.xxx:8096/Library/MediaFolders

 

2021-08-04 Server Configuration 1.jpg

2021-08-04 Server Configuration 2.jpg

2021-08-04 Server Configuration 3 - Inked.jpg

2021-08-04 Discovered libraries.jpg

2021-08-04 Progress bar.jpg

2021-08-04.log

Link to comment
Share on other sites

reggi

Hi @pju, thanks for testing the app and de detailed information 🙂 . I will add some extra debug logging to get more information about the libraries that are found on your Emby server. 

Could you also check your usersettings.json file for the MovieLibraries and ShowLibraries props? There should be some ids (in your case 2 ids in the movieLibraries prop). The json file should be in the root folder next to the .exe file.

image.png.ac7e29c2781f9320cdd0e4b187d42cfb.png

Link to comment
Share on other sites

50 minutes ago, reggi said:

Hi @pju, thanks for testing the app and de detailed information 🙂 . I will add some extra debug logging to get more information about the libraries that are found on your Emby server. 

Could you also check your usersettings.json file for the MovieLibraries and ShowLibraries props? There should be some ids (in your case 2 ids in the movieLibraries prop). The json file should be in the root folder next to the .exe file.

image.png.ac7e29c2781f9320cdd0e4b187d42cfb.png

Sure - from the usersettings.json in the data folder:

  "MovieLibraries": [
    "296203f2dee2abc2cd6f8c4283784bc7",
    "253bc9fc2ae4cb0a47d99e75b7e36923"
  ],
  "ShowLibraries": [],
I have not set up any Shows.

Edited by pju
Link to comment
Share on other sites

reggi

Hi @Sammy, I prefer Github but you can report here as well. Did you update or do a clean install? Currently a clean install is always needed (I forgot to mention that in the first post)

@pju, I'm currently building a new version with more debug info (and white screen fix hopefully). You can try beta.27 in 2 hours.

Link to comment
Share on other sites

Sammy

@reggi After this I'll post in the issues section of Github for your project.

I attempted to uninstall in programs and features without success, even after killing the process in task manager so I proceded to install over the top of the previous installation. I'll try again and report back on Github.

Link to comment
Share on other sites

reggi

I just released beta.27 that hopefully will fix the blank screen issue as well as added extra logging for the user converter. If it still fails best to share the Debug log with me but beware that I output your Emby user info to that log, so you have to manually sensor all private data (please, don't remove properties in the json otherwise I have no idea what properties are ommited by Emby)

As always, best to perform a clean install. @Sammy, maybe a reboot will help to kill the process?

Release v0.2.0-beta.27 · mregni/EmbyStat (github.com)

Link to comment
Share on other sites

1 hour ago, reggi said:

I just released beta.27 that hopefully will fix the blank screen issue as well as added extra logging for the user converter. If it still fails best to share the Debug log with me but beware that I output your Emby user info to that log, so you have to manually sensor all private data (please, don't remove properties in the json otherwise I have no idea what properties are ommited by Emby)

As always, best to perform a clean install. @Sammy, maybe a reboot will help to kill the process?

Release v0.2.0-beta.27 · mregni/EmbyStat (github.com)

And a new logfile 🙂
Should I btw open an issue in GitHub?

PS: Second thought -  all my libraries are "mixed content" - could that be the cause?
My Emby Library goes back many, many years - and it does not really fit into Emby content types.

2021-08-05.log

Edited by pju
Link to comment
Share on other sites

reggi

@pju, If you have a Github account feel free to create a bug for your issue New Issue · mregni/EmbyStat (github.com) 🙂 

I just looked at your log file, thanks for that! From what I can tell is that all your library types are of type "Other" instead of "Movies" so that's why EmbyStat is not syncing your libraries. Maybe I should remove the library type check in the sync job. If you create a Github issue I will upload a DEV version for you with some extra logging so we can see what type Emby is returning and why my mapping is broken.

Link to comment
Share on other sites

27 minutes ago, reggi said:

@pju, If you have a Github account feel free to create a bug for your issue New Issue · mregni/EmbyStat (github.com) 🙂 

I just looked at your log file, thanks for that! From what I can tell is that all your library types are of type "Other" instead of "Movies" so that's why EmbyStat is not syncing your libraries. Maybe I should remove the library type check in the sync job. If you create a Github issue I will upload a DEV version for you with some extra logging so we can see what type Emby is returning and why my mapping is broken.

Super & done.
I'm out until some time late afternoon, so, no rush 😉

Link to comment
Share on other sites

Junglejim

Cheers mate, working great here. Had to delete my Docker container and config dir, but after that no probs. Looking forward to the next update. ;)

Thanks for your work on this, I know your busy with work. Much Appreciated!

Link to comment
Share on other sites

varmandra

So finally i tested some installation of the beta.27

  • ESXi 6.7
  • Xeon(R) CPU E3-1230 v5 (2 or up to 8 virtual Cores)
  • 2-32GB RAM
  • Windows 7 Pro / Windwos 10 Pro / Linux Ubuntu / Linux Debian
  • Emby 4.6.4.0 (different PC)
  • URL: fully qualified domain name with SSL certificate

First whitout deleting all old files I get on every installation doesn't matte which OS an "Unhandled Backend Exception" Error on Windows 10 Pro with old files left i got an empty dark screen.

With a clean installation for me erverything works fine, the sync for movies and shows.

 

BdT

Varmandra

Link to comment
Share on other sites

reggi

Nice to hear the beta.27 is working for some people already 🙂 

A clean install is at this stage always adviced since i'm still changing the database and config files a lot.

  • Like 1
Link to comment
Share on other sites

Spaceboy

stats calculation fails if there is no media in one of the libraries. this is relevant to recorded tv movie libraries, i have none in there at present

Link to comment
Share on other sites

Sammy

Working great for me for shows and movies!

Now for FR's..

  • Reporting of Missing episodes by series/season/episode/title
  • Reporting of Duplicates. I know I have many but it is time consuming to ferret them out for deletion.
  • Reporting  of User Statistics
Link to comment
Share on other sites

rdmiller13

Copied and running perfectly - will take a bit to read 5000 movies and 60,000 episodes, but its running the jobs now!

 

Thanks!

Link to comment
Share on other sites

The page with General stats is very nice giving a good overview.

I have 2 questions, though:

Date/Time setting:
The date format is US (mm/dd/yyyy) - mildly disturbing. Is that coming from Emby or EmbyStat?
Windows is set up to use English as display language and preferred language. But, with Danish as regional format - so I would expect mm-dd-yyyy.

Most featured ...:
What's the query behind?
Example from most featured actor: 
In my stats "Ian Fleming" shows in the Action category.
No surprise, I have the 007 movies - but when looking up Ian Fleming in Emby, he shows in different types like "Novel", "Original Story", ... and some with empty type attribute, but never actor.
So, how is "Actor" selected?
He's BTW also between most featured Director - which is kind of scary - at least for the movies after 1964 🙂
 

Edit:
Hmmm, please hold your horses - looks like there's a discrepancy between my xml files (movie.xml) and the stuff I see when looking up metadata in Emby. Seems like Ian Fleming always has type "Actor". Seems like the import cheats me... And that's for sure a problem outside this topic.

 

Edited by pju
Link to comment
Share on other sites

Spaceboy

The episode count is wrong for me on a number of series. Partly that’s because you seem to be counting unaired episodes but there’s also another reason that I can’t identify. It’s not consistent 

Link to comment
Share on other sites

vaise

Could i ask what the plan is for the dashboard ?

A summary of the Movies and TVShow stats ?

Link to comment
Share on other sites

varmandra

What do you mean with safely? On debian there ist not really a installation, to uninstall you just need to do the installation in the other way.

1. Remove the service

2. Remove the files

3. Delete the user

 

Link to comment
Share on other sites

reggi

@pju and @Spaceboy, thanks for testing! I'll create some GitHub issue to track your bugs asap.

It looks like the "most featured" stats are broken (or never really worked in the first place). Maybe I can structure my database better so this query can be fixed easily.

 

@Alexwerilles, like @varmandra mentioned just remove the directory where you run EmbyStat from. It does not use any other folders on your system than his own folder.

Link to comment
Share on other sites

Anyone having experience with migration when it comes to "crew", ie loading libraries into a new database.
I'm aware that this really is not related to the actor data handled by this plugin - it just becomes visible when seeing stats.
I have not really been thinking about it before seeing the general stats - but it seems to me that Emby converts all person types different from the Emby "standard" to "Actor". 
Guess this is what being accepted - not much crew in that:
image.png.8db7b94a6bd15240d024f28e5360c219.png
And that is causing very misleading stats.
At the moment I see no way aroound it but going through all movie.xml and series.xml files and remove all persons with a "Type" different from what Emby accepts.
But, can that really be true?

Have tried to browse the forum - but I have not been able to come up with a useful query😉

Edited by pju
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...