Skip to content

Commit

Permalink
web app: Fix incorrect channel icon directory display
Browse files Browse the repository at this point in the history
If MYTHCONFDIR is not valued, the directory was displaying null. Changed
to use the default.

Fixes #1005
  • Loading branch information
bennettpeter committed Dec 27, 2024
1 parent c1541dd commit 9bb95e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mythtv/html/apps/backend/main.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ export class ChannelEditorComponent implements OnInit {

loadIcons(seticon?: string) {
this.mythService.GetBackendInfo().subscribe(data => {
this.iconDir = data.BackendInfo.Env.MYTHCONFDIR + "/channels";
if (data.BackendInfo.Env.MYTHCONFDIR)
this.iconDir = data.BackendInfo.Env.MYTHCONFDIR + "/channels";
else
this.iconDir = data.BackendInfo.Env.HOME + "/.mythtv/channels";
this.mythService.GetDirListing(this.iconDir, true).subscribe(data => {
// filter out resized images
this.icons = data.DirListing.filter((icon) => !icon.match(/\.[0-9]*x[0-9]*\./))
Expand Down

0 comments on commit 9bb95e3

Please sign in to comment.