[mythtv-users] Mytharchive Addition

Paul Harrison mythtv at dsl.pipex.com
Fri Sep 15 20:11:19 UTC 2006

Roy Lofthouse wrote:
> You wont be forced to put them in the theme dir, as it will default 
> back to the original dirs if the script cant find them in the theme...
> The changes are:
> def getIntroPath():
>     """This is the folder where all intro files are located."""
>     return os.path.join(sharepath, "mytharchive", "intro")
> becomes:
> def getIntroPath(theme):
>     """This is the folder where all intro files are located."""
>     """Search theme path for intro first."""
>     if os.path.exists(os.path.join(sharepath, "mytharchive", "themes", 
> theme, "intro")):
>         return os.path.join(sharepath, "mytharchive", "themes", theme, 
> "intro")
>     if os.path.exists(os.path.join(sharepath, "mytharchive", "intro")):
>         return os.path.join(sharepath, "mytharchive", "intro")
> and calls to getIntroPath() become getIntroPath(themeName)
OK, that sound reasonable. It would be nice if looking up the intro 
worked in a similar way to how getThemeFile() works just to be 
consistent. Maybe update getThemeFile to also lookup intro's?

Paul H.

More information about the mythtv-users mailing list