deadbeef icon indicating copy to clipboard operation
deadbeef copied to clipboard

[Feature request] loop/shuffle button

Open Solarunit opened this issue 6 years ago • 31 comments

Please add loop (shuffle) button. It would be nice to have some indication on the main window (or maybe tray area) when loop mode is enabled.

Solarunit avatar Mar 27 '18 21:03 Solarunit

As to me, it would be great to have "loop all/track" option in the program tray (since I have the main window closed most of the time). I use 0.7.2, and the "shuffle" option, unlike "loop" option, is already there. Quite frustrating, since I frequently use "loop", but never - "shuffle".

sklprogs avatar Feb 11 '19 22:02 sklprogs

Partly a "me too" to having indication of shuffle/loop status on the status bar but also to suggest possibly exposing the current status to a variable (title formatting)?

I've made custom buttons for the various shuffle/loop options but have no way to know the current status of shuffle/loop. I could use a variable in the output of the "playback status" plugin.

fabertawe avatar Aug 23 '19 14:08 fabertawe

There is a plugin called "Playback order menu", it would be easy to extend it or make a new one to show the repeat status.

kpcee avatar Jan 01 '20 13:01 kpcee

@kpcee - thank you so much! I don't know how I missed that plugin.

You say "easy" ;) ...I'll take a look and see if I can duplicate it for repeat status.

fabertawe avatar Jan 02 '20 13:01 fabertawe

In the meantime I have created a corresponding plugin myself. It creates two buttons with playback order and playback loop, if you click on them you can change the mode to Loop track → Loop all and Linear → Shuffle. The plugin runs with Gtk 2 without problems, but under Gtk 3 it crashes after a few clicks. This is because the click signal of the button triggers several signals where the label of the button is changed and DeaDBeeF doesn't like that at all. In later versions it could also be possible to replace the text with a graphic, so that it looks like Audacious. Does anyone have a suggestion for a name for the plugin? pic

kpcee avatar Jan 06 '20 14:01 kpcee

That looks great, I'd love to test it. I only use Gtk2 myself (where possible).

As for a name... "Shoop" ;) What about something along the lines of "(playback) control button(s)"/"playback button"? Just pick something you're happy with.

fabertawe avatar Jan 07 '20 12:01 fabertawe

Okay I just created a new repository deadbeef-playback-buttons.

kpcee avatar Jan 07 '20 13:01 kpcee

As for a name... "Shoop" ;)

This is a slang word for "to have sex". Shloop/loosh?

sklprogs avatar Jan 09 '20 12:01 sklprogs

Apologies for the delay in getting back on this.

It works great, many thanks!

The only thing your missing is random album and random track from the shuffle button itself but the button does display the correct status when these are selected elsewhere (menu). Similarly, with the loop button, it doesn't go to "Loop Off" unless selected from the menu.

Replacing the text (as you alluded to) at some point with a graphic would be ideal. I'm not keen on "Linear" as I'd prefer "Off". Also, could the button just display "Album" instead of "RND Album", for consistency? Minor niggles, that's all :)

Great work, this has filled a gap for me. Deadbeef is almost perfect now :)

EDIT: is there any difference between "Shuffle -> Tracks" and "Shuffle -> Random Tracks" ?

fabertawe avatar Jan 09 '20 13:01 fabertawe

Glad you like it :) The fact that you can't reach all the play modes from the buttons is due to personal preferences, I don't use album and random, on the other hand a graphical button would only switch between Off and Shuffle or Repeat Track / All. But it's not hard to change that if it's too annoying ;) I will change the names of the buttons in the next version. Theoretically, I could also add new play modes, like Keep Artist, Keep Album, Top Rated Songs et al.

The difference between Random and Shuffle is well explained in the foobar2000-FAQ.

kpcee avatar Jan 09 '20 14:01 kpcee

I will change the names of the buttons in the next version. Theoretically, I could also add new play modes, like Keep Artist, Keep Album, Top Rated Songs et al.

"Keep Artist" sounds interesting. I don't rate songs but other's do and this could be useful to a lot of people. It does what I need already so anything else is a bonus :)

The difference between Random and Shuffle is well explained in the foobar2000-FAQ.

Ah, it makes sense now, thanks.

fabertawe avatar Jan 09 '20 15:01 fabertawe

@kpcee deadbeef's shuffle works slightly differently though. Foobar FAQ claims that in shuffle mode, the playlist would be shuffled once, and then play in that order repeatedly. In deadbeef, after playing the shuffled playlist, it will get re-shuffled again.

There are possibly other differences too.

Oleksiy-Yakovenko avatar Jan 09 '20 15:01 Oleksiy-Yakovenko

There are possibly other differences too.

Yes, e.g. songs that have already been played are ignored in the search, so the order is never identical if you always start the same track manually.

kpcee avatar Jan 09 '20 16:01 kpcee

Any news on implementing it in master branch?

erdnuesse avatar Sep 14 '20 10:09 erdnuesse

I have uploaded a new version of my plugin which has now three buttons, the new button adds new playback modes ("Keep Album", "Keep Artist", "Top Rated", "Selection", "Playlist" deactivates the plugin). It works internally with its own playlist and supports the suffle modes "Linear", "Shuffle" and "Random". There is also a new entry in the context menu called "Custom Playlist". Unbenannt

kpcee avatar Sep 29 '20 14:09 kpcee

My problem is that I am a noob.

I have DeadBeef installed but I am unable to follow the instructions in the ReadMe, specifically:

"To compile the plugin you need to copy the files deadbeef.h and gtkui_api.h from the deadbeef directory." - I don't think that copying files compiles anything. What am I supposed to do with the copied files? Copy them to where?

and secondly:

"Copy the compiled plugin to the plugin folder (~/.local/lib/deadbeef/) and restart DeadDBeeF, then add the plugin to the gui." - to this I ask:

How do I "compile" the plugin?
How do I add the plugin to the gui?

Any direction would be much appreciated since I want the feature of your plugin and I also want to learn about my operating system.

Deadbeef version: 1.8.8 OS: Ubuntu 20.04

Storme9 avatar Apr 27 '22 20:04 Storme9

@Storme9 this particular plugin requires a copy of some files from deadbeef source, in order to compile. You need to copy the files from deadbeef source folder into the plugin source folder. After compiling and installing the plugin, assuming it works, you can add it to the UI using "Design Mode" -- which is accessible from the View menu. You will need to customize the UI, and rearrange some UI elements, to add this new UI element where you like it.

Oleksiy-Yakovenko avatar Apr 28 '22 06:04 Oleksiy-Yakovenko

@Storme9 Maybe I should also provide compiled versions. Did everything work now?

kpcee avatar Apr 30 '22 08:04 kpcee

As soon as I get a moment - I will try and do what you said and then let you know how it worked out.

On Sat, 30 Apr 2022 at 10:31, kpcee @.***> wrote:

@Storme9 https://github.com/Storme9 Maybe I should also provide compiled versions. Did everything work now?

— Reply to this email directly, view it on GitHub https://github.com/DeaDBeeF-Player/deadbeef/issues/1992#issuecomment-1113948993, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRWEYGPKY3KF6FYEXY7YV3VHTVWJANCNFSM4EXWSEIA . You are receiving this because you were mentioned.Message ID: @.***>

Storme9 avatar Apr 30 '22 12:04 Storme9

So I am trying to figure out how to install your plugin.

I started by trying to locate the source files of my deadbeef install. I did this with the following command: whereis deadbeef

It came up with 3 locations: /usr/bin/deadbeef /usr/lib/deadbeef /usr/share/deadbeef

Note: deadbeef is not installed in the ~/.local/lib/deadbeef/ location as you suggest.

listing all items in these directories resulted in zero files with the names: deadbeef.h and gtkui_api.h

I am dead in the water...

Attached is a screenshot of the items in the directory: /usr/bin/deadbeef

I would really appreciate some help please.

On Sat, 30 Apr 2022 at 13:59, Ethan Storme Malan @.***> wrote:

As soon as I get a moment - I will try and do what you said and then let you know how it worked out.

On Sat, 30 Apr 2022 at 10:31, kpcee @.***> wrote:

@Storme9 https://github.com/Storme9 Maybe I should also provide compiled versions. Did everything work now?

— Reply to this email directly, view it on GitHub https://github.com/DeaDBeeF-Player/deadbeef/issues/1992#issuecomment-1113948993, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRWEYGPKY3KF6FYEXY7YV3VHTVWJANCNFSM4EXWSEIA . You are receiving this because you were mentioned.Message ID: @.***>

Storme9 avatar May 01 '22 19:05 Storme9

You can get the files you need from this archive: https://sourceforge.net/projects/deadbeef/files/staticdeps/ddb-headers-latest.tar.bz2/download

Oleksiy-Yakovenko avatar May 01 '22 19:05 Oleksiy-Yakovenko

So I have those files now and I have copied them to the folder containing your plugin files. (please see screenshot)

Now I need to "compile" the plugin. I have never done this before. My plan is to follow this guide: https://www.howtogeek.com/105413/how-to-compile-and-install-from-source-on-ubuntu/ up until the end of the "compile" step. Is this okay?

And then finally your instructions say: "Copy the compiled plugin to the plugin folder (~/.local/lib/deadbeef/) and restart DeadDBeeF, then add the plugin to the gui." Where is the plugin folder?

On Sun, 1 May 2022 at 21:46, Alexey Yakovenko @.***> wrote:

You can get the files you need from this archive:

https://sourceforge.net/projects/deadbeef/files/staticdeps/ddb-headers-latest.tar.bz2/download

— Reply to this email directly, view it on GitHub https://github.com/DeaDBeeF-Player/deadbeef/issues/1992#issuecomment-1114319473, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRWEYDWJB4D3EKC7JHDHVTVH3NPZANCNFSM4EXWSEIA . You are receiving this because you were mentioned.Message ID: @.***>

Storme9 avatar May 01 '22 19:05 Storme9

for compiling the plugin, typically it's enough to just run make

to copy:

mkdir -p ~/.local/lib/deadbeef/
cp "plugin_name.so" ~/.local/lib/deadbeef/

(change the .so file name to the name of compiled plugin)

Oleksiy-Yakovenko avatar May 01 '22 20:05 Oleksiy-Yakovenko

I'm assuming I need to install gtk2.0 - is this correct?

On Sun, 1 May 2022 at 22:06, Ethan Storme Malan @.***> wrote:

On Sun, 1 May 2022 at 22:01, Alexey Yakovenko @.***> wrote:

for compiling the plugin, typically it's enough to just run make

to copy:

mkdir -p ~/.local/lib/deadbeef/ cp "plugin_name.so" ~/.local/lib/deadbeef/

(change the .so file name to the name of compiled plugin)

— Reply to this email directly, view it on GitHub https://github.com/DeaDBeeF-Player/deadbeef/issues/1992#issuecomment-1114322225, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRWEYAK5INAY72QBUT22YDVH3PLHANCNFSM4EXWSEIA . You are receiving this because you were mentioned.Message ID: @.***>

Storme9 avatar May 01 '22 20:05 Storme9

I seem to already have gtk2.0... Please see screenshot.

On Sun, 1 May 2022 at 22:07, Ethan Storme Malan @.***> wrote:

I'm assuming I need to install gtk2.0 - is this correct?

On Sun, 1 May 2022 at 22:06, Ethan Storme Malan @.***> wrote:

On Sun, 1 May 2022 at 22:01, Alexey Yakovenko @.***> wrote:

for compiling the plugin, typically it's enough to just run make

to copy:

mkdir -p ~/.local/lib/deadbeef/ cp "plugin_name.so" ~/.local/lib/deadbeef/

(change the .so file name to the name of compiled plugin)

— Reply to this email directly, view it on GitHub https://github.com/DeaDBeeF-Player/deadbeef/issues/1992#issuecomment-1114322225, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRWEYAK5INAY72QBUT22YDVH3PLHANCNFSM4EXWSEIA . You are receiving this because you were mentioned.Message ID: @.***>

Storme9 avatar May 01 '22 20:05 Storme9

There's no screenshot in your message. And yes, for this plugin you need a "dev" package of GTK to be installed: sudo apt install libgtk-3-dev

Oleksiy-Yakovenko avatar May 01 '22 20:05 Oleksiy-Yakovenko

compilation complete.

I copied the gtk2 plugin (it's a .so file) to the directory you told me to create.

Upon starting deadbeef I got an error even though deadbeef started.

I uninstalled and then reinstalled deadbeef only to be greeted by errors. (please see attached screenshot.

Upon google searching the errors - I get back to a deadbeef thread: "If you're sure the reason is deadbeef - make sure to delete all 3rd party deadbeef plugin, and provide a gdb backtrace. Instruction how to do it can be found here: https://github.com/Alexey-Yakovenko/deadbeef/wiki/GDB-HOWTO"

that link does not help...

I would appreciate another pointer please.

Would you suggest uninstalling all gtk packages and deadbeef and then reinstalling?

On Sun, 1 May 2022 at 22:16, Alexey Yakovenko @.***> wrote:

There's no screenshot in your message. And yes, for this plugin you need a "dev" package of GTK to be installed: sudo apt install libgtk-3-dev

— Reply to this email directly, view it on GitHub https://github.com/DeaDBeeF-Player/deadbeef/issues/1992#issuecomment-1114326988, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRWEYFSEC4YITC24IFE2HTVH3RDFANCNFSM4EXWSEIA . You are receiving this because you were mentioned.Message ID: @.***>

Storme9 avatar May 01 '22 20:05 Storme9

there's no screenshot in your message. It seems like email replies discard the attachments

Oleksiy-Yakovenko avatar May 02 '22 06:05 Oleksiy-Yakovenko

The screenshot is in my message to you. I'm not sure why it is not showing.

Here is the output text from my terminal:

selected output plugin: ALSA output plugin INFO: from file /home/storme/.config/deadbeef/playlists/0.dbpl convgui: gtkui plugin not found plugin Converter GTK3 UI failed to connect to dependencies, deactivated. plugin Playlist browser GTK3 failed to connect to dependencies, deactivated. shellexecui: can't find gtkui plugin plugin Shellexec GTK3 UI failed to connect to dependencies, deactivated. resume: track 0 pos 2.461293 playlist 0 gtkui plugin compiled for gtk version: 2.24.32 Gtk-Message: 09:43:02.896: Failed to load module "canberra-gtk-module"

(deadbeef:7307): Gdk-CRITICAL **: 09:43:03.052: IA__gdk_window_get_position: assertion 'GDK_IS_WINDOW (window)' failed

(deadbeef:7307): Gdk-CRITICAL **: 09:43:03.052: IA__gdk_window_get_position: assertion 'GDK_IS_WINDOW (window)' failed

(deadbeef:7307): Gdk-CRITICAL **: 09:43:03.052: gdk_window_invalidate_maybe_recurse_full: assertion 'GDK_IS_WINDOW (window)' failed

Any pointer would be much appreciated.

On Mon, 2 May 2022 at 08:17, Alexey Yakovenko @.***> wrote:

there's no screenshot in your message. It seems like email replies discard the attachments

— Reply to this email directly, view it on GitHub https://github.com/DeaDBeeF-Player/deadbeef/issues/1992#issuecomment-1114532448, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRWEYCCPOLER2YH5BAQHCTVH5XOBANCNFSM4EXWSEIA . You are receiving this because you were mentioned.Message ID: @.***>

Storme9 avatar Oct 11 '22 08:10 Storme9

@Storme9 can you please remind what is the problem again / what do you need help with? This conversation happened over 5 months ago, and I lost track of what it was about. I don't see any screenshot in any of your messages, and I'm not sure what problem you're trying to solve.

Oleksiy-Yakovenko avatar Oct 11 '22 15:10 Oleksiy-Yakovenko