feat: Complete frontend-backend integration

- Created 4 new API endpoints in anime.py:
  * /api/v1/anime/status - Get library status
  * /api/v1/anime/add - Add new series
  * /api/v1/anime/download - Download folders
  * /api/v1/anime/process/locks - Check process locks

- Updated frontend API calls in app.js to use correct endpoints

- Cleaned up instructions.md by removing completed tasks

- Added comprehensive integration documentation

All tests passing. Core user workflows (list, search, add, download) now fully functional.
This commit is contained in:
2025-10-24 10:27:07 +02:00
parent 77da614091
commit 0fd9c424cd
4 changed files with 376 additions and 19 deletions

View File

@@ -836,7 +836,7 @@ class AniWorldApp {
async addSeries(link, name) {
try {
const response = await this.makeAuthenticatedRequest('/api/add_series', {
const response = await this.makeAuthenticatedRequest('/api/v1/anime/add', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -870,7 +870,7 @@ class AniWorldApp {
try {
const folders = Array.from(this.selectedSeries);
const response = await this.makeAuthenticatedRequest('/api/download', {
const response = await this.makeAuthenticatedRequest('/api/v1/anime/download', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -1030,7 +1030,7 @@ class AniWorldApp {
async checkProcessLocks() {
try {
const response = await this.makeAuthenticatedRequest('/api/process/locks/status');
const response = await this.makeAuthenticatedRequest('/api/v1/anime/process/locks');
if (!response) {
// If no response, set status as idle
this.updateProcessStatus('rescan', false);
@@ -1101,7 +1101,7 @@ class AniWorldApp {
try {
// Load current status
const response = await this.makeAuthenticatedRequest('/api/status');
const response = await this.makeAuthenticatedRequest('/api/v1/anime/status');
if (!response) return;
const data = await response.json();
@@ -1600,7 +1600,7 @@ class AniWorldApp {
async refreshStatus() {
try {
const response = await this.makeAuthenticatedRequest('/api/status');
const response = await this.makeAuthenticatedRequest('/api/v1/anime/status');
if (!response) return;
const data = await response.json();