File tree Expand file tree Collapse file tree 2 files changed +14
-15
lines changed
Expand file tree Collapse file tree 2 files changed +14
-15
lines changed Original file line number Diff line number Diff line change 2525 ./configure
2626 make
2727 - name : Upload artifact
28- uses : actions/upload-artifact@v2
28+ uses : actions/upload-artifact@v4
2929 with :
3030 name : mpris-linux-x86_64
3131 path : .libs/mpris.so
Original file line number Diff line number Diff line change @@ -75,26 +75,25 @@ static int onConnect() {
7575 }
7676
7777 DB_plugin_t * hotkeysPlugin = mprisData .deadbeef -> plug_get_for_id ("hotkeys" );
78-
79- if (hotkeysPlugin != NULL ) {
80- debug ("hotkeys plugin detected...\n" );
81-
82- DB_plugin_action_t * dbaction ;
83-
84- for (dbaction = hotkeysPlugin -> get_actions (NULL ); dbaction ; dbaction = dbaction -> next ) {
78+ DB_plugin_t * * plugins = mprisData .deadbeef -> plug_get_list ();
79+ for (int i = 0 ; plugins [i ]; i ++ ) {
80+ for (DB_plugin_action_t * dbaction = plugins [i ]-> get_actions (NULL ); dbaction ; dbaction = dbaction -> next ) {
8581 if (strcmp (dbaction -> name , "prev_or_restart" ) == 0 ) {
8682 debug ("prev_or_restart command detected... previous or restart support enabled\n" );
8783 mprisData .prevOrRestart = dbaction ;
8884 break ;
8985 }
90- }
86+ }
9187
92- if (mprisData .prevOrRestart == NULL ) {
93- debug ("prev_or_restart command not detected... previous or restart support disabled\n" );
94- }
95- } else {
96- debug ("hotkeys plugin not detected... previous or restart support disabled\n" );
97- }
88+ if (mprisData .prevOrRestart != NULL ) {
89+ break ;
90+ }
91+ }
92+
93+
94+ if (mprisData .prevOrRestart == NULL ) {
95+ debug ("prev_or_restart command not detected... previous or restart support disabled\n" );
96+ }
9897
9998 return 0 ;
10099}
You can’t perform that action at this time.
0 commit comments