Jump to content

Developing a standalone embystat server


reggi

Recommended Posts

GoofyCDN

@@Shenniko

Here is the status of the service.  There are no log files located in embystat\Logs

 

:~$ sudo systemctl status embystat.service
● embystat.service
   Loaded: loaded (/etc/systemd/system/embystat.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: core-dump) since Thu 2020-06-04 12:55:08 EDT; 3s ago
  Process: 33810 ExecStart=/home/embystat/EmbyStat (code=dumped, signal=ABRT)
 Main PID: 33810 (code=dumped, signal=ABRT)
 
Jun 04 12:55:08 systemd[1]: embystat.service: Failed with result 'core-dump'.
Link to comment
Share on other sites

jurmb84

I am currently running v0.2.0-beta.20 in a windows 10 x64 environment installed with the exe and run as an application.  When trying to do the initial scan, I am getting the following error:

2020-06-04 12:16:09.3172 [INFO] MEDIASYNC-JOB	Processed 1400 / 9963 movies 
2020-06-04 12:16:15.1661 [WARN] MEDIASYNC-JOB	Movie error: Object reference not set to an instance of an object. 
2020-06-04 12:16:15.1661 [WARN] MEDIASYNC-JOB	Movie error: Object reference not set to an instance of an object. 
2020-06-04 12:16:15.1661 [ERROR] Error while running job System.NullReferenceException: Object reference not set to an instance of an object.
   at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovies(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList`1 libraries, CancellationToken cancellationToken)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync()
   at EmbyStat.Jobs.BaseJob.Execute()
2020-06-04 12:16:15.2576 [WARN] MEDIASYNC-JOB	Job failed, check logs for more info. 
2020-06-04 12:16:16.1121 [ERROR] Failed to process the job '01dcd9ed-e549-46f0-8f20-7f4076190470': an exception occurred. System.NullReferenceException: Object reference not set to an instance of an object.
   at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovies(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList`1 libraries, CancellationToken cancellationToken)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync()
   at EmbyStat.Jobs.BaseJob.Execute()
   at EmbyStat.Jobs.BaseJob.Execute()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

Please advise and thanx in advance...

Link to comment
Share on other sites

GoofyCDN

I removed everything and tried install v0.2.0-beta.19 and it's working now.  Seems to be an issue with the beta20

  • Like 1
Link to comment
Share on other sites

reggi

@@jurmb84, can you please run the application with the parameter "--log-level 1"? This will add a lot more logging information to the log files. 

Seems like the data returned from you Media server is not processed correctly. 

 

@@GoofyCDN, you can keep using the beta.19 for now. beta.20 was just to fix a problem for people with a lot of libraries. But it is strange that beta.20 is not working for you :(

Link to comment
Share on other sites

adrianwi

Thought i'd give this another spin this morning, but it doesn't appear to want to start the synchronisation.  It was a clean install pulling the latest version (v0.2.0-beta.20) I think.

 

Can't see much in the short log file:

2020-06-06 08:45:54.5899 [INFO] SYSTEM	Booting up server on port 6555 
2020-06-06 08:45:56.8040 [INFO] Starting Hangfire Server using job storage: 'Hangfire.MemoryStorage.MemoryStorage' 
2020-06-06 08:45:56.8077 [INFO] Using the following options for Hangfire Server:
    Worker count: 1
    Listening queues: 'main'
    Shutdown timeout: 1.00:00:00
    Schedule polling interval: 00:00:05 
2020-06-06 08:45:56.9347 [INFO] Server main server:1:21580203 successfully announced in 98.9576 ms 
2020-06-06 08:45:56.9460 [INFO] Server main server:1:21580203 is starting the registered dispatchers: ServerWatchdog, ServerJobCancellationWatcher, ExpirationManager, CountersAggregator, Worker, DelayedJobScheduler, RecurringJobScheduler... 
2020-06-06 08:45:56.9840 [INFO] Server main server:1:21580203 all the dispatchers started 
2020-06-06 08:46:42.0198 [INFO] SMALLEMBYSYNC-JOB	Starting job 
2020-06-06 08:46:42.1990 [INFO] SMALLEMBYSYNC-JOB	Server info downloaded 
2020-06-06 08:46:42.3972 [INFO] SMALLEMBYSYNC-JOB	Server plugins downloaded 
2020-06-06 08:46:42.6062 [INFO] SMALLEMBYSYNC-JOB	Server users downloaded 
2020-06-06 08:46:42.9692 [INFO] SMALLEMBYSYNC-JOB	Server devices downloaded 
2020-06-06 08:46:43.0047 [INFO] SMALLEMBYSYNC-JOB	Job finished after 1 minute. 
2020-06-06 08:46:43.0924 [INFO] MEDIASYNC-JOB	Starting job 
2020-06-06 08:46:43.2095 [INFO] MEDIASYNC-JOB	First delete all existing media and root media libraries from database so we have a clean start. 
2020-06-06 08:46:43.2095 [INFO] MEDIASYNC-JOB	Asking MediaServer for all root folders 
2020-06-06 08:46:43.4039 [INFO] MEDIASYNC-JOB	Found 8 root items, getting ready for processing 
2020-06-06 08:46:43.4079 [INFO] MEDIASYNC-JOB	Lets start processing movies 
2020-06-06 08:46:43.4793 [WARN] MEDIASYNC-JOB	0 movies found in parent with id 165db2549e77c71dacef0e83a95cc5de. Propably means something is wrong with the HTTP call. 
2020-06-06 08:46:43.6648 [WARN] MEDIASYNC-JOB	0 movies found in parent with id f4415c72cc16920fce19d78d636a3ce7. Propably means something is wrong with the HTTP call. 
2020-06-06 08:46:43.7213 [INFO] MEDIASYNC-JOB	Found 1306 movies for Movies library 

Link to comment
Share on other sites

averon

Hello, I guess I have a similar issue, I tried a lot of things to fix, but while scanning media, after 400-600 movies it fails. I enabled "--log-level 1" also enabled the advanced logging via web panel (even though I didn't notice any difference) 

OS: Using window 10 x64

Emby: 4.4.3.0

EmbyStat: "v0.2.0-beta.20" also tried "v0.2.0-beta.19"

 

 

Already tried/checked:

  • user permissions (different users, service, admin)
  • file permissions (set owner ect)
  • firewall (even though it runs on same machine)
  • searched for movies missing any metadata > deleted them, since I didnt care
  • maybe some other stuff

 

Log:

2020-06-08 03:33:17.3193 [DEBUG] BASE-HTTP-CLIENT	External call: [GET]http://192.168.0.199:8096/Items 
2020-06-08 03:33:17.3193 [DEBUG] BASE-HTTP-CLIENT	External call: [GET]http://192.168.0.199:8096/Items 
2020-06-08 03:33:17.3193 [DEBUG] BASE-HTTP-CLIENT	External call: [GET]http://192.168.0.199:8096/Items 
2020-06-08 03:33:17.3390 [DEBUG] BASE-HTTP-CLIENT	External call: [GET]http://192.168.0.199:8096/Items 
2020-06-08 03:33:17.3390 [DEBUG] BASE-HTTP-CLIENT	Call failed => StatusCode:0, Content: 
2020-06-08 03:33:17.3518 [WARN] MEDIASYNC-JOB	Movie error: Object reference not set to an instance of an object. 
2020-06-08 03:33:17.3518 [WARN] MEDIASYNC-JOB	Movie error: Object reference not set to an instance of an object. 
2020-06-08 03:33:17.3518 [ERROR] Error while running job System.NullReferenceException: Object reference not set to an instance of an object.
   at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovies(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList`1 libraries, CancellationToken cancellationToken)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync()
   at EmbyStat.Jobs.BaseJob.Execute()
2020-06-08 03:33:17.4040 [WARN] MEDIASYNC-JOB	Job failed, check logs for more info. 
2020-06-08 03:33:17.4920 [WARN] Failed to process the job '27504478-fbe6-4ef8-9fbe-8b919c859c1a': an exception occurred. Retry attempt 1 of 2 will be performed in 00:00:19. System.NullReferenceException: Object reference not set to an instance of an object.
   at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovies(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformMovieSyncAsync(String parentId, Int32 startIndex, Int32 limit)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList`1 libraries, CancellationToken cancellationToken)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync()
   at EmbyStat.Jobs.BaseJob.Execute()
   at EmbyStat.Jobs.BaseJob.Execute()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

any idea to fix this?

 

also interessting:

  • after the error, it fails to connect to emby for like 30 seconds, could it be a timeout thingy?
  • it actually fetches movie data from emby
  • the small update works 
Link to comment
Share on other sites

reggi
2020-06-08 03:33:17.3390 [DEBUG] BASE-HTTP-CLIENT    Call failed => StatusCode:0, Content:

This line is a bit concerning. It should give a proper status code even if the call fails. I'll have to check why it's returning a status code 0 instead of a proper status code. 

Link to comment
Share on other sites

averon
2020-06-08 03:33:17.3390 [DEBUG] BASE-HTTP-CLIENT    Call failed => StatusCode:0, Content:

This line is a bit concerning. It should give a proper status code even if the call fails. I'll have to check why it's returning a status code 0 instead of a proper status code. 

 

 

Well, I tried different installs, suddenly it worked when I enabled https. But I had the zip version in use, so I installed the exe version over the zip installation to get the service installed. After another update it failed again. Running out of ideas.

Link to comment
Share on other sites

  • 3 weeks later...
reggi

Hi guys,

So after a long silence I have some new screens ready for reviewing. I'm recreating the UI completely because it started to get buggy and slow. Started to use React and is shows some promising stuff, better graph libraries and stuff as well. Any way, have a look at the screenshots and let me know what you think!

I do have a question for all native English speakers (and every one who speaks better English then me :) ). I created a Movies table (movies4.jpg) and want to add some dynamic filter mechanism (movies5.jpg and movies6jpg) but I'm a but stuck on how to place the dropdowns to create a natural flow in creating filters.

I have 2 types of filters

- array filters: (fields: genres, subtitles, Images, ...). Examples are selecting all movies with genre "Comedy", if you place 2 filters on genre it will perform an AND between off filters.

- field filters: (fields: title, imdb, ...). Examples are selecting all movies where the title (not) starts with, (not) contains or (not) equals with a certain string. 

 

I'm still missing A LOT of stuff that is included in the Angular version so still a long way to go. But I think I think it will look better and less buggy in the future if I switch now. I also will add authentication to this version. What I also added is that from now on you have to select the libraries itself and not anymore on library types (wizard2.png.jpg) which was a feature request as well.

Let me know what you think about it, I hope I can upload a beta soon (maybe with only movie support for now just for testing)

movies1.jpg

movies2.jpg

movies3.jpg

movies4.jpg

movies5.jpg

movies6.jpg

wizard1.png

jobs.jpg

wizard2.png.jpg

  • Like 1
Link to comment
Share on other sites

Sammy

@reggi

If you can ask your questions of us English speakers with pictures to show what it is that you are talking about it will be easier to answer them.

Link to comment
Share on other sites

heciruam

Looks good! Thanks for your hard work.

Number 1 feature that I want to see is a "history" tab that shows plays chronologically for all people. The way it's handled in plexpy/tautulli or at least how it used to be. I haven't used that in 3 years.

 

Link to comment
Share on other sites

@reggi thanks for the update.

A suggestion : 

image.thumb.png.01ea98457fbb00ea0876163058ed2a25.png

In this screen, instead of displaying only a movie for each category, it could be great to have a widget that list the top 5 highest rated movies for example and a link to view more with a list of all movies ordered by ranking desc

Something like that with a view more at the bottom

image.png.1e00845f6b6a25ecad8873fb7f9dfa32.png
or more like tautulli : 
45068438-77b89000-b095-11e8-94cc-da92c1d597f3.png

 

EDIT : You can also do the same thing for actors, it will prevent to have only Stan Lee displayed in a lot of genre :)

EDIT 2 : Here is some inspiration for filters : 
https://dribbble.com/shots/6592115-Movies-Dashboard/attachments
In the left part you can add all your available filters, once one is selected it's going to the top with the possiblity to delete it

or this way to add advanced filters : 
https://dribbble.com/shots/4068867-Advanced-Filter-States-Flow

Edited by kesm
  • Thanks 1
Link to comment
Share on other sites

reggi

@kesm, thanks for the ideas and screens!!!!

I get frustrated sometimes because I'm not really a good designer so input is always more then welcome!

The tautulli implementation does look very nice indeed, i'll see what I can do. As for the dribbble designs, I do love them! Never heard of the website before so it could help me with other stuff as well in the future! 

Thanks!!

Link to comment
Share on other sites

Dribbble is nice for inspiration, there is a lot of designers that put stuff there. Glad it help you to find some ideas :)

Link to comment
Share on other sites

reggi

image.thumb.png.275163c445b6be145e9909230876e486.png

So I did some refactoring after the idea from @kesm. The titles are clickable and on hover they become yellow like the other text. I was just thinking that the yellow looks a lot like tautulli so maybe I need to find some other color scheme then blue-yellow as default theme colors. Maybe going back to the Emby green would be better.

  • Like 5
Link to comment
Share on other sites

rechigo

This is looking great reggi, I wish I had enough knowledge to help out :(

I hear you're using react now as opposed to angular, which I have some experience with. Are you still using material design? If so, are you using the material-ui react components?

Link to comment
Share on other sites

reggi

Thanks!

I switched to React because I needed to start working with it on my daytime job and I found out that it's (for me, don't want to start a Angular VS React war here) works a lot better. I'm indeed using the metarial-ui react package, it's way better then the Angular one I think. Also, I'm working with devexpress for all the charts and tables, it also a lot better then the package I found for Angular (I didn't knew devexpress was also for Angular at that time!)

Currenty working on the filtering of the movies list page. Will be hard one to make dynamic but I'm getting there. Maybe I will release a new beta with the React UI when I have the authentication and Movies page in order so you all can test it. Adding the shows will be the next step then.

Link to comment
Share on other sites

Nice can't wait to test it, I also think it could be better to have matching colors with emby/jellyfin, yellow is more or less affiliate to plex.

Did the poster change when mouse is over another movie? Here is a small video on how tautulli displays it

tautulli.gif.77bbe3354f747a557ceae50f9a585665.gif

  • Like 2
Link to comment
Share on other sites

reggi

owww, that's a nice feature. Currently it just shows the top poster. I'll see what I can do :D

  • Like 1
Link to comment
Share on other sites

Sammy

Will this update bring more stats for Users and/or Devices?

Edited by Sammy
Link to comment
Share on other sites

reggi

At the moment not. I'm still trying to get a basic tool working without to many bugs. 

I did already removed a lot of bugs while refactoring to React so let's hope that will speed up the process. After I implemented the show pages I can start working on the user/device data. I saw Emby is supporting webhooks so that might be a better way then web sockets to get data to EmbyStat!

Link to comment
Share on other sites

Painkiller8818

Great, i really love to see you are still working on that great Tool.

I hope you will find the time to implement Current playing streams soon. This is one of the most important things for me when using tautulli and i would love to see active streams and the info if the user is transcoding (and what is transcoded) or if it is direct play.

I think if you could realise this one day, it could be a real alternative to tautulli and that makes it a massive tool for every emby user :)

Link to comment
Share on other sites

Diedrich
Great, i really love to see you are still working on that great Tool.

 

I hope you will find the time to implement Current playing streams soon. This is one of the most important things for me when using tautulli and i would love to see active streams and the info if the user is transcoding (and what is transcoded) or if it is direct play.

 

I think if you could realise this one day, it could be a real alternative to tautulli and that makes it a massive tool for every emby user [emoji4]

You can see the transcode info on the Emby admin dashboard

 

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