[gnome-games/wip/exalm/uid: 1/13] wii: Remove WiiUid
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/uid: 1/13] wii: Remove WiiUid
- Date: Sun, 23 Feb 2020 12:34:35 +0000 (UTC)
commit 37614b5f7a63b47a87d92e959df217fe1672f553
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Feb 21 16:32:40 2020 +0500
wii: Remove WiiUid
Replace it with GenericUid.
plugins/wii/src/meson.build | 1 -
plugins/wii/src/wii-plugin.vala | 8 +++++++-
plugins/wii/src/wii-uid.vala | 20 --------------------
3 files changed, 7 insertions(+), 22 deletions(-)
---
diff --git a/plugins/wii/src/meson.build b/plugins/wii/src/meson.build
index ebaa6ce9..8141c95a 100644
--- a/plugins/wii/src/meson.build
+++ b/plugins/wii/src/meson.build
@@ -1,7 +1,6 @@
vala_sources = [
'wii-header.vala',
'wii-plugin.vala',
- 'wii-uid.vala',
]
c_args = [
diff --git a/plugins/wii/src/wii-plugin.vala b/plugins/wii/src/wii-plugin.vala
index 7c507b43..8617b7ac 100644
--- a/plugins/wii/src/wii-plugin.vala
+++ b/plugins/wii/src/wii-plugin.vala
@@ -34,12 +34,18 @@ private class Games.WiiPlugin : Object, Plugin {
return { factory };
}
+ private static string get_uid (WiiHeader header) throws Error {
+ var game_id = header.get_game_id ();
+
+ return @"$PLATFORM_UID_PREFIX-$game_id".down ();
+ }
+
private static Game game_for_uri (Uri uri) throws Error {
var file = uri.to_file ();
var header = new WiiHeader (file);
header.check_validity ();
- var uid = new WiiUid (header);
+ var uid = new GenericUid (get_uid (header));
var title = new FilenameTitle (uri);
var media = new GriloMedia (title, MIME_TYPE);
var cover = new CompositeCover ({
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]