chiark / gitweb /
Merge from disorder.dev.
[disorder] / server / play.c
index 303090107e4cf400f17bc7f894355366b457c273..b9d452bb7f8ff9bc8352b708b154999c1100280e 100644 (file)
@@ -583,7 +583,7 @@ void play(ev_source *ev) {
     }
     /* It's become the playing track */
     playing = q;
-    time(&playing->played);
+    xtime(&playing->played);
     playing->state = playing_started;
     notify_play(playing->track, playing->submitter);
     eventlog("playing", playing->track,
@@ -685,7 +685,7 @@ void scratch(const char *who, const char *id) {
       q = queue_add(config->scratch.s[r], who, WHERE_START, origin_scratch);
     }
     notify_scratch(playing->track, playing->submitter, who,
-                  time(0) - playing->played);
+                  xtime(0) - playing->played);
   }
 }
 
@@ -735,7 +735,7 @@ int pause_playing(const char *who) {
       error(0, "player indicates it cannot pause");
       return -1;
     }
-    time(&playing->lastpaused);
+    xtime(&playing->lastpaused);
     playing->uptopause = played;
     playing->lastresumed = 0;
     break;
@@ -763,13 +763,13 @@ void resume_playing(const char *who) {
   if(!playing) return;
   switch(playing->type & DISORDER_PLAYER_TYPEMASK) {
   case DISORDER_PLAYER_STANDALONE:
-    if(!playing->type & DISORDER_PLAYER_PAUSES) {
+    if(!(playing->type & DISORDER_PLAYER_PAUSES)) {
     default:
       /* Shouldn't happen */
       return;
     }
     play_resume(playing->pl, playing->data);
-    time(&playing->lastresumed);
+    xtime(&playing->lastresumed);
     break;
   case DISORDER_PLAYER_RAW:
     memset(&sm, 0, sizeof sm);