[Release] v5.0.0 (50000013) (#376)

NEW
- [-Arr/Releases] Match torrent seeder colours to the web GUI
- [Firebase/Analytics] Added analytics for breadcrumb tracking in crashes
- [Logger] Utilize a new, custom built on-device logging system
- [Logger] Compact/delete old log entries once the log count passes 100
- [Logger] Exported logs are now in JSON format
- [Routing] Protect all module routes by showing a "Not Enabled" screen when the module is not enabled
- [Settings/System] Added toggle to disable Firebase Analytics
- [Tautulli/Activity] Show custom season titles from Plex's new TV agent

TWEAKS
- [Radarr/Files] Add languages to file block
- [Radarr/Files] Small changes to table titles
- [System/Logs] Reimplemented logger view
- [System/Logs] Removed viewing the stack trace within the application (still viewable within the exported logs)
- [System/Logs] Added the exception to the expanded table instead of a separate dialog popup
- [Tautulli/Activity] Minor UI tweaks including showing the full season title and italicizing the episode title
- [UI/Navbar] Jump instead of animate to page when tapping a navbar item

FIXES
- [Firebase/Crashes] Do not log DioError/networking exceptions
- [Flutter] Updated packages
- [Flutter] Upgrade all Comet.Tools packages to null-safety/NNBD
- [Radarr/Releases] Negative format scores were not being shown
- [Share] The sharesheet could break after the first time it was opened
- [Strings] Safe-guard many substring operations
- [Tautulli/Activity] Play/paused/buffering icon was not properly left aligned to the text
- [Tautulli/Users] User images would not be fetched on newer versions of Tautulli
- [UI/UX] Modal scroll controller was not being attached to the ListView in a bottom modal sheet
- [UI/UX] Do not log errors when network images fail to load
- [UI/UX] Prevent attempting to load background images that are passed an empty URL
- [URLs] Safe-guard launching specific invalid URLs
This commit is contained in:
Jagandeep Brar
2021-03-17 19:51:28 -05:00
committed by GitHub
parent 225f5f95f6
commit 57404f2dc2
354 changed files with 3957 additions and 2120 deletions

View File

@@ -16,7 +16,7 @@ class Database {
await Hive.initFlutter(_DATABASE_PATH);
_registerAdapters();
await _openBoxes();
if(profilesBox.keys.length == 0) setDefaults(clearAlerts: true);
if(profilesBox.keys.length == 0) setDefaults(clearEverything: true);
}
/// Deinitialize the database by closing all open hive boxes.
@@ -24,9 +24,6 @@ class Database {
/// Registers all necessary object adapters for Hive.
void _registerAdapters() {
//Core
Hive.registerAdapter(IndexerHiveObjectAdapter());
Hive.registerAdapter(ProfileHiveObjectAdapter());
//General
LunaDatabase().registerAdapters();
DashboardDatabase().registerAdapters();
@@ -44,37 +41,44 @@ class Database {
/// Open all Hive boxes for reading.
Future<void> _openBoxes() async {
await Hive.openBox('lunasea');
await Hive.openBox('alerts');
await Hive.openBox<IndexerHiveObject>('indexers');
await Hive.openBox<LunaLogHiveObject>('logs');
await Hive.openBox('lunasea');
await Hive.openBox<ProfileHiveObject>('profiles');
}
/// Set the default state for all hive boxes.
void setDefaults({ bool clearAlerts = false }) {
void setDefaults({ bool clearEverything = false }) {
//Clear all the boxes
clearAllBoxes(clearAlerts: clearAlerts);
clearAllBoxes(clearEverything: clearEverything);
//Set default profile & enabled profile
profilesBox.put('default', ProfileHiveObject.empty());
lunaSeaBox.put(LunaDatabaseValue.ENABLED_PROFILE.key, 'default');
}
//Get boxes
static Box get lunaSeaBox => Hive.box('lunasea');
static Box get alertsBox => Hive.box('alerts');
static Box get profilesBox => Hive.box<ProfileHiveObject>('profiles');
static Box get indexersBox => Hive.box<IndexerHiveObject>('indexers');
static Box<IndexerHiveObject> get indexersBox => Hive.box<IndexerHiveObject>('indexers');
static Box<LunaLogHiveObject> get logsBox => Hive.box<LunaLogHiveObject>('logs');
static Box get lunaSeaBox => Hive.box('lunasea');
static Box<ProfileHiveObject> get profilesBox => Hive.box<ProfileHiveObject>('profiles');
//Clear boxes
void clearAlertsBox() => alertsBox.deleteAll(alertsBox.keys);
void clearIndexersBox() => indexersBox.deleteAll(indexersBox.keys);
void clearLogsBox() => logsBox.deleteAll(logsBox.keys);
void clearLunaSeaBox() => lunaSeaBox.deleteAll(lunaSeaBox.keys);
void clearProfilesBox() => profilesBox.deleteAll(profilesBox.keys);
void clearIndexersBox() => indexersBox.deleteAll(indexersBox.keys);
void clearAlertsBox() => alertsBox.deleteAll(alertsBox.keys);
void clearAllBoxes({ bool clearAlerts = false }) {
void clearAllBoxes({ bool clearEverything = false }) {
clearLunaSeaBox();
clearProfilesBox();
clearIndexersBox();
if(clearAlerts) clearAlertsBox();
if(clearEverything) {
clearAlertsBox();
clearLogsBox();
}
}
//Profile values