Author Topic: Clock accuracy and search for an API  (Read 81 times)

Slim

  • New User

  • Offline
  • *
  • 2
Clock accuracy and search for an API
« on: March 15, 2019, 11:03:44 AM »
I have been searching for some time now, if there is an API available for RadioDJ but I didn't find any so far, probably because it isn't developed (no offense here, just a fact I think).

For a ongoing app development, I have to get more information than just current played title or other metadata ; I need to get the full playlist, last played song date, categories... (I do it via Node JS requesting the DB). So for many info the DB request is enough.

My concern is about the clock and its accuracy regarding the system's clock. When I check the time difference between the system's clock vs the RDJ displayed clock I can see a notable difference (from several 10ms to almost 1sec depending on the RDJ session...!).
So when I get the history's last played song date (date_played) I am wondering if the result date is accurate (though it is not milliseconds accurate, just seconds accurate sadly) regarding the system's clock.

So two questions here:
  • Can we trust the DB recorded date to be system 's clock sync?
  • Is there an API (CLI ?) or a way to access some RDJ data except DB requests?

Thanks in advance !

PresidentOfACPJ

  • Jr. Member

  • Offline
  • **
  • 75
  • Personal Text
    We play all kinds of Rock!
    • RADIO ROCK FM - O ROCK ALTERNATIVO COM PITADAS DE CLASSIC ROCK!
Re: Clock accuracy and search for an API
« Reply #1 on: March 15, 2019, 02:50:31 PM »
Im finishing my own Rting Script as its being called , its consists in asscript that the listener see the song playing artist and title, then theres two buttons, two small gloves (as facebook like button)[Thumb up and thumb down]

then listener click one of them, then the current song gets a vte, it gets on like/dislike immediatelly. :ok:

in this scriipt im adding soon some improvemment. but not sure if i let it valiable here as soon as posible, or when the improvements are done. :bash:

BUT DEMOSCRIPT |YES | you can use that.

Requests scriptalready has last songs played, you just have to set it up to show the last played songs ordering by last to first, - default is shuffle.

I not sure if i got wut you need. Sorry. Please let me know.

Last fm API maybe can help you too.


 :cool:
RĂ¡dio Rock FM:

http://radiorockfm.com.br/
twitter.com/radiorockfmreal/
fb.com/radiorockfmreal/

Slim

  • New User

  • Offline
  • *
  • 2
Re: Clock accuracy and search for an API
« Reply #2 on: March 15, 2019, 04:42:51 PM »
Thanks for this reply but :
Quote
I not sure if i got wut you need. Sorry. Please let me know.
...mmh I don't think so.

I am trying to know if there is some kind of native RadioDJ API to access props/methods/events directly from the locally installed application ; third party derived/online API doesn't fit with my needs especially because I need time accuracy the most precise possible.

Plus I am wondering if the DB dates recorded are based (i.e. date_played from history table) on the system's clock (hopefully) rather than a RadioDJ internal clock which is not very accurate according to the noticeable difference between system's clock and RDJ displayed clock (see the gif attached below...)!