mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
playlist tab/view
This commit is contained in:
@@ -6,6 +6,8 @@ import {
|
||||
ArtistInfoElement,
|
||||
ChildElement,
|
||||
DirectoryElement,
|
||||
PlaylistElement,
|
||||
PlaylistWithSongsElement,
|
||||
} from '@app/subsonic/elements'
|
||||
|
||||
export type ResponseStatus = 'ok' | 'failed'
|
||||
@@ -153,3 +155,26 @@ export class GetAlbumList2Response extends BaseGetAlbumListResponse<AlbumID3Elem
|
||||
super(xml, AlbumID3Element)
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Playlists
|
||||
//
|
||||
|
||||
export class GetPlaylistsResponse {
|
||||
playlists: PlaylistElement[] = []
|
||||
|
||||
constructor(xml: Document) {
|
||||
const playlistElements = xml.getElementsByTagName('playlist')
|
||||
for (let i = 0; i < playlistElements.length; i++) {
|
||||
this.playlists.push(new PlaylistElement(playlistElements[i]))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class GetPlaylistResponse {
|
||||
playlist: PlaylistWithSongsElement
|
||||
|
||||
constructor(xml: Document) {
|
||||
this.playlist = new PlaylistWithSongsElement(xml.getElementsByTagName('playlist')[0])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user