How can I make a Movie List?
#1
I recently started working on a Movie Add-on for XBMC.
I was thinking of making some kind of list of movies where you can search for a movie.

With the following code I managed to display a list:

python:

...

menu = list()

for id, movie in movies.iteritems():
  listitem = xbmcgui.ListItem()
  local = movie.local[lang]
  listitem.setLabel(local.name)
  listitem.setLabel2(local.description)
  listitem.setArt({"poster": local.poster, "fanart": local.fanart})
  menu.append(listitem)

xbmcgui.Dialog().select("Movies", menu)

The list ends up looking like this:

Image

As you can see, the poster, description (Label2) as well as the fanart are not displayed.
Sadly, I have found nothing about lists or how to properly "design" them. But xbmcgui.Dialog().select(string, list) also isn't really an option.

So you get an idea what I want, here is an example: (Taken from https://kodi.wiki/view/Artwork_types, 4.1 Movies)

Image

What should I do so my Movie List would look like this? What do I have to change/add?

Thanks in advance! 
Reply
#2
I am not quite sure what you are after. But you did point me to section 4.1 in the wiki page with all the screenshots.

Which list are you after? You don't need to design addons to get what is in those images, you just need to change skins and find a skin that suits you. Do you know how to change skins? (I guess you do if you are looking at skinning code.)
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
(2021-03-14, 00:50)Karellen Wrote: I am not quite sure what you are after. But you did point me to section 4.1 in the wiki page with all the screenshots.

Which list are you after? You don't need to design addons to get what is in those images, you just need to change skins and find a skin that suits you. Do you know how to change skins? (I guess you do if you are looking at skinning code.)

I'm not sure if I understood it correctly, but I don't want to write a skin but make my list look like in the second picture.
 I am looking for a function like
python:
xbmcgui.selectStyle("movie")
Reply
#4
(2021-03-14, 01:19)-Leocat Wrote: I don't want to write a skin but make my list look like in the second picture.
Ok, so you want the "Shift" view in the default Estuary skin.

Enter your movies list
Pull out the Sideblade menu... https://kodi.wiki/view/Basic_controls#Sideblade_Menu
The first option "Viewtype", change that to "Shift"

Is that what you are after?
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#5
(2021-03-14, 01:38)Karellen Wrote:
(2021-03-14, 01:19)-Leocat Wrote: I don't want to write a skin but make my list look like in the second picture.
Ok, so you want the "Shift" view in the default Estuary skin.

Enter your movies list
Pull out the Sideblade menu... https://kodi.wiki/view/Basic_controls#Sideblade_Menu
The first option "Viewtype", change that to "Shift"

Is that what you are after?

No. I don't want to write a skin and I don't want to just change the view. I want to write my own add-on.

And in this add-on, I want to have a list of movies. I have already achieved this with the code mentioned above.

But, the list I made doesn't look like I wanted it to. So I'm looking for a way to display my list of xbmcgui.ListItem() like a movie list from the second screenshot. (By programming, not by settings and not by skins)
Reply
#6
(2021-03-14, 10:53)-Leocat Wrote:
(2021-03-14, 01:38)Karellen Wrote:
(2021-03-14, 01:19)-Leocat Wrote: I don't want to write a skin but make my list look like in the second picture.
Ok, so you want the "Shift" view in the default Estuary skin.

Enter your movies list
Pull out the Sideblade menu... https://kodi.wiki/view/Basic_controls#Sideblade_Menu
The first option "Viewtype", change that to "Shift"

Is that what you are after?

No. I don't want to write a skin and I don't want to just change the view. I want to write my own add-on.

And in this add-on, I want to have a list of movies. I have already achieved this with the code mentioned above.

But, the list I made doesn't look like I wanted it to. So I'm looking for a way to display my list of xbmcgui.ListItem() like a movie list from the second screenshot. (By programming, not by settings and not by skins)



Okay, it looks like I have found a way. First of all, I needed to replace the extension point called "xbmc.python.script" with "xbmc.python.pluginsource".

After that, I have changed the code to the following:

python:
...

xbmcplugin.setContent(sys.argv[1], 'movies')
xbmcplugin.setPluginCategory(sys.argv[1], 'Movies')

for id, movie in movies.iteritems():
    listitem = xbmcgui.ListItem()
    local = movie.local[lang]
    listitem.setLabel(local.name)
    listitem.setLabel2(local.description)
    listitem.setArt({"icon": local.poster, "fanart": local.fanart})
    xbmcplugin.addDirectoryItem(sys.argv[1], movie.video_path, listitem, False)

xbmcplugin.endOfDirectory(sys.argv[1])

Now the list looks perfectly!
Reply

Logout Mark Read Team Forum Stats Members Help
How can I make a Movie List?0