Skip to content

Commit

Permalink
audioplayers: Rename player-id to playerId as it should be
Browse files Browse the repository at this point in the history
  • Loading branch information
DoumanAsh authored and ardera committed Jul 3, 2023
1 parent bbded21 commit 7d3d426
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/plugins/audioplayers/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void audio_player_on_media_error(struct audio_player *self, GError *error, gchar
self->channel,
"audio.onError",
&STDMAP2(
STDSTRING("player_id"),
STDSTRING("playerId"),
STDSTRING(self->player_id),
STDSTRING("value"),
STDSTRING(error_message)
Expand Down Expand Up @@ -251,7 +251,7 @@ void audio_player_on_position_update(struct audio_player *self) {
self->channel,
"audio.onCurrentPosition",
&STDMAP2(
STDSTRING("player_id"),
STDSTRING("playerId"),
STDSTRING(self->player_id),
STDSTRING("value"),
STDINT64(audio_player_get_position(self))
Expand All @@ -269,7 +269,7 @@ void audio_player_on_duration_update(struct audio_player *self) {
self->channel,
"audio.onDuration",
&STDMAP2(
STDSTRING("player_id"),
STDSTRING("playerId"),
STDSTRING(self->player_id),
STDSTRING("value"),
STDINT64(audio_player_get_duration(self))
Expand All @@ -288,7 +288,7 @@ void audio_player_on_seek_completed(struct audio_player *self) {
self->channel,
"audio.onSeekComplete",
&STDMAP2(
STDSTRING("player_id"),
STDSTRING("playerId"),
STDSTRING(self->player_id),
STDSTRING("value"),
STDBOOL(true)
Expand All @@ -310,7 +310,7 @@ void audio_player_on_playback_ended(struct audio_player *self) {
self->channel,
"audio.onComplete",
&STDMAP2(
STDSTRING("player_id"),
STDSTRING("playerId"),
STDSTRING(self->player_id),
STDSTRING("value"),
STDBOOL(true)
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/audioplayers/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ static int on_local_method_call(char *channel, struct platch_obj *object, Flutte
return platch_respond_illegal_arg_std(responsehandle, "Expected `arg` to be a map.");
}

tmp = stdmap_get_str(&object->std_arg, "player_id");
tmp = stdmap_get_str(&object->std_arg, "playerId");
if (tmp == NULL || !STDVALUE_IS_STRING(*tmp)) {
LOG_ERROR("Call missing mandatory parameter player_id.\n");
return platch_respond_illegal_arg_std(responsehandle, "Expected `arg['player_id'] to be a string.");
return platch_respond_illegal_arg_std(responsehandle, "Expected `arg['playerId'] to be a string.");
}
player_id = STDVALUE_AS_STRING(*tmp);
tmp = stdmap_get_str(args, "mode");
Expand Down

0 comments on commit 7d3d426

Please sign in to comment.