17 |
|
|
18 |
|
_L<cse::String> Library::GetArtists() const |
19 |
|
{ |
20 |
< |
_R<dbi::ResultSet> artists_(connection->Execute(_B("SELECT DISTINCT artist FROM files WHERE live = TRUE"))); |
20 |
> |
_R<dbi::ResultSet> artists_(connection->Execute(_B("SELECT DISTINCT artist FROM files WHERE live = TRUE ORDER BY artist"))); |
21 |
|
_L<cse::String> artists; |
22 |
|
|
23 |
|
while (artists_->MoveNext()) |
28 |
|
|
29 |
|
_L<cse::String> Library::GetTitles() const |
30 |
|
{ |
31 |
< |
_R<dbi::ResultSet> titles_(connection->Execute(_B("SELECT DISTINCT title FROM files WHERE live = TRUE"))); |
31 |
> |
_R<dbi::ResultSet> titles_(connection->Execute(_B("SELECT DISTINCT title FROM files WHERE live = TRUE ORDER BY title"))); |
32 |
|
_L<cse::String> titles; |
33 |
|
|
34 |
|
while (titles_->MoveNext()) |
39 |
|
|
40 |
|
_L<cse::String> Library::GetAlbums() const |
41 |
|
{ |
42 |
< |
_R<dbi::ResultSet> albums_(connection->Execute(_B("SELECT DISTINCT album FROM files WHERE live = TRUE"))); |
42 |
> |
_R<dbi::ResultSet> albums_(connection->Execute(_B("SELECT DISTINCT album FROM files WHERE live = TRUE ORDER BY album"))); |
43 |
|
_L<cse::String> albums; |
44 |
|
|
45 |
|
while (albums_->MoveNext()) |
50 |
|
|
51 |
|
_L<cse::String> Library::GetGenres() const |
52 |
|
{ |
53 |
< |
_R<dbi::ResultSet> genres_(connection->Execute(_B("SELECT DISTINCT album FROM files WHERE live = TRUE"))); |
53 |
> |
_R<dbi::ResultSet> genres_(connection->Execute(_B("SELECT DISTINCT genre FROM files WHERE live = TRUE ORDER BY genre"))); |
54 |
|
_L<cse::String> genres; |
55 |
|
|
56 |
|
while (genres_->MoveNext()) |
61 |
|
|
62 |
|
_L<MediaFolder> Library::GetFolders() const |
63 |
|
{ |
64 |
< |
_R<dbi::ResultSet> roots(connection->Execute(_B("SELECT DISTINCT root FROM files WHERE live = TRUE"))); |
64 |
> |
_R<dbi::ResultSet> roots(connection->Execute(_B("SELECT DISTINCT root FROM files WHERE live = TRUE ORDER By root"))); |
65 |
|
_L<MediaFolder> folders; |
66 |
|
|
67 |
|
while (roots->MoveNext()) |