- | {{ source.subscription_name || source.subscription?.name || 'Unknown' }} |
- {{ source.platform }} |
+ {{ getSourceLabel(source) }} |
- {{ source.error_count }} errors
+ {{ source.last_error_type || 'failed' }}
|
{{ formatDate(source.last_check) }} |
@@ -318,7 +316,7 @@ const credentialsStore = useCredentialsStore()
const notifications = useNotificationStore()
// Supported platforms for credential status
-const supportedPlatforms = ['patreon', 'subscribestar', 'hentaifoundry', 'discord']
+const supportedPlatforms = ['patreon', 'subscribestar', 'hentaifoundry', 'discord', 'pixiv', 'deviantart']
// State
const checkingAll = ref(false)
@@ -335,9 +333,27 @@ let refreshInterval = null
// Computed
const stats = computed(() => downloadsStore.stats)
const recentActivity = computed(() => downloadsStore.recentActivity)
-const sourcesWithErrors = computed(() =>
- sourcesStore.sources.filter(s => s.error_count > 0).slice(0, 5)
-)
+
+// Sources with recent failures - derived from recent activity
+// Only shows sources where a recent download failed (not cumulative error_count)
+const sourcesWithErrors = computed(() => {
+ const failedDownloads = recentActivity.value.filter(d => d.status === 'failed')
+ // Group by source_id and keep unique sources with their most recent failure
+ const sourceMap = new Map()
+ for (const dl of failedDownloads) {
+ if (dl.source_id && !sourceMap.has(dl.source_id)) {
+ sourceMap.set(dl.source_id, {
+ id: dl.source_id,
+ subscription_name: dl.subscription_name,
+ platform: dl.platform,
+ last_error_type: dl.error_type,
+ last_check: dl.created_at,
+ })
+ }
+ }
+ return Array.from(sourceMap.values()).slice(0, 5)
+})
+
const failedCount = computed(() => stats.value?.failed || 0)
const activeDownloadsCount = computed(() =>
(stats.value?.queued || 0) + (stats.value?.running || 0)
@@ -565,10 +581,25 @@ function truncate(str, length) {
return str.substring(0, length) + '...'
}
+function getDownloadLabel(download) {
+ if (download.subscription_name && download.platform) {
+ return `${download.subscription_name}:${download.platform}`
+ }
+ // Fallback to truncated URL if source info not available
+ return truncate(download.url, 35)
+}
+
+function getSourceLabel(source) {
+ const name = source.subscription_name || source.subscription?.name || 'Unknown'
+ return `${name}:${source.platform}`
+}
+
async function retrySource(source) {
try {
await sourcesStore.triggerCheck(source.id)
- notifications.success(`Queued check for ${source.subscription_name || source.platform}`)
+ notifications.success(`Queued check for ${getSourceLabel(source)}`)
+ // Refresh recent activity after retrying
+ await downloadsStore.fetchRecentActivity({ limit: 10 })
} catch (error) {
notifications.error(`Failed to queue check: ${error.message}`)
}
diff --git a/summary.md b/summary.md
index e241f5a..99937c0 100644
--- a/summary.md
+++ b/summary.md
@@ -1,6 +1,6 @@
# GallerySubscriber - Project Summary
-**Updated:** 2026-02-04 (Fixed Pixiv authentication - requires OAuth refresh token)
+**Updated:** 2026-02-04 (Pixiv OAuth in extension, improved failed/naming display)
## Overview