Stop after stream track works, and updated todo

This commit is contained in:
David Sansome 2009-12-26 23:43:38 +00:00
parent 9206cad0cf
commit c98427aeae
4 changed files with 18 additions and 2 deletions

12
TODO
View File

@ -4,9 +4,19 @@
- Automatically install xine plugins - Automatically install xine plugins
- Copy to library, move to library - Copy to library, move to library
- Edit tags in the playlist - Edit tags in the playlist
- Global shortcut keys
- Make QSortFilterProxyModel on the library obey hasChildren()
- More columns in playlist
Last.fm:
- Artist/tag/etc. radio
- Skip, love
- Disable the pause button
- Double click from radio list
- Right click on radio list to configure Last.fm
- More types of radio
Long-term: Long-term:
- Last.fm
- iPod - iPod
Windows: Windows:

View File

@ -34,7 +34,7 @@ void Player::Next() {
void Player::TrackEnded() { void Player::TrackEnded() {
int i = playlist_->current_item(); int i = playlist_->current_item();
if (i == -1) { if (i == -1 || playlist_->stop_after_current()) {
Stop(); Stop();
return; return;
} }

View File

@ -430,3 +430,8 @@ void Playlist::ClearStreamMetadata() {
emit dataChanged(index(current_item_.row(), 0), index(current_item_.row(), ColumnCount)); emit dataChanged(index(current_item_.row(), 0), index(current_item_.row(), ColumnCount));
} }
bool Playlist::stop_after_current() const {
return stop_after_.isValid() && current_item_.isValid() &&
stop_after_.row() == current_item_.row();
}

View File

@ -46,6 +46,7 @@ class Playlist : public QAbstractListModel {
int current_item() const; int current_item() const;
int next_item() const; int next_item() const;
int previous_item() const; int previous_item() const;
bool stop_after_current() const;
PlaylistItem* item_at(int index) const { return items_[index]; } PlaylistItem* item_at(int index) const { return items_[index]; }
// Changing the playlist // Changing the playlist