Added some notifications when queing/playing files
This commit is contained in:
@@ -70,6 +70,8 @@
|
|||||||
<!--Playque-->
|
<!--Playque-->
|
||||||
<message id="Lms.PlayQueue.playqueue">Play Queue</message>
|
<message id="Lms.PlayQueue.playqueue">Play Queue</message>
|
||||||
<message id="Lms.PlayQueue.nb-tracks">{1} tracks</message>
|
<message id="Lms.PlayQueue.nb-tracks">{1} tracks</message>
|
||||||
|
<message id="Lms.PlayQueue.nb-tracks-added">Added {1} tracks</message>
|
||||||
|
<message id="Lms.PlayQueue.nb-tracks-playing">Playing {1} tracks</message>
|
||||||
|
|
||||||
<!--Settings-->
|
<!--Settings-->
|
||||||
<message id="Lms.Settings.account">Account</message>
|
<message id="Lms.Settings.account">Account</message>
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ PlayQueue::updateCurrentTrack(bool selected)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PlayQueue::addTracks(const std::vector<Database::Track::pointer>& tracks)
|
PlayQueue::enqueueTracks(const std::vector<Database::Track::pointer>& tracks)
|
||||||
{
|
{
|
||||||
// Use a "session" playqueue in order to store the current playqueue
|
// Use a "session" playqueue in order to store the current playqueue
|
||||||
// so that the user can disconnect and get its playqueue back
|
// so that the user can disconnect and get its playqueue back
|
||||||
@@ -181,6 +181,13 @@ PlayQueue::addTracks(const std::vector<Database::Track::pointer>& tracks)
|
|||||||
addSome();
|
addSome();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PlayQueue::addTracks(const std::vector<Database::Track::pointer>& tracks)
|
||||||
|
{
|
||||||
|
enqueueTracks(tracks);
|
||||||
|
LmsApp->notifyMsg(Wt::WString::tr("Lms.PlayQueue.nb-tracks-added").arg(tracks.size()));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PlayQueue::playTracks(const std::vector<Database::Track::pointer>& tracks)
|
PlayQueue::playTracks(const std::vector<Database::Track::pointer>& tracks)
|
||||||
{
|
{
|
||||||
@@ -193,9 +200,10 @@ PlayQueue::playTracks(const std::vector<Database::Track::pointer>& tracks)
|
|||||||
|
|
||||||
_entriesContainer->clear();
|
_entriesContainer->clear();
|
||||||
|
|
||||||
addTracks(tracks);
|
enqueueTracks(tracks);
|
||||||
|
|
||||||
play(0);
|
play(0);
|
||||||
|
|
||||||
|
LmsApp->notifyMsg(Wt::WString::tr("Lms.PlayQueue.nb-tracks-playing").arg(tracks.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ class PlayQueue : public Wt::WTemplate
|
|||||||
Wt::Signal<> playbackStop;
|
Wt::Signal<> playbackStop;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void enqueueTracks(const std::vector<Database::Track::pointer>& tracks);
|
||||||
void addSome();
|
void addSome();
|
||||||
void updateInfo();
|
void updateInfo();
|
||||||
void updateCurrentTrack(bool selected);
|
void updateCurrentTrack(bool selected);
|
||||||
|
|||||||
Reference in New Issue
Block a user