view tracks in playlist view and play playlists
This commit is contained in:
@@ -59,6 +59,34 @@ export namespace playlist {
|
||||
this.Name = source["Name"];
|
||||
}
|
||||
}
|
||||
export class Track {
|
||||
ID: number;
|
||||
Position: number;
|
||||
FilePath: string;
|
||||
Title: string;
|
||||
Artist: string;
|
||||
Album: string;
|
||||
CoverArtPath: string;
|
||||
CoverArtThumbnailPath: string;
|
||||
Duration: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Track(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.ID = source["ID"];
|
||||
this.Position = source["Position"];
|
||||
this.FilePath = source["FilePath"];
|
||||
this.Title = source["Title"];
|
||||
this.Artist = source["Artist"];
|
||||
this.Album = source["Album"];
|
||||
this.CoverArtPath = source["CoverArtPath"];
|
||||
this.CoverArtThumbnailPath = source["CoverArtThumbnailPath"];
|
||||
this.Duration = source["Duration"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -11,4 +11,6 @@ export function CreatePlaylistWithTracks(arg1:string,arg2:Array<string>):Promise
|
||||
|
||||
export function GetAllPlaylists():Promise<Array<playlist.Summary>>;
|
||||
|
||||
export function GetPlaylistTracks(arg1:number):Promise<Array<playlist.Track>>;
|
||||
|
||||
export function SetContext(arg1:context.Context):Promise<void>;
|
||||
|
||||
@@ -18,6 +18,10 @@ export function GetAllPlaylists() {
|
||||
return window['go']['playlist']['Service']['GetAllPlaylists']();
|
||||
}
|
||||
|
||||
export function GetPlaylistTracks(arg1) {
|
||||
return window['go']['playlist']['Service']['GetPlaylistTracks'](arg1);
|
||||
}
|
||||
|
||||
export function SetContext(arg1) {
|
||||
return window['go']['playlist']['Service']['SetContext'](arg1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user