Skip to content

Make IMDB URLs configurable in MediaInfo#506

Open
tsautier wants to merge 1 commit intodrftpd-ng:masterfrom
tsautier:fix/issue-126
Open

Make IMDB URLs configurable in MediaInfo#506
tsautier wants to merge 1 commit intodrftpd-ng:masterfrom
tsautier:fix/issue-126

Conversation

@tsautier
Copy link
Copy Markdown

@tsautier tsautier commented Jan 14, 2026

Problem

IMDB URLs (https://imdb.com, https://imdb.com/find?s=all&q=) were hardcoded in IMDBParser.java. If IMDB changed their domain or URL structure, users couldn't fix it without modifying source code and recompiling.

Solution

Move IMDB URLs to the configuration file (imdb.conf) so users can update them without code changes.

Changes Made

1. Added URL Config to imdb.conf.dist

Added new configuration options:

# IMDB URL settings - change these if IMDB changes their domain
url.base=https://imdb.com
url.search=https://imdb.com/find?s=all&q=
url.title.prefix=https://imdb.com/title/

2. Modified IMDBParser to Load URLs from Config

Changed from hardcoded constants to config-loaded values with sensible defaults:

  • Added ConfigLoader.loadPluginConfig("imdb.conf") to constructor
  • URLs now read from config with fallback to defaults

Benefits

  • Users can update IMDB URLs without recompiling
  • Sensible defaults ensure backward compatibility
  • If IMDB changes domain, a simple config edit fixes the plugin

Fixes: #126

@tsautier
Copy link
Copy Markdown
Author

@mvangoor @hrxcodes for review

@tsautier tsautier changed the title Fix/issue 126 Make IMDB URLs configurable in MediaInfo Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-work the way the imdb urls are provided (should be in configuration)

1 participant