This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Amarok no longer starts playing songs through Dolphin

Tags: None
(comma "," separated)
User avatar
danniken
Registered Member
Posts
91
Karma
0
Hello,

I am using KDE 4.10.3 and Amarok 2.70 on Fedora 17.

Somehow I have lost the ability for songs to start playing when invoked from Dolphin. From a dead stop (no songs playing), I can append and enqueue a song just fine, but I have to manually to into Amarok to start it playing.

Any idea why I lost the ability to have songs start playing when invoked through Dolphin?

BTW, this is using the right click context menu --> Actions --> Amarok --> Append & Play.

Thanks for any help with this.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
If you open Konsole, does running the following work?
Code: Select all
amarok --append <path to music file> --play

If it does not, can you try running this after the above command?
Code: Select all
amarok --play


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
danniken
Registered Member
Posts
91
Karma
0
Thanks, Cooks. Running the first command demonstrates the same behavior as double clicking the file (appending it but not playing it), but the second command does start to play it.

Here's the output showing the possible error:

[jon@F17 My Music]$ amarok --append song.mp3 --play
loaded the Generic plugin
QWidget::insertAction: Attempt to insert null action
Trying to set an invalid MediaSource -> ignoring.
**********************************************************************************************
** AMAROK WAS STARTED IN NORMAL MODE. IF YOU WANT TO SEE DEBUGGING INFORMATION, PLEASE USE: **
** amarok --debug **
**********************************************************************************************
[jon@F17 My Music]$ amarok --play
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Based on the message below, I suspect this to be a bug in Amarok - could a developer please confirm?
Code: Select all
Trying to set an invalid MediaSource -> ignoring.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
This is a known bug: https://bugs.kde.org/show_bug.cgi?id=317385, most likely fixed in the upcoming Amarok 2.8


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
User avatar
danniken
Registered Member
Posts
91
Karma
0
Thanks Mamarok, I appreciate the head's up on this. Like in the bug report, this is a behavior that didn't used to occur, so I will look forward to the next version (fortunately I'm on Fedora, so we usually get updates fairly regularly).

I wonder if there might be any way at a workaround by putting the additional "amarok --play" command (as cooks suggested) somewhere on the Exec line in the service menu (amarok_append.desktop).

I tried using a semicolon (Exec amarok --append %U --play; amarok --play) but that didn't work.

Is there a way to include two command lines for the Exec function in a ServiceMenu?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Unfortunately there isn't. What you can do instead however is create a shell script - and call that from the service menus. The below script should do the trick.
Code: Select all
#!/bin/bash
amarok --append "$1"
amarok --play


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
danniken
Registered Member
Posts
91
Karma
0
Thanks Cooks, that got me pretty close, but despite appending correctly and getting Amarok to play, it plays whatever song it was on before, instead of the song which was just appended. I do appreciate it though, as I now know how ot use a script on the Exec line.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Would it be acceptable to append just after the currently playing item? If so, try this instead:
Code: Select all
#!/bin/bash
amarok --queue "$1"
amarok --next

Skipping to the next track will hopefully trigger playback as well.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
danniken
Registered Member
Posts
91
Karma
0
Thanks cooks, that does start Amarok playing, but oddly. The first time this is invoked, it appends the intended song, but starts to play the song which was already in the Amarok playlist. After closing and stopping Amarok, and invoking the script again, it appends and begins to play the intended song.

This pattern is repeated; on each odd invocation, the other song plays, while on each even invocation, the intended song plays. I'm not sure why it is doing this, but it is kind of funny.

Fortunately this isn't a dealbreaker for me, so I am happy to wait for the new version to come out (although it is a curiosity).
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay. My guess is it is some form of playlist position issue, or something along those lines.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]