trash_compare_naming
Compare your naming configuration with TRaSH Guides recommendations to ensure proper media organization for Plex, Emby, Jellyfin, or standard setups in Radarr or Sonarr.
Instructions
Compare your naming configuration against TRaSH Guides recommendations. Requires the corresponding *arr service to be configured.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | Which service | |
| mediaServer | Yes | Which media server you use |
Implementation Reference
- src/index.ts:1956-2029 (handler)Executes the trash_compare_naming tool: fetches user's naming config from *arr client and TRaSH naming conventions, maps media server to recommended formats, compares folder/file naming patterns, and returns match status with recommendations.case "trash_compare_naming": { const { service, mediaServer } = args as { service: TrashService; mediaServer: string }; // Get client const client = service === 'radarr' ? clients.radarr : clients.sonarr; if (!client) { return { content: [{ type: "text", text: JSON.stringify({ error: `${service} not configured. Cannot compare naming.` }, null, 2), }], isError: true, }; } // Fetch both const [userNaming, trashNaming] = await Promise.all([ client.getNamingConfig(), trashClient.getNaming(service), ]); if (!trashNaming) { return { content: [{ type: "text", text: JSON.stringify({ error: `Could not fetch TRaSH naming for ${service}` }, null, 2), }], isError: true, }; } // Map media server to naming key const serverMap: Record<string, { folder: string; file: string }> = { plex: { folder: 'plex-imdb', file: 'plex-imdb' }, emby: { folder: 'emby-imdb', file: 'emby-imdb' }, jellyfin: { folder: 'jellyfin-imdb', file: 'jellyfin-imdb' }, standard: { folder: 'default', file: 'standard' }, }; const keys = serverMap[mediaServer] || serverMap.standard; const recommendedFolder = trashNaming.folder[keys.folder] || trashNaming.folder.default; const recommendedFile = trashNaming.file[keys.file] || trashNaming.file.standard; // Extract user's current naming (field names vary by service) const namingRecord = userNaming as unknown as Record<string, unknown>; const userFolder = namingRecord.movieFolderFormat || namingRecord.seriesFolderFormat || namingRecord.standardMovieFormat; const userFile = namingRecord.standardMovieFormat || namingRecord.standardEpisodeFormat; return { content: [{ type: "text", text: JSON.stringify({ mediaServer, yourNaming: { folder: userFolder, file: userFile, }, trashRecommended: { folder: recommendedFolder, file: recommendedFile, }, folderMatch: userFolder === recommendedFolder, fileMatch: userFile === recommendedFile, recommendations: [ ...(userFolder !== recommendedFolder ? [`Update folder format to: ${recommendedFolder}`] : []), ...(userFile !== recommendedFile ? [`Update file format to: ${recommendedFile}`] : []), ], }, null, 2), }], }; }
- src/index.ts:715-733 (schema)Tool definition including name, description, and input schema (service: radarr/sonarr, mediaServer: plex/emby/jellyfin/standard). Added to TOOLS array for registration.name: "trash_compare_naming", description: "Compare your naming configuration against TRaSH Guides recommendations. Requires the corresponding *arr service to be configured.", inputSchema: { type: "object" as const, properties: { service: { type: "string", enum: ["radarr", "sonarr"], description: "Which service", }, mediaServer: { type: "string", enum: ["plex", "emby", "jellyfin", "standard"], description: "Which media server you use", }, }, required: ["service", "mediaServer"], }, }
- src/index.ts:598-734 (registration)The tool is registered by pushing its definition to the TOOLS array, which is returned by listTools handler.TOOLS.push( { name: "trash_list_profiles", description: "List available TRaSH Guides quality profiles for Radarr or Sonarr. Shows recommended profiles for different use cases (1080p, 4K, Remux, etc.)", inputSchema: { type: "object" as const, properties: { service: { type: "string", enum: ["radarr", "sonarr"], description: "Which service to get profiles for", }, }, required: ["service"], }, }, { name: "trash_get_profile", description: "Get a specific TRaSH Guides quality profile with all custom format scores, quality settings, and implementation details", inputSchema: { type: "object" as const, properties: { service: { type: "string", enum: ["radarr", "sonarr"], description: "Which service", }, profile: { type: "string", description: "Profile name (e.g., 'remux-web-1080p', 'uhd-bluray-web', 'hd-bluray-web')", }, }, required: ["service", "profile"], }, }, { name: "trash_list_custom_formats", description: "List available TRaSH Guides custom formats. Can filter by category: hdr, audio, resolution, source, streaming, anime, unwanted, release, language", inputSchema: { type: "object" as const, properties: { service: { type: "string", enum: ["radarr", "sonarr"], description: "Which service", }, category: { type: "string", description: "Optional filter by category", }, }, required: ["service"], }, }, { name: "trash_get_naming", description: "Get TRaSH Guides recommended naming conventions for your media server (Plex, Emby, Jellyfin, or standard)", inputSchema: { type: "object" as const, properties: { service: { type: "string", enum: ["radarr", "sonarr"], description: "Which service", }, mediaServer: { type: "string", enum: ["plex", "emby", "jellyfin", "standard"], description: "Which media server you use", }, }, required: ["service", "mediaServer"], }, }, { name: "trash_get_quality_sizes", description: "Get TRaSH Guides recommended min/max/preferred sizes for each quality level", inputSchema: { type: "object" as const, properties: { service: { type: "string", enum: ["radarr", "sonarr"], description: "Which service", }, type: { type: "string", description: "Content type: 'movie', 'anime' for Radarr; 'series', 'anime' for Sonarr", }, }, required: ["service"], }, }, { name: "trash_compare_profile", description: "Compare your quality profile against TRaSH Guides recommendations. Shows missing custom formats, scoring differences, and quality settings. Requires the corresponding *arr service to be configured.", inputSchema: { type: "object" as const, properties: { service: { type: "string", enum: ["radarr", "sonarr"], description: "Which service", }, profileId: { type: "number", description: "Your quality profile ID to compare", }, trashProfile: { type: "string", description: "TRaSH profile name to compare against", }, }, required: ["service", "profileId", "trashProfile"], }, }, { name: "trash_compare_naming", description: "Compare your naming configuration against TRaSH Guides recommendations. Requires the corresponding *arr service to be configured.", inputSchema: { type: "object" as const, properties: { service: { type: "string", enum: ["radarr", "sonarr"], description: "Which service", }, mediaServer: { type: "string", enum: ["plex", "emby", "jellyfin", "standard"], description: "Which media server you use", }, }, required: ["service", "mediaServer"], }, } );
- src/trash-client.ts:338-351 (helper)Fetches and caches TRaSH Guides naming conventions from GitHub, used by trash_compare_naming.async getNaming(service: TrashService): Promise<TrashNaming | null> { const cached = cache.getNaming(service); if (cached) return cached; try { const naming = await fetchJSON<TrashNaming>( `${TRASH_BASE_URL}/${service}/naming/${service}-naming.json` ); cache.setNaming(service, naming); return naming; } catch { return null; } }
- src/arr-client.ts:550-552 (helper)Fetches the *arr application's naming configuration via API, used by trash_compare_naming.async getNamingConfig(): Promise<NamingConfig> { return this.request<NamingConfig>('/config/naming'); }