add windows as target

This commit is contained in:
2025-11-04 14:59:01 +01:00
parent ffe0af7932
commit 982654273b
25 changed files with 1223 additions and 46 deletions
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:multimediaFlutter/core/status.dart';
import 'package:multimedia_flutter/core/status.dart';
class StatusChip extends StatelessWidget {
final ItemStatus? selected;
@@ -11,6 +11,7 @@ import 'series_add_screen.dart';
import '../../shared/providers.dart';
import '../data/episode_model.dart';
import 'widgets/season_status_bar.dart';
import '../../../core/io_open.dart';
class SeriesListScreen extends ConsumerWidget {
const SeriesListScreen({super.key});
@@ -299,6 +300,7 @@ class SeriesListScreen extends ConsumerWidget {
String? showStatus;
bool? showCliffhanger;
String? posterPath;
String? downloadPath;
String displayName = displayOf(key);
final sortedSeasons = bySeason.keys.toList()..sort();
for (final s in sortedSeasons) {
@@ -310,6 +312,7 @@ class SeriesListScreen extends ConsumerWidget {
showStatus ??= e.showStatus;
showCliffhanger ??= e.showCliffhanger;
posterPath ??= e.posterPath;
downloadPath ??= e.downloadPath;
if (year != null && resolution != null && showStatus != null && showCliffhanger != null && posterPath != null) break;
}
if (year != null && resolution != null) break;
@@ -351,40 +354,99 @@ class SeriesListScreen extends ConsumerWidget {
else bg = Colors.green;
final cells = <DataCell>[
DataCell(Container(
color: bg,
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 8),
child: SizedBox(
width: 360,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (posterPath != null)
ClipRRect(
borderRadius: BorderRadius.circular(6),
child: CachedNetworkImage(
imageUrl: 'https://image.tmdb.org/t/p/w154$posterPath',
width: 50,
height: 75,
fit: BoxFit.cover,
DataCell(
GestureDetector(
behavior: HitTestBehavior.opaque,
onSecondaryTapDown: (details) async {
final pos = details.globalPosition;
final selected = await showMenu<String>(
context: context,
position: RelativeRect.fromLTRB(pos.dx, pos.dy, pos.dx, pos.dy),
items: const [
PopupMenuItem<String>(
value: 'open_download',
child: Text('Open Download Path'),
),
],
);
if (selected == 'open_download') {
if (downloadPath != null && downloadPath!.isNotEmpty) {
final ok = await openFolder(downloadPath!);
if (!ok && context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Pfad kann nicht geöffnet werden')),
);
}
} else if (context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Kein Download Path vorhanden')),
);
}
}
},
onLongPressStart: (details) async {
final pos = details.globalPosition;
final selected = await showMenu<String>(
context: context,
position: RelativeRect.fromLTRB(pos.dx, pos.dy, pos.dx, pos.dy),
items: const [
PopupMenuItem<String>(
value: 'open_download',
child: Text('Open Download Path'),
),
],
);
if (selected == 'open_download') {
if (downloadPath != null && downloadPath!.isNotEmpty) {
final ok = await openFolder(downloadPath!);
if (!ok && context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Pfad kann nicht geöffnet werden')),
);
}
} else if (context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Kein Download Path vorhanden')),
);
}
}
},
child: Container(
color: bg,
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 8),
child: SizedBox(
width: 360,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (posterPath != null)
ClipRRect(
borderRadius: BorderRadius.circular(6),
child: CachedNetworkImage(
imageUrl: 'https://image.tmdb.org/t/p/w154$posterPath',
width: 50,
height: 75,
fit: BoxFit.cover,
),
),
if (posterPath != null) const SizedBox(width: 8),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
_seriesTitle(displayName, year, showStatus, showCliffhanger, context),
const SizedBox(height: 4),
_resolutionInline(resolution, context),
],
),
),
),
if (posterPath != null) const SizedBox(width: 8),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
_seriesTitle(displayName, year, showStatus, showCliffhanger, context),
const SizedBox(height: 4),
_resolutionInline(resolution, context),
],
),
],
),
],
),
),
),
)),
),
];
for (final s in seasonCols) {