Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wheremyfiji committed Apr 12, 2024
1 parent b396ee8 commit 911b070
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import '../../../../../anime_lib/models/models.dart';
import '../../../../domain/models/pages_extra.dart';
import '../../../../domain/enums/anime_source.dart';
import '../../../../../anime_lib/enums/enums.dart';
import '../../../../../anime_lib/anilib_api.dart';
import '../../../widgets/cached_image.dart';
import '../../../widgets/error_widget.dart';
import '../../player/domain/player_page_extra.dart' as ppe;
import '../shared/compact_info_chip.dart';
Expand Down Expand Up @@ -156,23 +154,20 @@ class StudioListItem extends StatelessWidget {

@override
Widget build(BuildContext context) {
// final subtitle =
// '${item.translationType.name} / ${item.video[0].quality.toShort}';

final teamName = item.team.name
.replaceFirst('.Subtitles', '')
.replaceFirst('|Субтитры', '');

return ListTile(
onTap: onTap,
leading: CachedCircleImage(
item.team.teamCover,
httpHeaders: const {
'Origin': AnilibUtils.kOrigin,
'Referer': AnilibUtils.kReferer,
'User-Agent': AnilibUtils.kUserAgent,
},
),
// leading: CachedCircleImage(
// item.team.teamCover,
// httpHeaders: const {
// 'Origin': AnilibUtils.kOrigin,
// 'Referer': AnilibUtils.kReferer,
// 'User-Agent': AnilibUtils.kUserAgent,
// },
// ),
title: Row(
mainAxisSize: MainAxisSize.min,
children: [
Expand All @@ -189,7 +184,6 @@ class StudioListItem extends StatelessWidget {
),
],
),
//subtitle: Text(subtitle),
trailing: CompactInfoChip(item.video[0].quality.toShort),
);
}
Expand Down
9 changes: 1 addition & 8 deletions lib/src/presentation/pages/player/player_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,6 @@ class PlayerController extends ChangeNotifier {
'0',
);

// await player.open(
// Media(
// playableContent.getQ(selectedQuality) ?? playableContent.getMaxQ()),
// play: true,
// );

await _openMedia(streamQuality: selectedQuality);

await player.play();
Expand Down Expand Up @@ -758,8 +752,7 @@ class PlayerController extends ChangeNotifier {
return;
}

if (player.state.position == Duration.zero ||
player.state.position < const Duration(seconds: 5)) {
if (player.state.position < const Duration(seconds: 5)) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class QualityPopUpMenu extends StatelessWidget {
return [
if (playableContent.fourK != null)
const PopupMenuItem<StreamQuality>(
value: StreamQuality.fhd,
value: StreamQuality.fourK,
child: Text('2160p'),
),
if (playableContent.fhd != null)
Expand Down
14 changes: 7 additions & 7 deletions lib/src/presentation/pages/root/root_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ class ScaffoldWithNavBar extends ConsumerWidget {
}
AppUpdateBottomSheet.show(context: context, release: data);
},
error: (error, stackTrace) {
showErrorSnackBar(
ctx: context,
msg: 'Произошла ошибка при проверке обновлений приложения',
dur: const Duration(seconds: 5),
);
},
// error: (error, stackTrace) {
// showErrorSnackBar(
// ctx: context,
// msg: 'Произошла ошибка при проверке обновлений приложения',
// dur: const Duration(seconds: 5),
// );
// },
),
);

Expand Down

0 comments on commit 911b070

Please sign in to comment.