Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
enqeue mp3s in xmms from kde menu
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
xkalibur
n00b
n00b


Joined: 21 Jul 2002
Posts: 25

PostPosted: Sat Mar 29, 2003 8:13 pm    Post subject: enqeue mp3s in xmms from kde menu Reply with quote

want to right click on your mp3s and select "Enqeue in Xmms" under KDE ?
use kde service menu, here is how:

create file
/home/username/.kde/share/apps/konqueror/servicemenus/enqeuexmms.desktop
or
/usr/kde/3.1/share/apps/konqueror/servicemenus/enqeuexmms.desktop

containing:

[Desktop Entry]
ServiceTypes=audio/x-mpegurl,audio/x-mp3,application/x-ogg
Actions=enqeueInXmms

[Desktop Action enqeueInXmms]
Name=Enqeue in Xmms
Icon=xmms
Exec=xmms -e %U

see example
http://bruceyoung.tripod.com/pics/snapshot.html

sources:
http://developer.kde.org/documentation/tutorials/dot/servicemenus.html

link


EDIT: Added url tags around long link for word wrapping. -- pjp
Back to top
View user's profile Send private message
S_aIN_t
Guru
Guru


Joined: 11 May 2002
Posts: 488
Location: Ottawa

PostPosted: Sat Mar 29, 2003 11:44 pm    Post subject: Reply with quote

that is pretty cool. thanks.
_________________
"That which is overdesigned, too highly
specific, anticipates outcome; the anicipation of
outcome guatantees, if not failure, the
absence of grace."
- William Gibson, "All Tomorrow's Parties"
----
http://petro.tanreisoftware.com
Back to top
View user's profile Send private message
Uranus
Guru
Guru


Joined: 07 May 2002
Posts: 438
Location: Portugal, Braga

PostPosted: Sun Mar 30, 2003 2:27 am    Post subject: Reply with quote

cool... since I use gnome I created the file -> "/home/uranus/.gnome2/nautilus-scripts/Enqueue in xmms"

it's contents are:
Code:
xmms -e $*

now it'll show up under the scripts menu when you right-click an icon

:) supports multiple files :)
Back to top
View user's profile Send private message
krivi
n00b
n00b


Joined: 29 Jul 2003
Posts: 6
Location: Odense, Denmark

PostPosted: Thu Jul 31, 2003 9:19 pm    Post subject: Enqueue in xmms... Reply with quote

Hi,

I did it this way:

My ~/.kde3.1/share/applnk/Multimedia/xmms.desktop says:

[Desktop Entry]
BinaryPattern=
Comment=
Encoding=UTF-8
Exec=xmms --enqueue %U # <--- added "enqueue" here!!
GenericName=Multimedia Player
Icon=xmms
MimeType=audio/x-mp3;audio/x-mod;audio/x-wav;audio/x-mpegurl;audio/x-scpls;Appli
cation
Name=XMMS
Path=
ServiceTypes=
SwallowExec=
SwallowTitle=
Terminal=false
TerminalOptions=
Type=Application
X-DCOP-ServiceType=None
X-KDE-StartupNotify=false
X-KDE-SubstituteUID=false
X-KDE-Username=

Only "trouble" now is that when I click on an xmms file it doesn't play automatically, I have to press "Play". But it works.

Jens
_________________
Regards/Hilsen
Jens Villadsen
Odense, Denmark
Back to top
View user's profile Send private message
neon
l33t
l33t


Joined: 04 Aug 2003
Posts: 759
Location: Catania, Italy, Europe

PostPosted: Mon Aug 04, 2003 4:17 pm    Post subject: Reply with quote

I've made some corrections to the gnome script... now it won't add the entire dir but only selected files.
Code:

#! /bin/bash

quoted=$(echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | awk 'BEGIN {
FS = "\n" } { printf "\"%s\" ", $1 }' | sed -e s#\"\"##)
eval "xmms -e $quoted"


hope it helps

I'm tring to port it in python, but i don't know that language... :(

p.s.: sorry for bad english...
Back to top
View user's profile Send private message
neon
l33t
l33t


Joined: 04 Aug 2003
Posts: 759
Location: Catania, Italy, Europe

PostPosted: Tue Aug 05, 2003 12:31 pm    Post subject: Reply with quote

learned :mrgreen:
Code:

#! /usr/bin/env python

import os

files = ""
result = os.environ['NAUTILUS_SCRIPT_SELECTED_FILE_PATHS'].split('\n')

for i in range(0,len(result)-1):
   files = files + " \"" + result[i] + "\""

os.system("xmms -e" + files)
Back to top
View user's profile Send private message
ntd
n00b
n00b


Joined: 10 Jul 2003
Posts: 5

PostPosted: Sat Aug 16, 2003 6:20 pm    Post subject: Re: Enqueue in xmms... Reply with quote

krivi wrote:
Only "trouble" now is that when I click on an xmms file it doesn't play automatically, I have to press "Play". But it works.

Good tip xkalibur.
If you add in a '-p' option in your xmms command it will play the current list.
Back to top
View user's profile Send private message
VisualPhoenix
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2002
Posts: 135
Location: (CT v NJ)

PostPosted: Fri Sep 05, 2003 5:22 pm    Post subject: Reply with quote

is there a way to enqueue a whole folder?
Back to top
View user's profile Send private message
MaD-DaRiUs
n00b
n00b


Joined: 21 Aug 2002
Posts: 46
Location: BC, Canada

PostPosted: Sun Sep 07, 2003 8:18 pm    Post subject: Reply with quote

VisualPhoenix wrote:
is there a way to enqueue a whole folder?


Yes there is actually, if you add "inode/directory" to the service types line it will give you this option on folders,
so mine looks like this.
Code:
ServiceTypes=audio/x-mpegurl,audio/x-mp3,application/x-ogg,inode/directory

_________________
Required Reading list.
http://www.catb.org/~esr/faqs/smart-questions.html
http://www-106.ibm.com/developerworks/linux/library/l-faq/index.html
http://wiktionary.org
Back to top
View user's profile Send private message
b0fh
Guru
Guru


Joined: 16 Jun 2003
Posts: 426

PostPosted: Sat Feb 14, 2004 4:48 pm    Post subject: Reply with quote

This doesn't work for me in kde 3.2... Any fix?
Back to top
View user's profile Send private message
MaD-DaRiUs
n00b
n00b


Joined: 21 Aug 2002
Posts: 46
Location: BC, Canada

PostPosted: Thu Feb 26, 2004 5:59 am    Post subject: Reply with quote

Still works great for me with this in $HOME/.kde/share/apps/konqueror/servicemenus/enqueuexmms.desktop

Code:
[Desktop Entry]
 ServiceTypes=audio/x-mpegurl,audio/x-mp3,application/x-ogg,inode/directory
 Actions=enqeueInXmms

 [Desktop Action enqeueInXmms]
 Name=Enqeue in Xmms
 Icon=xmms
 Exec=xmms -e %U


and this one i threw together just because
playinxmms.desktop
Code:
[Desktop Entry]
 ServiceTypes=audio/x-mpegurl,audio/x-mp3,application/x-ogg,inode/directory
 Actions=playInXmms

 [Desktop Action playInXmms]
 Name=Play in Xmms
 Icon=xmms
 Exec=xmms %U

_________________
Required Reading list.
http://www.catb.org/~esr/faqs/smart-questions.html
http://www-106.ibm.com/developerworks/linux/library/l-faq/index.html
http://wiktionary.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum