Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Playback History Qt-only plugin #138

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

vedgy
Copy link

@vedgy vedgy commented May 2, 2023

Copy and modify the playlist-manager-qt plugin code.

A similar feature was requested in #553. However, this initial version of the playback history plugin tracks and displays only album history, not individual song/track history. Playback start/stop time is not tracked or shown either.

@vedgy vedgy force-pushed the add-history-plugin branch 3 times, most recently from d3d32ed to eedc773 Compare May 4, 2023 12:28
@jlindgren90
Copy link
Member

Looks like a nice plugin, except some of the limitations seem quite significant:

tracks and displays only album history, not individual song/track history

History entries are stored only in memory and are lost on Audacious exit.

I wonder how many users actually want a plugin that remembers only album history, and forgets it on exit?

@vedgy
Copy link
Author

vedgy commented May 6, 2023

My use case is listening to music while not otherwise using computer (the display is off). Then being able to tell what was playing. Storing and loading history is useless then.

Implementing storing and loading in an ini file is relatively easy. So if someone needs it, they can jump in. But there is a complication of automatic removal of old entries to limit the growth of history.

Tracking individual songs calls for automatic history cleanup as well, because the history will grow faster. Plus plugin preferences has to be implemented to choose between album and track history.

I don't want to implement either feature, because I'm not going to use them and can't be sure what exact behavior would be desired by the users who need these features.

@vedgy
Copy link
Author

vedgy commented May 7, 2023

I wonder how many users actually want a plugin that remembers only album history, and forgets it on exit?

While it's not exactly what many people want, the feature can be somewhat useful to random-song users too. The playlist Entry Number of a first played song in an album is stored. Selecting a history entry selects this song in the playlist. Assuming the playlist is unmodified, one can follow the played songs. Except when consecutive songs happen to be picked from a common album.

@vedgy
Copy link
Author

vedgy commented May 17, 2023

Will this plugin become mergeable if I add a song history option? A group box with two radio buttons Song history and Album history or a History mode combobox with two items Song and Album?

@jlindgren90
Copy link
Member

Sorry for the delayed response, but I just haven't had time to review this so far.

@vedgy
Copy link
Author

vedgy commented Jun 17, 2023

No problem. I'll wait for a review.

@vedgy
Copy link
Author

vedgy commented Oct 3, 2024

Resolved trivial conflicts and rebased on master. Will integrate relevant changes since my last testing, if any, from the copied-and-modified plugin playlist-manager-qt. Then perhaps add the discussed song history option.

EDIT: the Playback History plugin still works well and I found no relevant changes to integrate. I'll work on the song history option now.

Copy and modify the playlist-manager-qt plugin code.

A similar feature was requested in #553. However, this initial version
of the playback history plugin tracks and displays only album history,
not individual song/track history. Playback start/stop time is not
tracked or shown either.
The implementation is straightforward, because audqt::TreeView already
supports removing selected rows.
The added feature allows to follow playback history in the playlist
without activating history entries, i.e. without affecting playback.
@vedgy
Copy link
Author

vedgy commented Oct 6, 2024

Made a few changes that do not require retesting to the first 3 commits. Implemented the Song mode and preferences to switch between the Song and the Album modes. Tested everything again. Please review.

I hope permanent history storage is not a requirement for merging. Implementing permanent storage would require adding a history size limit option and implementing automatic history cleanup. Maybe also changing the type of m_entries from Index<HistoryEntry> to QList<HistoryEntry> and declaring HistoryEntry as Q_RELOCATABLE_TYPE in order to support efficient removal from the front (assuming Qt 6).

By the way, perhaps it makes sense to declare HistoryEntry as Q_RELOCATABLE_TYPE in the first existing commit just in case it's needed in the future? (or rather Q_MOVABLE_TYPE to support Qt 5 as well as Qt 6)

@jlindgren90
Copy link
Member

@radioactiveman can you review this? Not sure when I will be able to get to it.

@radioactiveman
Copy link
Member

@radioactiveman can you review this? Not sure when I will be able to get to it.

Yes, I will try out the plugin and review its code when finding some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants