File patch.patch of Package mpv-mpris

diff -urN a/mpris.c b/mpris.c
--- a/mpris.c	2022-04-07 05:39:39.000000000 +0900
+++ b/mpris.c	2022-04-12 10:11:50.088494001 +0900
@@ -512,13 +512,8 @@
         g_dbus_method_invocation_return_value(invocation, NULL);
 
     } else if (g_strcmp0(method_name, "PlayPause") == 0) {
-        int paused;
-        if (ud->status == STATUS_PAUSED) {
-            paused = FALSE;
-        } else {
-            paused = TRUE;
-        }
-        mpv_set_property(ud->mpv, "pause", MPV_FORMAT_FLAG, &paused);
+        const char *cmd[] = {"cycle", "pause", NULL};
+        mpv_command_async(ud->mpv, 0, cmd);
         g_dbus_method_invocation_return_value(invocation, NULL);
 
     } else if (g_strcmp0(method_name, "Play") == 0) {
@@ -532,12 +527,12 @@
         g_dbus_method_invocation_return_value(invocation, NULL);
 
     } else if (g_strcmp0(method_name, "Next") == 0) {
-        const char *cmd[] = {"playlist_next", NULL};
+        const char *cmd[] = {"add", "chapter", "1", NULL};
         mpv_command_async(ud->mpv, 0, cmd);
         g_dbus_method_invocation_return_value(invocation, NULL);
 
     } else if (g_strcmp0(method_name, "Previous") == 0) {
-        const char *cmd[] = {"playlist_prev", NULL};
+        const char *cmd[] = {"add", "chapter", "-1", NULL};
         mpv_command_async(ud->mpv, 0, cmd);
         g_dbus_method_invocation_return_value(invocation, NULL);
 
openSUSE Build Service is sponsored by