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 780852 - thegamesdb: add explicit PC games support
thegamesdb: add explicit PC games support
Status: RESOLVED OBSOLETE
Product: grilo
Classification: Other
Component: plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on: 769350
Blocks:
 
 
Reported: 2017-04-02 20:00 UTC by Yasitha Rajapaksha
Modified: 2018-09-24 09:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
thegamesdb: Use desktop entry MIME type (1.35 KB, patch)
2017-04-02 20:24 UTC, Yasitha Rajapaksha
none Details | Review
thegamesdb: Use desktop entry MIME type (1.66 KB, patch)
2017-04-03 07:36 UTC, Yasitha Rajapaksha
rejected Details | Review

Description Yasitha Rajapaksha 2017-04-02 20:00:13 UTC
We should add desktop Entry mime type for desktop games rather than resolving it by default.
Comment 1 Yasitha Rajapaksha 2017-04-02 20:24:36 UTC
Created attachment 349148 [details] [review]
thegamesdb: Use desktop entry MIME type

Use the 'application/x-desktop' MIME type
for desktop games as it has been added to
shared-mime-info
Comment 2 Adrien Plazas 2017-04-03 06:51:37 UTC
Review of attachment 349148 [details] [review]:

Please make the line of your commit message fill up to 72 chars, expect 50 for the shortlog.

Also the commit message don't make sense: application/x-desktop is in shared-mime-info since ages.

::: src/lua-factory/sources/grl-thegamesdb.lua
@@ +201,3 @@
     -- http://thegamesdb.net/api/GetPlatformsList.php
     -- http://wiki.thegamesdb.net/index.php/GetPlatformsList
+    platform_names['application/x-desktop'] = 'PC'

Please sort it alphabetically like all the other entries.

@@ +240,3 @@
     end
 
+    return platform_names[mime_type]

We should still have 'PC' as a fallback, we just want to explicit that desktop entries are 'PC'.
Comment 3 Yasitha Rajapaksha 2017-04-03 07:36:15 UTC
Created attachment 349158 [details] [review]
thegamesdb: Use desktop entry MIME type

Use the 'application/x-desktop' MIME type for desktop entries explicitly
Comment 4 Bastien Nocera 2017-04-03 07:41:55 UTC
Review of attachment 349158 [details] [review]:

That's wrong:
- a multi-file application cannot have a mime-type
- application/x-desktop only matches with the launcher for Linux games, what happens with non-Linux games, such as DOS ones? How do we detect them?

You'll need to find any way to pass the mime-type.
Comment 5 Bastien Nocera 2017-04-03 07:44:37 UTC
(In reply to Bastien Nocera from comment #4)
> Review of attachment 349158 [details] [review] [review]:
<snip>
> You'll need to find any way to pass the mime-type.

I meant, you'll need to fine a way to make it clear how to look up PC games, either through a new but fake mime-type, or using another property.
Comment 6 Adrien Plazas 2017-04-03 08:25:46 UTC
(In reply to Bastien Nocera from comment #4)
> Review of attachment 349158 [details] [review] [review]:
> 
> That's wrong:
> - a multi-file application cannot have a mime-type
> - application/x-desktop only matches with the launcher for Linux games, what
> happens with non-Linux games, such as DOS ones? How do we detect them?

Do you mean that application/x-desktop doesn't represent _only_ games, and hence is problematic as Grilo could return game related results for desktop entries not representing games?

> You'll need to find any way to pass the mime-type.
> 
> I meant, you'll need to fine a way to make it clear how to look up PC games,
> either through a new but fake mime-type, or using another property.

What properties do we have? Would application/x-desktop-game be good?
Comment 7 Bastien Nocera 2017-04-03 08:38:42 UTC
(In reply to Adrien Plazas from comment #6)
> (In reply to Bastien Nocera from comment #4)
> > Review of attachment 349158 [details] [review] [review] [review]:
> > 
> > That's wrong:
> > - a multi-file application cannot have a mime-type
> > - application/x-desktop only matches with the launcher for Linux games, what
> > happens with non-Linux games, such as DOS ones? How do we detect them?
> 
> Do you mean that application/x-desktop doesn't represent _only_ games, and
> hence is problematic as Grilo could return game related results for desktop
> entries not representing games?

A mime-type represents a stream of bytes, the purpose of which can be identified. A ROM or disk image for a particular system is relatively unique to this system, and identifiable, usually from a suffix or a magic header. "PC games" don't have either.

An ISO image with the PC game installer doesn't match the description above, neither does a DOS exe file without data, etc.

> > You'll need to find any way to pass the mime-type.
> > 
> > I meant, you'll need to fine a way to make it clear how to look up PC games,
> > either through a new but fake mime-type, or using another property.
> 
> What properties do we have? Would application/x-desktop-game be good?

Why not remove the mime-type from your lookup instead?

If you wanted something a bit more precise, you could split up the different types of games depending on the engine they use, and whether thegamesdb offers this type of cover. I'm guessing there are no entries for the games shipped by the GNOME projects, total mods of Quake or Doom engines, or PICO-8/Game & Watch games.
Comment 8 GNOME Infrastructure Team 2018-09-24 09:52:48 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/grilo/issues/113.