JanneKah 7 Posted April 15, 2021 Share Posted April 15, 2021 (edited) 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 April 15, 2021 by JanneKah Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted April 15, 2021 Share Posted April 15, 2021 modify the timestamp before you post it to the db? 1 Link to comment Share on other sites More sharing options...
JanneKah 7 Posted April 15, 2021 Author Share Posted April 15, 2021 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 More sharing options...
PenkethBoy 2063 Posted April 16, 2021 Share Posted April 16, 2021 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 More sharing options...
JanneKah 7 Posted April 17, 2021 Author Share Posted April 17, 2021 (edited) 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 April 17, 2021 by JanneKah Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now