Modify

Opened 3 years ago

Last modified 22 months ago

#12254 infoneeded_new Patch - Bug Fix

MythGame settings not initialized in the database

Reported by: jjiglesias@… Owned by:
Priority: minor Milestone: unknown
Component: Plugin - MythGame Version: 0.27.3
Severity: low Keywords:
Cc: Ticket locked: no

Description

Certain MythGame? settings variables are not initialized in the database, so that they can't be used until the first modification of MythGame? settings is performed through its setting user interface. This causes, for example, that those games marked as favorite don't appear in the Favorites listing, at the Games UI. To list favorite games, an SQL query is created with the content of the GameFavTreeLeves? setting. If this setting doesn't exist in the database, the query created is wrong and fails. Aa a result, no favorite games apperar on screen. I've proposed a patch that initializes these variables.

Attachments (0)

Change History (4)

comment:1 Changed 3 years ago by jjiglesias@…

Proposed patch pull request: https://github.com/MythTV/packaging/pull/38.

comment:2 Changed 3 years ago by mdean

Plugin settings should not be initialized in MythTV (core) dbcheck. Rather it's up to the plugin to create necessary settings. This can be done either by calling a function in mythplugin_init() to check and pre-populate settings (so it is done when the frontend is started on a particular host) or by handling non-existent settings within the code that uses them (either by specifying default values in the GetSetting?() calls or by using a conditional to check values).

Furthermore, fixes should be made in MythGame? itself, not in a packaging script used only by debian-based system packagers.

comment:3 Changed 3 years ago by jjiglesias@…

I've just seen an example of mythplugin_init() in mythbrowser/main.cpp. Thank you.

comment:4 Changed 22 months ago by dekarl

  • Status changed from new to infoneeded_new

Hi Jose, are you updating the patch in the near future or should this tracking ticket of the discarded pull request be discarded, too? You can always reopen it or open a new ticket once the new patch is ready.

Add Comment

Modify Ticket

Action
as infoneeded_new The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.