From 5f89584af948d866e65017ef70946a527f06e1cb Mon Sep 17 00:00:00 2001 From: Bruno D'Luka Date: Wed, 10 Jul 2024 09:25:22 -0300 Subject: [PATCH 1/3] chore: Bump version --- bluecherry_appcast.xml | 5 +++++ installer/windows-installer.iss | 2 +- linux/debian/DEBIAN/control | 2 +- linux/debian/usr/share/metainfo/bluecherry.appdata.xml | 1 + linux/rpm/bluecherry.spec | 2 +- pubspec.yaml | 2 +- snap/snapcraft.yaml | 2 +- 7 files changed, 11 insertions(+), 5 deletions(-) diff --git a/bluecherry_appcast.xml b/bluecherry_appcast.xml index 80c463be..4644fbb7 100644 --- a/bluecherry_appcast.xml +++ b/bluecherry_appcast.xml @@ -2,6 +2,11 @@ Bluecherry - Appcast + + Version 3.0.0-beta18 + Time Filter for Events; Fixed crash on newer versions of Windows. + Wed, 10 Jul 2024 + Version 3.0.0-beta17 Fixed Secondary Windows; Improved logging; and Addressed memory leaks and stream continuity. diff --git a/installer/windows-installer.iss b/installer/windows-installer.iss index 2e936a49..de9c85f5 100644 --- a/installer/windows-installer.iss +++ b/installer/windows-installer.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "Bluecherry DVR" -#define MyAppVersion "3.0.0-beta17" +#define MyAppVersion "3.0.0-beta18" #define MyAppPublisher "Bluecherry DVR" #define MyAppURL "https://www.bluecherrydvr.com/" #define MyAppExeName "bluecherry_client.exe" diff --git a/linux/debian/DEBIAN/control b/linux/debian/DEBIAN/control index 4cd30b57..9904edda 100644 --- a/linux/debian/DEBIAN/control +++ b/linux/debian/DEBIAN/control @@ -1,5 +1,5 @@ Package: bluecherrydvr -Version: 3.0.0-beta17 +Version: 3.0.0-beta18 Section: base Priority: optional Homepage: https://www.bluecherrydvr.com/ diff --git a/linux/debian/usr/share/metainfo/bluecherry.appdata.xml b/linux/debian/usr/share/metainfo/bluecherry.appdata.xml index 3d57af78..7114a092 100644 --- a/linux/debian/usr/share/metainfo/bluecherry.appdata.xml +++ b/linux/debian/usr/share/metainfo/bluecherry.appdata.xml @@ -36,6 +36,7 @@ bluecherrydvr.desktop + | | | | diff --git a/linux/rpm/bluecherry.spec b/linux/rpm/bluecherry.spec index e8b4fbd8..8dc19e82 100644 --- a/linux/rpm/bluecherry.spec +++ b/linux/rpm/bluecherry.spec @@ -1,5 +1,5 @@ Name: bluecherrydvr -Version: 3.0.0_beta16 +Version: 3.0.0_beta18 Release: 1 Summary: Bluecherry client written in Flutter. License: EULA diff --git a/pubspec.yaml b/pubspec.yaml index 538303b0..90c18a79 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Bluecherry client written in Flutter. publish_to: "none" -version: 3.0.0-beta17 +version: 3.0.0-beta18 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index a55224f7..fe26da3a 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: bluecherry-client -version: 3.0.0-beta17 +version: 3.0.0-beta18 summary: Bluecherry DVR Client description: Bluecherry DVR client From a9c4c60c64938dedd41ef38d7975e89d52c9a85a Mon Sep 17 00:00:00 2001 From: Bruno D'Luka Date: Wed, 10 Jul 2024 09:38:21 -0300 Subject: [PATCH 2/3] fix: Do not spam logs when fails to get user downloads directory --- lib/providers/downloads_provider.dart | 11 ++++++++--- lib/providers/events_provider.dart | 4 ++-- lib/providers/settings_provider.dart | 1 - 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/providers/downloads_provider.dart b/lib/providers/downloads_provider.dart index 4b54569a..16e8603d 100644 --- a/lib/providers/downloads_provider.dart +++ b/lib/providers/downloads_provider.dart @@ -122,10 +122,15 @@ class DownloadsManager extends UnityProvider { final docsDir = await getApplicationSupportDirectory(); dir = Directory(path.join(docsDir.path, 'downloads')); } + } on StateError catch (e) { + debugPrint('Failed to get default downloads directory: $e'); } catch (error, stack) { - debugPrint('Failed to get default downloads directory: $error\n$stack'); - final docsDir = await getApplicationSupportDirectory(); - dir = Directory(path.join(docsDir.path, 'downloads')); + debugPrint('Failed to get default downloads directory:$error\n$stack'); + } finally { + if (dir == null) { + final docsDir = await getApplicationSupportDirectory(); + dir = Directory(path.join(docsDir.path, 'downloads')); + } } debugPrint('The default downloads is ${dir.path}'); diff --git a/lib/providers/events_provider.dart b/lib/providers/events_provider.dart index 1f54083f..da95323c 100644 --- a/lib/providers/events_provider.dart +++ b/lib/providers/events_provider.dart @@ -158,8 +158,8 @@ extension EventsScreenProvider on EventsProvider { await Future.wait(allowedDevices.map((device) async { final iterable = (await API.instance.getEvents( server, - startTime: startDate ?? this.startDate, - endTime: endDate ?? this.startDate, + startTime: (startDate ?? this.startDate)?.toUtc(), + endTime: (endDate ?? this.startDate)?.toUtc(), device: device, )) .toList() diff --git a/lib/providers/settings_provider.dart b/lib/providers/settings_provider.dart index 859c3592..3ee67bf4 100644 --- a/lib/providers/settings_provider.dart +++ b/lib/providers/settings_provider.dart @@ -278,7 +278,6 @@ class SettingsProvider extends UnityProvider { try { return (await DownloadsManager.kDefaultDownloadsDirectory).path; } catch (e) { - debugPrint('Error getting default downloads directory: $e'); return ''; } }, From 4240ddd779463eb53ba9cfa1758820f5fc46526f Mon Sep 17 00:00:00 2001 From: Bruno D'Luka Date: Wed, 10 Jul 2024 09:44:57 -0300 Subject: [PATCH 3/3] fix: Null assignment on events loading --- lib/providers/events_provider.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/providers/events_provider.dart b/lib/providers/events_provider.dart index da95323c..54270909 100644 --- a/lib/providers/events_provider.dart +++ b/lib/providers/events_provider.dart @@ -144,6 +144,9 @@ extension EventsScreenProvider on EventsProvider { loadedEvents = LoadedEvents(); _notify(); + startDate ??= this.startDate; + endDate ??= this.endDate; + // Load the events at the same time await Future.wait(ServersProvider.instance.servers.map((server) async { if (!server.online || server.devices.isEmpty) return; @@ -158,8 +161,8 @@ extension EventsScreenProvider on EventsProvider { await Future.wait(allowedDevices.map((device) async { final iterable = (await API.instance.getEvents( server, - startTime: (startDate ?? this.startDate)?.toUtc(), - endTime: (endDate ?? this.startDate)?.toUtc(), + startTime: startDate?.toUtc(), + endTime: endDate?.toUtc(), device: device, )) .toList()