summaryrefslogtreecommitdiff
path: root/src/connector.js
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2025-06-11 21:09:11 -0500
committerTim Keller <tjk@tjkeller.xyz>2025-06-11 21:09:11 -0500
commit5ef1d2acb24e7b9ec8566ba29ae4dd025c78d7cb (patch)
tree979755235344bf1c7435b45e021a3369fea7dc75 /src/connector.js
parent9e8bc4a1e2361c4a4e4a0657df9cd893acc68682 (diff)
downloadimmich-frame-5ef1d2acb24e7b9ec8566ba29ae4dd025c78d7cb.tar.xz
immich-frame-5ef1d2acb24e7b9ec8566ba29ae4dd025c78d7cb.zip
stupid huge update lots of cool stuff
Diffstat (limited to 'src/connector.js')
-rw-r--r--src/connector.js19
1 files changed, 8 insertions, 11 deletions
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")