mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-02 20:30:10 +00:00
Add German Audible region
This commit is contained in:
@@ -166,6 +166,7 @@ export function AudiobookshelfSection({
|
||||
<option value="uk">United Kingdom</option>
|
||||
<option value="au">Australia</option>
|
||||
<option value="in">India</option>
|
||||
<option value="de">Germany</option>
|
||||
</select>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">
|
||||
Select the Audible region that matches your metadata engine (Audnexus/Audible Agent)
|
||||
|
||||
@@ -166,6 +166,7 @@ export function PlexSection({
|
||||
<option value="uk">United Kingdom</option>
|
||||
<option value="au">Australia</option>
|
||||
<option value="in">India</option>
|
||||
<option value="de">Germany</option>
|
||||
</select>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">
|
||||
Select the Audible region that matches your metadata engine (Audnexus/Audible Agent)
|
||||
|
||||
@@ -12,7 +12,7 @@ import { RMABLogger } from '@/lib/utils/logger';
|
||||
|
||||
const logger = RMABLogger.create('API.Admin.Settings.Audible');
|
||||
|
||||
const VALID_REGIONS = ['us', 'ca', 'uk', 'au', 'in'];
|
||||
const VALID_REGIONS = ['us', 'ca', 'uk', 'au', 'in', 'de'];
|
||||
|
||||
export async function PUT(request: NextRequest) {
|
||||
return requireAuth(request, async (req: AuthenticatedRequest) => {
|
||||
@@ -24,7 +24,7 @@ export async function PUT(request: NextRequest) {
|
||||
if (!region || !VALID_REGIONS.includes(region)) {
|
||||
logger.warn('Invalid region provided', { region });
|
||||
return NextResponse.json(
|
||||
{ success: false, error: 'Invalid Audible region. Must be one of: us, ca, uk, au, in' },
|
||||
{ success: false, error: 'Invalid Audible region. Must be one of: us, ca, uk, au, in, de' },
|
||||
{ status: 400 }
|
||||
);
|
||||
}
|
||||
|
||||
@@ -118,6 +118,7 @@ export function BackendSelectionStep({
|
||||
<option value="uk">United Kingdom</option>
|
||||
<option value="au">Australia</option>
|
||||
<option value="in">India</option>
|
||||
<option value="de">Germany</option>
|
||||
</select>
|
||||
<p className="text-sm text-gray-600 dark:text-gray-400">
|
||||
Select the Audible region that matches your metadata engine (Audnexus/Audible Agent)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Documentation: documentation/integrations/audible.md
|
||||
*/
|
||||
|
||||
export type AudibleRegion = 'us' | 'ca' | 'uk' | 'au' | 'in';
|
||||
export type AudibleRegion = 'us' | 'ca' | 'uk' | 'au' | 'in' | 'de';
|
||||
|
||||
export interface AudibleRegionConfig {
|
||||
code: AudibleRegion;
|
||||
@@ -43,6 +43,12 @@ export const AUDIBLE_REGIONS: Record<AudibleRegion, AudibleRegionConfig> = {
|
||||
baseUrl: 'https://www.audible.in',
|
||||
audnexusParam: 'in',
|
||||
},
|
||||
de: {
|
||||
code: 'de',
|
||||
name: 'Germany',
|
||||
baseUrl: 'https://www.audible.de',
|
||||
audnexusParam: 'de',
|
||||
},
|
||||
};
|
||||
|
||||
export const DEFAULT_AUDIBLE_REGION: AudibleRegion = 'us';
|
||||
|
||||
Reference in New Issue
Block a user