@christianriedl/media 1.0.95 → 1.0.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianriedl/media",
3
- "version": "1.0.95",
3
+ "version": "1.0.96",
4
4
  "description": "RIC media interfaces",
5
5
 
6
6
  "main": "dist/index.js",
@@ -28,6 +28,8 @@
28
28
  const interval = ref(8000);
29
29
  const hasCoordinates = ref(false);
30
30
  const carousel = ref<ComponentPublicInstance | null>(null);
31
+ const itemName = ref("");
32
+ const albumName = ref("");
31
33
  let origUrl = "";
32
34
  let gpsLng: number[];
33
35
  let gpsLat: number[];
@@ -60,6 +62,7 @@
60
62
  return false;
61
63
  }
62
64
  const photos = await mediaService.getPhotos(folder);
65
+ albumName.value = photos.Name;
63
66
  if(photos.Files.length > 0) {
64
67
  items.splice(0, items.length, ...photos.Files as IPictureFile[]);
65
68
  if (route.query.start) {
@@ -369,6 +372,7 @@
369
372
  }
370
373
  function clearName() { // also called by VImg::loadstart
371
374
  showName.value = false;
375
+ itemName.value = "";
372
376
  if (nameTimer >= 0) {
373
377
  window.clearTimeout(nameTimer);
374
378
  nameTimer = -1;
@@ -386,8 +390,17 @@
386
390
  const name = item.Url.substr(0, idx);
387
391
  if (!item.Name.includes(name)) {
388
392
  showName.value = true;
393
+ itemName.value = item.Name;
389
394
  nameTimer = window.setTimeout(() => { clearName(); }, mediaAppConfig.nameDurationMS);
390
395
  }
396
+ else if (item.LocationIdx >= 0) {
397
+ const location = mediaService.getListEntry("Picture.Location", item.LocationIdx);
398
+ if (location && !albumName.value.includes(location)) {
399
+ showName.value = true;
400
+ itemName.value = location;
401
+ nameTimer = window.setTimeout(() => { clearName(); }, mediaAppConfig.nameDurationMS);
402
+ }
403
+ }
391
404
  }
392
405
  </script>
393
406
 
@@ -398,7 +411,7 @@
398
411
  @click="onClick" @mousedown="onMouseDown" @update:modelValue="onUpdate">
399
412
  <v-carousel-item v-for="item in items" :key="item.DLNAID" :src="getUrl(item)" :alt="item.Name" :width="getWidth(item)" :height="getHeight(item)"
400
413
  @load="onLoad(item)" @loadstart="clearName()">
401
- <h2 v-if="showName" class="imgtext">{{item.Name}}</h2>
414
+ <h2 v-if="showName" class="imgtext">{{itemName}}</h2>
402
415
  </v-carousel-item>
403
416
  </v-carousel>
404
417
  <v-dialog v-model="infoDialog" :fullscreen="isMobile" >