Rockbox

  • Status New
  • Percent Complete
    0%
  • Task Type Patches
  • Category Database
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by sideral - 2011-04-07
Last edited by sideral - 2011-04-18

FS#12054 - Highlight each album's last-played track in database views - great for audiobooks and podcasts

The attached proof-of-concept patch highlights (places the cursor at) each album's last-played track in database views. The intention is to allow easy resuming of multi-track audiobooks or podcasts where they were last left off. This works best when autoresume has also been enabled.

The patch relies on runtime statistics gathering being enabled (and the DB needs to be enables as well, of course).

The current patch has some caveats that I plan to address in future revisions:

Right now, it's unconditionally enabled for all database-based track views. We might consider allowing to turn this off for regular music albums.

When the last-played track has been completed (played through to its end), we should actually highlight the next track (or the first track if the last-played track was the final track of the album). [EDIT: fixed – see latest patch in comments section]

It would be great if a similar feature was available for the file browser. I'd find it acceptable if that would require the DB as well (as that's the place where the last-played info is stored). It could benefit from an add-to-DB-as-files-are-played feature (aka FS#12073).

Comments?

[EDIT: Clarified summary. Fixed a rather severe bug in the patch to make it actually work. :) ]
[ EDIT 2: Linked to FS#12073. Addressed one caveat. ]

Good idea - an improvement to the "Follow Playlist" option? I don't think the database should be needed though - better to use the current playlist (modifying the format to cope with the db if needed)?

Thanks for your comments, pondlife!

No, I don't think this feature has much similarity to the follow-playlist option. The intention is to highlight the last-played track of _each_ album view as the user browses the database; it's not limited to the current playlist in any way. Hence, the current playlist does not carry enough data to know what each album's last-played track is.

I'm not sure what in my original description led to this misunderstanding. If you let me know, I'll fix the description.

No worries, I just read "last played track" and thought you meant the most recentlyplayed track, not the last played track on an album. Ignore me!

I haven't tried the patch myself, but from what I read I understood that the cursor is placed at the last played track of each album in order to indicate which track it is… I'd prefer to have the cursor start at the first item of the list, as usual, and have the last played track highlighted in red (example color, it could be configured by theme), like what the filebrowser does when a .colours file is activated (different colors for different file types).
But, that's just my opinion :) As long as we can enable and disable the feature through settings, it doesn't matter to me if it selects or highlights as most likely I won't be using the feature.

gbl08ma, thanks for your response and for sharing your idea! Your understanding of how the feature works is correct.

The color idea is interesting, but I have two gripes with it: First, I really want the cursor to be placed at the track that I likely want to play next. Saving button presses to achieve exactly this is the point of this feature. Second, colors don't work on monochrome displays (such as my Clip{V2,+}'s display).

Yes, I agree that the feature needs to be configurable. I guess that a global on/off toggle would suffice, although a way to configure which directories to apply it on would be nice as well.

Updated patch:

Make last-played-count DB lookup dependent on runtime statistics having been enabled.

When the last-played track has been completed (lastoffset == 0), highlight the next track instead. To this end, update lastoffset not only when autoresume has been enabled, but also when runtime statistics have been enabled.

Rebased to current SVN.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing