mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 02:46:16 -08:00
fix(downloads): preserve external launch priority
This commit is contained in:
1 parent
95aa73058b
commit
0313dd7a9b
2 files changed
+14
-1
No files matched your search
@@ -174,7 +174,7 @@
|
||||
}
|
||||
</span>
|
||||
</button>
|
||||
@if (!isExternalStopAction() && !isDownloaded()) {
|
||||
@if (externalPrimaryButtonState() === 'idle' && !isDownloaded()) {
|
||||
<button class="play-btn play-btn--restart" (click)="onPlay()">
|
||||
<mat-icon>replay</mat-icon>
|
||||
{{ 'XTREAM.RESTART' | translate }}
|
||||
|
||||
@@ -325,6 +325,19 @@ describe('VodDetailsComponent offline playback', () => {
|
||||
expect(resumeClicked).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('hides Restart while an undownloaded MPV launch is pending', async () => {
|
||||
await render({
|
||||
playbackPosition: 83,
|
||||
externalPlayback: MATCHING_LAUNCHING_MPV_SESSION,
|
||||
});
|
||||
|
||||
expect(buttonText(primaryButton())).toContain('Opening in MPV...');
|
||||
expect(primaryButton().disabled).toBe(true);
|
||||
expect(findButtonWithText('Restart')).toBeUndefined();
|
||||
expect(playClicked).not.toHaveBeenCalled();
|
||||
expect(resumeClicked).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('keeps normal provider Play as the undownloaded primary action', async () => {
|
||||
await render();
|
||||
|
||||
|
||||
Reference in new issue
Block a user