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