How to elegantly switch between kodi and eyetv?
#1
Question 
Hi

Using remote buddy and the following applescript I can switch between kodi (actually xbmc as I'm still on 13.2) and eyetv:

Code:
tell application "System Events"
    set openWindow to (get name of processes whose frontmost is true) as string
end tell

if openWindow is equal to "XBMC" then
    
    tell application "XBMC" to quit
    tell application "EyeTV" to activate
    tell application "System Events"
        tell process "EyeTV"
            keystroke "o" using command down
            delay 1
            keystroke "0" using command down
        end tell
    end tell
    
else
    
    tell application "System Events"
        tell process "EyeTV"
            keystroke "w" using command down
        end tell
    end tell
    tell application "XBMC" to activate
    tell application "System Events" to set frontmost of process "XBMC" to true
    
end if

so... that kind of works, but it doesn't react very snappy - for some reason I often have to press the remote twice and visually it's a bit ugly. xvmc closes revealing the desktop and eyetv opens the TV window and later maximizes it. If I have eyetv's tv window open while in xbmc, xbmc is very laggy/slow with stuttering playback, so that's why I'm closing that window when going from eyetv to xbmc.

Is there anyway I can make the switch more pretty and fast? I was thinking something like

1) press the button
2) immediate feedback to confirm that the button was pressed (e.g. in form a spinning ball, or a fullscreen splash or just that the screen goes black)
3) the tv channel is not shown until eyetv is ready and playing.

I'm on a 2012 Mac Mini, 2.5 GHz i5 and 4 GB ram.

Any ideas?
Reply
#2
Found a way my self that seems to work:

https://forums.plex.tv/index.php/topic/1...and-eyetv/

just replace plex with xbmc in the code ;-) I assigned the two bits of code to the same button but in separate behaviors and remote buddy will fire of the relevant bit when I press the button.

I did clean up the code a bit. This part seems a bit redundant:

Code:
if application "EyeTV" is running then
    tell application "EyeTV"
        activate
        play
        enter full screen
    end tell
end if

if application "EyeTV" is not running then
    tell application "EyeTV"
        activate
    end tell
end if

so I replaced it with this:

Code:
tell application "EyeTV"
    activate
    play
    enter full screen
end tell

this works very snappy :-)

Only issue is that upon re-activating eyetv (activate, play, enter full screen) it seems to pick up as time-shifted tv rather than live at the current channel. I'll work on that tomorrow, but I guess sending a cmd+L to eyetv using the script will work.
Reply
#3
I use this and don't see much difference between yours but I don't have the problem you have. Maybe its a setting within Eye TV. You could include a "Right arrow shortcut" after activating it.

Code:
if application "EyeTV" is running then
    tell application "EyeTV"
        activate
        --tell application "System Events"
        --    keystroke "o" using command down
        play
        enter full screen
    end tell
else
    tell application "EyeTV"
        activate
        delay 5
        play
        enter full screen
    end tell
end if
Macmini Server 2011 i7 Quad Core, OS 10.8.2, Amp Onkyo TX-SR308 USB WD drives 3x2TB TV Samsung Plasma 720p EyeTV Integration
There are only 10 kinds of people in this world, those who understand binary, and those who don't.



Reply
#4
I'm a totally newbie on Mac. Just purchased a Mac mini with an apple remote and transitioned from windows 7 media browser to kodi and eyetv software.

Can someone post specific and detail instructions on what I have to do to be able to use eyetv and kodi from the remote and switch back and forth with the remote?

Thank you very much for the help
Image
Reply

Logout Mark Read Team Forum Stats Members Help
How to elegantly switch between kodi and eyetv?0