[gnome-games/wip/exalm/uid: 8/18] playstation: Remove PlayStationUid
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/uid: 8/18] playstation: Remove PlayStationUid
- Date: Fri, 21 Feb 2020 13:36:02 +0000 (UTC)
commit 37faec9a1cc1a30a97aa03f16bffec7b6af8e808
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Feb 21 16:26:27 2020 +0500
playstation: Remove PlayStationUid
Replace it with GenericUid and a simple function.
plugins/playstation/src/meson.build | 1 -
plugins/playstation/src/playstation-game-factory.vala | 5 ++++-
plugins/playstation/src/playstation-uid.vala | 19 -------------------
3 files changed, 4 insertions(+), 21 deletions(-)
---
diff --git a/plugins/playstation/src/meson.build b/plugins/playstation/src/meson.build
index 1871682c..c7d4f8bc 100644
--- a/plugins/playstation/src/meson.build
+++ b/plugins/playstation/src/meson.build
@@ -3,7 +3,6 @@ vala_sources = [
'playstation-game-factory.vala',
'playstation-header.vala',
'playstation-plugin.vala',
- 'playstation-uid.vala',
]
c_sources = [
diff --git a/plugins/playstation/src/playstation-game-factory.vala
b/plugins/playstation/src/playstation-game-factory.vala
index 6ab77db1..a22b20e6 100644
--- a/plugins/playstation/src/playstation-game-factory.vala
+++ b/plugins/playstation/src/playstation-game-factory.vala
@@ -5,6 +5,7 @@ public class Games.PlayStationGameFactory : Object, UriGameFactory {
private const string PHONY_MIME_TYPE = "application/x-playstation-rom";
private const string ICON_NAME = "media-optical-symbolic";
private const string GAMEINFO =
"resource:///org/gnome/Games/plugin/playstation/playstation.gameinfo.xml";
+ private const string PLATFORM_UID_PREFIX = "playstation";
private static GameinfoDoc gameinfo;
@@ -148,8 +149,10 @@ public class Games.PlayStationGameFactory : Object, UriGameFactory {
}
private Game create_game (MediaSet media_set, string disc_set_id, Uri uri) throws Error {
+ var uid_string = @"$PLATFORM_UID_PREFIX-$disc_set_id".down ();
+
var gameinfo = get_gameinfo ();
- var uid = new PlayStationUid (disc_set_id);
+ var uid = new GenericUid (uid_string);
var title = new CompositeTitle ({
new GameinfoDiscIdGameTitle (gameinfo, disc_set_id),
new FilenameTitle (uri)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]