Place all XML files in config

This commit is contained in:
craig.p.drummond
2014-07-07 19:06:29 +00:00
parent 313ad1c13e
commit d70f7819ca
7 changed files with 13 additions and 17 deletions

View File

@@ -665,17 +665,14 @@ if (X11_FOUND)
endif (X11_FOUND)
if (WIN32)
install(FILES context/ultimate_providers.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/lyrics/)
install(FILES context/weblinks.xml online/podcast_directories.xml scrobbling/scrobblers.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/config/)
install(FILES tags/fixes.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/config/ RENAME tag-fixes.xml)
install(FILES tags/tag-fixes.xml context/lyrics_providers.xml context/weblinks.xml online/podcast_directories.xml scrobbling/scrobblers.xml
DESTINATION ${CMAKE_INSTALL_PREFIX}/config/)
elseif (APPLE)
install(FILES context/ultimate_providers.xml DESTINATION ${MACOSX_BUNDLE_RESOURCES}/lyrics/)
install(FILES context/weblinks.xml online/podcast_directories.xml scrobbling/scrobblers.xml DESTINATION ${MACOSX_BUNDLE_RESOURCES}/config/)
install(FILES tags/fixes.xml DESTINATION ${MACOSX_BUNDLE_RESOURCES}/config/ RENAME tag-fixes.xml)
install(FILES tags/tag_fixes.xml context/lyrics_providers.xml context/weblinks.xml online/podcast_directories.xml scrobbling/scrobblers.xml
DESTINATION ${MACOSX_BUNDLE_RESOURCES}/config/)
elseif (NOT ENABLE_UBUNTU)
install(FILES context/ultimate_providers.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${CMAKE_PROJECT_NAME}/lyrics)
install(FILES context/weblinks.xml online/podcast_directories.xml scrobbling/scrobblers.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${CMAKE_PROJECT_NAME}/config/)
install(FILES tags/fixes.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${CMAKE_PROJECT_NAME}/config/ RENAME tag-fixes.xml)
install(FILES tags/tag_fixes.xml context/lyrics_providers.xml context/weblinks.xml online/podcast_directories.xml scrobbling/scrobblers.xml
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${CMAKE_PROJECT_NAME}/config/)
endif (WIN32)
if (ENABLE_HTTP_STREAM_PLAYBACK)

View File

@@ -22,9 +22,9 @@
16. Add support for comments. These are read directly from the song file when
the tag-editor is used, and they are NOT saved in Cantata's cache file.
Comments are only read if MPD is configured to support the COMMENT field.
17. Install Cantata's list of lyrics providers to INSTALL/share/cantata/lyrics
18. Read lyrics providers from each .xml file in ~/.local/share/cantata/lyrics,
and INSTALL/share/cantata/lyrics
17. Install Cantata's list of lyrics providers to INSTALL/share/cantata/config
18. Read lyrics providers from each lyrics_*.xml file in
~/.local/share/cantata/config, and INSTALL/share/cantata/config
19. Attempt to respect menubar usage of current desktop. For Windows and Gnome;
menu button is used, and menubar hidden. For Mac and Unity; menubar is
used, and menu button is hidden. For KDE Plasma; by default the menu button
@@ -76,7 +76,7 @@
Albums, Tracks), so no real need for button.
47. Make shortcut for 'Go Back' action changeable.
48. Don't attempt to find Amarok or Clementine covers.
49. Don't hard-code artist name fixes, read from $install/tag-fixes.xml
49. Don't hard-code artist name fixes, read from $install/tag_fixes.xml
50. Remove grouping of multiple-artist albums under 'Various Artists'
51. Change default sidebar shortcuts from 'Alt+' to 'Ctrl+Shift+' so as to
avoid clashes with menubar.

View File

@@ -54,7 +54,6 @@
#define CANTATA_URL "cantata.googlecode.com"
#define CANTATA_SYS_CONFIG_DIR Utils::systemDir(QLatin1String("config"))
#define CANTATA_SYS_LYRICS_DIR Utils::systemDir(QLatin1String("lyrics"))
#define CANTATA_SYS_ICONS_DIR Utils::systemDir(QLatin1String("icons"))
#define CANTATA_SYS_MPD_DIR Utils::systemDir(QLatin1String("mpd"))
#define CANTATA_SYS_TRANS_DIR Utils::systemDir(QLatin1String("translations"))

View File

@@ -150,14 +150,14 @@ void UltimateLyrics::load()
return;
}
QStringList dirs=QStringList() << Utils::dataDir("lyrics") << CANTATA_SYS_LYRICS_DIR;
QStringList dirs=QStringList() << Utils::dataDir() << CANTATA_SYS_CONFIG_DIR;
QSet<QString> providerNames;
foreach (const QString &d, dirs) {
if (d.isEmpty()) {
continue;
}
QFileInfoList files=QDir(d).entryInfoList(QStringList() << QLatin1String("*.xml"), QDir::NoDotAndDotDot|QDir::Files);
QFileInfoList files=QDir(d).entryInfoList(QStringList() << QLatin1String("lyrics_*.xml"), QDir::NoDotAndDotDot|QDir::Files);
foreach (const QFileInfo &f, files) {
QFile file(f.absoluteFilePath());
if (file.open(QIODevice::ReadOnly)) {

View File

@@ -325,7 +325,7 @@ QString Covers::fixArtist(const QString &artist)
continue;
}
QFile f(dir+QLatin1String("/tag-fixes.xml"));
QFile f(dir+QLatin1String("/tag_fixes.xml"));
if (f.open(QIODevice::ReadOnly)) {
QXmlStreamReader doc(&f);
while (!doc.atEnd()) {