[gnome-games/wip/aplazas/run-uri: 9/21] playstation: Add PlayStationGameFactory.game_for_uri()
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/aplazas/run-uri: 9/21] playstation: Add PlayStationGameFactory.game_for_uri()
- Date: Thu, 13 Apr 2017 14:22:20 +0000 (UTC)
commit e328df2ce6f90d97817c9a6a2ee9bcffc4ba000f
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu Apr 13 15:20:02 2017 +0200
playstation: Add PlayStationGameFactory.game_for_uri()
This will be used in a subsequent commit to make a game from an URI.
.../playstation/src/playstation-game-factory.vala | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/plugins/playstation/src/playstation-game-factory.vala
b/plugins/playstation/src/playstation-game-factory.vala
index f668da0..dd3adbf 100644
--- a/plugins/playstation/src/playstation-game-factory.vala
+++ b/plugins/playstation/src/playstation-game-factory.vala
@@ -20,6 +20,16 @@ public class Games.PlayStationGameFactory : Object, UriGameFactory {
games = new HashTable<string, Game> (GLib.str_hash, GLib.str_equal);
}
+ public async Game game_for_uri (string uri) throws Error {
+ var disc_id = get_disc_id (uri);
+ var title = new GameinfoDiscIdDiscTitle (gameinfo, disc_id);
+ var media = new Media (uri, title);
+ var icon = GLib.Icon.new_for_string (ICON_NAME);
+ var media_set = new MediaSet ({ media }, icon);
+
+ return game_for_uris (media_set);
+ }
+
public void add_uri (string uri) {
string disc_id;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]