[mythtv-users] problems with livetv playback OS X Install

Craig Treleaven ctreleaven at cogeco.ca
Sun Jan 3 15:48:52 UTC 2016


> On Jan 2, 2016, at 7:39 PM, airdrummer <air_drummer at verizon.net> wrote:
> 
> forgot to replace macports vars, added stdout capture
> 
> (*  Applescript to run 'Unix' version of mythfronted
> 	For use with MacPorts install of Myth
> 	Author:  Craig Treleaven, ctreleaven at cogeco.ca
> 	Version: 0.27.0
> 	Modified: 2012May15
> 	          2012Nov20 -- handle 'thread not shut down error' on exit, add --quiet to prevent
> 	            console output from being returned to AppleScript, allow experimental AirPlay
> 	          2013Sep25 -- revert logserver stuff, remove AirPlay setting that is now unnecessary
> 
> 	2015mar26 -- make error dialog copyable  -- air_drummer at verizon.net
> 	2016jan02 -- add log capture, debug level, verbose level selects -- air_drummer at verizon.net
> 
> 	*)
> property MFEappPath : "/opt/dvr/bin/mythfrontend" -- "@PREFIX@/bin/mythfrontend"
> property MFElogArg : "--logpath /opt/dvr/var/log/mythtv.27/" -- "--logpath @MYTHTVLOGDIR@"
> -- property MFElogLevel : "info" -- single string
> -- property MFEverboseLevel : {"general"} -- a list, can be multiple strings
> 
> property lchoices : {"emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"}
> property vchoices : {"all", "none", "audio", "channel", "chanscan", "commflag", "database", "decode", "dsmcc", "dvbcam", "eit", "file", "frame", "general", "gpu", "gpuaudio", "gpuvideo", "gui", "idle", "jobqueue", "libav", "media", "mheg", "most", "network", "osd", "playback", "process", "record", "refcount", "rplxqueue", "schedule", "siparser", "socket", "system", "timestamp", "upnp", "vbi", "xmltv"}
> 
> set choice to choose from list lchoices with title ¬
> 	"set log level" with prompt ¬
> 	"choose 1" default items {"info"} ¬
> 	without multiple selections allowed
> if choice is false then ¬
> 	error number -128 -- cancel
> set MFElogLevel to contents of item 1 of choice
> 
> set choice to choose from list vchoices with title ¬
> 	"set verbose level" with prompt ¬
> 	"choose 1 or more" default items {"general"} ¬
> 	with multiple selections allowed
> if choice is false then ¬
> 	error number -128 -- cancel
> set MFEverboseLevel to choice
> 
> set CmdList to {MFEappPath, MFElogArg, "--loglevel " & MFElogLevel, "--verbose " & joinlist(MFEverboseLevel, ",")}
> set Cmd to (joinlist(CmdList, " "))
> 
> try
> 	set log to do shell script Cmd
> 	display dialog "mythfrontend log" default answer ((log) as string) buttons {"close"} default button 1
> 	
> on error the error_message number the error_number
> 	if the error_number is not 133 then
> 		set the error_text to error_number & " . " & the error_message
> 		display dialog "mythfrontend error:" default answer (error_text as string) buttons {"close"} default button 1
> 		return the error_text
> 	end if
> end try
> 
> -- -- -- -- -- -- -- --
> -- Handlers
> to joinlist(aList, delimiter)
> 	set retVal to ""
> 	set prevDelimiter to AppleScript's text item delimiters
> 	set AppleScript's text item delimiters to delimiter
> 	set retVal to aList as string
> 	set AppleScript's text item delimiters to prevDelimiter
> 	return retVal
> end joinlist
> _______________________________________________

I’m still not going to make those changes to the Applescript.  No one wants to see two or three dialog boxes every time they launch the frontend.  If you can make it so they appear ONLY if the user is holding down Shift or Option, I’ll consider it.

The backend does NOT need to be running for the frontend to create logs*.  I assume that your modified Applescript had the —logpath variable screwed up since it works for everyone else.

Craig
* In Myth 0.26, mythlogserver had to be running.  That’s different.  Thank God those days are gone.


More information about the mythtv-users mailing list