mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 12:42:34 +00:00
feat(Links): [Android Only] Attach module headers when viewing web GUI
This commit is contained in:
@@ -126,7 +126,10 @@ class _State extends State<Lidarr> {
|
||||
Future<void> _handlePopup() async {
|
||||
List<dynamic> values = await LidarrDialogs.globalSettings(context);
|
||||
if(values[0]) switch(values[1]) {
|
||||
case 'web_gui': await _api.host?.toString()?.lunaOpenGenericLink(); break;
|
||||
case 'web_gui':
|
||||
ProfileHiveObject profile = Database.currentProfileObject;
|
||||
await profile.lidarrHost?.lunaOpenGenericLink(headers: profile.lidarrHeaders);
|
||||
break;
|
||||
case 'update_library': await _api.updateLibrary()
|
||||
.then((_) => showLunaSuccessSnackBar(title: 'Updating Library...', message: 'Updating your library in the background'))
|
||||
.catchError((error) => showLunaErrorSnackBar(title: 'Failed to Update Library', error: error));
|
||||
|
||||
@@ -99,7 +99,10 @@ class _State extends State<NZBGet> {
|
||||
Future<void> _handlePopup() async {
|
||||
List<dynamic> values = await NZBGetDialogs.globalSettings(context);
|
||||
if(values[0]) switch(values[1]) {
|
||||
case 'web_gui': _api.host.lunaOpenGenericLink(); break;
|
||||
case 'web_gui':
|
||||
ProfileHiveObject profile = Database.currentProfileObject;
|
||||
await profile.nzbgetHost?.lunaOpenGenericLink(headers: profile.nzbgetHeaders);
|
||||
break;
|
||||
case 'add_nzb': _addNZB(); break;
|
||||
case 'sort': _sort(); break;
|
||||
case 'server_details': _serverDetails(); break;
|
||||
|
||||
@@ -44,7 +44,9 @@ extension RadarrGlobalSettingsTypeExtension on RadarrGlobalSettingsType {
|
||||
throw Exception('Invalid RadarrGlobalSettingsType');
|
||||
}
|
||||
|
||||
Future<void> _webGUI(BuildContext context) async => context.read<RadarrState>().host.lunaOpenGenericLink();
|
||||
Future<void> _webGUI(BuildContext context) async => context.read<RadarrState>().host.lunaOpenGenericLink(
|
||||
headers: context.read<RadarrState>().headers,
|
||||
);
|
||||
Future<void> _backupDatabase(BuildContext context) async => RadarrAPIHelper().backupDatabase(context: context);
|
||||
Future<void> _searchAllMissing(BuildContext context) async {
|
||||
bool result = await RadarrDialogs().searchAllMissingMovies(context);
|
||||
|
||||
@@ -99,7 +99,10 @@ class _State extends State<SABnzbd> {
|
||||
Future<void> _handlePopup() async {
|
||||
List<dynamic> values = await SABnzbdDialogs.globalSettings(context);
|
||||
if(values[0]) switch(values[1]) {
|
||||
case 'web_gui': _api.host.lunaOpenGenericLink(); break;
|
||||
case 'web_gui':
|
||||
ProfileHiveObject profile = Database.currentProfileObject;
|
||||
await profile.sabnzbdHost?.lunaOpenGenericLink(headers: profile.sabnzbdHeaders);
|
||||
break;
|
||||
case 'add_nzb': _addNZB(); break;
|
||||
case 'sort': _sort(); break;
|
||||
case 'clear_history': _clearHistory(); break;
|
||||
|
||||
@@ -22,7 +22,9 @@ class SonarrAppBarGlobalSettingsAction extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _webGUI(BuildContext context) async => Provider.of<SonarrState>(context, listen: false).host.lunaOpenGenericLink();
|
||||
Future<void> _webGUI(BuildContext context) async => context.read<SonarrState>().host.lunaOpenGenericLink(
|
||||
headers: context.read<SonarrState>().headers,
|
||||
);
|
||||
|
||||
Future<void> _viewQueue(BuildContext context) async => SonarrQueueRouter().navigateTo(context);
|
||||
|
||||
|
||||
@@ -48,7 +48,9 @@ extension TautulliGlobalSettingsTypeExtension on TautulliGlobalSettingsType {
|
||||
throw Exception('Invalid TautulliGlobalSettingsType');
|
||||
}
|
||||
|
||||
Future<void> _webGUI(BuildContext context) async => context.read<TautulliState>().host.lunaOpenGenericLink();
|
||||
Future<void> _webGUI(BuildContext context) async => context.read<TautulliState>().host.lunaOpenGenericLink(
|
||||
headers: context.read<TautulliState>().headers,
|
||||
);
|
||||
Future<void> _backupConfig(BuildContext context) async => TautulliAPIHelper().backupConfiguration(context: context);
|
||||
Future<void> _backupDatabase(BuildContext context) async => TautulliAPIHelper().backupDatabase(context: context);
|
||||
Future<void> _deleteCache(BuildContext context) async => TautulliAPIHelper().deleteCache(context: context);
|
||||
|
||||
Reference in New Issue
Block a user