Skip to content

audioplayers: Rename player-id to playerId as it should be #342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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