Bug 128967 - KMplayer lacks a DCOP call to return the path/URL of the currently playing file
Summary: KMplayer lacks a DCOP call to return the path/URL of the currently playing file
Status: REPORTED
Alias: None
Product: kmplayer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Koos Vriezen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-10 22:38 UTC by Stephan Sokolow
Modified: 2006-11-11 03:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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//'