Connecting to a DB
#31
Ok, that was it. There was no xbmcplugin.addSortMethod in my code.

For now I do not understand the difference between:
SORT_METHOD_TITLE  vs  SORT_METHOD_VIDEO_SORT_TITLE
SORT_METHOD_YEAR  vs   SORT_METHOD__VIDEO_YEAR   (but SORT_METHOD_YEAR produces an error...)
SORT_METHOD_DURATION  vs  SORT_METHOD_VIDEO_RUNTIME

Now I try to fine tune things on the info page. So far I use the plot field to display the info i need. But then there is the details-field on the right side of the info page, so far only the director and the country get displayed there, how do I get more info into this field?
Reply
#32
(2020-12-13, 15:36)vonson Wrote: Ok, that was it. There was no xbmcplugin.addSortMethod in my code.

For now I do not understand the difference between:
SORT_METHOD_TITLE  vs  SORT_METHOD_VIDEO_SORT_TITLE
SORT_METHOD_YEAR  vs   SORT_METHOD__VIDEO_YEAR   (but SORT_METHOD_YEAR produces an error...)
SORT_METHOD_DURATION  vs  SORT_METHOD_VIDEO_RUNTIME

Now I try to fine tune things on the info page. So far I use the plot field to display the info i need. But then there is the details-field on the right side of the info page, so far only the director and the country get displayed there, how do I get more info into this field?
Title and sort title are different variables, as are the rest.  To get additional information in the info panel you need to populate the info dictionary.  Back to my code this is where all of these dictionary items come into play:

                    info = {
                        'duration': getSeconds(duration_text),
                        'genre': genre_text,
                        'year': release_year_text,
                        'title': title,
                        'plot': description_text,
                        'director': creator_text,
                        'tagline': tagline_text,
                        'writer': writer_text,
                        'cast': artist_text.split(','),
                        'artist': artist_text.split(','),
                        'rating': rating_val,
                        'code': imdb_text,
                        'mediatype': categories_text,
                        'season': season_text,
                        'episode': episode_text,
                        'lastplayed': last_played_text,
                        'aired': aired_text,
                        'mpaa':content_rating_text,
                        'studio':production_company_text,
                        'playcount':playcount,
                        'trailer':trailerurl,
                        'tvshowtitle':album_text,
                    }

You can try hard coding a few of these items to see the results.  Note that most of these are simple strings but some are formatted.  Let me know if you have questions on specific ones or look at my code to see the formatting.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#33
I guess my items are not formatted properly, but do not understand how to.
And how to deal with multiple entries in fields like director or genre?

The ones I'd like to see on the info pane are: year, duration and genre (as well as director and country, but those two do work already).
I understood that year is meant to be simply a string? It won't show on the info pane.
Genre: Strangely, the genre gets displayed on the top of the info page, right below the title, but not on the info pane.
Duration: The duration ist meant to be set in seconds (as an integer)? I have set duration as an integer, but it won't show up.
Reply
#34
(2020-12-13, 23:17)vonson Wrote: I guess my items are not formatted properly, but do not understand how to.
And how to deal with multiple entries in fields like director or genre?

The ones I'd like to see on the info pane are: year, duration and genre (as well as director and country, but those two do work already).
I understood that year is meant to be simply a string? It won't show on the info pane.
Genre: Strangely, the genre gets displayed on the top of the info page, right below the title, but not on the info pane.
Duration: The duration ist meant to be set in seconds (as an integer)? I have set duration as an integer, but it won't show up.

Duration is an int, genre and director are strings (I separate mine with commas) and year is a string.  Is there any way you can post some code and maybe a screen shot ? This could be a skin view mode issue.  What skin are you using and which view mode (i.e. list, poster etc...)  ?


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#35
So multiple entries in genre or director is still a single string with the elements separated by comma, not a list?

The skin is Estuary, my favorite view modes are list or wall, depending on use case. I just experimented with the other view modes, and this is interesting. In mode 'Shift' and 'WideList' the genre actually gets displayed. Other than that, in all the other views I get only the plot field.

But I was refering to the info page that opens when I select one item from the list, and the section on the right side of that page.

Concerning code and screenshot:
Code: I just tried posting an excerpt of the code, but how do I insert it here without it losing its indentations?
Screenshot: Is there a way to attach a local screenshot from my HD without uploading it somewhere else? With the 'Image'-button I only can insert a link. ?...
Reply
#36
(2020-12-14, 02:31)vonson Wrote: So multiple entries in genre or director is still a single string with the elements separated by comma, not a list?

The skin is Estuary, my favorite view modes are list or wall, depending on use case. I just experimented with the other view modes, and this is interesting. In mode 'Shift' and 'WideList' the genre actually gets displayed. Other than that, in all the other views I get only the plot field.

But I was refering to the info page that opens when I select one item from the list, and the section on the right side of that page.

Concerning code and screenshot:
Code: I just tried posting an excerpt of the code, but how do I insert it here without it losing its indentations?
Screenshot: Is there a way to attach a local screenshot from my HD without uploading it somewhere else? With the 'Image'-button I only can insert a link. ?...

Correct, elements separated by commas, not a list.   'genrea, genreb, grnrec' 

Try adding this line before your end of directory line:

    xbmcplugin.setContent(addon_handle, 'movies')

See if that helps.  I looked at the Estuary view modes and only shift adds other metadata like genre, director, writer and first aired date.  Here's a screenshot.  This is all controlled by the skin. 

What I did for music, which you can do here, is modify the plot field with additional information, formatting and such. 

Here's a simple example:

                    desc_text2 = 'Genre: ' + genre_text + '\nDirector: ' + creator_text + '\n\n' + description_text

                    info = {
                        'duration': getSeconds(duration_text),
                        'genre': genre_text,
                        'year': release_year_text,
                        'title': title,
                        'plot': desc_text2,
                        'director': creator_text,
                        'tagline': tagline_text,
                        'writer': writer_text,
                        'cast': artist_text.split(','),
                        'artist': artist_text.split(','),
                        'rating': rating_val,
                        'code': imdb_text,
                        'mediatype': categories_text,
                        'season': season_text,
                        'episode': episode_text,
                        'lastplayed': last_played_text,
                        'aired': aired_text,
                        'mpaa':content_rating_text,
                        'studio':production_company_text,
                        'playcount':playcount,
                        'trailer':trailerurl,
                        'tvshowtitle':album_text,
                    }
                    li.setInfo(mediaClass_text, info)

With this the plot field will always have what you want.  if you want to get creative with improved formatting and colors see my media.py file and look for :

def mComment(minfo, mduration):            #  Update music metadata comments

You'll see some formatting that I use for music to do the same thing. 


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#37
If you want to post code here without losing the formatting I copy / paste out of Notepad.  When I've tried out of VScode and similar I lose the formatting.



Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#38
That's what I do with the plot field too, I just hoped I could unclutter it a little by moving some info like genre and running time over to the details field, where director and country are displayed but nothing else. And the list view should not be relevant, for i am interested in the separate info page that opens after lists view, when I select and enter an entry.

The xbmcplugin.setContent does not help; but interestingly, if i set it to video instead of movies I lose the view mode options...

The formatting idea is a nice addition, I set the location code of the optical media to bold to highlight it. Nice. Is there a way to increase the font size thus?

For the code, I don't see a lot of difference to your code, maybe you see something I don't. To keep it short I've limited it to the elements that we are talking about:

    for column, item in enumerate(sublist):
        item = item.strip(" \"\n\t\r)")
        if len(item) > 0:
            if row == 0:
                if item.lower() in {'jahr','year'}:
                    YearIndex = column
                    YearLabel = "Jahr"
                if item.lower() in {'genre','category','kategorie'}:
                    GenreIndex = column
                    GenreLabel = "Genre"
                if item.lower() in {'laenge','lauflaenge','laufzeit','length','duration','running time'}:
                    DurationIndex = column
                    DurationLabel = "Laenge"
            else:
                if column == YearIndex:
                    year = item
                if column == GenreIndex:
                    genre = item
                if column == DurationIndex:
                    duration = int(item)

(...)

            duration_sec = duration * 60
            info = {
                'title': title,
                'orgtitle': orgtitle,
                'director': director,
                'year': year,
                'country': country,
                'director': director,
                'genre': genre,
                'duration': duration_sec,
                'subtitles': subtitles,
                'locationcode': locationcode,
                'plot':  MediaDetails,
                'age': age,
                'image': image,
                'mediatype': 'video',
                }

            li.setInfo("video", info)
            xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)

    xbmcplugin.addSortMethod(addon_handle, xbmcplugin.SORT_METHOD_VIDEO_SORT_TITLE_IGNORE_THE)
    xbmcplugin.addSortMethod(addon_handle, xbmcplugin.SORT_METHOD_VIDEO_YEAR)
    xbmcplugin.addSortMethod(addon_handle, xbmcplugin.SORT_METHOD_DURATION)
    xbmcplugin.addSortMethod(addon_handle, xbmcplugin.SORT_METHOD_COUNTRY)

    xbmcplugin.setContent(addon_handle, 'movies')
    xbmcplugin.endOfDirectory(addon_handle)
Reply
#39
one more question regarding the formatting: can I use to specify skin-preset colors instead of absolute colors?

EDIT:
Actually, I am quite an idiot. Concerning the running time: I was looking for it in the details field next to director and country. I just noticed it gets displayed at the bottom right corner. Just like in Kodi's movie database list. Stupid of me.

And another question: On my Android tablet I use Estouchy as my skin. In this the addon page shows the program addons and I do not know how to change to the video addons. Is there a way to have the video addons the default addon page on Estouchy?
Reply
#40
(2020-12-14, 14:17)vonson Wrote: one more question regarding the formatting: can I use to specify skin-preset colors instead of absolute colors?

EDIT:
Actually, I am quite an idiot. Concerning the running time: I was looking for it in the details field next to director and country. I just noticed it gets displayed at the bottom right corner. Just like in Kodi's movie database list. Stupid of me.

And another question: On my Android tablet I use Estouchy as my skin. In this the addon page shows the program addons and I do not know how to change to the video addons. Is there a way to have the video addons the default addon page on Estouchy?

I don't know about relative colors.  Here's the best link I am aware of on the topic.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#41
Yes, that's the same info I found. Not important, was just an idea.

Well, I guess I am quite happy with how things turned out and think I will leave it the way it is now. It provides the functionality that i was looking for, and while there might be small things that could be fine tuned, quite frankly the result now is a lot better than what I had expected when I started.

So thank you for your help. A lot!!!

Best wishes,
Marc
Reply
#42
(2020-12-14, 16:26)vonson Wrote: Yes, that's the same info I found. Not important, was just an idea.

Well, I guess I am quite happy with how things turned out and think I will leave it the way it is now. It provides the functionality that i was looking for, and while there might be small things that could be fine tuned, quite frankly the result now is a lot better than what I had expected when I started.

So thank you for your help. A lot!!!

Best wishes,
Marc
You are welcome.  I am glad it worked out for you and that I could help.  I sent you a private message with my E-mail address.  I'd love to see a couple of screenshots.

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#43
(2020-12-14, 14:17)vonson Wrote: one more question regarding the formatting: can I use to specify skin-preset colors instead of absolute colors?

EDIT:
Actually, I am quite an idiot. Concerning the running time: I was looking for it in the details field next to director and country. I just noticed it gets displayed at the bottom right corner. Just like in Kodi's movie database list. Stupid of me.

And another question: On my Android tablet I use Estouchy as my skin. In this the addon page shows the program addons and I do not know how to change to the video addons. Is there a way to have the video addons the default addon page on Estouchy?

I use autoexec.py to launch my addon for videos and take me right where I want when Kodi starts.

Here's mine:

import xbmc

xbmc.executebuiltin("ActivateWindow(10025,plugin://plugin.video.mezzmo/?contentdirectory=http://192.168.0.34:53168/ContentDirectory/control;mode=server;objectID=taz1l0z1l13)")

Yours might be something like:

import xbmc

xbmc.executebuiltin("ActivateWindow(10025,plugin://plugin.video.myaddon)")


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#44
Hey, I just send you an Email.

But regarding your suggestions from your last post: It's not that I want the addon to open when Kodi opens, I just want to be able to access it quickly. But in the Estouchy Skin, when entering the Addons from the main menu, it shows only the program addons and I do not find an option to swap to the other categories. I'd prefer to see just the video addons when entering the addons, especially now with my own addon, while I hardly have need for the program addons to be accessible quickly. For now I have added my addon to the Kodi start screen, which is an option in the Estouchy skin settings.
Reply
#45
(2020-12-14, 22:50)vonson Wrote: Hey, I just send you an Email.

But regarding your suggestions from your last post: It's not that I want the addon to open when Kodi opens, I just want to be able to access it quickly. But in the Estouchy Skin, when entering the Addons from the main menu, it shows only the program addons and I do not find an option to swap to the other categories. I'd prefer to see just the video addons when entering the addons, especially now with my own addon, while I hardly have need for the program addons to be accessible quickly. For now I have added my addon to the Kodi start screen, which is an option in the Estouchy skin settings.

You can go into Interface -->  Skin -->  Configure Skin -->  Main Menu Items and disable many things you don't want.  That might help.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply

Logout Mark Read Team Forum Stats Members Help
Connecting to a DB0