Skip to content

Fix chapter listing and remote navigation

Description

This MR resolves two issues

  1. Chapter menu navigation using a remote control initially obtains focus of the top menu item on screen, rather than the selected chapter
  2. When playing a DVD ISO, null chapter names are returned from libvlc and displayed to the user.

The first issue is resolved by requesting focus for the selected chapter. This is verified using either a remote control with an Android TV, or using keyboard navigation with an emulator. First, open the chapter menu. Next, if you initially navigate down, you will observe the focus appears on the item above the selected chapter (assuming it is at the top of the screen), down again moves focus to the selected chapter, and a third down press focuses on the chapter below the selected chapter. With this change the first down moves to the chapter beneath the selected chapter.

The second issue is resolved by updating the chapter format function to use the chapter index in order to construct a label if the title is null.

The following table lists inputs and resulting outputs.

Input (Index = 0) Output
null Chapter: 1
"" Chapter: 1
" " Chapter: 1
Introduction Chapter: Introduction
1. Introduction 1. Introduction
#1 Introduction #1 Introduction

How Has This Been Tested?

Tested with ISO, MKV and MP4 files.

Screenshots:

Null_Chapters

Enumerated_Chapters

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the CONTRIBUTING section of the README document.

Resolves

Mention: !1511 (merged)

Edited by Robert Stone

Merge request reports

Loading