Skip to content

Commit

Permalink
Playlist query also uses the selected library
Browse files Browse the repository at this point in the history
  • Loading branch information
geloczi committed Dec 19, 2021
1 parent 93c4151 commit 9bd8820
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions SynologyDotNet.AudioStation/AudioStationClient.Playlist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public partial class AudioStationClient
public async Task<ApiListRessponse<PlaylistList>> ListPlaylistsAsync(int limit, int offset)
{
var result = await Client.QueryListAsync<ApiListRessponse<PlaylistList>>(SYNO_AudioStation_Playlist, "list", limit, offset,
("library", "all"));
GetLibraryArg());
return result;
}

Expand All @@ -30,7 +30,7 @@ public async Task<ApiListRessponse<PlaylistList>> ListPlaylistsAsync(int limit,
public async Task<ApiDataResponse<Playlist>> GetPlaylistAsync(int limit, int offset, string id)
{
var result = await Client.QueryListAsync<ApiListRessponse<PlaylistList>>(SYNO_AudioStation_Playlist, "getinfo", limit, offset,
("library", "all"),
GetLibraryArg(),
("id", id),
("additional", "songs") //("additional", "songs_song_tag,songs_song_audio,songs_song_rating,sharing_info")
);
Expand Down
9 changes: 1 addition & 8 deletions SynologyDotNet.AudioStation/Model/Playlist.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
using SynologyDotNet.Core.Responses;

namespace SynologyDotNet.AudioStation.Model
namespace SynologyDotNet.AudioStation.Model
{
public class PlaylistList : ListResponseBase
{
public Playlist[] playlists { get; set; }
}

public class Playlist
{
public static class ReservedNames
Expand Down
9 changes: 9 additions & 0 deletions SynologyDotNet.AudioStation/Model/PlaylistList.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using SynologyDotNet.Core.Responses;

namespace SynologyDotNet.AudioStation.Model
{
public class PlaylistList : ListResponseBase
{
public Playlist[] playlists { get; set; }
}
}

0 comments on commit 9bd8820

Please sign in to comment.