+
yt-dlp Output
-
-
{{
- playlistProgressData.ytdlnStdout }}
+
{{ ytdlnStdout }}
@@ -130,7 +120,6 @@
import {
CassetteTape,
Copy,
- Dot,
EllipsisVertical,
Eye,
FileQuestionMark,
@@ -139,22 +128,15 @@ import {
Trash2
} from 'lucide-vue-next';
import { ref } from 'vue';
+import type { PlaylistProgressAllOfStatus } from '~/composeables/api/models';
interface Props {
title: string
trackCount?: number
- type?: string
+ ytdlnStdout: string
+ status: PlaylistProgressAllOfStatus
progress?: number
error?: string
- playlistProgressData?: {
- playlistId: number
- trackSourceId: number
- userId: number
- timestamp: number
- ytdlnStdout: string
- overallProgress: number
- status: 'LOADING' | 'FINISHED'
- }
}
const props = withDefaults(defineProps
(), {
@@ -167,36 +149,34 @@ const emit = defineEmits<{
const isDialogOpen = ref(false);
-const hasLoaded = props.trackCount && props.type;
+const hasLoaded = props.trackCount;
const hasProgress = props.progress !== undefined && props.progress > 0;
const hasError = props.error;
const openDialog = () => {
isDialogOpen.value = true;
- console.log(isDialogOpen.value)
};
+const toggleDialog = (value: boolean) => {
+ isDialogOpen.value = value;
+}
+
const getStatusColor = () => {
if (hasError) return 'bg-destructive';
- if (props.playlistProgressData?.status === 'FINISHED') return 'bg-green-500';
- if (props.playlistProgressData?.status === 'LOADING') return 'bg-blue-500';
+ if (props.status === 'FINISHED') return 'bg-green-500';
+ if (props.status === 'LOADING') return 'bg-blue-500';
if (hasProgress) return 'bg-amber-500';
return 'bg-gray-500';
};
const getStatusText = () => {
if (hasError) return 'Error';
- if (props.playlistProgressData?.status === 'FINISHED') return 'Completed';
- if (props.playlistProgressData?.status === 'LOADING') return 'Loading';
+ if (props.status === 'FINISHED') return 'Completed';
+ if (props.status === 'LOADING') return 'Loading';
if (hasProgress) return 'In Progress';
return 'Pending';
};
-const formatTimestamp = (timestamp?: number) => {
- if (!timestamp) return 'N/A';
- return new Date(timestamp).toLocaleString();
-};
-
const copyToClipboard = async (text: string) => {
try {
await navigator.clipboard.writeText(text);
diff --git a/app/components/internal/import/uploadentry/SingleUploadEntry.vue b/app/components/internal/import/uploadentry/SingleUploadEntry.vue
index f5b388c..3b22bca 100644
--- a/app/components/internal/import/uploadentry/SingleUploadEntry.vue
+++ b/app/components/internal/import/uploadentry/SingleUploadEntry.vue
@@ -19,10 +19,6 @@
{{ format }}
-
-
- {{ type }}
-