Skip to content

[script.module.libard] 6.0.3 - #2886

Open
cvosoft wants to merge 1 commit into
xbmc:matrixfrom
cvosoft:libard-fix
Open

[script.module.libard] 6.0.3#2886
cvosoft wants to merge 1 commit into
xbmc:matrixfrom
cvosoft:libard-fix

Conversation

@cvosoft

@cvosoft cvosoft commented Aug 24, 2026

Copy link
Copy Markdown

Description

Fix ARD Mediathek and Sportschau playback after changes to the ARD API.

The old /page-gateway/mediacollection/{id} endpoint now returns HTTP 404.

This update:

  • uses the current /page-gateway/pages/ard/item/{id} endpoint with mediaCollection v6
  • parses HLS streams from the new streams/media structure
  • updates subtitle parsing to use the new WebVTT subtitle sources

Tested playback with:

  • plugin.video.ardmediathek_de
  • plugin.video.sportschau

Checklist:

  • My code follows the add-on rules and piracy stance of this project.
  • I have read the CONTRIBUTING document
  • Each add-on submission should be a single commit with using the following style: [script.foo.bar] 1.0.0

@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown

Greptile Summary

The PR updates libard to use ARD's current item endpoint and mediaCollection v6 stream/subtitle structures, and increments the add-on version. The new stream parsing restores HLS discovery, but the emitted subtitle type is incompatible with the existing playback layer.

  • Replaces the obsolete media-collection request with the page-gateway item endpoint.
  • Selects HLS media from the new streams[].media[] representation.
  • Parses WebVTT subtitle sources from the new subtitle structure.
  • Updates script.module.libard from 6.0.2 to 6.0.3.

Confidence Score: 4/5

The subtitle type mismatch should be fixed before merging because it causes all newly parsed ARD WebVTT subtitles to be discarded.

The parser emits vtt, while the established playback path accepts only webvtt for this format and otherwise drops the subtitle.

Files Needing Attention: script.module.libard/lib/libardnewjsonparser.py

Important Files Changed

Filename Overview
script.module.libard/lib/libardnewjsonparser.py Migrates video and subtitle parsing to ARD's current API structure, but labels WebVTT entries with an unsupported subtitle type.
script.module.libard/addon.xml Updates the add-on version from 6.0.2 to 6.0.3.

Sequence Diagram

sequenceDiagram
    participant Addon as ARD add-on
    participant Parser as libard parseVideo
    participant API as ARD page-gateway
    participant Player as libmediathek4.play
    Addon->>Parser: parseVideo(clipId)
    Parser->>API: "GET /pages/ard/item/{id}?mcV6=true"
    API-->>Parser: streams and WebVTT sources
    Parser-->>Addon: "media + subtitle(type=vtt)"
    Addon->>Player: play(parsed data)
    Player-->>Player: Reject unsupported vtt type
    Note over Player: Subtitle is omitted
Loading

Reviews (1): Last reviewed commit: "[script.module.libard] 6.0.3" | Re-trigger Greptile

if source.get('kind') == 'webvtt':
subtitles.append({
'url': source['url'],
'type': 'vtt',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 WebVTT subtitles use unsupported type

When an ARD item includes a WebVTT subtitle source, parseVideo labels it as vtt, but the playback layer recognizes only webvtt and drops unsupported entries, causing playback to start without subtitles.

Suggested change
'type': 'vtt',
'type': 'webvtt',

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good catch. Changed the subtitle type to webvtt and verified it locally with an ARD item containing WebVTT subtitles. Playback and subtitles are working.

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