mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-14 17:55:58 -07:00
feat: Android TV support (#503)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
7ab8c015b9
commit
c299492d6d
168 changed files with 12019 additions and 3073 deletions
|
|
@ -26,9 +26,16 @@ class DashboardNotifier extends StateNotifier<HomeModel> {
|
|||
final viewTypes =
|
||||
ref.read(viewsProvider.select((value) => value.dashboardViews)).map((e) => e.collectionType).toSet().toList();
|
||||
|
||||
final imagesToFetch = {
|
||||
ImageType.logo,
|
||||
ImageType.primary,
|
||||
ImageType.backdrop,
|
||||
ImageType.banner,
|
||||
}.toList();
|
||||
|
||||
if (viewTypes.containsAny([CollectionType.movies, CollectionType.tvshows])) {
|
||||
final resumeVideoResponse = await api.usersUserIdItemsResumeGet(
|
||||
limit: 16,
|
||||
enableImageTypes: imagesToFetch,
|
||||
fields: [
|
||||
ItemFields.parentid,
|
||||
ItemFields.mediastreams,
|
||||
|
|
@ -36,6 +43,8 @@ class DashboardNotifier extends StateNotifier<HomeModel> {
|
|||
ItemFields.candelete,
|
||||
ItemFields.candownload,
|
||||
ItemFields.primaryimageaspectratio,
|
||||
ItemFields.overview,
|
||||
ItemFields.genres,
|
||||
],
|
||||
mediaTypes: [MediaType.video],
|
||||
enableTotalRecordCount: false,
|
||||
|
|
@ -48,7 +57,7 @@ class DashboardNotifier extends StateNotifier<HomeModel> {
|
|||
|
||||
if (viewTypes.contains(CollectionType.music)) {
|
||||
final resumeAudioResponse = await api.usersUserIdItemsResumeGet(
|
||||
limit: 16,
|
||||
enableImageTypes: imagesToFetch,
|
||||
fields: [
|
||||
ItemFields.parentid,
|
||||
ItemFields.mediastreams,
|
||||
|
|
@ -56,6 +65,8 @@ class DashboardNotifier extends StateNotifier<HomeModel> {
|
|||
ItemFields.candelete,
|
||||
ItemFields.candownload,
|
||||
ItemFields.primaryimageaspectratio,
|
||||
ItemFields.overview,
|
||||
ItemFields.genres,
|
||||
],
|
||||
mediaTypes: [MediaType.audio],
|
||||
enableTotalRecordCount: false,
|
||||
|
|
@ -68,7 +79,7 @@ class DashboardNotifier extends StateNotifier<HomeModel> {
|
|||
|
||||
if (viewTypes.contains(CollectionType.books)) {
|
||||
final resumeBookResponse = await api.usersUserIdItemsResumeGet(
|
||||
limit: 16,
|
||||
enableImageTypes: imagesToFetch,
|
||||
fields: [
|
||||
ItemFields.parentid,
|
||||
ItemFields.mediastreams,
|
||||
|
|
@ -76,6 +87,8 @@ class DashboardNotifier extends StateNotifier<HomeModel> {
|
|||
ItemFields.candelete,
|
||||
ItemFields.candownload,
|
||||
ItemFields.primaryimageaspectratio,
|
||||
ItemFields.overview,
|
||||
ItemFields.genres,
|
||||
],
|
||||
mediaTypes: [MediaType.book],
|
||||
enableTotalRecordCount: false,
|
||||
|
|
@ -87,7 +100,6 @@ class DashboardNotifier extends StateNotifier<HomeModel> {
|
|||
}
|
||||
|
||||
final nextResponse = await api.showsNextUpGet(
|
||||
limit: 16,
|
||||
nextUpDateCutoff: DateTime.now().subtract(
|
||||
ref.read(clientSettingsProvider.select((value) => value.nextUpDateCutoff ?? const Duration(days: 28)))),
|
||||
fields: [
|
||||
|
|
@ -97,6 +109,8 @@ class DashboardNotifier extends StateNotifier<HomeModel> {
|
|||
ItemFields.candelete,
|
||||
ItemFields.candownload,
|
||||
ItemFields.primaryimageaspectratio,
|
||||
ItemFields.overview,
|
||||
ItemFields.genres,
|
||||
],
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue