Skip to content

feat: integrate Wikidata awards system and enhance metadata management - #223

Merged
MakD merged 1 commit into
masterfrom
wikidata-awards
Aug 19, 2026
Merged

MakD merged 1 commit into
masterfrom
wikidata-awards

Conversation

@MakD

@MakD MakD commented Aug 19, 2026

Copy link
Copy Markdown
Owner

This commit introduces a comprehensive awards tracking system powered by Wikidata, allowing users to view detailed win and nomination histories for movies, shows, and people. It includes a robust caching layer, SPARQL-based query infrastructure, and a new UI suite for timeline-style award displays.

Key Changes:

  • Wikidata Integration:

    • Networking: Added WikidataApiService and WikidataAwardQueries to perform SPARQL lookups using TMDB identifiers.
    • Parsing: Implemented WikidataAwardParser to transform complex SPARQL responses into a unified WikidataAwards model, featuring logic to group results by year and deduplicate "Won" vs. "Nominated" entries.
    • Repository: Created WikidataAwardsRepository to manage data flow, handle in-flight request de-duplication, and manage multi-tier TTL (Time-To-Live) for positive and negative caches.
  • Persistence & Caching:

    • Database: Introduced WikidataAwardsCacheEntity and WikidataAwardsDao with a Room migration (v70 to v71).
    • Metadata Refactoring: Updated ItemDetailViewModel to use differentiated cache expiration (48h for populated metadata vs. 6h for empty results) to improve refresh reliability.
  • UI & Presentation:

    • WikidataAwardsSection: Created a new UI component supporting two styles: a COLLAPSED_BAR for item headers and an OPEN_LIST for detailed timelines.
    • Award Timeline: Implemented a vertical timeline view with distinct markers for wins (gold) and nominations, including a bottom sheet for full history.
    • Person Support: Extended person detail screens to fetch and display awards for actors and directors by resolving their TMDB IDs.
    • Preferences: Added global toggles for "Show Awards" and "Wikidata Enabled," including a dedicated disclosure and opt-in flow in the Services Hub.
  • Security & Utilities:

    • URL Redaction: Introduced UrlRedaction.kt to automatically strip sensitive parameters (API keys, tokens) from logs across the network layer and media workers.
    • MDBList Usage: Added an API usage tracker in Settings to show remaining MDBList requests.
  • Refinement:

    • Centralized award headline logic to prioritize OMDb headlines while falling back to derived Wikidata summaries when applicable.
    • Updated PlayerControls to respect the new LocalShowAwards preference.

This commit introduces a comprehensive awards tracking system powered by Wikidata, allowing users to view detailed win and nomination histories for movies, shows, and people. It includes a robust caching layer, SPARQL-based query infrastructure, and a new UI suite for timeline-style award displays.

### Key Changes:

*   **Wikidata Integration**:
    *   **Networking**: Added `WikidataApiService` and `WikidataAwardQueries` to perform SPARQL lookups using TMDB identifiers.
    *   **Parsing**: Implemented `WikidataAwardParser` to transform complex SPARQL responses into a unified `WikidataAwards` model, featuring logic to group results by year and deduplicate "Won" vs. "Nominated" entries.
    *   **Repository**: Created `WikidataAwardsRepository` to manage data flow, handle in-flight request de-duplication, and manage multi-tier TTL (Time-To-Live) for positive and negative caches.

*   **Persistence & Caching**:
    *   **Database**: Introduced `WikidataAwardsCacheEntity` and `WikidataAwardsDao` with a Room migration (v70 to v71).
    *   **Metadata Refactoring**: Updated `ItemDetailViewModel` to use differentiated cache expiration (48h for populated metadata vs. 6h for empty results) to improve refresh reliability.

*   **UI & Presentation**:
    *   **`WikidataAwardsSection`**: Created a new UI component supporting two styles: a `COLLAPSED_BAR` for item headers and an `OPEN_LIST` for detailed timelines.
    *   **Award Timeline**: Implemented a vertical timeline view with distinct markers for wins (gold) and nominations, including a bottom sheet for full history.
    *   **Person Support**: Extended person detail screens to fetch and display awards for actors and directors by resolving their TMDB IDs.
    *   **Preferences**: Added global toggles for "Show Awards" and "Wikidata Enabled," including a dedicated disclosure and opt-in flow in the Services Hub.

*   **Security & Utilities**:
    *   **URL Redaction**: Introduced `UrlRedaction.kt` to automatically strip sensitive parameters (API keys, tokens) from logs across the network layer and media workers.
    *   **MDBList Usage**: Added an API usage tracker in Settings to show remaining MDBList requests.

*   **Refinement**:
    *   Centralized award headline logic to prioritize OMDb headlines while falling back to derived Wikidata summaries when applicable.
    *   Updated `PlayerControls` to respect the new `LocalShowAwards` preference.
@MakD
MakD merged commit 1f1e8b0 into master Aug 19, 2026
@MakD
MakD deleted the wikidata-awards branch August 19, 2026 08:13
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.

1 participant