Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #85 from tsirysndr/playlist-folder-id

rpc: add folder_id to create_playlist parameters

authored by

Tsiry Sandratraina and committed by
GitHub
cb28527d b007d59b

+19 -20
+16 -20
crates/rpc/proto/rockbox/v1alpha1/playlist.proto
··· 35 35 36 36 message AmountRequest {} 37 37 38 - message AmountResponse { 39 - int32 amount = 1; 40 - } 38 + message AmountResponse { int32 amount = 1; } 41 39 42 40 message PlaylistResumeRequest {} 43 41 44 - message PlaylistResumeResponse { 45 - int32 code = 1; 46 - } 42 + message PlaylistResumeResponse { int32 code = 1; } 47 43 48 44 message ResumeTrackRequest { 49 45 int32 start_index = 1; ··· 74 70 75 71 message RemoveAllTracksResponse {} 76 72 77 - message RemoveTracksRequest { 78 - repeated int32 positions = 1; 79 - } 73 + message RemoveTracksRequest { repeated int32 positions = 1; } 80 74 81 75 message RemoveTracksResponse {} 82 76 83 77 message CreatePlaylistRequest { 84 78 string name = 1; 85 79 repeated string tracks = 2; 80 + optional string folder_id = 3; 86 81 } 87 82 88 - message CreatePlaylistResponse { 89 - int32 start_index = 1; 90 - } 83 + message CreatePlaylistResponse { int32 start_index = 1; } 91 84 92 85 message InsertTracksRequest { 93 86 optional string playlist_id = 1; ··· 133 126 134 127 message InsertArtistTracksResponse {} 135 128 136 - message ShufflePlaylistRequest { 137 - int32 start_index = 1; 138 - } 129 + message ShufflePlaylistRequest { int32 start_index = 1; } 139 130 140 131 message ShufflePlaylistResponse {} 141 132 ··· 144 135 rpc GetResumeInfo(GetResumeInfoRequest) returns (GetResumeInfoResponse) {} 145 136 rpc GetTrackInfo(GetTrackInfoRequest) returns (GetTrackInfoResponse) {} 146 137 rpc GetFirstIndex(GetFirstIndexRequest) returns (GetFirstIndexResponse) {} 147 - rpc GetDisplayIndex(GetDisplayIndexRequest) returns (GetDisplayIndexResponse) {} 138 + rpc GetDisplayIndex(GetDisplayIndexRequest) 139 + returns (GetDisplayIndexResponse) {} 148 140 rpc Amount(AmountRequest) returns (AmountResponse) {} 149 141 rpc PlaylistResume(PlaylistResumeRequest) returns (PlaylistResumeResponse) {} 150 142 rpc ResumeTrack(ResumeTrackRequest) returns (ResumeTrackResponse) {} 151 143 rpc SetModified(SetModifiedRequest) returns (SetModifiedResponse) {} 152 144 rpc Start(StartRequest) returns (StartResponse) {} 153 145 rpc Sync(SyncRequest) returns (SyncResponse) {} 154 - rpc RemoveAllTracks(RemoveAllTracksRequest) returns (RemoveAllTracksResponse) {} 146 + rpc RemoveAllTracks(RemoveAllTracksRequest) 147 + returns (RemoveAllTracksResponse) {} 155 148 rpc RemoveTracks(RemoveTracksRequest) returns (RemoveTracksResponse) {} 156 149 rpc CreatePlaylist(CreatePlaylistRequest) returns (CreatePlaylistResponse) {} 157 150 rpc InsertTracks(InsertTracksRequest) returns (InsertTracksResponse) {} 158 - rpc InsertDirectory(InsertDirectoryRequest) returns (InsertDirectoryResponse) {} 151 + rpc InsertDirectory(InsertDirectoryRequest) 152 + returns (InsertDirectoryResponse) {} 159 153 rpc InsertPlaylist(InsertPlaylistRequest) returns (InsertPlaylistResponse) {} 160 154 rpc InsertAlbum(InsertAlbumRequest) returns (InsertAlbumResponse) {} 161 - rpc InsertArtistTracks(InsertArtistTracksRequest) returns (InsertArtistTracksResponse) {} 162 - rpc ShufflePlaylist(ShufflePlaylistRequest) returns (ShufflePlaylistResponse) {} 155 + rpc InsertArtistTracks(InsertArtistTracksRequest) 156 + returns (InsertArtistTracksResponse) {} 157 + rpc ShufflePlaylist(ShufflePlaylistRequest) 158 + returns (ShufflePlaylistResponse) {} 163 159 }
+2
crates/rpc/src/api/rockbox.v1alpha1.rs
··· 4927 4927 pub name: ::prost::alloc::string::String, 4928 4928 #[prost(string, repeated, tag = "2")] 4929 4929 pub tracks: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 4930 + #[prost(string, optional, tag = "3")] 4931 + pub folder_id: ::core::option::Option<::prost::alloc::string::String>, 4930 4932 } 4931 4933 #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4932 4934 pub struct CreatePlaylistResponse {
crates/rpc/src/api/rockbox_descriptor.bin

This is a binary file and will not be displayed.

+1
crates/rpc/src/playlist.rs
··· 238 238 let body = serde_json::json!({ 239 239 "name": request.name, 240 240 "tracks": request.tracks, 241 + "folder_id": request.folder_id, 241 242 }); 242 243 243 244 let url = format!("{}/playlists", rockbox_url());