1
0
Fork 0
mirror of synced 2024-06-17 18:14:44 +12:00
Commit graph

27 commits

Author SHA1 Message Date
loathingKernel da93dc2e5e ImageManager: Add the ability to request different types of cover art images 2024-05-31 00:21:58 +03:00
loathingKernel 99bcdbaaf0 ImageManager: Download and prepare wide images too 2024-05-27 15:33:44 +03:00
loathingKernel e1afbd879b ImageManager: Use 'tall' instead of 'card' for the names 2024-05-24 13:51:22 +03:00
loathingKernel 5051ead0ca ImageManager: Add wide image filenames 2024-05-20 12:52:20 +03:00
loathingKernel 21dd30c40a ImageManager: Possibly fix segmentation fault when updating images 2024-05-20 10:04:23 +03:00
loathingKernel 9b10a48704 ImageManager: Reduce thread count even more 2024-01-18 16:43:03 +02:00
loathingKernel c063f5f5b9
Library: Move image loading from RareCore to the GameWidget
Instead of loading images in the showEvent of the MainWindow,
load them in the showEvent of each widget. It seems to reduce
the startup stuttering this way. With some more work
we can only load the images for the widgets that are currently
visible and reduce the stutter even more.

At the same time, reduce the number of concurrent downloads
in the image manager and add a timeout so we won't halt.
The exception from the timeout is just logged at this point,
and the download is not requeued.
2023-11-29 12:50:02 +02:00
loathingKernel d11faa5263
ImageManager: Remove leading space 2023-11-28 16:38:00 +02:00
loathingKernel 1f06c87743
ImageManager: Few improvements
Check if there is a `keyImages` attribute before accessing it, and return
an empty list in case it isn't available. Fixes a recent crash with
`Prison Architect - eureka Update 1` DLC.

Exit early from `download_image` if the requested image is currently being
downloaded. This avoids multiple preparations and loading callbacks for
queued images.

Remove checking for supported OS when creating the icon. Now we create
icons in `icns` format for `Darwin` irregardless the fact we don't use them
for anything.
2023-06-05 01:33:11 +03:00
loathingKernel 737730583f ImageManager: Check if desktop icons are supported on current plaform
Before creating icons, check if desktop links are supported by Rare
on the current platform.

Fixes Dummerle/Rare#262
2023-05-14 22:13:12 +02:00
loathingKernel 0e4e7420cf
Refactor: Move ImageSize to models
`ImageSize` is a property of `ImageWidget` it is relevant to
`ImageManager` and the store widgets. So move it out of `ImageManager`.
2023-05-03 17:27:35 +03:00
loathingKernel e9b9f91df8
ImageSize: Include reference to the base image preset
"Base" refers to the preset used fetching and storing the image
2023-04-04 13:30:40 +03:00
loathingKernel 74eb87b396
ImageSize: Add smaller size presets for wide images 2023-04-01 00:55:11 +03:00
loathingKernel 4e1248a18a
RareCore: Move OriginWineWorker execution in load_pixamps()
We don't need to know if Origin is installed before launching the window,
so we can save on startup time by executing the worker after the window
has become visible.
2023-03-12 01:11:27 +02:00
loathingKernel 3adabda1ba
ImageManager: Add OfferImageTall to the set of image types to look for
Seems like Epic are changing their API again, and some image types have been renamed. This made the list of updates to be empty after filtering it for image types we could handle. This also had the side effect of an infinite recursion when downloading images, as the resulting pixmap would be null.

To fix this situation, the new image type has been added, and the image loading in RareGame has become two methods, one for loading and one for setting it.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-10 10:35:31 +02:00
loathingKernel 5748d0e6ee
RareCore: Manage initialization in RareCore instead of LaunchDialog
This is the last change of the `backend_refactor` branch. This makes
`RareCore` the centerpiece of Rare by moving initialization before the UI
is brought up. RareCore is now in control of creating and querying `RareGame`
objects, re-introducing the ability (incomplete) to refresh the games library.
As a result, ApiResults has been removed.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:21 +02:00
loathingKernel 034c6f2ade ImageManager: Increase margin on desktop icons
Add size presets for wide covers
2023-02-14 10:21:38 +02:00
loathingKernel c0d9e5c845 ImageSize.Preset: Add equality test 2023-02-08 17:09:24 +02:00
loathingKernel b36dfdd2c6 ImageManager: Generate shortcut icons when fetching cover images. 2023-02-08 15:08:55 +02:00
loathingKernel ac1bda2cb9 ImageSize: Add wide 16/9 size preset 2023-02-04 17:38:07 +02:00
loathingKernel cf5fd415e5 LaunchDialog: Add a middle-ground solution for concurrent image downloads 2022-09-11 14:51:37 +03:00
Stelios Tsampas d5d795ce79 Paths: Query paths after the OrganizationName and ApplicationName have been set
At the point they were evaluated, `OrganizationName` and `ApplicationName` are unset
resulting in wrong paths. As a quick fix, explicitly set them to their later values
Per OS examples:
Windows:
	before:
		data: C:\Users\<user>\AppData\Local
		cache: C:\Users\<user>\AppData\Local\cache
	after:
		data: C:\Users\<user>\AppData\Local\Rare\Rare
		cache: C:\Users\<user>\AppData\Local\Rare\Rare\cache
2022-09-08 01:27:37 +03:00
loathingKernel 5029921b09 Move a bunch of class attributes to instance attributes 2022-09-07 18:21:50 +03:00
loathingKernel 1ebd0b18d8 Introduce a very basic RareCore to handle signletons and their cleanup. 2022-09-04 20:39:03 +03:00
loathingKernel 4139797eff ImageManager: Also test if 'game.metadata' has 'keyImages' 2022-07-28 22:20:06 +03:00
loathingKernel ff09475cac ImageManager: Handle broken image.cache 2022-06-21 01:05:39 +03:00
loathingKernel 3a28f2f0a2 Implement image manager
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2022-06-19 17:12:59 +03:00