Two directory item questions
#1
1) Can I change a directory item page's "parent" page?

Say I have two mode pages, and I have them to link to each other. Now I can navigate use the link correctly. However, when I click the back (the ".." at the top), the behavior is not what I want. It will go through all the history pages, but I want the back button to go to a specific page.

Say.

MODE 0 page: # the "ROOT"
addDirectoryItem(link="mode1 page")

MODE 1 # View type 1
addDirectoryItem(link="mode2 start page")
addDirectoryItem(link="mode1 item1")
addDirectoryItem(link="mode1 item2")

MODE 2 # View type 2
addDirectoryItem(link="mode1 start page")
addDirectoryItem(link="mode2 item1")
addDirectoryItem(link="mode2 item2")

Can I make it so that in MODE1 and MODE2 page, when user clicks "..", it will go to MODE0?

2) Can I add a directory item with a null action?

I wan to put some separator between the directory items, and want nothing to happen if user clicks. What url shall I put for that item?

My use case:
# category1 # nothing shall happen if clicked
video1
video2
# category2 # nothing shall happen if clicked
video3
Reply
#2
MODE 0 page: # the "ROOT"
addDirectoryItem(link="mode1 page")

MODE 1 # View type 1
addDirectoryItem(link="mode2 start page")
addDirectoryItem(link="mode1 item1")
addDirectoryItem(name= MAIN link="mode0")<----------i.e go back to main page

MODE 2 # View type 2
addDirectoryItem(link="mode1 start page")
addDirectoryItem(link="mode2 item1")
addDirectoryItem(link="mode2 item2")
addDirectoryItem(name=MAIN link="mode0")<----------i.e go back to main page
Reply
#3
Yeah, I can explicitly add a link to MODE0. But is it possible to make the ".." link (the very top item in a directory item list) also goes to my specified page?

Currently, the ".." 's behavior will be undesired to user. It will go back whatever the user's history modes were, and finally, it will show MODE0.

Just check the forum to see if there is supported way to do that. If not, I will just have to let the users to learn the ".." behavior - and maybe decide not to use that button.

(2013-01-11, 17:01)mikey1234 Wrote: MODE 0 page: # the "ROOT"
addDirectoryItem(link="mode1 page")

MODE 1 # View type 1
addDirectoryItem(link="mode2 start page")
addDirectoryItem(link="mode1 item1")
addDirectoryItem(name= MAIN link="mode0")<----------i.e go back to main page

MODE 2 # View type 2
addDirectoryItem(link="mode1 start page")
addDirectoryItem(link="mode2 item1")
addDirectoryItem(link="mode2 item2")
addDirectoryItem(name=MAIN link="mode0")<----------i.e go back to main page

Reply
#4
If I understand you correctly, then you want to set the updateListing param to True in your call to xbmcplugin.endOfDirectory() when displaying mode 1 and mode 2. This will prevent these views from being added to the history, so when you click ".." you will go back to the addon root.

See http://mirrors.xbmc.org/docs/python-docs...fDirectory
Reply
#5
Yeah updateListing makes it going back to the addon root. That's one level above my original thought (I wanted to go MODE0), but it's close enough.

Is there a solution to question#2? Can I add a directory item with a null action? i.e., when user clicks a ListItem, nothing shall happen.

I tried to put an empty link there. But sometimes, there will be a waring box saying one video is not played correctly.

(2013-01-11, 23:22)jbel Wrote: If I understand you correctly, then you want to set the updateListing param to True in your call to xbmcplugin.endOfDirectory() when displaying mode 1 and mode 2. This will prevent these views from being added to the history, so when you click ".." you will go back to the addon root.

See http://mirrors.xbmc.org/docs/python-docs...fDirectory

Reply

Logout Mark Read Team Forum Stats Members Help
Two directory item questions0