mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-05 21:55:24 +00:00
A bit of TrackList cleanup.
This commit is contained in:
parent
72975b5a98
commit
680195a21a
@ -252,6 +252,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
LibraryPtr library = LibraryFactory::Libraries().at(0);
|
||||
GaplessTransport transport;
|
||||
transport.SetVolume(0.75);
|
||||
PlaybackService playback(library, transport);
|
||||
|
||||
GlobalHotkeys globalHotkeys(playback, library);
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
#define MAX_SIZE 60
|
||||
#define MAX_SIZE 50
|
||||
|
||||
using musik::core::db::Statement;
|
||||
using musik::core::db::Row;
|
||||
|
@ -105,13 +105,13 @@ bool CategoryTrackListQuery::OnRun(Connection& db) {
|
||||
std::string lastAlbum;
|
||||
size_t index = 0;
|
||||
|
||||
this->query = boost::str(boost::format(
|
||||
std::string query = boost::str(boost::format(
|
||||
"SELECT DISTINCT t.id, al.name " \
|
||||
"FROM tracks t, albums al, artists ar, genres gn " \
|
||||
"WHERE t.%s=? AND t.album_id=al.id AND t.visual_genre_id=gn.id AND t.visual_artist_id=ar.id "
|
||||
"ORDER BY al.name, disc, track, ar.name") % this->column);
|
||||
|
||||
Statement trackQuery(this->query.c_str(), db);
|
||||
Statement trackQuery(query.c_str(), db);
|
||||
trackQuery.BindInt(0, this->id);
|
||||
|
||||
while (trackQuery.Step() == Row) {
|
||||
@ -123,21 +123,6 @@ bool CategoryTrackListQuery::OnRun(Connection& db) {
|
||||
lastAlbum = album;
|
||||
}
|
||||
|
||||
// TrackPtr track = TrackPtr(new LibraryTrack(id, this->library));
|
||||
// track->SetValue(Track::TRACK_NUM, trackQuery.ColumnText(1));
|
||||
// track->SetValue(Track::DISC_NUM, trackQuery.ColumnText(2));
|
||||
// track->SetValue(Track::BPM, trackQuery.ColumnText(3));
|
||||
// track->SetValue(Track::DURATION, trackQuery.ColumnText(4));
|
||||
// track->SetValue(Track::FILESIZE, trackQuery.ColumnText(5));
|
||||
// track->SetValue(Track::YEAR, trackQuery.ColumnText(6));
|
||||
// track->SetValue(Track::TITLE, trackQuery.ColumnText(7));
|
||||
// track->SetValue(Track::FILENAME, trackQuery.ColumnText(8));
|
||||
// track->SetValue(Track::THUMBNAIL_ID, trackQuery.ColumnText(9));
|
||||
// track->SetValue(Track::ALBUM, album.c_str());
|
||||
// track->SetValue(Track::GENRE, trackQuery.ColumnText(11));
|
||||
// track->SetValue(Track::ARTIST, trackQuery.ColumnText(12));
|
||||
// track->SetValue(Track::FILETIME, trackQuery.ColumnText(13));
|
||||
|
||||
result->Add(id);
|
||||
++index;
|
||||
}
|
||||
|
@ -66,7 +66,6 @@ namespace musik {
|
||||
Headers headers;
|
||||
std::string column;
|
||||
DBID id;
|
||||
std::string query;
|
||||
size_t hash;
|
||||
};
|
||||
}
|
||||
|
@ -120,6 +120,7 @@
|
||||
<ClCompile Include="app\layout\ConsoleLayout.cpp" />
|
||||
<ClCompile Include="app\layout\NowPlayingLayout.cpp" />
|
||||
<ClCompile Include="app\layout\SearchLayout.cpp" />
|
||||
<ClCompile Include="app\model\TrackList.cpp" />
|
||||
<ClCompile Include="app\query\CategoryListViewQuery.cpp" />
|
||||
<ClCompile Include="app\query\NowPlayingTrackListQuery.cpp" />
|
||||
<ClCompile Include="app\query\CategoryTrackListQuery.cpp" />
|
||||
@ -163,6 +164,7 @@
|
||||
<ClInclude Include="app\layout\ConsoleLayout.h" />
|
||||
<ClInclude Include="app\layout\NowPlayingLayout.h" />
|
||||
<ClInclude Include="app\layout\SearchLayout.h" />
|
||||
<ClInclude Include="app\model\TrackList.h" />
|
||||
<ClInclude Include="app\query\CategoryListViewQuery.h" />
|
||||
<ClInclude Include="app\query\NowPlayingTrackListQuery.h" />
|
||||
<ClInclude Include="app\query\TrackListQueryBase.h" />
|
||||
|
@ -111,6 +111,9 @@
|
||||
<ClCompile Include="app\util\Duration.cpp">
|
||||
<Filter>app\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="app\model\TrackList.cpp">
|
||||
<Filter>app\model</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h" />
|
||||
@ -264,6 +267,9 @@
|
||||
<ClInclude Include="app\util\Duration.h">
|
||||
<Filter>app\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="app\model\TrackList.h">
|
||||
<Filter>app\model</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="cursespp">
|
||||
@ -287,5 +293,8 @@
|
||||
<Filter Include="app\service">
|
||||
<UniqueIdentifier>{f2315c14-fb1b-4928-ab47-462d1dc65c77}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="app\model">
|
||||
<UniqueIdentifier>{b6720351-dd55-4b14-936a-09df56193c15}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user