You are not logged in.

#1 2009-11-13 09:16:56

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

KDE 4: Open with Video Player (VLC) action [SOLVED]

Hi,

I tried the following (the default Dragon Player won't work, anyway big_smile ):

/usr/share/apps/solid/actions/vlc-opendvd.desktop:

[Desktop Entry]
X-KDE-Solid-Predicate=[[ StorageVolume.ignored == false AND OpticalDisc.availableContent == 'Data|VideoDvd' ] OR [ StorageVolume.ignored == false AND OpticalDisc.availableContent == 'Data|VideoDvd' ]]
Type=Service
Actions=open;

[Desktop Action open]
Name=Open with Video Player (VLC)

...

Exec=vlc
Icon=dragonplayer

This way it works, but I have to step through the VLC's Open Media->Disk dialog. There must be a way to skip it; I tried Exec=vlc --dvd (?) but it won't deliver.

Last edited by Llama (2009-11-13 17:05:15)

Offline

#2 2009-11-13 14:28:21

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: KDE 4: Open with Video Player (VLC) action [SOLVED]

This is from vlc --help:

URL syntax:
  [file://]filename              Plain media file
  http://ip:port/file            HTTP URL
  ftp://ip:port/file             FTP URL
  mms://ip:port/file             MMS URL
  screen://                      Screen capture
  [dvd://][device][@raw_device]  DVD device
  [vcd://][device]               VCD device
  [cdda://][device]              Audio CD device

It looks suggestive, but I can't figure what to do with it smile

Last edited by Llama (2009-11-13 14:29:29)

Offline

#3 2009-11-13 15:42:59

Bralkein
Member
Registered: 2004-10-26
Posts: 354

Re: KDE 4: Open with Video Player (VLC) action [SOLVED]

This should work:

[Desktop Entry]
X-KDE-Solid-Predicate=[[ StorageVolume.ignored == false AND OpticalDisc.availableContent == 'Data|VideoDvd' ] OR [ StorageVolume.ignored == false AND OpticalDisc.availableContent == 'Data|VideoDvd' ]]
Type=Service
Actions=open;

[Desktop Action open]
Name=Open with Video Player (VLC)
Exec=vlc dvd://%d
Icon=vlc

But I had to logout/login to make the action appear on the list. The dvd://%d bit will expand to dvd:///dev/sr0 for example, if /dev/sr0 is your DVD device file. If you have problems for some reason, it should work with only dvd:// since that will play your default DVD device. Also note the icon name to get a pretty VLC traffic cone smile

PS. Also note that the X-KDE-Solid-Predicate seems to be a tautology, since the two things being compared are the same. However, I removed one and it stopped working. How strange!

Last edited by Bralkein (2009-11-13 15:44:54)

Offline

#4 2009-11-13 17:02:25

Aedit
Member
Registered: 2009-10-29
Posts: 138

Re: KDE 4: Open with Video Player (VLC) action [SOLVED]

Bralkein wrote:

PS. Also note that the X-KDE-Solid-Predicate seems to be a tautology, since the two things being compared are the same. However, I removed one and it stopped working. How strange!

Try this:

[Desktop Entry]
X-KDE-Solid-Predicate=[ StorageVolume.ignored == false AND OpticalDisc.availableContent & 'Data|VideoDvd' ] 
Type=Service
Actions=open;

[Desktop Action open]
Name=Open with Video Player (VLC)
Exec=vlc dvd://%d
Icon=vlc

Offline

#5 2009-11-13 17:04:42

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: KDE 4: Open with Video Player (VLC) action [SOLVED]

Thanks!

Offline

Board footer

Powered by FluxBB