Embuary to TMDB Helper conversion



New thread split off from TMDB helper thread as this will probably turn into a teaching moment for me with some help from Mike….. 

So you mentioned DialogVideoInfo.xml does it all, I can kind get behind the mentality of why, but when I look at the code there, it is baron and clearly heavily embuary script dependant, and following the minimal example, I can see this is going to be a not so easy conversion unless there is something I’m missing.

Here is what I see at the .xml:

xml:


<?xml version="1.0" encoding="utf-8"?>
<window>
    <defaultcontrol>9000</defaultcontrol>
    <onload>SetFocus(9000,0)</onload>
    <onload condition="System.AddonIsEnabled(script.embuary.helper) + Skin.HasSetting(BlurEnabled) + !String.IsEqual(ListItem.DBType,musicvideo) + Skin.HasSetting(VideoBlurEnabled)]">RunScript(script.embuary.helper,action=blurimg,file=$ESCINFO[ListItem.Art(thumb)],prop=blurthumb,radius=2)</onload>
    <onload condition="System.AddonIsEnabled(script.embuary.helper) + Skin.HasSetting(BlurEnabled) + String.IsEqual(ListItem.DBType,musicvideo) + Skin.HasSetting(MusicBlurEnabled)]">RunScript(script.embuary.helper,action=blurimg,file=$ESCINFO[ListItem.Art(thumb)],prop=blurthumb,radius=2)</onload>
    <onload condition="System.AddonIsEnabled(script.embuary.helper) + String.IsEqual(ListItem.DBTYPE,movie)">RunScript(script.embuary.helper,action=split,value="$ESCINFO[ListItem.Writer]",separator="" / "",prop=Writer)</onload>
    <onload condition="System.AddonIsEnabled(script.embuary.helper)">RunScript(script.embuary.helper,action=resetposition,container=1010||1020||1040||1050||1060||1070||1080||1090||9002)</onload>
    <onload condition="System.AddonIsEnabled(script.embuary.helper) + !String.IsEqual(ListItem.DBTYPE,musicvideo)">RunScript(script.embuary.helper,action=encode,string=$INFO[ListItem.Title],prop=TitleEncoded)</onload>
    <onload condition="System.AddonIsEnabled(script.embuary.helper) + !String.IsEqual(ListItem.DBTYPE,musicvideo)">RunScript(script.embuary.helper,action=encode,string=$INFO[ListItem.TVShowTitle],prop=TVShowTitleEncoded)</onload>
    <controls>
        <include content="DialogInfoCommon">
            <param name="blur">Skin.HasSetting(VideoBlurEnabled)</param>
            <param name="art">$VAR[PosterVar]</param>
        </include>
        <control type="group">
            <visible>!Window.IsVisible(script-embuary-person.xml) + !Window.IsVisible(script-embuary-video.xml)</visible>
            <include>AnimationInfoDialog</include>
            <include condition="!String.IsEqual(ListItem.DBType,musicvideo)">DialogVideoInfo</include>
            <include condition="String.IsEqual(ListItem.DBType,musicvideo)">DialogMusicInfo</include>
        </control>
    </controls>
</window>