mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 22:29:38 +00:00
Replace Database connection with web server API
This commit is contained in:
@@ -8,13 +8,13 @@ export class AlbumArtService {
|
||||
|
||||
constructor(private electronService: ElectronService) { }
|
||||
|
||||
private imageCache: { [songID: number]: Buffer } = {}
|
||||
private imageCache: { [songID: number]: string } = {}
|
||||
|
||||
async getImage(songID: number): Promise<Buffer | null> {
|
||||
async getImage(songID: number): Promise<string | null> {
|
||||
if (this.imageCache[songID] == undefined) {
|
||||
const albumArtResult = await this.electronService.invoke('album-art', songID)
|
||||
if (albumArtResult) {
|
||||
this.imageCache[songID] = albumArtResult.art
|
||||
this.imageCache[songID] = albumArtResult.base64Art
|
||||
} else {
|
||||
this.imageCache[songID] = null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user