refactor: migrate main.py to modular routers and add project roadmap
- Migrated monolithic main.py to feature-scoped routers in app/routers/ - Added GEMINI.md for project context and AI instructional guidelines - Updated README.md with a comprehensive modernization plan (SQL migration, robust scraping DSL, frontend modernization) - Improved authentication with cookie support and modular JS - Updated test suite and documentation
This commit is contained in:
+27
-15
@@ -62,16 +62,13 @@ async function searchAnimeDetails(query, malId = null) {
|
||||
const providersData = await getProvidersInfo();
|
||||
|
||||
// Build results HTML
|
||||
const streamingParts = [
|
||||
`<div class="streaming-results-header">
|
||||
<h3>🎬 Résultats de streaming</h3>
|
||||
</div>
|
||||
<div class="search-results" style="margin-top: 20px;">`
|
||||
];
|
||||
const streamingParts = [];
|
||||
let hasResults = false;
|
||||
|
||||
// Display results from each provider - render all cards in parallel
|
||||
for (const [providerId, results] of Object.entries(streamingData.value.results)) {
|
||||
if (results && results.length > 0) {
|
||||
hasResults = true;
|
||||
const provider = providersData.anime_providers[providerId];
|
||||
|
||||
// Render all cards for this provider
|
||||
@@ -81,8 +78,17 @@ async function searchAnimeDetails(query, malId = null) {
|
||||
}
|
||||
}
|
||||
|
||||
streamingParts.push('</div>');
|
||||
streamingHtml = streamingParts.join('');
|
||||
// Only add header and wrapper if we have results
|
||||
if (hasResults) {
|
||||
streamingParts.unshift(
|
||||
`<div class="streaming-results-header">
|
||||
<h3>🎬 Résultats de streaming</h3>
|
||||
</div>
|
||||
<div class="search-results" style="margin-top: 20px;">`
|
||||
);
|
||||
streamingParts.push('</div>');
|
||||
streamingHtml = streamingParts.join('');
|
||||
}
|
||||
}
|
||||
|
||||
// Display results
|
||||
@@ -150,16 +156,13 @@ async function getProviderSearchResults(query) {
|
||||
}
|
||||
|
||||
// Build results HTML
|
||||
const htmlParts = [
|
||||
`<div class="streaming-results-header">
|
||||
<h3>🎬 Résultats de streaming</h3>
|
||||
</div>
|
||||
<div class="search-results" style="margin-top: 20px;">`
|
||||
];
|
||||
const htmlParts = [];
|
||||
let hasResults = false;
|
||||
|
||||
// Display results from each provider
|
||||
for (const [providerId, results] of Object.entries(data.results)) {
|
||||
if (results && results.length > 0) {
|
||||
hasResults = true;
|
||||
const providersData = await getProvidersInfo();
|
||||
const provider = providersData.anime_providers[providerId];
|
||||
|
||||
@@ -170,7 +173,16 @@ async function getProviderSearchResults(query) {
|
||||
}
|
||||
}
|
||||
|
||||
htmlParts.push('</div>');
|
||||
// Only add header and wrapper if we have results
|
||||
if (hasResults) {
|
||||
htmlParts.unshift(
|
||||
`<div class="streaming-results-header">
|
||||
<h3>🎬 Résultats de streaming</h3>
|
||||
</div>
|
||||
<div class="search-results" style="margin-top: 20px;">`
|
||||
);
|
||||
htmlParts.push('</div>');
|
||||
}
|
||||
|
||||
return htmlParts.join('');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user