Files
lunasea/lib/modules/lidarr/widgets/missing_tile.dart
Jagandeep Brar 4340853b8c [Release] v5.0.0 (50000001) (#312)
NEW
- [Radarr] Completely rewritten from the ground-up
- [Radarr] View system status, disk usage, and manage tags
- [Radarr] Catalogue, upcoming, missing, tags, and quality profiles are now held in-state between module switches
- [Radarr/Add] Long-pressing a search result tile will open the movie's TMDB entry
- [Radarr/History] Now an infinite scrolling list
- [Radarr/Movie] Cast information, movie-specific history, more detailed file information, more detailed overview page
- [Radarr/Filtering] Improved sorting and filtering speed, performance, and consistency
- [Radarr/Filtering] Ability to set sorting and filtering defaults in settings
- [Radarr/Filtering] Many additional filtering options
- [Haptics] Added haptic feedback to all buttons, toggles, and dropdowns
- [Quick Actions] Default "Settings" quick action added to end of the list (if there is room)
- [UI/UX] (Radarr Only For Now) Ability to tap the AppBar to scroll to top
- [UI/UX] (Radarr Only For Now) If the list is in a tabbed PageView, tapping the active tab will scroll the list to the top
- [UI/UX] (Radarr Only For Now) If the keyboard is open, scrolling the list, swiping between pages, or opening the drawer will dismiss the keyboard
- [Webhooks] Notification webhooks will now show as an in-app heads up if LunaSea is open at the time of receiving the notification

TWEAKS
- [Radarr] Now only supports v3.0.0 and higher of Radarr
- [Radarr] Many visual changes, too many to list
- [Radarr] The tab "History" has been replaced with "More"
- [Radarr/Edit] Monitor toggle has been moved to the edit prompt
- [Sonarr/Filtering] Updated button to use standard filtering icon
- [Tautulli/Activity] Show session type and bandwidth type breakdown on activity page
- [Tautulli/Activity] Cleanup player information to more closely resemble web GUI
- [Tautulli/Activity] Show subtitle stream decision
- [UI/UX] Reduced the weight of bold text across the application
- [UI/UX] Added padding to bottom of lists for devices that require a safe area
- [UI/UX] Active tab in navigation bar now has a border with the AMOLED theme

FIXES
- [Changelog] Properly align/pad "Full Changelog" button at the end of the changelog
- [Flutter] Update packages
- [Flutter] Now using the beta channel
- [Quick Actions] Improve internal implementation of quick actions to be more stable and reliable
- [Settings/Modules] Newly set headers would sometimes not be passed to the connection test
- [Sonarr/Edit] Series path prompt would show an incorrect title
- [Sonarr/Description] Show "No summary is available" when there is no summary instead of an empty string
- [Sonarr/Releases] Default sorting direction was using catalogue default value
- [Tautulli/Graphs] Description of some graphs were not correct (Thanks @ZuluWhiskey!)
- [Tautulli/IPs] Fix location showing as null for local addresses
- [UI/UX] Border radius for the splash highlight wouldn't clip correctly on slim buttons
- [UI/UX] Margin/size of sort/filter buttons were off by a few pixels
- [UI/UX] InkWell splash now clips correctly to the rounded borders of popup menu buttons
2021-02-16 22:51:43 -06:00

109 lines
3.7 KiB
Dart

import 'package:flutter/material.dart';
import 'package:lunasea/core.dart';
import 'package:lunasea/modules/lidarr.dart';
class LidarrMissingTile extends StatefulWidget {
final LidarrMissingData entry;
final GlobalKey<ScaffoldState> scaffoldKey;
final Function refresh;
LidarrMissingTile({
@required this.entry,
@required this.scaffoldKey,
@required this.refresh,
});
@override
State<LidarrMissingTile> createState() => _State();
}
class _State extends State<LidarrMissingTile> {
@override
Widget build(BuildContext context) => LSCardTile(
title: LSTitle(text: widget.entry.artistTitle),
subtitle: RichText(
text: TextSpan(
style: TextStyle(
fontSize: Constants.UI_FONT_SIZE_SUBTITLE,
),
children: <TextSpan>[
TextSpan(
text: widget.entry.title,
style: TextStyle(
color: Colors.white70,
fontStyle: FontStyle.italic,
),
),
TextSpan(
text: '\nReleased ${widget.entry.releaseDateString}',
style: TextStyle(
color: Colors.red,
fontWeight: LunaUI.FONT_WEIGHT_BOLD,
),
),
],
),
overflow: TextOverflow.fade,
softWrap: false,
maxLines: 2,
),
trailing: LSIconButton(
icon: Icons.search,
onPressed: () async => _search(),
onLongPress: () async => _interactiveSearch(),
),
onTap: () async => _enterAlbum(),
onLongPress: () async => _enterArtist(),
decoration: LunaCardDecoration(
uri: widget.entry.bannerURI(),
headers: Database.currentProfileObject.getLidarr()['headers'],
),
padContent: true,
);
Future<void> _search() async {
final _api = LidarrAPI.from(Database.currentProfileObject);
await _api.searchAlbums([widget.entry.albumID])
.then((_) => LSSnackBar(context: context, title: 'Searching...', message: widget.entry.title))
.catchError((_) => LSSnackBar(context: context, title: 'Failed to Search', message: LunaLogger.CHECK_LOGS_MESSAGE, type: SNACKBAR_TYPE.failure));
}
Future<void> _interactiveSearch() async => Navigator.of(context).pushNamed(
LidarrSearchResults.ROUTE_NAME,
arguments: LidarrSearchResultsArguments(
albumID: widget.entry.albumID,
title: widget.entry.title,
),
);
Future<void> _enterArtist() async {
final dynamic result = await Navigator.of(context).pushNamed(
LidarrDetailsArtist.ROUTE_NAME,
arguments: LidarrDetailsArtistArguments(
data: null,
artistID: widget.entry.artistID,
),
);
if(result != null) switch(result[0]) {
case 'remove_artist': {
LSSnackBar(
context: context,
title: result[1] ? 'Removed (With Data)' : 'Removed',
message: widget.entry.artistTitle,
type: SNACKBAR_TYPE.success,
);
widget.refresh();
break;
}
}
}
Future<void> _enterAlbum() async => await Navigator.of(context).pushNamed(
LidarrDetailsAlbum.ROUTE_NAME,
arguments: LidarrDetailsAlbumArguments(
albumID: widget.entry.albumID,
title: widget.entry.title,
monitored: widget.entry.monitored,
),
);
}