@christianriedl/media 1.0.28 → 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.28",
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",
@@ -253,7 +253,7 @@
253
253
  <img :src="item.realUrl" />
254
254
  </v-carousel-item>
255
255
  </v-carousel>
256
- <v-dialog v-model="infoDialog" :fullscreen="isMobile" v-click-outside="infoDialog = false">
256
+ <v-dialog v-model="infoDialog" :fullscreen="isMobile" >
257
257
  <v-card v-if="infoDialog" width="400">
258
258
  <v-card-title class="headline">Metadata</v-card-title>
259
259
  <v-card-text>
@@ -274,7 +274,7 @@
274
274
  </v-card-actions>
275
275
  </v-card>
276
276
  </v-dialog>
277
- <v-dialog v-model="keyDialog" :fullscreen="isMobile" v-click-outside="keyDialog = false">
277
+ <v-dialog v-model="keyDialog" :fullscreen="isMobile" >
278
278
  <v-card v-if="keyDialog" width="400">
279
279
  <v-card-text>
280
280
  <v-container>
@@ -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">