From 5ef1d2acb24e7b9ec8566ba29ae4dd025c78d7cb Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Wed, 11 Jun 2025 21:09:11 -0500 Subject: stupid huge update lots of cool stuff --- src/connector.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src/connector.js') diff --git a/src/connector.js b/src/connector.js index 6c557a8..03e6f3d 100644 --- a/src/connector.js +++ b/src/connector.js @@ -6,16 +6,14 @@ class APIConnector { this.socket = io(url) this.asset_index = 0 - this.asset = null - this.prevAssets = null - this.nextAssets = null + this.movement = 0 + this.assets = null this.seekCallbacks = [] this.socket.on("seek", e => { - this.asset_index = e.asset_index - this.asset = e.asset - this.prevAssets = e.prev_assets - this.nextAssets = e.next_assets + this.assetIndex = e.asset_index + this.movement = e.movement + this.assets = e.assets for (const cb of this.seekCallbacks) cb() }) @@ -46,12 +44,11 @@ class APIConnector { } fetchAlbums() { - return this.fetch("/albums/get") + return this.fetch("/albums") } - albumThumbSrc(key) { - return `${this.url}/api/albums/thumb/${key}` - } + assetSrc(key) { return `${this.url}/api/asset/${key}` } + assetThumbnailSrc(key) { return `${this.url}/api/asset/${key}/thumbnail` } } const apiConnector = new APIConnector("http://localhost:5000") -- cgit v1.2.3