aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Marshall <jmarshall@never.you.mind>2012-05-10 19:31:21 +1200
committerJonathan Marshall <jmarshall@never.you.mind>2012-05-10 20:36:48 +1200
commit7df84a0fcdafd049611a16158a9ca924c1dd82da (patch)
tree98e07e60858d1db1017f1ce7f0255a9b70d35648
parent9ea952884163fd88a90cebd5b2b01ca930af689a (diff)
cosmetic - cleanup view creation in musicdb
-rw-r--r--xbmc/music/MusicDatabase.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/xbmc/music/MusicDatabase.cpp b/xbmc/music/MusicDatabase.cpp
index 5f3d813f7f..12199fcdd4 100644
--- a/xbmc/music/MusicDatabase.cpp
+++ b/xbmc/music/MusicDatabase.cpp
@@ -235,14 +235,21 @@ void CMusicDatabase::CreateViews()
CLog::Log(LOGINFO, "create album view");
m_pDS->exec("DROP VIEW IF EXISTS albumview");
- m_pDS->exec("create view albumview as select album.idAlbum as idAlbum, strAlbum, strExtraArtists, "
- "album.idArtist as idArtist, album.strExtraGenres as strExtraGenres, album.idGenre as idGenre, "
- "strArtist, strGenre, album.iYear as iYear, strThumb, idAlbumInfo, strMoods, strStyles, strThemes, "
- "strReview, strLabel, strType, strImage, iRating from album "
- "left outer join artist on album.idArtist=artist.idArtist "
- "left outer join genre on album.idGenre=genre.idGenre "
- "left outer join thumb on album.idThumb=thumb.idThumb "
- "left outer join albuminfo on album.idAlbum=albuminfo.idAlbum");
+ m_pDS->exec("CREATE VIEW albumview AS SELECT"
+ " album.idAlbum AS idAlbum, strAlbum, strExtraArtists,"
+ " album.idArtist AS idArtist, album.strExtraGenres AS strExtraGenres,"
+ " album.idGenre AS idGenre, strArtist, strGenre, album.iYear AS iYear,"
+ " strThumb, idAlbumInfo, strMoods, strStyles, strThemes,"
+ " strReview, strLabel, strType, strImage, iRating "
+ "FROM album "
+ " LEFT OUTER JOIN artist ON"
+ " album.idArtist=artist.idArtist"
+ " LEFT OUTER JOIN genre ON"
+ " album.idGenre=genre.idGenre"
+ " LEFT OUTER JOIN thumb ON"
+ " album.idThumb=thumb.idThumb"
+ " LEFT OUTER JOIN albuminfo ON"
+ " album.idAlbum=albuminfo.idAlbum");
}
void CMusicDatabase::AddSong(CSong& song, bool bCheck)