[UI/MOBILE] WIP on internal path support
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <Wt/WApplication>
|
||||
#include "LmsApplication.hpp"
|
||||
|
||||
#include "utils/Utils.hpp"
|
||||
|
||||
@@ -45,11 +45,22 @@ ArtistView::ArtistView(Wt::WContainerWidget *parent)
|
||||
|
||||
Artist::id_type id;
|
||||
if (readAs(strId, id))
|
||||
releases->search(SearchFilter::ById(SearchFilter::Field::Artist, id), 20);
|
||||
{
|
||||
Wt::Dbo::Transaction transaction(DboSession());
|
||||
|
||||
auto artist = Artist::getById(DboSession(), id);
|
||||
releases->search(SearchFilter::ById(SearchFilter::Field::Artist, id), 20, artist ? Wt::WString::fromUTF8(artist->getName()) : "Unknown artist");
|
||||
}
|
||||
|
||||
}, std::placeholders::_1));
|
||||
}
|
||||
|
||||
Wt::WLink
|
||||
ArtistView::getLink(Database::Artist::id_type id)
|
||||
{
|
||||
return Wt::WLink(Wt::WLink::InternalPath, "/audio/artist/" + std::to_string(id));
|
||||
}
|
||||
|
||||
} //namespace Mobile
|
||||
} //namespace UserInterface
|
||||
|
||||
|
||||
Reference in New Issue
Block a user