@christianriedl/media 1.0.159 → 1.0.161
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.
|
|
3
|
+
"version": "1.0.161",
|
|
4
4
|
"description": "RIC media interfaces",
|
|
5
5
|
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"author": "Christian Riedl",
|
|
19
19
|
"license": "ISC",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@christianriedl/utils": "^1.0.
|
|
21
|
+
"@christianriedl/utils": "^1.0.89",
|
|
22
22
|
"@christianriedl/rest": "^1.0.52",
|
|
23
23
|
"@christianriedl/epg": "^1.0.30"
|
|
24
24
|
},
|
package/src/views/MusicPage.vue
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject, ref, reactive, computed, onMounted, onUnmounted, nextTick, watch, StyleValue } from 'vue';
|
|
3
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
3
4
|
import { useRouter } from 'vue-router';
|
|
4
5
|
import { IAppState, Helper, EDevice, EScope, appStateSymbol, IAppConfig, appConfigSymbol } from '@christianriedl/utils';
|
|
5
6
|
import { Authorize, authorizeSymbol } from '@christianriedl/rest';
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
const downloadVisible = computed(() => playingTrackUrl.value && !isMobile);
|
|
43
44
|
const audio = ref<HTMLAudioElement | null>(null);
|
|
44
45
|
const paused = ref(false);
|
|
45
|
-
const listhead = ref<
|
|
46
|
+
const listhead = ref<ComponentPublicInstance | null>(null);
|
|
46
47
|
const positionText = computed(() => {
|
|
47
48
|
if (playingTrack.value) {
|
|
48
49
|
if (playingTrack.value.duration > 0)
|
|
@@ -102,8 +103,8 @@
|
|
|
102
103
|
function computeListHeight() {
|
|
103
104
|
nextTick(() => {
|
|
104
105
|
let height = appState.bodyHeight.value;
|
|
105
|
-
if (listhead.value
|
|
106
|
-
height = height - listhead.value
|
|
106
|
+
if (listhead.value) {
|
|
107
|
+
height = height - (listhead.value.$el as HTMLElement).clientHeight;
|
|
107
108
|
}
|
|
108
109
|
listHeight.value = height;
|
|
109
110
|
})
|
|
@@ -294,7 +294,11 @@
|
|
|
294
294
|
origUrl = mediaService.getPhotoUrl(albumUrl.value, file.url, '0x0x0');
|
|
295
295
|
metadata['Album'] = albumName.value;
|
|
296
296
|
metadata['Name'] = file.name;
|
|
297
|
-
|
|
297
|
+
let fileName: string = albumUrl.value + file.url;
|
|
298
|
+
const idx = fileName.lastIndexOf('/');
|
|
299
|
+
if (idx > 0)
|
|
300
|
+
fileName = fileName.substring(idx + 1);
|
|
301
|
+
metadata['File'] = fileName;
|
|
298
302
|
if (exif) {
|
|
299
303
|
if (exif.Model)
|
|
300
304
|
metadata['Kamera'] = exif.Model;
|
package/src/views/PhotosPage.vue
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
const downloadFolder = ref<IMediaFolder | null>(null);
|
|
35
35
|
const selectedYear = ref<number | undefined>(undefined);
|
|
36
36
|
const selectedName = ref<string | undefined>(undefined);
|
|
37
|
-
const scrollElement = ref<
|
|
37
|
+
const scrollElement = ref<ComponentPublicInstance | null>(null);
|
|
38
38
|
|
|
39
39
|
window.addEventListener('popstate', onPopState);
|
|
40
40
|
function onPopState(event: any) {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
if (scrollTop > 0 && scrollElement.value) {
|
|
73
73
|
nextTick(() => {
|
|
74
74
|
// Scoll to this position
|
|
75
|
-
const el = scrollElement.value
|
|
75
|
+
const el = scrollElement.value.$el as HTMLElement;
|
|
76
76
|
el?.scrollTo(0, scrollTop);
|
|
77
77
|
});
|
|
78
78
|
}
|
package/src/views/VideosPage.vue
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject, ref, reactive, computed, onMounted, onUnmounted, nextTick, watch, StyleValue } from 'vue';
|
|
3
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
3
4
|
import { useRouter } from 'vue-router';
|
|
4
5
|
import { IAppState, EDevice, EScope, appStateSymbol, appConfigSymbol, IValueText } from '@christianriedl/utils';
|
|
5
6
|
import { Authorize, authorizeSymbol } from '@christianriedl/rest';
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
const itemIndex = ref(0);
|
|
31
32
|
const selected = ref<IMediaItem>({ name: 'Root', itemType: EItemType.Root } as IMediaFolder);
|
|
32
33
|
const listHeight = ref(0);
|
|
33
|
-
const listhead = ref<
|
|
34
|
+
const listhead = ref<ComponentPublicInstance | null>(null);
|
|
34
35
|
const dialog = ref(false);
|
|
35
36
|
const showItem = ref<IVideoFile|null>(null);
|
|
36
37
|
const uploadVisible = ref(false);
|
|
@@ -86,8 +87,8 @@
|
|
|
86
87
|
function computeListHeight() {
|
|
87
88
|
nextTick(() => {
|
|
88
89
|
let height = appState.bodyHeight.value;
|
|
89
|
-
if (listhead.value
|
|
90
|
-
height = height - listhead.value
|
|
90
|
+
if (listhead.value) {
|
|
91
|
+
height = height - (listhead.value.$el as HTMLElement).clientHeight;
|
|
91
92
|
}
|
|
92
93
|
listHeight.value = height;
|
|
93
94
|
})
|