lekma / plugin.video.invidious

Invidious Addon for Kodi
GNU General Public License v3.0
50 stars 7 forks source link

feat: use default track and label other audio tracks #94

Open SethFalco opened 1 year ago

SethFalco commented 1 year ago

Atm, there are some issues when channels use the audio-tracks feature on YouTube.

Namely:

  1. It doesn't use the default/original audio-track by default.
  2. All audio-tracks are unlabeled.

I was looking into this, but found it'd be best to leave an issue open and come back to it later.

This is technically possible to resolve already, but it'll be best to wait for this PR to be merged/released first:

Namely, this snippet: https://github.com/iv-org/invidious/pull/3620/files#diff-2e15ef15316a1d99f1f4b03a18c0e632f5c55d2c661318aa2f8bfe5beace3589R104

It looks like that should tweak the API endpoint to make handling this much simpler.

Once that PR is merged:

  1. We use the default track by default.
  2. We label all audio tracks with iso_code.
  3. We sort the list of audio-tracks by iso_code.

I'd recommend using iso_code instead of displayName to preserve l10n. Since language names vary by language, but ISO codes are international. (Unless we have the means to localize the display name.)