Jump to content

Timeshift for DateCreated - timestamp?


JanneKah

Recommended Posts

JanneKah

Hello,

I'm currently running into a problem when writing data from an emby api call into a influxdb. When emby adds items at the same time, the DateCreated timestamp is the same for all these items. This makes sense since emby added them all at the same time. But it makes it a bit complicated when you write those dates into an influxdb since it only adds one of theses items to the matching timestamp. 5 episodes added at the same time become one only in your influxdb. 

So having the option to set a tiny (.001s) timeshift between the DateCreated timestamps would be amazing.Is there one already that I don't see?

Edited by JanneKah
Link to comment
Share on other sites

JanneKah

It's posted to the DB automatically, by telegraf. Maybe I can figure out a way to apply a shift there, doubt it though. But thank you.

Link to comment
Share on other sites

PenkethBoy

or apply a shift to the db records?

if not then you need to probably pull the records from emby via the api - modify - and then post to the db

Link to comment
Share on other sites

JanneKah

Thanks @PenkethBoy

I'm not sure I can do this. I'm going to stick with the non-influxdb solution I guess. There is a way to show all the items created at the same time without using a DB.

Fortunately the emby API shows DateCreated data of all media ever added if only you set the limit parameter high enough. That -by the way- was the reason for my other topic here asking for a API parameter to limit the API results not only by number of items (simply using limit=n) but limiting it by DateCreated (and LastPlayed for another of my use scenarios).

 

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