Kodi Community Forum

Full Version: how i can clone an home category?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi guys!

i wanna clone an home category "tvshows" and make it double, but how i can do it?
i use the default skin Estuary ,the new section will be call "anime"
what i wanna create is a clone of tvshows but the contenent are not in the same folder of "tvshows", it means that i must manually add the source, not problem, but how i can do it?

using some topics in it forum i found a partial solution this code
 
Code:
    <!-- start anime -->
                        <item>
                            <label>Anime</label>
                            <onclick condition="Library.HasContent(tvshows) + Skin.HasSetting(home_no_categories_widget)">ActivateWindow(Videos,videodb://tvshows/,return)</onclick>
                            <onclick condition="Library.HasContent(tvshows) + !Skin.HasSetting(home_no_categories_widget)">ActivateWindow(Videos,videodb://tvshows/titles/,return)</onclick>
                            <onclick condition="!Library.HasContent(tvshows)">ActivateWindow(Videos,sources://video/,return)</onclick>
                            <property name="menu_id">$NUMBER[6000]</property>
                            <thumb>icons/sidemenu/tv.png</thumb>
                            <property name="id">tvshows</property>
                            <visible>!Skin.HasSetting(HomeMenuNoTVShowButton)</visible>
                        </item>
    <!-- end anime -->

is possible, using this code, manually add a new address for the source folder?

thank for reading
Depends on how you've added your anime content.

If it's only added as a source but not added to library then you can use sources://video/ style. For example if you have a source call anime added in videos then you can use:

sources://video/anime

If you have a anime node configured then you use a library:// style address that follows the node structure. For example if you have a node for anime under videos:

library://video/anime
Adding menu and accompanying  screen
how the menu and widget screen are linked
xml:

<item>
<label>$LOCALIZE[1]</label>
<onclick>ActivateWindow(Pictures)</onclick>
<property name="menu_id">$NUMBER[4000]</property>
<thumb>icons/sidemenu/pictures.png</thumb>
<property name="id">pictures</property>
<visible>!Skin.HasSetting(HomeMenuNoPicturesButton)</visible>
</item>
right screen
<control type="group" id="4000">
     <visible>String.IsEqual(Container(9000).ListItem.Property(id),pictures)</visible>
     <include content="Visible_Right_Delayed">
      <param name="id" value="pictures"/>
     </include>
     <control type="grouplist" id="4001">
      <include>WidgetGroupListCommon</include>
      <include content="WidgetListCategories" condition="!Skin.HasSetting(HomeMenuNoPicturesButton)">
       <param name="content_path" value="sources://pictures/"/>
       <param name="widget_header" value="$LOCALIZE[20094]"/>
       <param name="widget_target" value="pictures"/>
       <param name="list_id" value="4100"/>
       <param name="icon_height" value="110"/>
      </include>
     </control>
     
    </control>
<item> menu item tag
    <label>$LOCALIZE[1]</label> name of menu in this one it is = to pictures
    <property name="menu_id">$NUMBER[4000]</property> this is the number linked to the groups
    <control type="group" id="4000"> <control type="grouplist" id="4001"> <param name="list_id" value="4100"/>
    <onclick>ActivateWindow(Pictures)</onclick> ActivateWindow or plugin or node
    <thumb>icons/sidemenu/pictures.png</thumb> image thumb icon
    <property name="id">pictures</property> is the same
<visible>String.IsEqual(Container(9000).ListItem.Property(id),pictures)</visible>
    and <param name="id" value="pictures"/>
    <visible>!Skin.HasSetting(HomeMenuNoPicturesButton)</visible> not needed unless you are going to hide it
    </item> close item tag
    missing from pictures but needed for widget rows is <pagecontrol>menu_id010</pagecontrol> and it uses the same menu_id 010
    and and is placed after  <include>WidgetGroupListCommon</include> and after widget rows is <include content="WidgetScrollbar" condition="Skin.HasSetting(touchmode)">
      <param name="scrollbar_id" value="menu_id010"/>
     </include>
Example of how this works kids zone edit home.xml
xml:

 <item>
               <label>kids zone</label>
               <onclick>ActivateWindow(10025,&quot;plugin://plugin.video.youtube/kodion/search/list/&quot;,return)</onclick>
              <property name="menu_id">$NUMBER[30000]</property>
              <thumb>icons/sidemenu/kids.png</thumb>
             <property name="id">kidszone</property>
             </item>


xml:
    
 <control type="group" id="21000"> add before <control type="group" id="30000">
     <visible>String.IsEqual(Container(9000).ListItem.Property(id),kidszone)</visible>
     <include content="Visible_Right_Delayed">
      <param name="id" value="kidszone"/>
     </include>
     <control type="grouplist" id="30001">
      <include>WidgetGroupListCommon</include>
      <pagecontrol>30010</pagecontrol>
      Widgets can be added from a node (library://video/movies/) see kodi node library examples https://forum.kodi.tv/showthread.php?tid=344482
      
      <include content="WidgetListPoster" condition="Library.HasContent(movies)">
       <param name="content_path" value="special://skin/playlists/unwatched_movies.xsp"/>
       <param name="widget_header" value="$LOCALIZE[31007]"/>
       <param name="widget_target" value="videos"/>
       <param name="list_id" value="30300"/>
      </include>
      <include content="WidgetListPoster" condition="Library.HasContent(movies)">
       <param name="content_path" value="special://skin/playlists/random_movies.xsp"/>
       <param name="widget_header" value="$LOCALIZE[31006]"/>
       <param name="widget_target" value="videos"/>
       <param name="list_id" value="30400"/>
      </include>
      </control>
      <include content="WidgetScrollbar" condition="Skin.HasSetting(touchmode)">
      <param name="scrollbar_id" value="5010"/>
     </include>
     </control>

content screen


the <param name="list_id" value="30300"/> of the next widget needs to be higher then the one before <param name="list_id" value="30310"/>
@the_other_guy  and @jjd-uk thank to both of you, but this is a job that goes beyond my knowledge, i will add my animated elements to the "tv show", is the esiest action to do

anyway i would like use this post to understand how this part of kodi works, please can you tell me which xml file generates the portion of screen call "A zone"?

Image

this is the original part of home.xml that creates the category "tv show", can you tell wich part of the code recall the "A zone" xml file?
sorry the second post is because i didn't add the source code for tv show and i cannot edit my sent message

Code:
                        <item>
                            <label>$LOCALIZE[20343]</label>
                            <onclick condition="Library.HasContent(tvshows) + Skin.HasSetting(home_no_categories_widget)">ActivateWindow(Videos,videodb://tvshows/,return)</onclick>
                            <onclick condition="Library.HasContent(tvshows) + !Skin.HasSetting(home_no_categories_widget)">ActivateWindow(Videos,videodb://tvshows/titles/,return)</onclick>
                            <onclick condition="!Library.HasContent(tvshows)">ActivateWindow(Videos,sources://video/,return)</onclick>
                            <property name="menu_id">$NUMBER[6000]</property>
                            <thumb>icons/sidemenu/tv.png</thumb>
                            <property name="id">tvshows</property>
                            <visible>!Skin.HasSetting(HomeMenuNoTVShowButton)</visible>
                        </item>

if a mod or a staff member wanna merge the two post thank
edit home.xml
azone is made up of
        <include content="WidgetListPoster" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="videodb://inprogresstvshows"/>
                            <param name="sortby" value="lastplayed"/>
                            <param name="sortorder" value="descending"/>
                            <param name="widget_header" value="$LOCALIZE[626]"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="26100"/>
                        </include>

to link to a playlist 

    <include content="WidgetListthumb" condition="Library.HasContent(movies) + !Skin.HasSetting(hide_inprogressmovies)">
                            <param name="content_path" value="special://skin/playlists/Genre_Documentary.xsp"/>
                            <param name="widget_header" value="Documentary"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="55111"/>
                        </include>
you make a copy of tv tvshows    menu  <property name="id">tvshows</property> (id),tvshows) value="tvshows"/> new name 
id="6000 grouplist" id="6001  <property name="menu_id">$NUMBER[6000]</property> new number
xml:

    <control type="group" id="26000">
                    <visible>String.IsEqual(Container(9000).ListItem.Property(id),26tvshows)</visible>
                    <include content="Visible_Right_Delayed">
                        <param name="id" value="26tvshows"/>
                    </include>
    <control type="grouplist" id="26001">
                        <include>WidgetGroupListCommon</include>
                        <pagecontrol>26010</pagecontrol>
                        <include content="WidgetListCategories" condition="Library.HasContent(tvshows) + !Skin.HasSetting(home_no_categories_widget)">
                            <param name="content_path" value="library://video/tvshows/"/>
                            <param name="additional_tvshow_items" value="true"/>
                            <param name="widget_header" value="$LOCALIZE[31148]"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="26900"/>
                        </include>
                        <include content="WidgetListPoster" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="videodb://inprogresstvshows"/>
                            <param name="sortby" value="lastplayed"/>
                            <param name="sortorder" value="descending"/>
                            <param name="widget_header" value="$LOCALIZE[626]"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="26100"/>
                        </include>
                        <include content="WidgetListEpisodes" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/recent_unwatched_episodes.xsp"/>
                            <param name="widget_header" value="$LOCALIZE[20387]"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="26200"/>
                        </include>
                        <include content="WidgetListPoster" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/unwatched_tvshows.xsp"/>
                            <param name="widget_header" value="$LOCALIZE[31122]"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="26300"/>
                        </include>
                        <include content="WidgetListCategories" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="videodb://tvshows/genres/"/>
                            <param name="widget_header" value="$LOCALIZE[135]"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="26400"/>
                            <param name="icon" value="$VAR[WidgetGenreIconVar]"/>
                            <param name="icon_height" value="70"/>
                        </include>
                        <include content="WidgetListCategories" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="videodb://tvshows/studios/"/>
                            <param name="widget_header" value="$LOCALIZE[20388]"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="26500"/>
                            <param name="icon" value="$VAR[WidgetStudioIconVar]"/>
                            <param name="icon_height" value="70"/>
                        </include>
                    </control>
                    <include content="ImageWidget" condition="!Library.HasContent(tvshows)">
                        <param name="text_label" value="$LOCALIZE[31104]" />
                        <param name="button_label" value="$LOCALIZE[31110]" />
                        <param name="button_onclick" value="ActivateWindow(videos,files,return)"/>
                        <param name="button_id" value="26400"/>
                        <param name="button2_onclick" value="Skin.SetBool(HomeMenuNoTVShowButton)"/>
                    </include>
                    <include content="WidgetScrollbar" condition="Skin.HasSetting(touchmode)">
                        <param name="scrollbar_id" value="26010"/>
                    </include>
                </control>


xml:

    <item>
                            <label>26tvshows$LOCALIZE[20343]</label>
                            <onclick condition="Library.HasContent(tvshows) + Skin.HasSetting(home_no_categories_widget)">ActivateWindow(Videos,videodb://tvshows/,return)</onclick>
                            <onclick condition="Library.HasContent(tvshows) + !Skin.HasSetting(home_no_categories_widget)">ActivateWindow(Videos,videodb://tvshows/titles/,return)</onclick>
                            <onclick condition="!Library.HasContent(tvshows)">ActivateWindow(Videos,sources://video/,return)</onclick>
                            <property name="menu_id">$NUMBER[26000]</property>
                            <thumb>icons/sidemenu/tv.png</thumb>
                            <property name="id">26tvshows</property>
                            <visible>!Skin.HasSetting(HomeMenuNoTVShowButton)</visible>
                        </item>


@the_other_guy  , the first pic in that old node editor guide , top right , at the top of the list it says "widgets >" , I assume that path has to be followed to add a node as a widget, but in my "library node editor in default estuary , the "widget >" option is missing , could you post an example where you have set a path to a node and used it as a widget , say in movies ?
I was trying to test this out using a path to "popular" movies from the TMDB Helper addon , but I can't get the text for path correct with no example to follow, thanks.
To be clear , I was trying to add the popular movies section of TMDB as a row of poster widgets , not as a single category widget . Playlists I have no problem creating and typing the path , nodes I just have no clue.
Plugin as a widget use plugin://
plugin://plugin.video.imdb.trailers

to find full path to the subpages of a plugin add to favourites and copy from favourites
to activate from menu 
ActivateWindow(10025,&quot;plugin://plugin.video.imdb.trailers&quot;,return)
Thanks , am familiar with the "favourites" method from your previous videos.
It's the  interpretation of the "PATH" that I can't get right. 
Using Library Node Editor , a plugin that I have never been able to figure out.
Looking at your examples.
I did it this way.
Created a parent node , named mytmdb
then a new node named tmdb-popular
then went into plugins and pointed the new node to TMDB plugin and popular movies.
Then to test it , I replaced the "content_path"line below in the first block pic below in Movies Group 5001 in Home.xml .
<include content="WidgetListPoster" condition="Library.HasContent(movies) + Skin.HasSetting(home_screen_poster_size)">
                            <param name="content_path" value="special://skin/playlists/inprogress_movies.xsp"/>
                            <param name="widget_header" value="$LOCALIZE[31010]"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="5100"/>
                        </include>
In the above , I replaced :  
                 <param name="content_path" value="special://skin/playlists/inprogress_movies.xsp"/>
with :
                <param name="content_path" value="library://video/mytmdb/tmdb-popular/plugin.video.themoviedb.helper/?info=popular&tmdb_type=movie"/>
 that doesn't produce a widget , so my "Path" is clearly wrong ?
using the line from "favourites"
                <param name="content_path" value="library://video/mytmdb/tmdb-popular/plugin://plugin.video.themoviedb.helper/info=popular&tmdb_type=movie&quot;,return"/>
wrong again.
@ontap 
Try this scenario using favourite path:-
plugin://plugin.video.themoviedb.helper/info=popular&tmdb_type=movie&quot;,return
I've used this same kind of structure before with success.
Thanks , Dumyat. I think that would work to set popular movies as a main menu item , but it doesn't work when trying to add it as a widget.
Edit : spoke too  soon , getting somewhere doing it your way , it displays the categories section of TMDB as a widget .. Need to do a bit more to get the popular movies sub section to show , but thanks.
Doing it your way Dumyat,
<param name="content_path" value="plugin://plugin.video.themoviedb.helper/info=popular&tmdb_type=movie&quot;,return"/>
it will at least give me a widget row ,as in pic below, but it won't go as far as showing the "popular" movies section. But of course that way is dispensing with "library node editor " which is what I am trying to learn how to use. If I add your code to the node path ,  I get nothing.
<param name="content_path" value="library://video/mytmdb/tmdb-popular/plugin://plugin.video.themoviedb.helper/info=popular&tmdb_type=movie&quot;,return"/>Image
JUST REMEMBER THAT IS NOT A NODE
they are menu items in includes home
xml:

    <include name="MovieSubmenuItems">
        <content>
            <item>
                <label>$LOCALIZE[31146]</label>
                <onclick>ActivateWindow(videos,plugin://script.embuary.info/movie/now_playing,return)</onclick>
                <thumb>DefaultStudios.png</thumb>
                <visible>System.AddonIsEnabled(script.embuary.info)</visible>
            </item>
            <item>
                <label>$LOCALIZE[31147]</label>
                <onclick>ActivateWindow(videos,plugin://script.embuary.info/movie/upcoming,return)</onclick>
                <thumb>DefaultYear.png</thumb>
                <visible>System.AddonIsEnabled(script.embuary.info)</visible>
            </item>
        </content>
https://github.com/sualfred/script.embuary.helper/wiki
If you want the category nodes on the screen as well, you could try something similar to this, which is what I've used previously for custom node categories for Netflix:-
xml:
<include content="WidgetListCategories" condition="System.HasAddon(plugin.video.themoviedb.helper) + Library.HasContent(movies) + !Skin.HasSetting(home_no_categories_widget">
                            <param name="content_path" value="library://video/TMDB/"/>
                            <param name="widget_header" value="$LOCALIZE[31148]"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="16501"/>
                        </include>
Try replacing the default movie categories code on the Home.xml with the above and see if you able to select nodes from the TMDB Helper.
Any new nodes you create will be written to library://video/TMDB/ in the userdata folder.
Pages: 1 2