Skip to content

Commit

Permalink
Minor UI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dsolonenko committed Dec 30, 2023
1 parent c8ed02b commit 2e6623b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ While Titanius Launcher does have built-in scraper, it was designed with the int
## Scraper

Titanius Launcher has a built-in scraper that uses [Screenscraper](https://www.screenscraper.fr) APIs for scraping ROMs metadata and media.
To use it, navigate to Settings -> Scraper and select the systems you want to scrape.
To use it, navigate to Settings -> Scraper, enter your account username & password, then select the systems you want to scrape.
You can also scrape individual games by going into game settings and selecting "Scrape Game".

Mind that scraper requires to calculate checksums for each ROM file, which can take a while for large files.
While it works just fine for most systems, it can take minutes per rom for CD-based systems like PS2 and GameCube, so it's recommended to scrape them on a PC and transfer the metadata to your Android device.
While it works fine for most systems, it can take minutes per rom for CD-based systems like PS2 and GameCube, so it's recommended to scrape them on a PC and transfer the metadata to your Android device.

The scraper is still work in progress, some things dont work yet like folders support.

Expand Down Expand Up @@ -71,9 +71,6 @@ Games page:
Game details:
![Screenshot](assets/screenshots/03.png)

Folders support:
![Screenshot](assets/screenshots/04.png)

Collections:
![Screenshot](assets/screenshots/07.png)

Expand Down
4 changes: 2 additions & 2 deletions lib/pages/games.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class GamesPage extends HookConsumerWidget {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(
flex: 3,
flex: 5,
child: Column(
children: [
Container(
Expand Down Expand Up @@ -193,7 +193,7 @@ class GamesPage extends HookConsumerWidget {
),
),
Expanded(
flex: 5,
flex: 8,
child: Container(
//color: Colors.black.brighten(10),
padding: const EdgeInsets.all(8.0),
Expand Down
16 changes: 10 additions & 6 deletions lib/widgets/fade_image_to_video.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class FadeImageToVideo extends StatefulWidget {
class FadeImageToVideoState extends State<FadeImageToVideo> {
late VideoPlayerController _controller;
bool _playVideo = false;
bool _inFocus = true;

@override
void initState() {
Expand All @@ -32,7 +33,7 @@ class FadeImageToVideoState extends State<FadeImageToVideo> {
if (widget.settings.fadeToVideo) {
_controller.initialize();
Future.delayed(const Duration(seconds: 2), () async {
if (mounted && _controller.value.isInitialized) {
if (_inFocus && mounted && _controller.value.isInitialized) {
setState(() {
_playVideo = true;
});
Expand All @@ -44,10 +45,12 @@ class FadeImageToVideoState extends State<FadeImageToVideo> {
_controller.initialize().then((value) {
if (mounted) {
// force aspect ratio
setState(() {
_playVideo = true;
});
_controller.play();
if (_inFocus) {
setState(() {
_playVideo = true;
});
_controller.play();
}
}
});
}
Expand All @@ -67,6 +70,7 @@ class FadeImageToVideoState extends State<FadeImageToVideo> {
if (mounted) {
_controller.dispose();
setState(() {
_inFocus = false;
_playVideo = false;
});
}
Expand All @@ -76,7 +80,7 @@ class FadeImageToVideoState extends State<FadeImageToVideo> {
}

Widget _buildVideoPlayer() {
if (_playVideo) {
if (_playVideo && _inFocus) {
return AspectRatio(
aspectRatio: _controller.value.aspectRatio,
child: VideoPlayer(_controller),
Expand Down

0 comments on commit 2e6623b

Please sign in to comment.