Skip to content
Open
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
4 changes: 4 additions & 0 deletions crates/server/src/handlers/albums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ pub async fn get_album_tracks(
res.json(&tracks);
Ok(())
}

pub async fn play_album(ctx: &Context, req: &Request, res: &mut Response) -> Result<(), Error> {
Ok(())
}
5 changes: 5 additions & 0 deletions crates/server/src/handlers/artists.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ pub async fn get_artist_tracks(
res.json(&tracks);
Ok(())
}

pub async fn play_artist_tracks(ctx: &Context, req: &Request, res: &mut Response) -> Result<(), Error> {
Ok(())
}

4 changes: 4 additions & 0 deletions crates/server/src/handlers/browse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ pub async fn get_tree_entries(
res.json(&entries);
Ok(())
}

pub fn play_directory(ctx: &Context, req: &Request, res: &mut Response) -> Result<(), Error> {
Ok(())
}
3 changes: 3 additions & 0 deletions crates/server/src/handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ macro_rules! async_handler {
async_handler!(albums, get_albums);
async_handler!(albums, get_album);
async_handler!(albums, get_album_tracks);
async_handler!(albums, play_album);
async_handler!(artists, get_artists);
async_handler!(artists, get_artist);
async_handler!(artists, get_artist_albums);
async_handler!(artists, get_artist_tracks);
async_handler!(artists, play_artist_tracks);
async_handler!(browse, get_tree_entries);
async_handler!(player, load);
async_handler!(player, play);
Expand All @@ -60,6 +62,7 @@ async_handler!(playlists, get_playlist_tracks);
async_handler!(playlists, insert_tracks);
async_handler!(playlists, remove_tracks);
async_handler!(playlists, get_playlist);
async_handler!(playlists, play_playlist);
async_handler!(tracks, get_tracks);
async_handler!(tracks, get_track);
async_handler!(system, get_rockbox_version);
Expand Down
4 changes: 4 additions & 0 deletions crates/server/src/handlers/playlists.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,7 @@ pub async fn get_playlist(ctx: &Context, _req: &Request, res: &mut Response) ->
drop(player_mutex);
Ok(())
}

pub async fn play_playlist(ctx: &Context, req: &Request, res: &mut Response) -> Result<(), Error> {
Ok(())
}
4 changes: 3 additions & 1 deletion crates/server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ pub extern "C" fn start_server() {
app.get("/albums", get_albums);
app.get("/albums/:id", get_album);
app.get("/albums/:id/tracks", get_album_tracks);

app.put("/albums/:id/play", play_album);
app.get("/artists", get_artists);
app.get("/artists/:id", get_artist);
app.get("/artists/:id/albums", get_artist_albums);
app.get("/artists/:id/tracks", get_artist_tracks);
app.put("/artists/:id/play", play_artist_tracks);

app.get("/browse/tree-entries", get_tree_entries);

Expand Down Expand Up @@ -91,6 +92,7 @@ pub extern "C" fn start_server() {
app.post("/playlists/:id/tracks", insert_tracks);
app.delete("/playlists/:id/tracks", remove_tracks);
app.get("/playlists/:id", get_playlist);
app.put("/playlists/:id/play", play_playlist);

app.get("/tracks", get_tracks);
app.get("/tracks/:id", get_track);
Expand Down
Loading