Merge pull request 'push-tlnqyqsrywyr' (#53) from push-tlnqyqsrywyr into main
Some checks failed
Build and Push Docker Image / build (push) Failing after 4m55s
Some checks failed
Build and Push Docker Image / build (push) Failing after 4m55s
Reviewed-on: #53
This commit was merged in pull request #53.
This commit is contained in:
@@ -3,8 +3,7 @@ name: Build and Push Docker Image
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main # Changez cela si votre branche principale a un autre nom
|
- main # Changez cela si votre branche principale a un autre nom
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -16,6 +15,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: dont-cache-${{ github.run_id }}
|
key: dont-cache-${{ github.run_id }}
|
||||||
|
|
||||||
|
- name: Extract version from Cargo.toml
|
||||||
|
run: |
|
||||||
|
grep '^version = ' PMOMusic/Cargo.toml | head -n 1 | sed 's/version = "\(.*\)"/\1/' > version.txt
|
||||||
|
echo "Version extracted: $(cat version.txt)"
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
uses: https://gargoton.petite-maison-orange.fr/pmo-actions/build-push-image@main
|
uses: https://gargoton.petite-maison-orange.fr/pmo-actions/build-push-image@main
|
||||||
with:
|
with:
|
||||||
@@ -24,6 +29,3 @@ jobs:
|
|||||||
no_cache: true
|
no_cache: true
|
||||||
version_file: version.txt
|
version_file: version.txt
|
||||||
check_uuid: 82a30d23-b3bd-4199-9237-776965831d20
|
check_uuid: 82a30d23-b3bd-4199-9237-776965831d20
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -4,7 +4,7 @@ version = 4
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "PMOMusic"
|
name = "PMOMusic"
|
||||||
version = "0.1.0"
|
version = "0.3.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum 0.8.7",
|
"axum 0.8.7",
|
||||||
"console-subscriber",
|
"console-subscriber",
|
||||||
|
|||||||
35
Makefile
35
Makefile
@@ -13,6 +13,7 @@ BINARY_NAME = PMOMusic
|
|||||||
# Couleurs pour l'affichage
|
# Couleurs pour l'affichage
|
||||||
GREEN = \033[0;32m
|
GREEN = \033[0;32m
|
||||||
YELLOW = \033[1;33m
|
YELLOW = \033[1;33m
|
||||||
|
BLUE = \033[1;34m
|
||||||
RED = \033[0;31m
|
RED = \033[0;31m
|
||||||
NC = \033[0m # No Color
|
NC = \033[0m # No Color
|
||||||
|
|
||||||
@@ -193,6 +194,21 @@ update:
|
|||||||
cd $(WEBAPP_DIR) && $(NPM) update
|
cd $(WEBAPP_DIR) && $(NPM) update
|
||||||
@echo "$(GREEN)✓ Dépendances mises à jour$(NC)"
|
@echo "$(GREEN)✓ Dépendances mises à jour$(NC)"
|
||||||
|
|
||||||
|
## bump-version: Incrémente le numéro de version patch (x.y.z -> x.y.z+1)
|
||||||
|
bump-version:
|
||||||
|
@echo "$(YELLOW)→ Incrémentation de la version...$(NC)"
|
||||||
|
@current=$$(grep '^version = ' PMOMusic/Cargo.toml | head -n 1 | sed 's/version = "\(.*\)"/\1/'); \
|
||||||
|
echo " Version actuelle: $$current"; \
|
||||||
|
major=$$(echo $$current | cut -d. -f1); \
|
||||||
|
minor=$$(echo $$current | cut -d. -f2); \
|
||||||
|
patch=$$(echo $$current | cut -d. -f3); \
|
||||||
|
new_patch=$$((patch + 1)); \
|
||||||
|
new_version="$$major.$$minor.$$new_patch"; \
|
||||||
|
echo " Nouvelle version: $$new_version"; \
|
||||||
|
sed -i.bak "s/^version = \"$$current\"/version = \"$$new_version\"/" PMOMusic/Cargo.toml && \
|
||||||
|
rm PMOMusic/Cargo.toml.bak
|
||||||
|
@echo "$(GREEN)✓ Version mise à jour dans PMOMusic/Cargo.toml$(NC)"
|
||||||
|
|
||||||
## bench: Exécute les benchmarks
|
## bench: Exécute les benchmarks
|
||||||
bench:
|
bench:
|
||||||
@echo "$(YELLOW)→ Exécution des benchmarks...$(NC)"
|
@echo "$(YELLOW)→ Exécution des benchmarks...$(NC)"
|
||||||
@@ -204,3 +220,22 @@ coverage:
|
|||||||
$(CARGO) tarpaulin --out Html --output-dir target/coverage
|
$(CARGO) tarpaulin --out Html --output-dir target/coverage
|
||||||
@echo "$(GREEN)✓ Rapport disponible dans target/coverage/index.html$(NC)"
|
@echo "$(GREEN)✓ Rapport disponible dans target/coverage/index.html$(NC)"
|
||||||
|
|
||||||
|
jjnew:
|
||||||
|
@echo "$(YELLOW)→ Création d'un nouveau commit...$(NC)"
|
||||||
|
@echo "$(BLUE)→ Documentation du commit courrant...$(NC)"
|
||||||
|
@jj auto-describe
|
||||||
|
@echo "$(BLUE)→ C'est fait.$(NC)"
|
||||||
|
@jj new
|
||||||
|
@echo "$(GREEN)✓ nouveau commit créé$(NC)"
|
||||||
|
|
||||||
|
jjpush: bump-version
|
||||||
|
@echo "$(YELLOW)→ Push du commit sur le dépôt...$(NC)"
|
||||||
|
@jj auto-describe
|
||||||
|
@jj git push --change @
|
||||||
|
@echo "$(GREEN)✓ Commit pushé sur le dépôt$(NC)"
|
||||||
|
|
||||||
|
jjfetch:
|
||||||
|
@echo "$(YELLOW)→ Pull des derniers commits...$(NC)"
|
||||||
|
@jj git fetch
|
||||||
|
@jj new main@origin
|
||||||
|
@echo "$(GREEN)✓ Derniers commits pullés$(NC)"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "PMOMusic"
|
name = "PMOMusic"
|
||||||
version = "0.1.0"
|
version = "0.3.1"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@@ -1,62 +1,58 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref, watch } from 'vue'
|
import { computed, ref, watch } from "vue";
|
||||||
import { useMediaServers } from '@/composables/useMediaServers'
|
import { useMediaServers } from "@/composables/useMediaServers";
|
||||||
import { useRenderers } from '@/composables/useRenderers'
|
import { useRenderers } from "@/composables/useRenderers";
|
||||||
import { useUIStore } from '@/stores/ui'
|
import { useUIStore } from "@/stores/ui";
|
||||||
import Breadcrumb from './Breadcrumb.vue'
|
import Breadcrumb from "./Breadcrumb.vue";
|
||||||
import ContainerItem from './ContainerItem.vue'
|
import ContainerItem from "./ContainerItem.vue";
|
||||||
import MediaItem from './MediaItem.vue'
|
import MediaItem from "./MediaItem.vue";
|
||||||
import { Loader2 } from 'lucide-vue-next'
|
import { Loader2 } from "lucide-vue-next";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
serverId: string
|
serverId: string;
|
||||||
containerId: string
|
containerId: string;
|
||||||
}>()
|
}>();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
getBrowseCached,
|
getBrowseCached,
|
||||||
browseContainer,
|
browseContainer,
|
||||||
currentPath: breadcrumbPath,
|
currentPath: breadcrumbPath,
|
||||||
loading,
|
loading,
|
||||||
error
|
error,
|
||||||
} = useMediaServers()
|
} = useMediaServers();
|
||||||
|
|
||||||
const {
|
const { playContent, addToQueue, attachAndPlayPlaylist, attachPlaylist } =
|
||||||
playContent,
|
useRenderers();
|
||||||
addToQueue,
|
const uiStore = useUIStore();
|
||||||
attachAndPlayPlaylist,
|
|
||||||
attachPlaylist,
|
|
||||||
} = useRenderers()
|
|
||||||
const uiStore = useUIStore()
|
|
||||||
|
|
||||||
// Flags pour gérer le rechargement automatique avec debounce et cooldown
|
// Flags pour gérer le rechargement automatique avec debounce et cooldown
|
||||||
const isRefreshing = ref(false)
|
const isRefreshing = ref(false);
|
||||||
const refreshTimeoutId = ref<number | null>(null)
|
const refreshTimeoutId = ref<number | null>(null);
|
||||||
const lastRefreshTime = ref<number>(0)
|
const lastRefreshTime = ref<number>(0);
|
||||||
const REFRESH_COOLDOWN_MS = 5000 // Ne pas recharger plus d'une fois toutes les 5 secondes
|
const REFRESH_COOLDOWN_MS = 2000; // Ne pas recharger plus d'une fois toutes les 2 secondes
|
||||||
|
|
||||||
const browseData = computed(() =>
|
const browseData = computed(() =>
|
||||||
getBrowseCached(props.serverId, props.containerId)
|
getBrowseCached(props.serverId, props.containerId),
|
||||||
)
|
);
|
||||||
|
|
||||||
const containers = computed(() =>
|
const containers = computed(
|
||||||
browseData.value?.entries.filter((e) => e.is_container) || []
|
() => browseData.value?.entries.filter((e) => e.is_container) || [],
|
||||||
)
|
);
|
||||||
|
|
||||||
const items = computed(() =>
|
const items = computed(
|
||||||
browseData.value?.entries.filter((e) => !e.is_container) || []
|
() => browseData.value?.entries.filter((e) => !e.is_container) || [],
|
||||||
)
|
);
|
||||||
|
|
||||||
// Charger le container au montage et quand containerId change
|
// Charger le container au montage et quand containerId change
|
||||||
watch(
|
watch(
|
||||||
() => props.containerId,
|
() => props.containerId,
|
||||||
async (newContainerId) => {
|
async (newContainerId) => {
|
||||||
if (newContainerId) {
|
if (newContainerId) {
|
||||||
await browseContainer(props.serverId, newContainerId)
|
await browseContainer(props.serverId, newContainerId);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true },
|
||||||
)
|
);
|
||||||
|
|
||||||
// Recharger automatiquement si le cache est invalidé (ex: après un ContainersUpdated SSE)
|
// Recharger automatiquement si le cache est invalidé (ex: après un ContainersUpdated SSE)
|
||||||
// Cela se produit notamment quand on clique sur "Lire maintenant" sur une playlist,
|
// Cela se produit notamment quand on clique sur "Lire maintenant" sur une playlist,
|
||||||
@@ -64,268 +60,282 @@ watch(
|
|||||||
// Utilise un debounce de 3 secondes pour regrouper les multiples invalidations
|
// Utilise un debounce de 3 secondes pour regrouper les multiples invalidations
|
||||||
// et un cooldown de 5 secondes pour éviter les rechargements successifs
|
// et un cooldown de 5 secondes pour éviter les rechargements successifs
|
||||||
watch(
|
watch(
|
||||||
() => browseData.value,
|
() => browseData.value,
|
||||||
(data) => {
|
(data) => {
|
||||||
// Si browseData devient undefined alors que containerId est présent,
|
// Si browseData devient undefined alors que containerId est présent,
|
||||||
// et qu'on n'est pas déjà en train de charger, planifier un rechargement
|
// et qu'on n'est pas déjà en train de charger, planifier un rechargement
|
||||||
if (!data && props.containerId && !loading.value) {
|
if (!data && props.containerId && !loading.value) {
|
||||||
// Vérifier le cooldown: ignorer si on a rechargé il y a moins de 5 secondes
|
// Vérifier le cooldown: ignorer si on a rechargé il y a moins de 5 secondes
|
||||||
const timeSinceLastRefresh = Date.now() - lastRefreshTime.value
|
const timeSinceLastRefresh = Date.now() - lastRefreshTime.value;
|
||||||
if (timeSinceLastRefresh < REFRESH_COOLDOWN_MS) {
|
if (timeSinceLastRefresh < REFRESH_COOLDOWN_MS) {
|
||||||
console.log(
|
console.log(
|
||||||
`[MediaBrowser] Cache invalidé mais cooldown actif (${Math.round((REFRESH_COOLDOWN_MS - timeSinceLastRefresh) / 1000)}s restantes), rechargement ignoré`
|
`[MediaBrowser] Cache invalidé mais cooldown actif (${Math.round((REFRESH_COOLDOWN_MS - timeSinceLastRefresh) / 1000)}s restantes), rechargement ignoré`,
|
||||||
)
|
);
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Annuler tout timeout en cours
|
// Annuler tout timeout en cours
|
||||||
if (refreshTimeoutId.value !== null) {
|
if (refreshTimeoutId.value !== null) {
|
||||||
clearTimeout(refreshTimeoutId.value)
|
clearTimeout(refreshTimeoutId.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Planifier le rechargement après 3 secondes
|
// Planifier le rechargement après 200ms
|
||||||
// Cela permet de regrouper plusieurs événements SSE successifs
|
// Cela permet de dédupliquer les événements SSE dans le même batch (polling 500ms)
|
||||||
refreshTimeoutId.value = window.setTimeout(async () => {
|
refreshTimeoutId.value = window.setTimeout(async () => {
|
||||||
if (!isRefreshing.value) {
|
if (!isRefreshing.value) {
|
||||||
console.log(
|
console.log(
|
||||||
`[MediaBrowser] Cache invalidé pour ${props.serverId}/${props.containerId}, rechargement après debounce...`
|
`[MediaBrowser] Cache invalidé pour ${props.serverId}/${props.containerId}, rechargement après debounce...`,
|
||||||
)
|
);
|
||||||
isRefreshing.value = true
|
isRefreshing.value = true;
|
||||||
await browseContainer(props.serverId, props.containerId, false)
|
await browseContainer(
|
||||||
lastRefreshTime.value = Date.now() // Enregistrer le moment du rechargement
|
props.serverId,
|
||||||
isRefreshing.value = false
|
props.containerId,
|
||||||
refreshTimeoutId.value = null
|
false,
|
||||||
|
);
|
||||||
|
lastRefreshTime.value = Date.now(); // Enregistrer le moment du rechargement
|
||||||
|
isRefreshing.value = false;
|
||||||
|
refreshTimeoutId.value = null;
|
||||||
|
}
|
||||||
|
}, 200);
|
||||||
}
|
}
|
||||||
}, 3000)
|
},
|
||||||
}
|
);
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
navigate: [containerId: string]
|
navigate: [containerId: string];
|
||||||
}>()
|
}>();
|
||||||
|
|
||||||
function handleNavigate(containerId: string) {
|
function handleNavigate(containerId: string) {
|
||||||
emit('navigate', containerId)
|
emit("navigate", containerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleBrowseContainer(containerId: string) {
|
function handleBrowseContainer(containerId: string) {
|
||||||
emit('navigate', containerId)
|
emit("navigate", containerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actions handlers pour les containers (playlists/albums)
|
// Actions handlers pour les containers (playlists/albums)
|
||||||
async function handlePlayContainer(containerId: string, rendererId: string) {
|
async function handlePlayContainer(containerId: string, rendererId: string) {
|
||||||
try {
|
try {
|
||||||
await attachAndPlayPlaylist(rendererId, props.serverId, containerId)
|
await attachAndPlayPlaylist(rendererId, props.serverId, containerId);
|
||||||
uiStore.notifySuccess('Lecture de la playlist démarrée !')
|
uiStore.notifySuccess("Lecture de la playlist démarrée !");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const message = err instanceof Error ? err.message : 'Erreur inconnue'
|
const message = err instanceof Error ? err.message : "Erreur inconnue";
|
||||||
uiStore.notifyError(`Erreur lors de la lecture de la playlist: ${message}`)
|
uiStore.notifyError(
|
||||||
}
|
`Erreur lors de la lecture de la playlist: ${message}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleQueueContainer(containerId: string, rendererId: string) {
|
async function handleQueueContainer(containerId: string, rendererId: string) {
|
||||||
try {
|
try {
|
||||||
await attachPlaylist(rendererId, props.serverId, containerId)
|
await attachPlaylist(rendererId, props.serverId, containerId);
|
||||||
uiStore.notifySuccess('Playlist attachée à la queue !')
|
uiStore.notifySuccess("Playlist attachée à la queue !");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const message = err instanceof Error ? err.message : 'Erreur inconnue'
|
const message = err instanceof Error ? err.message : "Erreur inconnue";
|
||||||
uiStore.notifyError(`Erreur lors de l'ajout de la playlist: ${message}`)
|
uiStore.notifyError(
|
||||||
}
|
`Erreur lors de l'ajout de la playlist: ${message}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actions handlers pour les items (tracks)
|
// Actions handlers pour les items (tracks)
|
||||||
async function handlePlayItem(itemId: string, rendererId: string) {
|
async function handlePlayItem(itemId: string, rendererId: string) {
|
||||||
try {
|
try {
|
||||||
await playContent(rendererId, props.serverId, itemId)
|
await playContent(rendererId, props.serverId, itemId);
|
||||||
uiStore.notifySuccess('Lecture démarrée !')
|
uiStore.notifySuccess("Lecture démarrée !");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const message = err instanceof Error ? err.message : 'Erreur inconnue'
|
const message = err instanceof Error ? err.message : "Erreur inconnue";
|
||||||
uiStore.notifyError(`Erreur lors de la lecture: ${message}`)
|
uiStore.notifyError(`Erreur lors de la lecture: ${message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleQueueItem(itemId: string, rendererId: string) {
|
async function handleQueueItem(itemId: string, rendererId: string) {
|
||||||
try {
|
try {
|
||||||
await addToQueue(rendererId, props.serverId, itemId)
|
await addToQueue(rendererId, props.serverId, itemId);
|
||||||
uiStore.notifySuccess('Ajouté à la queue !')
|
uiStore.notifySuccess("Ajouté à la queue !");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const message = err instanceof Error ? err.message : 'Erreur inconnue'
|
const message = err instanceof Error ? err.message : "Erreur inconnue";
|
||||||
uiStore.notifyError(`Erreur lors de l'ajout à la queue: ${message}`)
|
uiStore.notifyError(`Erreur lors de l'ajout à la queue: ${message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="media-browser">
|
<div class="media-browser">
|
||||||
<!-- Breadcrumb -->
|
<!-- Breadcrumb -->
|
||||||
<Breadcrumb
|
<Breadcrumb
|
||||||
:items="breadcrumbPath"
|
:items="breadcrumbPath"
|
||||||
:serverId="serverId"
|
:serverId="serverId"
|
||||||
@navigate="handleNavigate"
|
@navigate="handleNavigate"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Loading state -->
|
<!-- Loading state -->
|
||||||
<div v-if="loading" class="browser-loading">
|
<div v-if="loading" class="browser-loading">
|
||||||
<Loader2 :size="32" class="spinner" />
|
<Loader2 :size="32" class="spinner" />
|
||||||
<p>Chargement...</p>
|
<p>Chargement...</p>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Error state -->
|
|
||||||
<div v-else-if="error" class="browser-error">
|
|
||||||
<p class="error-message">{{ error }}</p>
|
|
||||||
<button class="btn btn-secondary" @click="browseContainer(serverId, containerId, false)">
|
|
||||||
Réessayer
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Content -->
|
|
||||||
<div v-else class="browser-content">
|
|
||||||
<!-- Containers section -->
|
|
||||||
<div v-if="containers.length" class="browser-section">
|
|
||||||
<h3 class="section-title">Dossiers et playlists</h3>
|
|
||||||
<div class="entries-list">
|
|
||||||
<ContainerItem
|
|
||||||
v-for="container in containers"
|
|
||||||
:key="container.id"
|
|
||||||
:entry="container"
|
|
||||||
:server-id="serverId"
|
|
||||||
@browse="handleBrowseContainer"
|
|
||||||
@play-now="handlePlayContainer"
|
|
||||||
@add-to-queue="handleQueueContainer"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Items section -->
|
<!-- Error state -->
|
||||||
<div v-if="items.length" class="browser-section">
|
<div v-else-if="error" class="browser-error">
|
||||||
<h3 class="section-title">Pistes</h3>
|
<p class="error-message">{{ error }}</p>
|
||||||
<div class="entries-list">
|
<button
|
||||||
<MediaItem
|
class="btn btn-secondary"
|
||||||
v-for="item in items"
|
@click="browseContainer(serverId, containerId, false)"
|
||||||
:key="item.id"
|
>
|
||||||
:entry="item"
|
Réessayer
|
||||||
:server-id="serverId"
|
</button>
|
||||||
@play-now="handlePlayItem"
|
|
||||||
@add-to-queue="handleQueueItem"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Empty state -->
|
<!-- Content -->
|
||||||
<div v-if="!containers.length && !items.length" class="browser-empty">
|
<div v-else class="browser-content">
|
||||||
<p>Ce dossier est vide</p>
|
<!-- Containers section -->
|
||||||
</div>
|
<div v-if="containers.length" class="browser-section">
|
||||||
|
<h3 class="section-title">Dossiers et playlists</h3>
|
||||||
|
<div class="entries-list">
|
||||||
|
<ContainerItem
|
||||||
|
v-for="container in containers"
|
||||||
|
:key="container.id"
|
||||||
|
:entry="container"
|
||||||
|
:server-id="serverId"
|
||||||
|
@browse="handleBrowseContainer"
|
||||||
|
@play-now="handlePlayContainer"
|
||||||
|
@add-to-queue="handleQueueContainer"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Items section -->
|
||||||
|
<div v-if="items.length" class="browser-section">
|
||||||
|
<h3 class="section-title">Pistes</h3>
|
||||||
|
<div class="entries-list">
|
||||||
|
<MediaItem
|
||||||
|
v-for="item in items"
|
||||||
|
:key="item.id"
|
||||||
|
:entry="item"
|
||||||
|
:server-id="serverId"
|
||||||
|
@play-now="handlePlayItem"
|
||||||
|
@add-to-queue="handleQueueItem"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Empty state -->
|
||||||
|
<div
|
||||||
|
v-if="!containers.length && !items.length"
|
||||||
|
class="browser-empty"
|
||||||
|
>
|
||||||
|
<p>Ce dossier est vide</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.media-browser {
|
.media-browser {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--spacing-lg);
|
gap: var(--spacing-lg);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Loading */
|
/* Loading */
|
||||||
.browser-loading {
|
.browser-loading {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: var(--spacing-md);
|
gap: var(--spacing-md);
|
||||||
color: var(--color-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.spinner {
|
.spinner {
|
||||||
animation: spin 1s linear infinite;
|
animation: spin 1s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
from {
|
from {
|
||||||
transform: rotate(0deg);
|
transform: rotate(0deg);
|
||||||
}
|
}
|
||||||
to {
|
to {
|
||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Error */
|
/* Error */
|
||||||
.browser-error {
|
.browser-error {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: var(--spacing-md);
|
gap: var(--spacing-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-message {
|
.error-message {
|
||||||
font-size: var(--text-base);
|
font-size: var(--text-base);
|
||||||
color: var(--status-offline);
|
color: var(--status-offline);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Content */
|
/* Content */
|
||||||
.browser-content {
|
.browser-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--spacing-xl);
|
gap: var(--spacing-xl);
|
||||||
padding-right: var(--spacing-xs);
|
padding-right: var(--spacing-xs);
|
||||||
}
|
}
|
||||||
|
|
||||||
.browser-section {
|
.browser-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--spacing-md);
|
gap: var(--spacing-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-title {
|
.section-title {
|
||||||
font-size: var(--text-lg);
|
font-size: var(--text-lg);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding-bottom: var(--spacing-sm);
|
padding-bottom: var(--spacing-sm);
|
||||||
border-bottom: 1px solid var(--color-border);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.entries-list {
|
.entries-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--spacing-xs);
|
gap: var(--spacing-xs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Empty state */
|
/* Empty state */
|
||||||
.browser-empty {
|
.browser-empty {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
color: var(--color-text-tertiary);
|
color: var(--color-text-tertiary);
|
||||||
font-size: var(--text-base);
|
font-size: var(--text-base);
|
||||||
padding: var(--spacing-xl);
|
padding: var(--spacing-xl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scrollbar styling */
|
/* Scrollbar styling */
|
||||||
.browser-content::-webkit-scrollbar {
|
.browser-content::-webkit-scrollbar {
|
||||||
width: 6px;
|
width: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.browser-content::-webkit-scrollbar-track {
|
.browser-content::-webkit-scrollbar-track {
|
||||||
background: var(--color-bg-secondary);
|
background: var(--color-bg-secondary);
|
||||||
border-radius: var(--radius-full);
|
border-radius: var(--radius-full);
|
||||||
}
|
}
|
||||||
|
|
||||||
.browser-content::-webkit-scrollbar-thumb {
|
.browser-content::-webkit-scrollbar-thumb {
|
||||||
background: var(--color-border);
|
background: var(--color-border);
|
||||||
border-radius: var(--radius-full);
|
border-radius: var(--radius-full);
|
||||||
}
|
}
|
||||||
|
|
||||||
.browser-content::-webkit-scrollbar-thumb:hover {
|
.browser-content::-webkit-scrollbar-thumb:hover {
|
||||||
background: var(--color-text-tertiary);
|
background: var(--color-text-tertiary);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -112,8 +112,8 @@ impl ControlPoint {
|
|||||||
];
|
];
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
// Attendre 60 secondes avant le prochain cycle
|
// Attendre 10 secondes avant le prochain cycle pour découverte rapide
|
||||||
thread::sleep(Duration::from_secs(60));
|
thread::sleep(Duration::from_secs(10));
|
||||||
|
|
||||||
debug!("Sending periodic M-SEARCH for device discovery");
|
debug!("Sending periodic M-SEARCH for device discovery");
|
||||||
|
|
||||||
@@ -303,9 +303,9 @@ impl ControlPoint {
|
|||||||
new_snapshot.state = Some(logical_state);
|
new_snapshot.state = Some(logical_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Poll volume and mute less frequently (every 3 seconds)
|
// Poll volume and mute every second (every 2 ticks at 500ms)
|
||||||
// to reduce SOAP overhead without impacting UI responsiveness
|
// for responsive volume control feedback
|
||||||
if tick % 3 == 0 {
|
if tick % 2 == 0 {
|
||||||
if let Ok(volume) = renderer.volume() {
|
if let Ok(volume) = renderer.volume() {
|
||||||
if prev_snapshot.last_volume != Some(volume) {
|
if prev_snapshot.last_volume != Some(volume) {
|
||||||
polling_cp.emit_renderer_event(RendererEvent::VolumeChanged {
|
polling_cp.emit_renderer_event(RendererEvent::VolumeChanged {
|
||||||
@@ -334,8 +334,8 @@ impl ControlPoint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tick = tick.wrapping_add(1);
|
tick = tick.wrapping_add(1);
|
||||||
// Keep 1 second polling for smooth position updates
|
// 500ms polling for smoother position updates and progress bar
|
||||||
thread::sleep(Duration::from_secs(1));
|
thread::sleep(Duration::from_millis(500));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1497,87 +1497,79 @@ async fn play_content(
|
|||||||
})?;
|
})?;
|
||||||
|
|
||||||
let control_point = Arc::clone(&state.control_point);
|
let control_point = Arc::clone(&state.control_point);
|
||||||
|
let rid_for_log = rid.clone();
|
||||||
|
let object_id_for_log = object_id.clone();
|
||||||
|
let object_id_for_debug = object_id_for_log.clone();
|
||||||
|
|
||||||
// Spawn blocking task for content loading
|
// Launch the command in background and return immediately
|
||||||
let play_task = tokio::task::spawn_blocking(move || {
|
// The UI will be updated via SSE events when playback starts
|
||||||
// Fetch playback items from server
|
tokio::task::spawn(async move {
|
||||||
let items = fetch_playback_items(&control_point, &sid, &object_id)?;
|
let result = tokio::task::spawn_blocking(move || {
|
||||||
|
// Fetch playback items from server
|
||||||
|
let items = fetch_playback_items(&control_point, &sid, &object_id)?;
|
||||||
|
|
||||||
if items.is_empty() {
|
if items.is_empty() {
|
||||||
return Err(anyhow::anyhow!("No playable content found"));
|
return Err(anyhow::anyhow!("No playable content found"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if items.len() > 1 {
|
||||||
|
debug!(
|
||||||
|
renderer = rid.0.as_str(),
|
||||||
|
server = sid.0.as_str(),
|
||||||
|
object = object_id.as_str(),
|
||||||
|
item_count = items.len(),
|
||||||
|
"Auto-binding playlist to renderer queue (auto_play = true)"
|
||||||
|
);
|
||||||
|
control_point.attach_queue_to_playlist_with_options(
|
||||||
|
&rid,
|
||||||
|
sid.clone(),
|
||||||
|
object_id.clone(),
|
||||||
|
true,
|
||||||
|
)?;
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear queue
|
||||||
|
control_point.clear_queue(&rid)?;
|
||||||
|
|
||||||
|
// Enqueue items
|
||||||
|
control_point.enqueue_items(&rid, items)?;
|
||||||
|
|
||||||
|
// Start playback
|
||||||
|
// Pour les renderers OpenHome, play_current_from_queue() va gérer automatiquement
|
||||||
|
// la lecture depuis la playlist native si elle existe
|
||||||
|
control_point.play_current_from_queue(&rid)?;
|
||||||
|
|
||||||
|
Ok::<(), anyhow::Error>(())
|
||||||
|
})
|
||||||
|
.await;
|
||||||
|
|
||||||
|
match result {
|
||||||
|
Ok(Ok(())) => {
|
||||||
|
debug!(
|
||||||
|
"Successfully started playing content {} on renderer {}",
|
||||||
|
object_id_for_log, rid_for_log.0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Ok(Err(e)) => {
|
||||||
|
warn!(
|
||||||
|
"Failed to play content on renderer {}: {}",
|
||||||
|
rid_for_log.0, e
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Err(e) => {
|
||||||
|
warn!(
|
||||||
|
"Task join error during play content for renderer {}: {}",
|
||||||
|
rid_for_log.0, e
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if items.len() > 1 {
|
|
||||||
debug!(
|
|
||||||
renderer = rid.0.as_str(),
|
|
||||||
server = sid.0.as_str(),
|
|
||||||
object = object_id.as_str(),
|
|
||||||
item_count = items.len(),
|
|
||||||
"Auto-binding playlist to renderer queue (auto_play = true)"
|
|
||||||
);
|
|
||||||
control_point.attach_queue_to_playlist_with_options(
|
|
||||||
&rid,
|
|
||||||
sid.clone(),
|
|
||||||
object_id.clone(),
|
|
||||||
true,
|
|
||||||
)?;
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clear queue
|
|
||||||
control_point.clear_queue(&rid)?;
|
|
||||||
|
|
||||||
// Enqueue items
|
|
||||||
control_point.enqueue_items(&rid, items)?;
|
|
||||||
|
|
||||||
// Start playback
|
|
||||||
// Pour les renderers OpenHome, play_current_from_queue() va gérer automatiquement
|
|
||||||
// la lecture depuis la playlist native si elle existe
|
|
||||||
control_point.play_current_from_queue(&rid)?;
|
|
||||||
|
|
||||||
Ok::<(), anyhow::Error>(())
|
|
||||||
});
|
});
|
||||||
|
|
||||||
time::timeout(QUEUE_COMMAND_TIMEOUT, play_task)
|
|
||||||
.await
|
|
||||||
.map_err(|_| {
|
|
||||||
warn!(
|
|
||||||
"Play content command for renderer {} exceeded {:?}",
|
|
||||||
renderer_id, QUEUE_COMMAND_TIMEOUT
|
|
||||||
);
|
|
||||||
(
|
|
||||||
StatusCode::GATEWAY_TIMEOUT,
|
|
||||||
Json(ErrorResponse {
|
|
||||||
error: format!(
|
|
||||||
"Play content timed out after {}s",
|
|
||||||
QUEUE_COMMAND_TIMEOUT.as_secs()
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})?
|
|
||||||
.map_err(|e| {
|
|
||||||
warn!("Task join error during play content: {}", e);
|
|
||||||
(
|
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
|
||||||
Json(ErrorResponse {
|
|
||||||
error: format!("Internal task error: {}", e),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})?
|
|
||||||
.map_err(|e| {
|
|
||||||
warn!("Failed to play content on renderer {}: {}", renderer_id, e);
|
|
||||||
(
|
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
|
||||||
Json(ErrorResponse {
|
|
||||||
error: format!("Failed to play content: {}", e),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})?;
|
|
||||||
|
|
||||||
debug!(
|
debug!(
|
||||||
renderer = renderer_id.as_str(),
|
renderer = renderer_id.as_str(),
|
||||||
server = req.server_id.as_str(),
|
server = req.server_id.as_str(),
|
||||||
object = object_id_for_log.as_str(),
|
object = object_id_for_debug.as_str(),
|
||||||
"Content playing via HTTP API"
|
"Content playing via HTTP API"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -1626,65 +1618,54 @@ async fn add_to_queue(
|
|||||||
})?;
|
})?;
|
||||||
|
|
||||||
let control_point = Arc::clone(&state.control_point);
|
let control_point = Arc::clone(&state.control_point);
|
||||||
|
let rid_for_log = rid.clone();
|
||||||
|
let object_id_for_log = object_id.clone();
|
||||||
|
let object_id_for_debug = object_id_for_log.clone();
|
||||||
|
|
||||||
// Spawn blocking task for content loading
|
// Launch the command in background and return immediately
|
||||||
let add_task = tokio::task::spawn_blocking(move || {
|
// The UI will be updated via SSE events when the queue changes
|
||||||
// Fetch playback items from server
|
tokio::task::spawn(async move {
|
||||||
let items = fetch_playback_items(&control_point, &sid, &object_id)?;
|
let result = tokio::task::spawn_blocking(move || {
|
||||||
|
// Fetch playback items from server
|
||||||
|
let items = fetch_playback_items(&control_point, &sid, &object_id)?;
|
||||||
|
|
||||||
if items.is_empty() {
|
if items.is_empty() {
|
||||||
return Err(anyhow::anyhow!("No playable content found"));
|
return Err(anyhow::anyhow!("No playable content found"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enqueue items
|
||||||
|
control_point.enqueue_items(&rid, items)?;
|
||||||
|
|
||||||
|
Ok::<(), anyhow::Error>(())
|
||||||
|
})
|
||||||
|
.await;
|
||||||
|
|
||||||
|
match result {
|
||||||
|
Ok(Ok(())) => {
|
||||||
|
debug!(
|
||||||
|
"Successfully added content {} to queue for renderer {}",
|
||||||
|
object_id_for_log, rid_for_log.0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Ok(Err(e)) => {
|
||||||
|
warn!(
|
||||||
|
"Failed to add content to queue for renderer {}: {}",
|
||||||
|
rid_for_log.0, e
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Err(e) => {
|
||||||
|
warn!(
|
||||||
|
"Task join error during add to queue for renderer {}: {}",
|
||||||
|
rid_for_log.0, e
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enqueue items
|
|
||||||
control_point.enqueue_items(&rid, items)?;
|
|
||||||
|
|
||||||
Ok::<(), anyhow::Error>(())
|
|
||||||
});
|
});
|
||||||
|
|
||||||
time::timeout(QUEUE_COMMAND_TIMEOUT, add_task)
|
|
||||||
.await
|
|
||||||
.map_err(|_| {
|
|
||||||
warn!(
|
|
||||||
"Add to queue command for renderer {} exceeded {:?}",
|
|
||||||
renderer_id, QUEUE_COMMAND_TIMEOUT
|
|
||||||
);
|
|
||||||
(
|
|
||||||
StatusCode::GATEWAY_TIMEOUT,
|
|
||||||
Json(ErrorResponse {
|
|
||||||
error: format!(
|
|
||||||
"Add to queue timed out after {}s",
|
|
||||||
QUEUE_COMMAND_TIMEOUT.as_secs()
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})?
|
|
||||||
.map_err(|e| {
|
|
||||||
warn!("Task join error during add to queue: {}", e);
|
|
||||||
(
|
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
|
||||||
Json(ErrorResponse {
|
|
||||||
error: format!("Internal task error: {}", e),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})?
|
|
||||||
.map_err(|e| {
|
|
||||||
warn!(
|
|
||||||
"Failed to add content to queue for renderer {}: {}",
|
|
||||||
renderer_id, e
|
|
||||||
);
|
|
||||||
(
|
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
|
||||||
Json(ErrorResponse {
|
|
||||||
error: format!("Failed to add to queue: {}", e),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})?;
|
|
||||||
|
|
||||||
debug!(
|
debug!(
|
||||||
renderer = renderer_id.as_str(),
|
renderer = renderer_id.as_str(),
|
||||||
server = req.server_id.as_str(),
|
server = req.server_id.as_str(),
|
||||||
object = object_id_for_log.as_str(),
|
object = object_id_for_debug.as_str(),
|
||||||
"Content added to queue via HTTP API"
|
"Content added to queue via HTTP API"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -1734,69 +1715,58 @@ async fn add_after_current(
|
|||||||
})?;
|
})?;
|
||||||
|
|
||||||
let control_point = Arc::clone(&state.control_point);
|
let control_point = Arc::clone(&state.control_point);
|
||||||
|
let rid_for_log = rid.clone();
|
||||||
|
let object_id_for_log = object_id.clone();
|
||||||
|
let object_id_for_debug = object_id_for_log.clone();
|
||||||
|
|
||||||
// Spawn blocking task for content loading
|
// Launch the command in background and return immediately
|
||||||
let add_task = tokio::task::spawn_blocking(move || {
|
// The UI will be updated via SSE events when the queue changes
|
||||||
// Fetch playback items from server
|
tokio::task::spawn(async move {
|
||||||
let items = fetch_playback_items(&control_point, &sid, &object_id)?;
|
let result = tokio::task::spawn_blocking(move || {
|
||||||
|
// Fetch playback items from server
|
||||||
|
let items = fetch_playback_items(&control_point, &sid, &object_id)?;
|
||||||
|
|
||||||
if items.is_empty() {
|
if items.is_empty() {
|
||||||
return Err(anyhow::anyhow!("No playable content found"));
|
return Err(anyhow::anyhow!("No playable content found"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Insert items after current using the new method
|
||||||
|
control_point.enqueue_items_with_mode(
|
||||||
|
&rid,
|
||||||
|
items,
|
||||||
|
crate::queue::EnqueueMode::InsertAfterCurrent,
|
||||||
|
)?;
|
||||||
|
|
||||||
|
Ok::<(), anyhow::Error>(())
|
||||||
|
})
|
||||||
|
.await;
|
||||||
|
|
||||||
|
match result {
|
||||||
|
Ok(Ok(())) => {
|
||||||
|
debug!(
|
||||||
|
"Successfully added content {} after current for renderer {}",
|
||||||
|
object_id_for_log, rid_for_log.0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Ok(Err(e)) => {
|
||||||
|
warn!(
|
||||||
|
"Failed to add content after current for renderer {}: {}",
|
||||||
|
rid_for_log.0, e
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Err(e) => {
|
||||||
|
warn!(
|
||||||
|
"Task join error during add after current for renderer {}: {}",
|
||||||
|
rid_for_log.0, e
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert items after current using the new method
|
|
||||||
control_point.enqueue_items_with_mode(
|
|
||||||
&rid,
|
|
||||||
items,
|
|
||||||
crate::queue::EnqueueMode::InsertAfterCurrent,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
Ok::<(), anyhow::Error>(())
|
|
||||||
});
|
});
|
||||||
|
|
||||||
time::timeout(QUEUE_COMMAND_TIMEOUT, add_task)
|
|
||||||
.await
|
|
||||||
.map_err(|_| {
|
|
||||||
warn!(
|
|
||||||
"Add after current command for renderer {} exceeded {:?}",
|
|
||||||
renderer_id, QUEUE_COMMAND_TIMEOUT
|
|
||||||
);
|
|
||||||
(
|
|
||||||
StatusCode::GATEWAY_TIMEOUT,
|
|
||||||
Json(ErrorResponse {
|
|
||||||
error: format!(
|
|
||||||
"Add after current timed out after {}s",
|
|
||||||
QUEUE_COMMAND_TIMEOUT.as_secs()
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})?
|
|
||||||
.map_err(|e| {
|
|
||||||
warn!("Task join error during add after current: {}", e);
|
|
||||||
(
|
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
|
||||||
Json(ErrorResponse {
|
|
||||||
error: format!("Internal task error: {}", e),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})?
|
|
||||||
.map_err(|e| {
|
|
||||||
warn!(
|
|
||||||
"Failed to add content after current for renderer {}: {}",
|
|
||||||
renderer_id, e
|
|
||||||
);
|
|
||||||
(
|
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
|
||||||
Json(ErrorResponse {
|
|
||||||
error: format!("Failed to add after current: {}", e),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})?;
|
|
||||||
|
|
||||||
debug!(
|
debug!(
|
||||||
renderer = renderer_id.as_str(),
|
renderer = renderer_id.as_str(),
|
||||||
server = req.server_id.as_str(),
|
server = req.server_id.as_str(),
|
||||||
object = object_id_for_log.as_str(),
|
object = object_id_for_debug.as_str(),
|
||||||
"Content added after current via HTTP API"
|
"Content added after current via HTTP API"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
0.3.0
|
|
||||||
Reference in New Issue
Block a user