Bug 128967

Summary: KMplayer lacks a DCOP call to return the path/URL of the currently playing file
Product: [Unmaintained] kmplayer Reporter: Stephan Sokolow <kde_bugzilla_2>
Component: generalAssignee: Koos Vriezen <koos.vriezen>
Status: RESOLVED UNMAINTAINED    
Severity: wishlist    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Stephan Sokolow 2006-06-10 22:38:04 UTC
Version:           0.9.1a (using KDE KDE 3.5.2)
Installed from:    Compiled From Sources
Compiler:          gcc (GCC) 3.4.5 (Gentoo 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9) 
OS:                Linux

One integration feature I commonly use is to write plugins for chat clients which provide a "Send currently playing song/video to this person" option. However, as KMplayer lacks a DCOP call to get the path of the currently playing file, I cannot implement them for KMplayer. 

It shouldn't be too difficult, but I have no C++ experience or I'd include a patch for it.
Comment 1 Koos Vriezen 2006-06-11 13:13:30 UTC
You mean the current file independent if it's a playlist or not, or the actual link in the playlist?
Any preferences for the dcop function name?
Comment 2 Stephan Sokolow 2006-06-11 15:39:53 UTC
The currently playing file, after resolving any KIOSlaves which resolve to local paths. (I play a lot of media:/ stuff)

I don't have enough experience with DCOP to have an idea what would be appropriate but maybe something like currentURL()
Comment 3 Eike Hein 2006-10-04 19:16:29 UTC
There's definitely a need for a "now playing" DCOP API that at the very least returns the file name without the path, or ideally meta data (creator, artist, album, title and so on). Both Konversation and Kopete could use it for their "now playing" plugins. 
Comment 4 Edgar Ibsen 2006-11-11 03:00:41 UTC
I actually worked around this problem by using the window caption. The following is a line from a bash script of mine:

result=`dcop $kmplayerinstance kmplayer-mainwindow#1 caption | sed 's/^URL - //' | sed 's/ - KMPlayer//'`

To return the file name without the path simply do:

result=`dcop $kmplayerinstance kmplayer-mainwindow#1 caption | sed 's|^.*/||' | sed 's/ - KMPlayer//'
Comment 5 Christoph Cullmann 2025-06-09 21:04:56 UTC
This project is unfortunately no longer maintained.

If a new maintainer wants to step up and take care, the project is archived here:

https://invent.kde.org/multimedia/kmplayer

You can just clone it in your private namespace on invent.kde.org and if you have started to work on it and fixed/implemented something get it reviewed and the project unarchived.

Sorry for the inconveniences.