34 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'generalsettings'");
41 if (loadMusicDefaultUpmix == 1)
49 if (loadIgnoreTags == 1)
53 if (allowTagWriting == 1)
63 "will use the device specified in MythTV"));
65 "Set this option to enable it by default. " 66 "You can enable or disable the upconversion " 67 "during playback at anytime."));
70 "information if no ID3 information is found. Accepts " 71 "GENRE, ARTIST, ALBUM, TITLE, ARTIST_TITLE and " 74 "in files and just try to determine Genre, Artist, " 75 "Album, and Track number and title from the " 78 "metadata in the file (e.g. ID3) to match the " 79 "database. This means allowing MythTV to write " 80 "to the file and permissions must be set " 81 "accordingly. Features such as ID3 playcounts " 82 "and ratings depend on this being enabled."));
85 "for a fresh start. NOTE: You may lose any manual or automatic changes made to " 86 "a tracks metadata like rating or playcount unless you told MythMusic to " 87 "write those to the tag."));
100 ShowOkPopup(tr(
"Are you sure you want to reset the music database?"),
112 query.
prepare(
"TRUNCATE music_albumart");
116 query.
prepare(
"TRUNCATE music_albums");
120 query.
prepare(
"TRUNCATE music_artists");
124 query.
prepare(
"TRUNCATE music_directories");
128 query.
prepare(
"TRUNCATE music_genres");
132 query.
prepare(
"TRUNCATE music_playlists");
136 query.
prepare(
"TRUNCATE music_songs");
140 query.
prepare(
"TRUNCATE music_stats");
146 ShowOkPopup(tr(
"Music database has been cleared.\n" 147 "You must now scan, rip or import some tracks."));
MythUIStateType::StateType GetCheckState() const
MythConfirmationDialog * ShowOkPopup(const QString &message, QObject *parent, const char *slot, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
MythUICheckBox * m_musicDefaultUpmix
void SaveSetting(const QString &key, int newValue)
QSqlQuery wrapper that fetches a DB connection from the connection pool.
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
MythUIButton * m_resetDBButton
void BuildFocusList(void)
This class is used as a container for messages.
void SetHelpText(const QString &text)
MythUITextEdit * m_musicAudioDevice
QString GetSetting(const QString &key, const QString &defaultval="")
MythUICheckBox * m_allowTagWriting
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
static MSqlQueryInfo InitCon(ConnectionReuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
void stop(bool stopAll=false)
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
void SetText(const QString &text, bool moveCursor=true)
void dispatch(const MythEvent &event)
MythUIButton * m_cancelButton
MythUITextEdit * m_nonID3FileNameFormat
int GetNumSetting(const QString &key, int defaultval=0)
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
bool Create(void) override
#define LOG(_MASK_, _LEVEL_, _STRING_)
MythUICheckBox * m_ignoreID3Tags
void SetCheckState(MythUIStateType::StateType state)
bool SetFocusWidget(MythUIType *widget=nullptr)
static void slotDoResetDB(bool ok)
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
static void DBError(const QString &where, const MSqlQuery &query)
void reloadMusic(void)
reload music after a scan, rip or import
MythUITextEdit * m_musicCDDevice
QString GetText(void) const
MythUIButton * m_saveButton