After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783319 - refactor: Expose game IDs and media IDs
refactor: Expose game IDs and media IDs
Status: RESOLVED OBSOLETE
Product: gnome-games
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-01 11:29 UTC by Adrien Plazas
Modified: 2021-04-03 09:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
core: Add MediaInfo (2.36 KB, patch)
2017-06-01 15:10 UTC, Adrien Plazas
committed Details | Review
core: Add Media.get_info() and Media.with_info() (2.27 KB, patch)
2017-06-01 15:10 UTC, Adrien Plazas
committed Details | Review
core: Make MediaSet.icon settable (926 bytes, patch)
2017-06-01 15:10 UTC, Adrien Plazas
committed Details | Review
core: Add MediaSet.add_media() (831 bytes, patch)
2017-06-01 15:10 UTC, Adrien Plazas
committed Details | Review
core: Allow the MediaSet constructor to take no parameter (925 bytes, patch)
2017-06-01 15:11 UTC, Adrien Plazas
committed Details | Review
retro: Simplify construction of MediaSet in RetroRunner (1.17 KB, patch)
2017-06-01 15:11 UTC, Adrien Plazas
committed Details | Review
playstation: Simplify construction of MediaSet (1.29 KB, patch)
2017-06-01 15:11 UTC, Adrien Plazas
committed Details | Review
core: Remove the MediaSet constructor (891 bytes, patch)
2017-06-01 15:11 UTC, Adrien Plazas
committed Details | Review

Description Adrien Plazas 2017-06-01 11:29:01 UTC
Games currently create Game objects from Uri objects generated separately and it's already a great improvement over what we did before.

We should keep standardizing and exposing the internals of how Game objects are created.

All games are composed of medias, represented by a URI; each media has an ID and is related to a game, and each game has an ID and is related to a platform. The IDs may be part of an external database (for example each PlayStation disc has its own ID) or something generated by Games (the hash of a file or parts of a file for example).

I propose to do the following:
- looking for URIs
- getting the platform, game ID and media ID corresponding to each URI
- create Media objects gathering these media-specific information and the corresponding URIs
- creating games from these medias

This has the advantage of allowing for more sophisticated caching as all information relative to the URIs and the corresponding medias are exposed.
Comment 1 Adrien Plazas 2017-06-01 15:10:41 UTC
Created attachment 353010 [details] [review]
core: Add MediaInfo

This will be used to extract information on a game media from an URI.
Comment 2 Adrien Plazas 2017-06-01 15:10:48 UTC
Created attachment 353011 [details] [review]
core: Add Media.get_info() and Media.with_info()

Allow to attach information to and retrieve it from a Media.
Comment 3 Adrien Plazas 2017-06-01 15:10:53 UTC
Created attachment 353012 [details] [review]
core: Make MediaSet.icon settable

This will help simplifying and making more flexible the construction of
a MediaSet.
Comment 4 Adrien Plazas 2017-06-01 15:10:58 UTC
Created attachment 353013 [details] [review]
core: Add MediaSet.add_media()

This will help simplifying and making more flexible the construction of
a MediaSet.
Comment 5 Adrien Plazas 2017-06-01 15:11:05 UTC
Created attachment 353014 [details] [review]
core: Allow the MediaSet constructor to take no parameter

This will help simplifying and making more flexible the construction of
a MediaSet.
Comment 6 Adrien Plazas 2017-06-01 15:11:10 UTC
Created attachment 353015 [details] [review]
retro: Simplify construction of MediaSet in RetroRunner
Comment 7 Adrien Plazas 2017-06-01 15:11:16 UTC
Created attachment 353016 [details] [review]
playstation: Simplify construction of MediaSet

Simplify the construction of MediaSet in PlayStationGameFactory.
Comment 8 Adrien Plazas 2017-06-01 15:11:22 UTC
Created attachment 353017 [details] [review]
core: Remove the MediaSet constructor

As all its parameters are optionnal and none is used, it should be
removed.
Comment 9 Adrien Plazas 2017-06-01 15:14:51 UTC
Attachment 353010 [details] pushed as 2b8e749 - core: Add MediaInfo
Attachment 353011 [details] pushed as 4e21da7 - core: Add Media.get_info() and Media.with_info()
Attachment 353012 [details] pushed as 6963c35 - core: Make MediaSet.icon settable
Attachment 353013 [details] pushed as bc79462 - core: Add MediaSet.add_media()
Attachment 353014 [details] pushed as 3187d47 - core: Allow the MediaSet constructor to take no parameter
Attachment 353015 [details] pushed as 12121bc - retro: Simplify construction of MediaSet in RetroRunner
Attachment 353016 [details] pushed as 7bd5111 - playstation: Simplify construction of MediaSet
Attachment 353017 [details] pushed as b3a9a0e - core: Remove the MediaSet constructor
Comment 10 Adrien Plazas 2017-06-01 15:17:49 UTC
Closed by accident, reopen it.
Comment 11 Alexander Mikhaylenko 2021-04-03 09:57:47 UTC
Closing, we're not gonna go with it at this point.