From c57f7a81aceac0e70fdd02f3bc0041d7a386fb2a Mon Sep 17 00:00:00 2001 From: Peter Bennett Date: Mon, 22 Jan 2024 15:29:39 -0500 Subject: [PATCH] web app: Fix Recordings download URL problem As a result of a recent change, the download link in recordings was not supporting right-click to copy the download URL. Now fixed. --- .../dashboard/recordings/recordings.component.html | 2 +- .../dashboard/recordings/recordings.component.ts | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/mythtv/html/backend/src/app/dashboard/recordings/recordings.component.html b/mythtv/html/backend/src/app/dashboard/recordings/recordings.component.html index 96af061ae79..0d35f995778 100644 --- a/mythtv/html/backend/src/app/dashboard/recordings/recordings.component.html +++ b/mythtv/html/backend/src/app/dashboard/recordings/recordings.component.html @@ -114,7 +114,7 @@

{{ 'dashboard.recordings.heading' | translate }}

- + diff --git a/mythtv/html/backend/src/app/dashboard/recordings/recordings.component.ts b/mythtv/html/backend/src/app/dashboard/recordings/recordings.component.ts index 94c5f3f598d..d574f71bd93 100644 --- a/mythtv/html/backend/src/app/dashboard/recordings/recordings.component.ts +++ b/mythtv/html/backend/src/app/dashboard/recordings/recordings.component.ts @@ -212,14 +212,23 @@ export class RecordingsComponent implements OnInit { return duration; } + // return true causes default browser right click menu to show + // return false suppresses default browser right click menu onContextMenu(program: ScheduleOrProgram, event: any) { + if (this.selection.length == 0) + return true; + if (event.target && event.target.id && event.target.id.startsWith('download_')) + return true; if (this.selection.some((x) => !x)) { + // This happens if some entries have not been loaded this.sendMessage('error', null, '', this.msg.UndefSelection); return false; } - if (this.selection.some((x) => x.Recording.RecordedId == program.Recording.RecordedId)) + if (this.selection.some((x) => x.Recording.RecordedId == program.Recording.RecordedId)) { this.showContextMenu(null, event); - return false; + return false; + } + return true; } onSelectChange() {