@christianriedl/media 1.0.29 → 1.0.30
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.30",
|
|
4
4
|
"description": "RIC media interfaces",
|
|
5
5
|
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"license": "ISC",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@christianriedl/utils": "^1.0.65",
|
|
22
|
-
"@christianriedl/rest": "^1.0.33"
|
|
22
|
+
"@christianriedl/rest": "^1.0.33",
|
|
23
|
+
"@christianriedl/epg": "^1.0.19"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"typescript": "^4.6.3",
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject, ref, reactive, computed, onMounted, onUnmounted, nextTick, watch } from 'vue';
|
|
3
3
|
import { useRouter } from 'vue-router';
|
|
4
|
-
import { IAppState } from '@christianriedl/utils';
|
|
4
|
+
import { IAppState, EScope } from '@christianriedl/utils';
|
|
5
|
+
import { DvbService } from '@christianriedl/epg';
|
|
5
6
|
import { EItemType, IMediaFolder, IMediaItem, MediaService } from '@christianriedl/media';
|
|
6
7
|
|
|
7
8
|
const appState = inject<IAppState>('appstate')!;
|
|
8
9
|
const getMediaService = inject<() => MediaService>('get-media')!;
|
|
9
10
|
const mediaService = getMediaService();
|
|
11
|
+
const getDvbService = inject<() => DvbService>('get-dvbservice')!;
|
|
12
|
+
const dvbService = getDvbService()!;
|
|
10
13
|
const heightStyle = computed(() => { return { height: appState.bodyHeight.value + 'px', overflowY: 'auto' } });
|
|
11
14
|
const isMobile = appState.isMobile;
|
|
15
|
+
const deleteVisible = !!(appState.scopes & EScope.Admin);
|
|
12
16
|
const router = useRouter();
|
|
13
17
|
|
|
14
18
|
const items: IMediaItem[] = reactive([]);
|
|
@@ -51,6 +55,13 @@
|
|
|
51
55
|
function listBack() {
|
|
52
56
|
router.back();
|
|
53
57
|
}
|
|
58
|
+
async function deleteRecording() {
|
|
59
|
+
const rc = await dvbService.deleteRecording(selected.value.DLNAID);
|
|
60
|
+
const root = await mediaService.initializeRecordedTVs();
|
|
61
|
+
selected.value = root;
|
|
62
|
+
items.splice(0, items.length, ...root.Files);
|
|
63
|
+
computeListHeight();
|
|
64
|
+
}
|
|
54
65
|
</script>
|
|
55
66
|
|
|
56
67
|
<template>
|
|
@@ -71,6 +82,9 @@
|
|
|
71
82
|
<v-btn v-if="playVisible" @click.stop="play">
|
|
72
83
|
<v-icon icon="$play" />
|
|
73
84
|
</v-btn>
|
|
85
|
+
<v-btn v-if="deleteVisible" @click.stop="deleteRecording">
|
|
86
|
+
<v-icon icon="$delete" />
|
|
87
|
+
</v-btn>
|
|
74
88
|
</v-card-actions>
|
|
75
89
|
</v-card>
|
|
76
90
|
<v-card :max-height="listHeight" class="overflow-y-auto bg-media">
|