From 177917c06e118e8c2f2ac543f3ff59997e116f33 Mon Sep 17 00:00:00 2001 From: R0m1k3 Date: Thu, 16 Apr 2026 14:19:55 +0200 Subject: [PATCH] =?UTF-8?q?R=C3=A9sout=20tous=20les=20conflits=20de=20merg?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - podcastController: createPodcastFromRss sans feedData (parse le RSS réel) - Discover.tsx: stub vide (remplacé par /trending et /add) - App.tsx + Navigation.tsx: conflits déjà résolus Co-Authored-By: Claude Sonnet 4.6 --- backend/src/controllers/podcastController.ts | 10 +++----- frontend/src/components/Navigation.tsx | 25 +++++++------------- frontend/src/pages/Discover.tsx | 1 + 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/backend/src/controllers/podcastController.ts b/backend/src/controllers/podcastController.ts index 167f868..986201b 100644 --- a/backend/src/controllers/podcastController.ts +++ b/backend/src/controllers/podcastController.ts @@ -243,15 +243,11 @@ export const subscribeFromDiscovery = async (req: Request, res: Response) => { // Check if podcast already in database let podcast = await Podcast.findOne({ rssUrl }); - // If not in database, create it from RSS + // If not in database, create it from RSS (parse feed for real episodes) if (!podcast) { try { - const result = await rssParserService.createPodcastFromRss(rssUrl, { - title: title || 'Unknown Podcast', - author: author || '', - imageUrl: imageUrl, - }); - // Refetch as a proper Mongoose document + const result = await rssParserService.createPodcastFromRss(rssUrl); + // Refetch as a proper Mongoose document (result.podcast is a plain object) podcast = await Podcast.findById(result.podcast._id); } catch (error: any) { if (error.message.includes('already in database')) { diff --git a/frontend/src/components/Navigation.tsx b/frontend/src/components/Navigation.tsx index 708a9c1..997d82d 100644 --- a/frontend/src/components/Navigation.tsx +++ b/frontend/src/components/Navigation.tsx @@ -1,5 +1,5 @@ import { Link, useLocation } from 'react-router-dom'; -import { Home, Flame, PlusCircle, BookOpen, Music2, Search, Library } from 'lucide-react'; +import { Home, Flame, PlusCircle, BookOpen, Library } from 'lucide-react'; export default function Navigation() { const location = useLocation(); @@ -7,10 +7,10 @@ export default function Navigation() { const isActive = (path: string) => location.pathname === path; const navItems = [ - { path: '/dashboard', label: 'Dashboard', icon: Home, color: 'text-accent-indigo' }, - { path: '/trending', label: 'Trending', icon: Flame, color: 'text-accent-rose' }, - { path: '/library', label: 'Library', icon: Library, color: 'text-accent-cyan' }, - { path: '/add', label: 'Add Podcast', icon: PlusCircle, color: 'text-accent-violet' }, + { path: '/dashboard', label: 'Tableau de bord', icon: Home, color: 'text-accent-indigo' }, + { path: '/trending', label: 'Tendances', icon: Flame, color: 'text-accent-rose' }, + { path: '/library', label: 'Bibliothèque', icon: Library, color: 'text-accent-cyan' }, + { path: '/add', label: 'Ajouter', icon: PlusCircle, color: 'text-accent-violet' }, ]; return ( @@ -44,7 +44,7 @@ export default function Navigation() { }`} > {active && ( -
+
)} {item.label} @@ -53,16 +53,9 @@ export default function Navigation() { })}
- {/* Footer info/stats */} -
-
-

My Stats

-
- 2.4k - Mins Listened -
-
-

Podcastic Premium © 2026

+ {/* Footer */} +
+

Podcastic © 2026

diff --git a/frontend/src/pages/Discover.tsx b/frontend/src/pages/Discover.tsx index ed76dbf..d2752b5 100644 --- a/frontend/src/pages/Discover.tsx +++ b/frontend/src/pages/Discover.tsx @@ -1,3 +1,4 @@ +// Cette page est remplacée par /trending et /add export default function Discover() { return null; }