Go to the documentation of this file.
19 if (!LoadWindowFromXML(
"musicsettings-ui.xml",
"generalsettings",
this))
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."));
86 "for a fresh start. NOTE: You may lose any manual or automatic changes made to "
87 "a tracks metadata like rating or playcount unless you told MythMusic to "
88 "write those to the tag."));
102 ShowOkPopup(tr(
"Are you sure you want to reset the music database?"),
114 query.
prepare(
"TRUNCATE music_albumart");
118 query.
prepare(
"TRUNCATE music_albums");
122 query.
prepare(
"TRUNCATE music_artists");
126 query.
prepare(
"TRUNCATE music_directories");
130 query.
prepare(
"TRUNCATE music_genres");
134 query.
prepare(
"TRUNCATE music_playlists");
138 query.
prepare(
"TRUNCATE music_songs");
142 query.
prepare(
"TRUNCATE music_stats");
148 ShowOkPopup(tr(
"Music database has been cleared.\n"
149 "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.