Support for --keep-open=no
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
- Showing the playlist selects the currently played file/stream in the playlist.
|
- Showing the playlist selects the currently played file/stream in the playlist.
|
||||||
- Properties are shown in the command palette instead of the text editor
|
- Properties are shown in the command palette instead of the text editor
|
||||||
making it very easy to find a property and show/print its value.
|
making it very easy to find a property and show/print its value.
|
||||||
|
- Support for --keep-open=no.
|
||||||
|
|
||||||
|
|
||||||
5.4.9.1 Beta (2021-06-23)
|
5.4.9.1 Beta (2021-06-23)
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ namespace mpvnet
|
|||||||
public string SID { get; set; } = "";
|
public string SID { get; set; } = "";
|
||||||
|
|
||||||
public bool Border { get; set; } = true;
|
public bool Border { get; set; } = true;
|
||||||
|
public bool FileEnded { get; set; }
|
||||||
public bool Fullscreen { get; set; }
|
public bool Fullscreen { get; set; }
|
||||||
public bool IsLogoVisible { set; get; } = true;
|
public bool IsLogoVisible { set; get; } = true;
|
||||||
public bool IsQuitNeeded { set; get; } = true;
|
public bool IsQuitNeeded { set; get; } = true;
|
||||||
@@ -419,6 +420,7 @@ namespace mpvnet
|
|||||||
var reason = (mpv_end_file_reason)data.reason;
|
var reason = (mpv_end_file_reason)data.reason;
|
||||||
InvokeAsync(EndFileAsync, reason);
|
InvokeAsync(EndFileAsync, reason);
|
||||||
EndFile?.Invoke(reason);
|
EndFile?.Invoke(reason);
|
||||||
|
FileEnded = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case mpv_event_id.MPV_EVENT_FILE_LOADED:
|
case mpv_event_id.MPV_EVENT_FILE_LOADED:
|
||||||
@@ -528,8 +530,15 @@ namespace mpvnet
|
|||||||
InvokeEvent(TrackSwitched, TrackSwitchedAsync);
|
InvokeEvent(TrackSwitched, TrackSwitchedAsync);
|
||||||
break;
|
break;
|
||||||
case mpv_event_id.MPV_EVENT_IDLE:
|
case mpv_event_id.MPV_EVENT_IDLE:
|
||||||
ShowLogo();
|
|
||||||
InvokeEvent(Idle, IdleAsync);
|
InvokeEvent(Idle, IdleAsync);
|
||||||
|
|
||||||
|
if (FileEnded)
|
||||||
|
{
|
||||||
|
ShowLogo();
|
||||||
|
|
||||||
|
if (GetPropertyString("keep-open") == "no")
|
||||||
|
Core.CommandV("quit");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case mpv_event_id.MPV_EVENT_PAUSE:
|
case mpv_event_id.MPV_EVENT_PAUSE:
|
||||||
Paused = true;
|
Paused = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user