feat: add anime metadata editing and NFO diagnostics
- Add PUT /anime/{key} endpoint for updating anime key, tmdb_id, tvdb_id
- Add NFO diagnostics and repair endpoints (GET/POST /nfo/diagnostics)
- Add edit modal UI with context menu integration
- Add frontend JS modules for context-menu and edit-modal
- Add comprehensive tests for edit, rename, and NFO repair flows
This commit is contained in:
@@ -392,6 +392,22 @@ AniWorld.SeriesManager = (function() {
|
||||
return seriesData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a series key in the local data arrays after rename.
|
||||
* @param {string} oldKey - The previous key
|
||||
* @param {string} newKey - The new key
|
||||
*/
|
||||
function updateSeriesKey(oldKey, newKey) {
|
||||
if (seriesData) {
|
||||
var s = seriesData.find(function(item) { return item.key === oldKey; });
|
||||
if (s) s.key = newKey;
|
||||
}
|
||||
if (filteredSeriesData) {
|
||||
var fs = filteredSeriesData.find(function(item) { return item.key === oldKey; });
|
||||
if (fs) fs.key = newKey;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get filtered series data
|
||||
* @returns {Array} Filtered series data array
|
||||
@@ -543,6 +559,7 @@ AniWorld.SeriesManager = (function() {
|
||||
getFilteredSeriesData: getFilteredSeriesData,
|
||||
findByKey: findByKey,
|
||||
updateSeriesLoadingStatus: updateSeriesLoadingStatus,
|
||||
updateSingleSeries: updateSingleSeries
|
||||
updateSingleSeries: updateSingleSeries,
|
||||
updateSeriesKey: updateSeriesKey
|
||||
};
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user