[gnome-games/wip/exalm/uid: 11/18] steam: Remove SteamUid



commit 66944c72b8d3a2ea1d5b8599bcbf030349f202ec
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Feb 21 16:32:40 2020 +0500

    steam: Remove SteamUid
    
    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]