fix(web): handle nullable assets duration (#18679)

* fix(web): handle nullable assets duration

* Update web/src/lib/components/assets/thumbnail/thumbnail.svelte

Co-authored-by: Mert <101130780+mertalev@users.noreply.github.com>

* fix: format

---------

Co-authored-by: Mert <101130780+mertalev@users.noreply.github.com>
This commit is contained in:
Alex 2025-05-27 10:24:17 -05:00 committed by GitHub
parent e2720e85bb
commit fff651f8a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ name: immich-dev
services: services:
immich-server: immich-server:
container_name: immich_server container_name: immich_server
command: ['/usr/src/app/bin/immich-dev'] command: [ '/usr/src/app/bin/immich-dev' ]
image: immich-server-dev:latest image: immich-server-dev:latest
# extends: # extends:
# file: hwaccel.transcoding.yml # file: hwaccel.transcoding.yml
@ -31,6 +31,7 @@ services:
- ../open-api:/usr/src/open-api - ../open-api:/usr/src/open-api
- ${UPLOAD_LOCATION}/photos:/usr/src/app/upload - ${UPLOAD_LOCATION}/photos:/usr/src/app/upload
- ${UPLOAD_LOCATION}/photos/upload:/usr/src/app/upload/upload - ${UPLOAD_LOCATION}/photos/upload:/usr/src/app/upload/upload
- ${EXTERNAL_LIBRARY}:/data/external-library
- /usr/src/app/node_modules - /usr/src/app/node_modules
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
env_file: env_file:
@ -70,7 +71,7 @@ services:
# user: 0:0 # user: 0:0
build: build:
context: ../web context: ../web
command: ['/usr/src/app/bin/immich-web'] command: [ '/usr/src/app/bin/immich-web' ]
env_file: env_file:
- .env - .env
ports: ports:
@ -134,7 +135,6 @@ services:
- ${UPLOAD_LOCATION}/postgres:/var/lib/postgresql/data - ${UPLOAD_LOCATION}/postgres:/var/lib/postgresql/data
ports: ports:
- 5432:5432 - 5432:5432
# set IMMICH_TELEMETRY_INCLUDE=all in .env to enable metrics # set IMMICH_TELEMETRY_INCLUDE=all in .env to enable metrics
# immich-prometheus: # immich-prometheus:
# container_name: immich_prometheus # container_name: immich_prometheus

View File

@ -339,7 +339,7 @@
url={getAssetPlaybackUrl({ id: asset.id, cacheKey: asset.thumbhash })} url={getAssetPlaybackUrl({ id: asset.id, cacheKey: asset.thumbhash })}
enablePlayback={mouseOver && $playVideoThumbnailOnHover} enablePlayback={mouseOver && $playVideoThumbnailOnHover}
curve={selected} curve={selected}
durationInSeconds={timeToSeconds(asset.duration!)} durationInSeconds={asset.duration ? timeToSeconds(asset.duration) : 0}
playbackOnIconHover={!$playVideoThumbnailOnHover} playbackOnIconHover={!$playVideoThumbnailOnHover}
/> />
</div> </div>