[GH-ISSUE #17] More options for playing songs? #12

Closed
opened 2026-05-22 22:02:31 +01:00 by JakeStanger · 12 comments
Owner

Originally created by @thepenguinthatwants on GitHub (Mar 31, 2020).
Original GitHub issue: https://github.com/JakeStanger/Rofi_MPD/issues/17

Hiya!

This plugin seems to work after adding some mediainfo to files.

Is it possible to add different options for better controls?

Like playing the song straight after choosing it?

Originally created by @thepenguinthatwants on GitHub (Mar 31, 2020). Original GitHub issue: https://github.com/JakeStanger/Rofi_MPD/issues/17 Hiya! This plugin seems to work after adding some mediainfo to files. Is it possible to add different options for better controls? Like playing the song straight after choosing it?
Author
Owner

@JakeStanger commented on GitHub (Mar 31, 2020):

Good to hear! Do you know which tags were missing, out of interest? I'll try and make things fail more gracefully if it's something silly.

I can definitely add a setting to start playback on add. Do you have anything else in mind?

<!-- gh-comment-id:606812746 --> @JakeStanger commented on GitHub (Mar 31, 2020): Good to hear! Do you know which tags were missing, out of interest? I'll try and make things fail more gracefully if it's something silly. I can definitely add a setting to start playback on add. Do you have anything else in mind?
Author
Owner

@thepenguinthatwants commented on GitHub (Apr 1, 2020):

Hi!
Thanks for the reply.

Practically all the media tags.
I thought that this could work based on file names. But using easytag it was quite easy to tag all of em. I always thought that the title is same than file name.

Playback on add is like very good improvement already.

Maybe also possibility to change playlists on the fly? That would make it even crazier.

Normally would've thought about next and previous tracks but they are good enough to be as normal keybindings.

<!-- gh-comment-id:607261674 --> @thepenguinthatwants commented on GitHub (Apr 1, 2020): Hi! Thanks for the reply. Practically all the media tags. I thought that this could work based on file names. But using easytag it was quite easy to tag all of em. I always thought that the title is same than file name. Playback on add is like very good improvement already. Maybe also possibility to change playlists on the fly? That would make it even crazier. Normally would've thought about next and previous tracks but they are good enough to be as normal keybindings.
Author
Owner

@JakeStanger commented on GitHub (Apr 1, 2020):

Right yeah, you need your tracks to be tagged for MPD to work; filenames mean nothing.

Getting a list of playlists from the playlist directory should be quite straight-forward. I'll see what I can do.

<!-- gh-comment-id:607426242 --> @JakeStanger commented on GitHub (Apr 1, 2020): Right yeah, you need your tracks to be tagged for MPD to work; filenames mean nothing. Getting a list of playlists from the playlist directory should be quite straight-forward. I'll see what I can do.
Author
Owner

@JakeStanger commented on GitHub (Apr 1, 2020):

@thepenguinthatwants I've just pushed a new release and updated the PyPi package to 2.1.0.

Try adding play_on_add = true to your config and using the --playlists argument. If both work I'll close this 👍

<!-- gh-comment-id:607445810 --> @JakeStanger commented on GitHub (Apr 1, 2020): @thepenguinthatwants I've just pushed a new release and updated the PyPi package to `2.1.0`. Try adding `play_on_add = true` to your config and using the `--playlists` argument. If both work I'll close this :+1:
Author
Owner

@thepenguinthatwants commented on GitHub (Apr 2, 2020):

I downloaded r80.76cc551-1 version from
https://aur.archlinux.org/packages/rofi-mpd-git/

Added play_on_add = true to the mpd.conf but adding a song didnt start plaiying it.

<!-- gh-comment-id:607928819 --> @thepenguinthatwants commented on GitHub (Apr 2, 2020): I downloaded r80.76cc551-1 version from https://aur.archlinux.org/packages/rofi-mpd-git/ Added play_on_add = true to the mpd.conf but adding a song didnt start plaiying it.
Author
Owner

@thepenguinthatwants commented on GitHub (Apr 2, 2020):

The playlist seems to work!
Cool!!! You are awesome!

<!-- gh-comment-id:607929412 --> @thepenguinthatwants commented on GitHub (Apr 2, 2020): The playlist seems to work! Cool!!! You are awesome!
Author
Owner

@JakeStanger commented on GitHub (Apr 2, 2020):

The option goes in the config for this app, not your MPD config.

MPD is a server that has no awareness of this app, and it's this app that tells the player to start playback.

Config file is documented in the readme.

<!-- gh-comment-id:607931150 --> @JakeStanger commented on GitHub (Apr 2, 2020): The option goes in the config for this app, not your MPD config. MPD is a server that has no awareness of this app, and it's this app that tells the player to start playback. Config file is documented [in the readme](https://github.com/JakeStanger/Rofi_MPD#configuration).
Author
Owner

@thepenguinthatwants commented on GitHub (Apr 2, 2020):

Oh how foolish of me sorry.

I added it to my configs but it didnt change. Adding a song to the list didnt start the song.

music_directory = "~/Music" # Same as MPD `music_directory`
case_sensitive = false # Should searching be case sensitive by default?

# Should disc name tags be read?
# This requires opening the file to read its tags.
# Disc names can be stored in the `TSST` tag.
enable_disc_names = true
play_on_add = true

tracks_keep_open = false # Should the track selection menu re-open on selection?
discs_keep_open = true # Should the disc selection menu re-open on selection?

# Multiple hosts can be defined.
# If more than one host is defined, a menu is initially opened
# from which a host is selected.
# Passing the host argument bypasses this.
[[hosts]]
host = "localhost"
port = 6600
<!-- gh-comment-id:607932845 --> @thepenguinthatwants commented on GitHub (Apr 2, 2020): Oh how foolish of me sorry. I added it to my configs but it didnt change. Adding a song to the list didnt start the song. ``` music_directory = "~/Music" # Same as MPD `music_directory` case_sensitive = false # Should searching be case sensitive by default? # Should disc name tags be read? # This requires opening the file to read its tags. # Disc names can be stored in the `TSST` tag. enable_disc_names = true play_on_add = true tracks_keep_open = false # Should the track selection menu re-open on selection? discs_keep_open = true # Should the disc selection menu re-open on selection? # Multiple hosts can be defined. # If more than one host is defined, a menu is initially opened # from which a host is selected. # Passing the host argument bypasses this. [[hosts]] host = "localhost" port = 6600 ```
Author
Owner

@thepenguinthatwants commented on GitHub (Apr 2, 2020):

It does start plaiying the music player.. but only the song that is first on the list.. not the song that this script added.

<!-- gh-comment-id:607933442 --> @thepenguinthatwants commented on GitHub (Apr 2, 2020): It does start plaiying the music player.. but only the song that is first on the list.. not the song that this script added.
Author
Owner

@JakeStanger commented on GitHub (Apr 2, 2020):

The script only changes the player state from stopped/paused to playing, it doesn't update the index.

Personally if I was queuing songs into a playlist, I'd rather playback started from the top of the playlist rather than where I just added songs, so this behavior makes sense to me.

This app isn't meant to be a full client so I want to be quite careful about adding more features. What I will do is make the play_on_add option a CLI flag as well, so you can override your config on a run-by-run basis.

I'll add this in a couple of hours and let you know when it's done.

<!-- gh-comment-id:607944557 --> @JakeStanger commented on GitHub (Apr 2, 2020): The script only changes the player state from stopped/paused to playing, it doesn't update the index. Personally if I was queuing songs into a playlist, I'd rather playback started from the top of the playlist rather than where I just added songs, so this behavior makes sense to me. This app isn't meant to be a full client so I want to be quite careful about adding more features. What I will do is make the `play_on_add` option a CLI flag as well, so you can override your config on a run-by-run basis. I'll add this in a couple of hours and let you know when it's done.
Author
Owner

@JakeStanger commented on GitHub (Apr 5, 2020):

Sorry it took me a little longer than expected, ended up being busy the past few days.

I've added two new CLI options - --play and --noplay which will override the config's play_on_add value on a per-run basis.

<!-- gh-comment-id:609402444 --> @JakeStanger commented on GitHub (Apr 5, 2020): Sorry it took me a little longer than expected, ended up being busy the past few days. I've added two new CLI options - `--play` and `--noplay` which will override the config's `play_on_add` value on a per-run basis.
Author
Owner

@JakeStanger commented on GitHub (Apr 15, 2020):

Closing this, feel free to re-open it or open another issue.

<!-- gh-comment-id:614209669 --> @JakeStanger commented on GitHub (Apr 15, 2020): Closing this, feel free to re-open it or open another issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/Rofi_MPD#12
No description provided.