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

[Feature request] loop/shuffle button #1992

Open
Solarunit opened this issue Mar 27, 2018 · 31 comments
Open

[Feature request] loop/shuffle button #1992

Solarunit opened this issue Mar 27, 2018 · 31 comments

Comments

@Solarunit
Copy link

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 Solarunit changed the title [Feature request] loop (shuffle) button [Feature request] loop/shuffle button Mar 27, 2018
@sklprogs
Copy link

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".

@fabertawe
Copy link

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.

@kpcee
Copy link
Contributor

kpcee commented Jan 1, 2020

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.

@fabertawe
Copy link

@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.

@kpcee
Copy link
Contributor

kpcee commented Jan 6, 2020

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

@fabertawe
Copy link

fabertawe commented Jan 7, 2020

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.

@kpcee
Copy link
Contributor

kpcee commented Jan 7, 2020

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

@sklprogs
Copy link

sklprogs commented Jan 9, 2020

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

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

@fabertawe
Copy link

fabertawe commented Jan 9, 2020

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" ?

@kpcee
Copy link
Contributor

kpcee commented Jan 9, 2020

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.

@fabertawe
Copy link

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.

@Oleksiy-Yakovenko
Copy link
Member

@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.

@kpcee
Copy link
Contributor

kpcee commented Jan 9, 2020

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.

@erdnuesse
Copy link

Any news on implementing it in master branch?

@kpcee
Copy link
Contributor

kpcee commented Sep 29, 2020

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

@Storme9
Copy link

Storme9 commented Apr 27, 2022

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

@Oleksiy-Yakovenko
Copy link
Member

@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.

@kpcee
Copy link
Contributor

kpcee commented Apr 30, 2022

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

@Storme9
Copy link

Storme9 commented Apr 30, 2022 via email

@Storme9
Copy link

Storme9 commented May 1, 2022 via email

@Oleksiy-Yakovenko
Copy link
Member

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

@Storme9
Copy link

Storme9 commented May 1, 2022 via email

@Oleksiy-Yakovenko
Copy link
Member

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)

@Storme9
Copy link

Storme9 commented May 1, 2022 via email

@Storme9
Copy link

Storme9 commented May 1, 2022 via email

@Oleksiy-Yakovenko
Copy link
Member

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

@Storme9
Copy link

Storme9 commented May 1, 2022 via email

@Oleksiy-Yakovenko
Copy link
Member

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

@Storme9
Copy link

Storme9 commented Oct 11, 2022 via email

@Oleksiy-Yakovenko
Copy link
Member

@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.

@Storme9
Copy link

Storme9 commented Feb 14, 2023

It seems you have added a repeat menu to the player which solves all issues. Thank you.

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

No branches or pull requests

7 participants