add repeat toggle button
[uwplayer.git] / application / player.c
index 4764e98..4d0ef22 100644 (file)
@@ -561,8 +561,11 @@ static void json_print(JSONValue *value, char *name, int indent) {
 }
 
 void PlayerEOF(Player *p) {
-    char *cmd = "{ \"command\": [\"set_property\", \"playback-time\", 0] }\n";
-    write(p->ipc, cmd, strlen(cmd));
+    MainWindow *win = GetMainWindow();
+    if(win->repeatTrack) {
+        char *cmd = "{ \"command\": [\"set_property\", \"playback-time\", 0] }\n";
+        write(p->ipc, cmd, strlen(cmd));
+    }
 }
 
 void PlayerHandleInput(MainWindow *win, Player *p, XmDrawingAreaCallbackStruct *cb) {