Skip to content

Commit

Permalink
Add sorting keys on TV, music as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Beirdo committed Dec 20, 2010
1 parent e270c10 commit a6cd9df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions mythtv/programs/mythbackend/upnpcdsmusic.cpp
Expand Up @@ -53,7 +53,7 @@ UPnpCDSRootInfo UPnpCDSMusic::g_RootNodes[] =
"FROM music_songs song "
"%1 "
"ORDER BY name",
"", "" },
"", "name" },

/*
This is currently broken... need to handle list of items with single parent (like 'All Music')
Expand All @@ -66,7 +66,7 @@ This is currently broken... need to handle list of items with single parent (lik
"FROM music_songs song "
"%1 "
"ORDER BY name",
"WHERE (DATEDIFF( CURDATE(), date_modified ) <= 30 ) " },
"WHERE (DATEDIFF( CURDATE(), date_modified ) <= 30 ) ", "" },
*/
{ "By Album",
"song.album_id",
Expand All @@ -77,7 +77,7 @@ This is currently broken... need to handle list of items with single parent (lik
"%1 "
"GROUP BY a.album_id "
"ORDER BY a.album_name",
"WHERE song.album_id=:KEY" },
"WHERE song.album_id=:KEY", "song.album_name" },
/*
{ "By Artist",
Expand All @@ -89,7 +89,7 @@ This is currently broken... need to handle list of items with single parent (lik
"%1 "
"GROUP BY a.artist_id "
"ORDER BY a.artist_name",
"WHERE song.artist_id=:KEY" },
"WHERE song.artist_id=:KEY", "" },
*/
/*
{ "By Genre",
Expand All @@ -101,7 +101,7 @@ This is currently broken... need to handle list of items with single parent (lik
"%1 "
"GROUP BY g.genre_id "
"ORDER BY g.genre",
"WHERE song.genre_id=:KEY" },
"WHERE song.genre_id=:KEY", "" },
*/
};
Expand Down
12 changes: 6 additions & 6 deletions mythtv/programs/mythbackend/upnpcdstv.cpp
Expand Up @@ -47,7 +47,7 @@ UPnpCDSRootInfo UPnpCDSTv::g_RootNodes[] =
"FROM recorded "
"%1 "
"ORDER BY starttime DESC",
"", "" },
"", "starttime DESC" },

{ "By Title",
"title",
Expand All @@ -58,7 +58,7 @@ UPnpCDSRootInfo UPnpCDSTv::g_RootNodes[] =
"%1 "
"GROUP BY title "
"ORDER BY title",
"WHERE title=:KEY", "" },
"WHERE title=:KEY", "title" },

{ "By Genre",
"category",
Expand All @@ -69,7 +69,7 @@ UPnpCDSRootInfo UPnpCDSTv::g_RootNodes[] =
"%1 "
"GROUP BY category "
"ORDER BY category",
"WHERE category=:KEY", "" },
"WHERE category=:KEY", "category" },

{ "By Date",
"DATE_FORMAT(starttime, '%Y-%m-%d')",
Expand All @@ -80,7 +80,7 @@ UPnpCDSRootInfo UPnpCDSTv::g_RootNodes[] =
"%1 "
"GROUP BY name "
"ORDER BY starttime DESC",
"WHERE DATE_FORMAT(starttime, '%Y-%m-%d') =:KEY", "" },
"WHERE DATE_FORMAT(starttime, '%Y-%m-%d') =:KEY", "starttime DESC" },

{ "By Channel",
"chanid",
Expand All @@ -92,7 +92,7 @@ UPnpCDSRootInfo UPnpCDSTv::g_RootNodes[] =
"%1 "
"GROUP BY name "
"ORDER BY channel.chanid",
"WHERE channel.chanid=:KEY", "" },
"WHERE channel.chanid=:KEY", "channel.callsign" },


{ "By Group",
Expand All @@ -103,7 +103,7 @@ UPnpCDSRootInfo UPnpCDSTv::g_RootNodes[] =
"%1 "
"GROUP BY recgroup "
"ORDER BY recgroup",
"WHERE recgroup=:KEY", "" }
"WHERE recgroup=:KEY", "recgroup" }
};

int UPnpCDSTv::g_nRootCount = sizeof( g_RootNodes ) / sizeof( UPnpCDSRootInfo );
Expand Down

0 comments on commit a6cd9df

Please sign in to comment.