Skip to content

Commit

Permalink
Display people in priority order when displaying program details
Browse files Browse the repository at this point in the history
With MythTV commit bf47572d56 (Include actor roles in cast info)
the credits table now maintains the order received from a XMLTV
feed(1).  This patch returns the credits in the order specified
for display purposes.  Because an actor may play multiple
characters in certain shows, only return an actor's name once.

Fixes: #40

(1) All XMLTV grabbers are expected to provide the credits in
    the order of billing to the best of their abilities, which
    is typically limited to their upstream guide source(s).
  • Loading branch information
garybuhrmaster committed Dec 13, 2021
1 parent 30e96d5 commit d2aa192
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/tv/classes/Program.php
Expand Up @@ -565,12 +565,13 @@ public function get_credits($role, $add_search_links = FALSE) {
// No cached value -- load it
if (!isset($this->credits[$role][$add_search_links])) {
// Get the credits for the requested role
$result = $db->query('SELECT people.name
$result = $db->query('SELECT UNIQUE(people.name)
FROM credits, people
WHERE credits.person = people.person
AND credits.role = ?
AND credits.chanid = ?
AND credits.starttime = FROM_UNIXTIME(?)',
AND credits.starttime = FROM_UNIXTIME(?)
ORDER BY credits.priority',
$role,
$this->chanid,
$this->starttime
Expand Down

0 comments on commit d2aa192

Please sign in to comment.