Skip to content

[addons] Remove the dead <dvd> block from the four language packs that still declare one #134

Description

@malard

Kodi's support for the language packs' <dvd> element is being removed, so the four packs that
still declare one carry configuration nothing reads.

What the element was

Three ISO 639-1 codes a language pack declares, handed to libdvdnav and libbluray as the
player's preferred menu, audio and subtitle language for optical media. Present since the XBMC era
(it is in the repository root commit, 2009), parsed from each language's langinfo.xml until the
October 2014 add-on migration moved the parsing to addon.xml.

Why it is going

Discs carry no per-track disposition. DVDDemuxFFmpeg ORs ffmpeg's disposition bitmask
straight into StreamFlags, so a file can mark a track original, dub, forced or
hearing-impaired and Kodi's preferences act on it. A DVD's VMGI and a Blu-ray's clip information
carry a language code and little else — the code says so:

The transport stream of a bluray carries no disposition, so the default audio and subtitle
streams have to be flagged from the clip information

So every flag-based preference is unavailable on optical media, and <dvd> was a per-language
constant standing in for the missing capability. es_mx's <audio>en</audio> does not really mean
"English audio on discs"; it means prefer the original over the Spanish dub, because on a Mexican
DVD the English track is the original. In 2009 there was no way to say "original".
locale.audiolanguage = original expresses that intent now, and applies to all media rather than
one container family.

The four packs

Checked every one of the 78 packs on xbmc/repo-resources omega. Four declare <dvd>:

pack declares reading
resource.language.af_za menu/audio/subtitle en no disc is authored in Afrikaans
resource.language.mi menu/audio/subtitle en no disc is authored in Māori
resource.language.es_mx <audio>en</audio> only Spanish menus and subtitles, English audio
resource.language.id_id menu/audio/subtitle in the deprecated ISO 639-1 code; the DVD spec froze an older revision

They are not maintained

  • 74 of 74 packs declared <dvd> before the 2014 migration — it was mandatory boilerplate. The
    pruning to four happened once, at that migration.
  • The set has been byte-identical from isengard (2015) to omega (2023).
  • Every commit touching those addon.xml files is an automated "Language add-on versions
    incremented". The only non-automated one is a bulk Add language addons import (2023-02-20).

Note also that the documentation for the element is still a comment block in
resources/langinfo.xml — the file it was parsed from until 2014 — describing an element that file
no longer contains, and pointing at a dead link (etext.virginia.edu/tei/iso639.html). That is why
the feature reads as abandoned while the parsing is live.

Action

Remove the <dvd> block from those four addon.xml files, and the stale <dvd> documentation
comment from the langinfo.xml shipped with resource.language.en_gb.

These are four separate add-ons in xbmc/repo-resources with their own maintainers, so this is a
separate submission from the Kodi-side removal and should follow it, not precede it.

Kodi-side change this depends on

CLanguageResource loses the <dvd> parse, its three std::string members and their getters;
CLangInfo loses m_strDVD*Language and the GetDVD*Language() trio. The three disc consumers
ask CLanguage directly and narrow themselves — AsIso6391() for libdvdnav, AsIso6392T() for
libbluray. Disc menu language moves from the region's language to CLanguage::UI(); both narrow to
the same code, but a menu is UI and should not depend on the regional formatting profile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: addonsAdd-on and Python binding layersarea: i18nLanguage codes, BCP 47, localisationtype: cleanupReadability, consistency, tech debt

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions