0.13.1 DVD Series rc1
This commit is contained in:
@@ -1344,8 +1344,8 @@ export default function RipperPage({
|
||||
imdbId: job?.imdb_id || null,
|
||||
poster: job?.poster_url || null,
|
||||
metadataProvider: context?.metadataProvider || 'omdb',
|
||||
seasonNumber: context?.seriesLookupHint?.seasonNumber || null,
|
||||
discNumber: context?.seriesLookupHint?.discNumber || null
|
||||
seasonNumber: null,
|
||||
discNumber: null
|
||||
};
|
||||
return {
|
||||
...context,
|
||||
@@ -1379,8 +1379,8 @@ export default function RipperPage({
|
||||
imdbId: null,
|
||||
poster: null,
|
||||
metadataProvider: currentContext?.metadataProvider || 'omdb',
|
||||
seasonNumber: currentContext?.seriesLookupHint?.seasonNumber || null,
|
||||
discNumber: currentContext?.seriesLookupHint?.discNumber || null
|
||||
seasonNumber: null,
|
||||
discNumber: null
|
||||
},
|
||||
metadataProvider: currentContext?.metadataProvider || currentContext?.selectedMetadata?.metadataProvider || 'omdb',
|
||||
metadataCandidates: Array.isArray(currentContext?.metadataCandidates) ? currentContext.metadataCandidates : [],
|
||||
@@ -2202,7 +2202,8 @@ export default function RipperPage({
|
||||
return response.results || [];
|
||||
};
|
||||
|
||||
const doSelectMetadata = async (payload) => {
|
||||
const doSelectMetadata = async (payload, options = {}) => {
|
||||
const suppressErrorToast = Boolean(options?.suppressErrorToast);
|
||||
setBusy(true);
|
||||
try {
|
||||
if (metadataDialogReassignMode) {
|
||||
@@ -2216,6 +2217,9 @@ export default function RipperPage({
|
||||
setMetadataDialogContext(null);
|
||||
setMetadataDialogReassignMode(false);
|
||||
} catch (error) {
|
||||
if (suppressErrorToast) {
|
||||
throw error;
|
||||
}
|
||||
showError(error);
|
||||
} finally {
|
||||
setBusy(false);
|
||||
@@ -2223,17 +2227,27 @@ export default function RipperPage({
|
||||
};
|
||||
|
||||
const handleMetadataSubmit = async (payload) => {
|
||||
const payloadProvider = String(payload?.metadataProvider || '').trim().toLowerCase();
|
||||
const currentJobMediaProfile = String(effectiveMetadataDialogContext?.mediaProfile || '').trim().toLowerCase();
|
||||
const isSeriesDvdPayload = payloadProvider === 'tmdb' && currentJobMediaProfile === 'dvd';
|
||||
|
||||
if (metadataDialogReassignMode) {
|
||||
await doSelectMetadata(payload);
|
||||
return;
|
||||
}
|
||||
|
||||
// Serien-DVDs laufen ohne Film-Duplikatdialog weiter; die Disk-Pruefung
|
||||
// erfolgt serverseitig gegen den vorhandenen Staffel-Container.
|
||||
if (isSeriesDvdPayload) {
|
||||
await doSelectMetadata(payload, { suppressErrorToast: true });
|
||||
return;
|
||||
}
|
||||
|
||||
// Duplikatprüfung: nur bei OMDB-Auswahl mit imdbId sinnvoll
|
||||
const searchTitle = payload.title || '';
|
||||
const searchImdbId = payload.imdbId || null;
|
||||
if (searchTitle) {
|
||||
try {
|
||||
const currentJobMediaProfile = String(effectiveMetadataDialogContext?.mediaProfile || '').trim().toLowerCase();
|
||||
const historyResponse = await api.getJobs({ search: searchTitle, limit: 50, lite: true });
|
||||
const historyJobs = Array.isArray(historyResponse?.jobs) ? historyResponse.jobs : [];
|
||||
const duplicate = historyJobs.find((job) => {
|
||||
|
||||
Reference in New Issue
Block a user