Skip to content

Connect language selection to TMDB API movie filtering#3

Draft
Domi2445 with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-language-selection-movies
Draft

Connect language selection to TMDB API movie filtering#3
Domi2445 with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-language-selection-movies

Conversation

Copilot AI commented Jan 18, 2026

Copy link
Copy Markdown

Language selection in settings only changed UI language, not the language of movies fetched from TMDB API. Selecting English still showed German movies.

Changes

  • LanguageUtil: Added getTmdbLanguageCode() method mapping Language enum to TMDB API codes (EN→en-US, DE→de-DE, AR→ar-SA, PL→pl-PL)

  • FilmRepository.getTopMovies(): Replaced static ApiConfig.TMDB_LANGUAGE with dynamic LanguageUtil.getTmdbLanguageCode()

  • TMDbService: Updated all TMDB API methods to use dynamic language from LanguageUtil. Added FALLBACK_LANGUAGE constant to replace hardcoded "en-US" strings.

Behavior

When user saves language preference, SettingsController reloads the root view, triggering SearchController reinitialization. Subsequent TMDB API calls use the selected language code, returning region-appropriate popular movies.

// Before
String url = BASE_URL + "/movie/popular?api_key=" + apiKey + "&language=" + ApiConfig.TMDB_LANGUAGE;

// After  
String url = BASE_URL + "/movie/popular?api_key=" + apiKey + "&language=" + LanguageUtil.getTmdbLanguageCode();

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • jitpack.io
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.12/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.12/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.12 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.12/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/CineScopeJavaProject/CineScopeJavaProject org.codehaus.plexus.classworlds.launcher.Launcher clean compile -q (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.12/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.12/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.12 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.12/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/CineScopeJavaProject/CineScopeJavaProject org.codehaus.plexus.classworlds.launcher.Launcher -f pom.xml -B -V -e -Dfindbugs.skip -Dcheckstyle.skip -Dpmd.skip=true -Dspotbugs.skip -Denforcer.skip -Dmaven.javadoc.skip (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

also folgendes Problem wenn ich ja z.B englisch auswähle sollen mir auch Englische Filme angezeigt werden

The user has attached the following files from their workspace:

  • logs/cinescape_system.log

TITLE: Language Selection Should Show English Movies
USER INTENT: Ensure selecting the English language option displays English-language films.
TASK DESCRIPTION: Implement or fix functionality so that when a user selects “English” as their preferred language, the app displays movies in English.
EXISTING: No existing code or solutions were discussed; the user only described the desired behavior.
PENDING: Implement or verify the filter or display logic that shows English films upon selecting the English language option.
CODE STATE: No files or code snippets were provided or modified.
RELEVANT CODE/DOCUMENTATION SNIPPETS: None provided.
OTHER NOTES: The user’s request was stated in German: they want English-language films to appear when choosing English.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 18, 2026 11:33
…ring

Co-authored-by: Domi2445 <177636536+Domi2445@users.noreply.github.com>
Co-authored-by: Domi2445 <177636536+Domi2445@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement functionality to display English movies Connect language selection to TMDB API movie filtering Jan 18, 2026
Copilot AI requested a review from Domi2445 January 18, 2026 11:37
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.

2 participants