mirror of
https://github.com/Zaarrg/stremio-community-v5.git
synced 2026-05-11 12:40:37 +00:00
NextVideo playback fix and borderless window tray option
- Fixed NextVideo playback by not returning every end of playback event - Added Borderless Window tray option
This commit is contained in:
parent
f447229ed4
commit
b66efe6101
7 changed files with 38 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.30)
|
||||
|
||||
project(stremio VERSION "5.0.1")
|
||||
project(stremio VERSION "5.0.2")
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
|
||||
|
||||
|
|
|
|||
|
|
@ -301,6 +301,15 @@ ApplicationWindow {
|
|||
}
|
||||
}
|
||||
|
||||
function onSignalBorderlessWindow() {
|
||||
root.raise()
|
||||
if (root.flags & Qt.FramelessWindowHint) {
|
||||
root.flags &= ~Qt.FramelessWindowHint;
|
||||
} else {
|
||||
root.flags |= Qt.FramelessWindowHint;
|
||||
}
|
||||
}
|
||||
|
||||
// The signal - close the application by ignoring the check-box
|
||||
function onSignalQuit() {
|
||||
quitApp();
|
||||
|
|
|
|||
|
|
@ -272,18 +272,18 @@ void MpvObject::handle_mpv_event(mpv_event *event) {
|
|||
this->setVisible(false);
|
||||
mpv_event_end_file *endFile = (mpv_event_end_file *)event->data;
|
||||
switch (endFile->reason) {
|
||||
case MPV_END_FILE_REASON_EOF:
|
||||
eventJson["reason"] = "quit";
|
||||
Q_EMIT mpvEvent("mpv-event-ended", eventJson);
|
||||
break;
|
||||
case MPV_END_FILE_REASON_ERROR:
|
||||
eventJson["reason"] = "error";
|
||||
eventJson["error"] = mpv_error_string(endFile->error);
|
||||
break;
|
||||
case MPV_END_FILE_REASON_QUIT:
|
||||
eventJson["reason"] = "quit";
|
||||
Q_EMIT mpvEvent("mpv-event-ended", eventJson);
|
||||
break;
|
||||
default:
|
||||
eventJson["reason"] = "other";
|
||||
break;
|
||||
}
|
||||
Q_EMIT mpvEvent("mpv-event-ended", eventJson);
|
||||
break;
|
||||
}
|
||||
case MPV_EVENT_SHUTDOWN: {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@
|
|||
alwaysOnTopAction = new QAction(tr("Always on top"), this);
|
||||
alwaysOnTopAction->setCheckable(true);
|
||||
|
||||
borderlessWindowAction = new QAction(tr("Borderless Window"), this);
|
||||
borderlessWindowAction->setCheckable(true);
|
||||
|
||||
QAction * quitAction = new QAction(tr("Quit"), this);
|
||||
|
||||
/* to connect the signals clicks on menu items to the appropriate signals for QML.
|
||||
|
|
@ -22,10 +25,12 @@
|
|||
connect(trayIconMenu, &QMenu::aboutToShow, this, &SystemTray::signalIconMenuAboutToShow);
|
||||
connect(viewWindowAction, &QAction::triggered, this, &SystemTray::signalShow);
|
||||
connect(alwaysOnTopAction, &QAction::triggered, this, &SystemTray::signalAlwaysOnTop);
|
||||
connect(borderlessWindowAction, &QAction::triggered, this, &SystemTray::signalBorderlessWindow);
|
||||
connect(quitAction, &QAction::triggered, this, &SystemTray::signalQuit);
|
||||
|
||||
trayIconMenu->addAction(viewWindowAction);
|
||||
trayIconMenu->addAction(alwaysOnTopAction);
|
||||
trayIconMenu->addAction(borderlessWindowAction);
|
||||
trayIconMenu->addAction(quitAction);
|
||||
|
||||
|
||||
|
|
@ -87,3 +92,13 @@
|
|||
{
|
||||
alwaysOnTopAction->setEnabled(enabled);
|
||||
}
|
||||
|
||||
void SystemTray::updateIsBorderless(bool isBorderless)
|
||||
{
|
||||
borderlessWindowAction->setChecked(isBorderless);
|
||||
}
|
||||
|
||||
void SystemTray::borderlessWindowEnabled(bool enabled)
|
||||
{
|
||||
borderlessWindowAction->setEnabled(enabled);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ public:
|
|||
void signalIconActivated();
|
||||
void signalShow();
|
||||
void signalAlwaysOnTop();
|
||||
void signalBorderlessWindow();
|
||||
void signalQuit();
|
||||
|
||||
private slots:
|
||||
|
|
@ -26,6 +27,8 @@ public:
|
|||
void hideIconTray();
|
||||
void updateVisibleAction(bool isVisible);
|
||||
void updateIsOnTop(bool isOnTop);
|
||||
void updateIsBorderless(bool isBorderless);
|
||||
void borderlessWindowEnabled(bool enabled);
|
||||
void alwaysOnTopEnabled(bool enabled);
|
||||
|
||||
private:
|
||||
|
|
@ -33,6 +36,7 @@ private:
|
|||
QSystemTrayIcon * trayIcon;
|
||||
QAction * viewWindowAction;
|
||||
QAction * alwaysOnTopAction;
|
||||
QAction * borderlessWindowAction;
|
||||
};
|
||||
|
||||
#endif // SYSTEMTRAY_H
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"shellVersion": "5.0.1",
|
||||
"shellVersion": "5.0.2",
|
||||
"files": {
|
||||
"windows": {
|
||||
"url": "https://github.com/Zaarrg/stremio-desktop-v5/releases/download/5.0.0-beta.2/Stremio.5.0.1.exe",
|
||||
"checksum": "38f11ab6dcb4fc93cbe54c88a4f8042fef8c09fc9ba83938b916dbe5ba3fe45f"
|
||||
"url": "https://github.com/Zaarrg/stremio-desktop-v5/releases/download/5.0.0-beta.3/Stremio.5.0.2.exe",
|
||||
"checksum": "b1670f3a32ecd09fea76fb60a081496e952ac34e1cb1744e7c0a37119619660f"
|
||||
},
|
||||
"server.js": {
|
||||
"url": "https://dl.strem.io/server/v4.20.8/desktop/server.js",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"upToDate": false,
|
||||
"versionDesc": "https://raw.githubusercontent.com/Zaarrg/stremio-desktop-v5/refs/heads/master/version/version-details.json",
|
||||
"signature": "bRMydlBNCo4eqIIQwTQ1O1vgOs20fpfRh6ymmu9G9rqQtJlEC5uDe8uavu7wmDJC/ARHgsSQxzb8tw/HCbR4knI6gPQs1oasDhSn6o4b5YyWdLJo0vfyicrJj+xI5cngdS5NLnyrCxVf7sO5NRi1NtLWJ0XcF8M8f93VfqTClVAR/SDbX5vFod+CppZDNbpdKHvyCdk/AT232Pv9q6+2TQyLQk7rLvlBXXH/8OCU+tmmTe7arTSKNr6NA8k5N+hevjay+cuhXluSomesXIjJVIPFolu7yaC3MX6doxE3hBhTA3wnUlm5nDZOSPplYRQfHubA8ms+8BOzZE32sZw2qA=="
|
||||
"signature": "KuSMHr3svLxRjA8hGaEMXodVjg6R9AJ/euqTmVkZzzriEzKyGzUijJTKa2O1UvDa2MQBcd4gWieRRnM7KpwXvqZB9tAwW8BxbMK+BCN3dc4E6dn6MjjgZc+qwVvb0gITR86x19G4DdyZvjuY+cHRNR0dnyODwzcoYomarHK/UJ3GQY6tScc/fneCoF79YWqAkxP3j/VQxCGlOL1+QaT1IG94HbI6FfmYy0QLO1ERlEBAGuTgUtjbSpLxl9TpCOXVtMMBw8l4yzXU060qftpBXLNEEdbyQBMDIsucEVznsLribGprgCCviwnhVPDYbKq1O4gol3O8Ff2AAE3KMKhXDw=="
|
||||
}
|
||||
Loading…
Reference in a new issue