@christianriedl/media 1.0.297 → 1.0.298
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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { Dictionary, Helper } from '@christianriedl/utils';
|
|
4
4
|
import { IPictureFile, EOrientation, EPictureFlags, getMediaSymbol } from '@christianriedl/media';
|
|
5
5
|
|
|
6
|
-
const props = defineProps<{ file: IPictureFile, all: boolean, splitxmp: boolean
|
|
6
|
+
const props = defineProps<{ file: IPictureFile, all: boolean, splitxmp: boolean }>();
|
|
7
7
|
|
|
8
8
|
interface ITree {
|
|
9
9
|
id: number;
|
|
@@ -19,31 +19,20 @@
|
|
|
19
19
|
const treeColumns = computed(() => props.splitxmp ? 3 : 2);
|
|
20
20
|
let metadata: Dictionary<any>;
|
|
21
21
|
let allMetaData: Dictionary<any>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
if (!metadata)
|
|
29
|
-
setMetaData(props.metadata, props.file);
|
|
30
|
-
properties.value = metadata;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
watch(() => props.all, async () => await fetchMetaData(), { immediate: true });
|
|
35
|
-
watch(() => props.splitxmp, () => buildTree());
|
|
36
|
-
}
|
|
22
|
+
|
|
23
|
+
watch(() => props.all, async () => await fetchMetaData(), { immediate: true });
|
|
24
|
+
watch(() => props.splitxmp, () => buildTree());
|
|
25
|
+
|
|
37
26
|
async function fetchMetaData() {
|
|
38
27
|
if (props.all) {
|
|
39
28
|
if (!allMetaData) {
|
|
40
|
-
allMetaData = await mediaService
|
|
29
|
+
allMetaData = await mediaService.getExifInfo(props.file.dlnaParentId, props.file.dlnaid, props.all, props.splitxmp);
|
|
41
30
|
}
|
|
42
31
|
buildTree();
|
|
43
32
|
}
|
|
44
33
|
else {
|
|
45
34
|
if (!metadata) {
|
|
46
|
-
const data = await mediaService
|
|
35
|
+
const data = await mediaService.getExifInfo(props.file.dlnaParentId, props.file.dlnaid, props.all, props.splitxmp);
|
|
47
36
|
setMetaData(data, props.file);
|
|
48
37
|
}
|
|
49
38
|
properties.value = metadata;
|
package/src/views/VideosPage.vue
CHANGED
|
@@ -99,8 +99,7 @@
|
|
|
99
99
|
const videos: IVideoFile[] = [];
|
|
100
100
|
for (let i = 0; i < foundVideos.length; i++) { // Use prepared videos from mediaservice folders
|
|
101
101
|
const foundVideo = foundVideos[i];
|
|
102
|
-
const folder = mediaService.
|
|
103
|
-
mediaService.prepare(folder);
|
|
102
|
+
const folder = mediaService.getFolder(foundVideo.dlnaParentId);
|
|
104
103
|
const file = folder.files!.find(f => f.dlnaid == foundVideo.dlnaid) as IVideoFile;
|
|
105
104
|
videos.push(file);
|
|
106
105
|
}
|