Jump to content


Photo

Developing a standalone embystat server

emby statistics server

  • Please log in to reply
129 replies to this topic

#1 reggi OFFLINE  

reggi

    Advanced Member

  • Members
  • 290 posts
  • Local time: 03:49 PM
  • LocationAntwerp, Belgium

Posted 03 March 2018 - 08:49 AM

5c613d25370ed_logo_color.png
 
all.png total.png embystat.png localized.png embystat.png embystat.png
 
 
EmbyStat is a personal web server that can calculate all kinds of statistics from your (local) Emby server. Just install this on your server and let him calculate all kinds of fun stuff.
 
This project is still in Alpha fase, but feel free to test it on your computer.
 
Packages
Supported platforms as the moment are:
I will try to support as many platforms as possible. More and more will come in the future!
If you have knowledge about building Unix packages please feel free to contact me so I can support as many platforms as possible.
 
 
Installation Guides
Go to https://github.com/m...byStat/releases and grab the latest release.
The packages are selfcontained so you don't need to install dotnet runtime on your host.
 
Run the server (Kestrel on Windows example)
Embystat.exe --port <port>

Passing a port is optional, default port is 5432

 

 
To host it in a Docker container you can use the following command
docker run -p <port>:5432 uping/embystat:beta-win
docker run -p <port>:5432 uping/embystat:beta-linux
Translations
Translations are managed with the Crowdin web service. Feel free to help me translate the application in your own language here: https://crowdin.com/project/embystat. If your language is not listed just create a new feature request or ping me.
 
Technology
This project is build from scratch with the following technologies:
  • .NET CORE 2.2
  • Sqlite
  • SignalR
  • Serilog
  • Angular 5
  • SCSS styling
 
Roadmap
A lot of things need to be done before I can go life with this and publish my first 1.0 release. This will happen when all features from the Emby statistics plugin are implemented in EmbyStat.  

Edited by reggi, 11 February 2019 - 05:42 AM.

  • CBers, JoshFink, Swynol and 6 others like this

#2 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 2913 posts
  • Local time: 02:49 PM
  • LocationWarrington,UK

Posted 03 March 2018 - 09:10 AM

interesting :)

 

Happy to test and give feedback etc

 

need more specifics to see if i can help on the project itself

 

what are you using for the backend to store the "stats"? xml? some db? ....



#3 reggi OFFLINE  

reggi

    Advanced Member

  • Members
  • 290 posts
  • Local time: 03:49 PM
  • LocationAntwerp, Belgium

Posted 03 March 2018 - 09:16 AM

Hey @PenkethBoy, thanks for the support already!

 

I was thinking of a SQLite db. It is well supported in the CORE framework already and runs on all systems.

Probably I will also need an Emby plugin to send start/stop/user events to the stat server. That way the stat server will get real live viewing data and some kind of viewed history after a while.

 

The most difficult part (for me) is getting it up and running in a good way. No point of starting development full throttle if there is no decent system to install/run the server on various platforms I think.



#4 mastrmind11 ONLINE  

mastrmind11

    Advanced Member

  • Members
  • 2517 posts
  • Local time: 09:49 AM
  • LocationLong Island, NY

Posted 03 March 2018 - 09:19 AM

Any reason you're set on .net core and not something universal like Java/Scala?



#5 reggi OFFLINE  

reggi

    Advanced Member

  • Members
  • 290 posts
  • Local time: 03:49 PM
  • LocationAntwerp, Belgium

Posted 03 March 2018 - 09:24 AM

I have no experience with Java or Scala that's why. And at this moment .net core can run on all platforms as well. 

 

Since java and c# are really close I do can have a look at it and see if I can set it up more easily. 


  • J2ghz likes this

#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 119080 posts
  • Local time: 09:49 AM

Posted 03 March 2018 - 10:53 AM

C# with .net core is just as universal.

#7 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2175 posts
  • Local time: 09:49 AM

Posted 03 March 2018 - 10:56 AM

Just use c# on net core.  Anyone running Emby will already have what's needed.



#8 reggi OFFLINE  

reggi

    Advanced Member

  • Members
  • 290 posts
  • Local time: 03:49 PM
  • LocationAntwerp, Belgium

Posted 03 March 2018 - 06:19 PM

@Luke

The problem with a .net core app is that is will open an ugly console app on windows.

 

So what I was thinking was to use a full .net app for windows and a console application that will run on mono on unix platforms. What you think?

I see you guys did the same with Emby, no?

 

Or did you guys find a way to run a .net core app in the background?



#9 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 119080 posts
  • Local time: 09:49 AM

Posted 03 March 2018 - 06:26 PM

After building, this command can change the exe type for windows so that there's no console:

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\editbin.exe" /subsystem:windows "exe path"

Or you can create two application projects - a windows .net core app for windows, a console app for the other operating systems, and then have them both use a shared library with your actual application code.


  • reggi likes this

#10 reggi OFFLINE  

reggi

    Advanced Member

  • Members
  • 290 posts
  • Local time: 03:49 PM
  • LocationAntwerp, Belgium

Posted 03 March 2018 - 06:30 PM

Ha super!

 

I will have a look at that editbin exe first!

But it looks like 2 app projects with shared libs is the most pratical way at the moment.


  • Swynol likes this

#11 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2175 posts
  • Local time: 09:49 AM

Posted 28 March 2018 - 05:09 AM

Don't know if this would be a help or not but take a look at http://tautulli.com/. Tautulli is an open source Plex statistics server that runs onside Plex similar to what you are thinking of doing.

 

I know for a fact that NOT having Tautulli available for Emby has been a reason many people won't switch over to Emby from Plex.  These people just don't want to give up this functionality.

 

Obviously the import routines would need to be different/changed for Emby but other than getting the information into the Tautulli DB it should function almost the same regardless of if the data came from Plex or Emby (with minimal differences).'

 

Definitely worth a hard look to see if this code base can be leveraged.

 

Carlo


  • reggi likes this

#12 reggi OFFLINE  

reggi

    Advanced Member

  • Members
  • 290 posts
  • Local time: 03:49 PM
  • LocationAntwerp, Belgium

Posted 28 March 2018 - 05:33 AM

@cayars

 

Thanks for the input, I will definitely look into that one!

At this moment I'm almost done with my first version, but still have to setup my build server to make docker images, .deb packages, ...

 

If that is done I will show some screenshots here to get some feedback from you guys.


  • heciruam likes this

#13 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2175 posts
  • Local time: 09:49 AM

Posted 28 March 2018 - 05:54 AM

@reggi, if you haven't looked at it yet, maybe don't do it. :)

It's a rewrite of an existing stats server so it's quite powerful and feature packed.  It's a lot to live up to. :)

 

If on the other hand you want to play with it but don't have a Plex setup to use to help populate the DB give me a shout and I can zip up a DB from a test system that will have some info in it for you to play with.

 

Carlo


  • reggi likes this

#14 reggi OFFLINE  

reggi

    Advanced Member

  • Members
  • 290 posts
  • Local time: 03:49 PM
  • LocationAntwerp, Belgium

Posted 28 March 2018 - 09:36 AM

Yeah it will take me some time to get there indeed! :P 

 

i'll PM you if I need a DB to test the Plex setup. Thanks for the support!



#15 reggi OFFLINE  

reggi

    Advanced Member

  • Members
  • 290 posts
  • Local time: 03:49 PM
  • LocationAntwerp, Belgium

Posted 17 April 2018 - 05:39 PM

Hey guys, 

 

After a few weeks of development, I have some screens that I can show you all. Of course, there is still a lot that needs to be done but just so you get an idea of what I'm working on. You will notice it looks a lot like Emby, this is because I'm using the same material design.

And most of all, I would love to have some feedback and ideas from everyone. So feel free to past your most crazy ideas here and I'll see what I can do. 

 

Don't worry, lot's of features are still missing (included but not limited to show stats, user stats, full movie stats, ...)

 

I'm also still looking for some guys that want to help me out with the UI design, I'm not good at it, so if anyone wants to spend some time discussing ideas with me or make some mockups, feel free to do so!

 

Thanks for the help in advance! I really hope I can make this side project work for everyone.

Attached Files


  • Jdiesel, wedgekc, heciruam and 2 others like this

#16 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 2913 posts
  • Local time: 02:49 PM
  • LocationWarrington,UK

Posted 18 April 2018 - 04:57 AM

Hi Reggi

 

Looking forward to giving this a test when you get there

 

One question to kick things off - will your server be able to connect to more than one server at a time?



#17 reggi OFFLINE  

reggi

    Advanced Member

  • Members
  • 290 posts
  • Local time: 03:49 PM
  • LocationAntwerp, Belgium

Posted 18 April 2018 - 05:01 AM

Hi PenkethBoy,

 

At this moment no, maybe in the future, I can implement that as well! It should not be that hard because a "server" is just a row in the database.

Another solution would be that you run multiple instances in separate docker containers.

 

But good idea to allow mulitple servers to connect. I'll make a GitHub issue so I don't forget 



#18 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 2913 posts
  • Local time: 02:49 PM
  • LocationWarrington,UK

Posted 18 April 2018 - 05:22 AM

Ok fine 

 

instances of Your server in dockers?

 

Second question - do you anticipate collecting similar info to the new plugin from null_pointer as it would be good to have all info in one place - or maybe import his info via his backup option as its a text file?



#19 reggi OFFLINE  

reggi

    Advanced Member

  • Members
  • 290 posts
  • Local time: 03:49 PM
  • LocationAntwerp, Belgium

Posted 18 April 2018 - 01:04 PM

What info do you mean? I'm not sure I can follow you, or did I miss something (sorry, been some lang nights already ;) )



#20 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 2913 posts
  • Local time: 02:49 PM
  • LocationWarrington,UK

Posted 18 April 2018 - 02:43 PM

have a look at Null's plugin and you will see he collects additional info to your plugin







Also tagged with one or more of these keywords: emby, statistics, server

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users