'Replace playlist' action

Bug #136009 reported by Adam Olsen
30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Wishlist
Rob McAuley

Bug Description

Exaile has only the option to add files to the current playlist. After listening to one CD, I'd like to be able to select another one and right-click->replace playlist...

Cheers!

-H-

This ticket was migrated from the old trac: re #362

Revision history for this message
Adam Olsen (arolsen) wrote :

This ticket is a duplicate

Changed in exaile:
status: New → Invalid
Revision history for this message
Sean Hodges (seanhodges) wrote :

I'd like to see this action included as well, wheres the original ticket if this is a dupe?

Revision history for this message
Sean Hodges (seanhodges) wrote :

Sorry I'm not able to find the original ticket, attached is a fix to add a "Replace Current" item to the collection context menu.

I'll post this elsewhere if required.

Revision history for this message
Sean Hodges (seanhodges) wrote :

Cannot find the dupe, so re-opening the ticket for now

Changed in exaile:
assignee: nobody → seanhodges
status: Invalid → In Progress
Revision history for this message
Adam Olsen (arolsen) wrote :

I like this patch, but I don't understand why it's assuming that playback should restart on the new playlist?

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

In Exaile 0.3.x, tracks/albums can only be appended to current from the collection, while they can be appended to any playlist or to a new playlist from the playlist view itself.

It'd be good to be able to move an album to any playlist from the collection / file manager :

 * Append to current
 * Append to another PL >
 * * playlist 2
 * * playlist 3
 * * New playlist
 * Toggle Queue
 * Rating : ***** (collection only)
 * Send to trash (file manager only)
 * Open folder in file manage (both)

I hope we can discuss and fix this for 0.3.0.

Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote :

I found a duplicate bug:
https://bugs.launchpad.net/ubuntu/+source/exaile/+bug/339126

Some music players give you the option of setting the default double-click action to be "replace" instead of "enqueue". This is my preferred method of listening to music, so it would be great if the feature were in Exaile.

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

Anyone who is willing to produce a complete design guideline or a patch for this bug report should assign it to oneself.

Changed in exaile:
assignee: Sean Hodges (seanhodges) → nobody
importance: Undecided → Wishlist
milestone: none → 0.3.2
status: In Progress → Confirmed
Revision history for this message
Rob McAuley (rmcauley) wrote :

With the help of reacocard in #exaile, I've developed a patch to add this feature.

The patch adds:
- A context menu item to "Replace Current Playlist"
- Middle click in collection adds (currently not working, as something is capturing middle click before the press_button function can get it)
- A playlist preference changing the double-click action to replace instead of append by default

Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote : Re: [Bug 136009] Re: 'Replace playlist' action

Awesome. Can't wait.

On Tue, Sep 15, 2009 at 21:09, Rob McAuley <email address hidden> wrote:
> With the help of reacocard in #exaile, I've developed a patch to add
> this feature.
>
> The patch adds:
> - A context menu item to "Replace Current Playlist"
> - Middle click in collection adds (currently not working, as something is capturing middle click before the press_button function can get it)
> - A playlist preference changing the double-click action to replace instead of append by default
>
> ** Attachment added: "Add replace currently playlist functionality"
>   http://launchpadlibrarian.net/31871417/exaile-replace.diff
>
> --
> 'Replace playlist' action
> https://bugs.launchpad.net/bugs/136009
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Exaile: Confirmed
>
> Bug description:
> Exaile has only the option to add files to the current playlist. After listening to one CD, I'd like to be able to select another one and right-click->replace playlist...
>
> Cheers!
>
> -H-
>
>
> This ticket was migrated from the old trac: re #362
>

Revision history for this message
Rob McAuley (rmcauley) wrote :

There's still some work left to be done, including a bug reacocard found"

- Replace the playlist with any item from your collection
- Replace the playlist with the same item from your collection
- Repeat the same action again

What happens is the playlist is not cleared before replacing, meaning the item from your collection is now appended to the playlist. This happens every second replacement - essentially, if the playlist contains the exact same contents that you're importing, it will append instead of replace.

Even more bizarrely, the more often you use the Replace or Append function, the slower the collection responds to mouse clicks! This is completely unacceptable, so I'll need to figure out why my patch is making that happen. (if it is my patch)

The added menu item and preference are also going to need translation work on them done.

Revision history for this message
Rob McAuley (rmcauley) wrote :

The performance problems are not related to my patch. Still hunting the replacement bug.

Changed in exaile:
assignee: nobody → Rob McAuley (rmcauley)
Revision history for this message
Rob McAuley (rmcauley) wrote :

Actually the playlist isn't being appended to at all, it's a weirder bug than that:

- Replace your playlist with an item from the collection
- Replace with the same item again

Your playlist should now contain 1 copy of the item you selected from your collection. Try and play the item. You'll get a traceback:

Traceback (most recent call last):
  File "/home/rmcauley/exaile-dev/exaile03/xlgui/playlist.py", line 478, in on_row_activated
    index = self.playlist.index(track)
  File "/home/rmcauley/exaile-dev/exaile03/xl/playlist.py", line 541, in index
    return self.ordered_tracks.index(track)
ValueError: list.index(x): x not in list

It's not appending a 2nd copy to the playlist - the first copy doesn't exist in Exaile, yet it's displayed. You can also "stack" these visible-yet-non-existent items: once the phantom songs are displayed in the playlist, you can replace the playlist with something else, and the phantom songs will persist.

Revision history for this message
Rob McAuley (rmcauley) wrote :

Alright, back at work on this. This patch works against the latest bzr rev.

Revision history for this message
Rob McAuley (rmcauley) wrote :

I wonder if this GTK exception will help us:

/home/rmcauley/exaile-dev/exaile-rob/xlgui/playlist.py:781: GtkWarning: gtk_tree_path_append_index: assertion `index >= 0' failed
  self.list.set_cursor(lastindex - len(rows))
/home/rmcauley/exaile-dev/exaile-rob/xlgui/playlist.py:781: GtkWarning: gtk_tree_row_reference_new_proxy: assertion `path->depth > 0' failed
  self.list.set_cursor(lastindex - len(rows))

Could this be clue as to why the replace command is causing this strange behaviour?

Revision history for this message
Rob McAuley (rmcauley) wrote :

Bumping this bug -

Testing against the latest bzr version, the strange playlist bugs exhibited earlier do not seem to exist. Works for Me(tm). The patch also works completely.

Could one of the devs test further for possible inclusion in 0.3.2?

Revision history for this message
Mathias Brodala (mathbr) wrote :

Fixed with r2999.

Changed in exaile:
status: Confirmed → Fix Committed
reacocard (reacocard)
Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.