[mythtv-users] Switching between Mythtv and Amarok

Dave M G martin at autotelic.com
Sat Jun 14 12:41:38 UTC 2008


MythTV Users,

I have a dedicated Mythbuntu computer, with a Hauppauge PVR-150 card.

I'm trying to set it up to use Amarok as it's music player.

I've followed the instructions here as best I could:
http://acidzebra.blogspot.com/2007/07/integrating-mythtv-and-amarok_17.html

The main menu on my MythTV front end interface has an Amarok option, and 
when I select it, Amarok comes up.

But, after that, I have no control over Amarok. Further, LIRC seems to 
continue to send signals to the MythTV interface. The MythTV interface 
could be in any menu or have selected any option after I quit Amarok.

My main guess at this point is that my lirc file is not set up right, so 
that control is not properly switching between MythTV and Amarok.

Or maybe it's something else. I'm open to suggestions.

One additional note. On the web page I referenced, it says to put "begin 
mythtv" before all MythTV related controls, and "end mythtv" at the end 
of them. However, when I do that, the remote doesn't do anything at all. 
So right now I don't have those entries in my .lirc file.

Any help would be much appreciated.

I've included my .lirc file for reference.

- - lirc file begins - -

# Hauppauge PVR-150 Buttons



################

# irexec
# Executes commands to start programs that aren't already running

# Green Power button
# Turns on mythfrontend
begin
prog = irexec
button = Power
config = /home/media/.lirc/powerbutton.sh
end
# Green Power button
# Turns on mythfrontend
begin
prog = mythfrontend
button = Power
config = jump mainmenu
end
begin
flags = startup_mode
mode = mythtv
end
begin
prog = irexec
button = Music
repeat = 3
config = /usr/bin/amarok
end
begin
prog = irexec
button = Back-Exit
config = dcop amarok MainApplication-Interface quit
end

################

# MythTV

#Up Arrow
begin
prog = mythfrontend
button = Blue
config = jump mainmenu
end

#Up Arrow
begin
prog = mythtv
button = Up
config = Up
end

#Down Arrow
begin
prog = mythtv
button = Down
config = Down
end

#Left Arrow
begin
prog = mythtv
button = Left
config = Left
end

#Right Arrow
begin
prog = mythtv
button = Right
config = Right
end

#OK Button
begin
prog = mythtv
button = OK
config = Space
end

#Back/Exit
begin
prog = mythtv
button = Back/Exit
config = Esc
end

#Menu/i
begin
prog = mythtv
button = Menu/i
config = m
end

#Mute
begin
prog = mythtv
button = Mute
config = |
end

#Volume Up
begin
prog = mythtv
button = Vol+
config = ]
end

#Volume Down
begin
prog = mythtv
button = Vol-
config = [
end

#Channel Up
begin
prog = mythtv
button = Ch+
config = Up
end

#Channel Down
begin
prog = mythtv
button = Ch-
config = Down
end

#Rewind
begin
prog = mythtv
button = Rewind
config = j
end

#Fast Forward
begin
prog = mythtv
button = Forward
config = u
end

#Pause
begin
prog = mythtv
button = Pause
config = p
end

#1
begin
prog = mythtv
button = 1
config = 1
end

#2
begin
prog = mythtv
button = 2
config = 2
end
	
#3
begin
prog = mythtv
button = 3
config = 3
end
	
#4
begin
prog = mythtv
button = 4
config = 4
end

#5
begin
prog = mythtv
button = 5
config = 5
end

#6
begin
prog = mythtv
button = 6
config = 6
end

#7
begin
prog = mythtv
button = 7
config = 7
end

#8
begin
prog = mythtv
button = 8
config = 8
end

#9
begin
prog = mythtv
button = 9
config = 9
end

#0
begin
prog = mythtv
button = 0
config = 0
end

#*
begin
prog = mythtv
button = Asterix
config =
end

##
begin
prog = mythtv
button = #
config =
end


#######################

# Mplayer


#Mute
begin
prog = mplayer
button = Mute
config = m
end

#Volume Up
begin
prog = mplayer
button = Vol+
config = volume +10
end

#Volume Down
begin
prog = mplayer
button = Vol-
config = volume -10
end

#Back/Exit
begin
prog = mplayer
button = Back/Exit
config = quit
end

#Menu/i
begin
prog = mplayer
button = Menu/i
config = osd
end

#Stop
begin
prog = mplayer
button = Stop
config = quit
end

#Rewind
begin
prog = mplayer
button = Rewind
config = seek -10
end

#Fast Forward
begin
prog = mplayer
button = Forward
config = seek +30
end

#Play
begin
prog = mplayer
button = Play
config = seek +1
end

#Replay
begin
prog = mplayer
button = Replay/SkipBackward
config = seek -600
end

#Pause
begin
prog = mplayer
button = Pause

config = Pause
end

#Skip
begin
prog = mplayer
button = SkipForward
config = seek +600
end

###############

# configuration of amarok. special mode because of overlapping configs

begin
prog = irexec
button = PLAY
config = dcop amarok player play
end

begin
prog = irexec
button = PAUSE
config = dcop amarok player playPause
end

begin
prog = irexec
button = STOP
config = dcop amarok player stop
end

begin
prog = irexec
button = Volume-Down
config = dcop amarok player volumeDown
repeat = 2
end

begin
prog = irexec
button = Volume-UP
config = dcop amarok player volumeUp
repeat = 2
end

begin
prog = irexec
button = Forward
config = dcop amarok player seekRelative 10
repeat = 3
end

begin
prog = irexec
button = Rewind
config = dcop amarok player seekRelative -10
repeat = 3
end

begin
prog = irexec
button = Next
config = dcop amarok player next
end

begin
prog = irexec
button = Previous
config = dcop amarok player prev
end

begin
prog = irexec
button = Back-Exit
config = dcop amarok MainApplication-Interface quit
flags = mode
mode = mythtv
end

begin
prog = irexec
button = Mute
config = dcop amarok player mute
end

begin
prog = irexec
button = 1
config = dcop amarok player setRating 2
end

begin
prog = irexec
button = 2
config = dcop amarok player setRating 4
end

begin
prog = irexec
button = 3
config = dcop amarok player setRating 6
end

begin
prog = irexec
button = 4
config = dcop amarok player setRating 8
end

begin
prog = irexec
button = 5
config = dcop amarok player setRating 10
end

begin
prog = irexec
button = green
config = dcop amarok contextbrowser showLyrics
end

begin
prog = irexec
button = yellow
config = dcop amarok contextbrowser showWiki
end

begin
prog = irexec
button = red
config = dcop amarok contextbrowser showCurrentTrack
end

begin
prog = irexec
button = blue
config = dcop amarok playlist repopulate
end

begin
prog = irexec
button = Guide
config = dcop kmix Mixer0 setMasterVolume 60; prev_volume=`dcop amarok 
player getVolume`; dcop amarok player setVolume `expr $prev_volume / 3`; 
(echo 'this is '; dcop amarok player artist; echo ' playing the song '; 
dcop amarok player title; echo ' from thee '; dcop amarok player year; 
echo ' album '; dcop amarok player album) | text2wave -F 44100 -scale 3 
| aplay; dcop amarok player setVolume $prev_volume; dcop kmix Mixer0 
setMasterVolume 100
end

- - lirc file ends - -

-- 
Dave M G



More information about the mythtv-users mailing list