(2020-12-12, 22:06)vonson Wrote: Soooo, after a lot of trial and error, headache and cursing I have sorted out a lot of my problems and things work more or less as I want them to.
the one thing that I cannot get to work is the sorting. You suggested setting the ListItem media type to video - how do I do that? I don't understand the documentation...
That's good to hear and fairly common when you start coding addons. Did the xbmc.translatePath work for you ?
To set the lititem media type look at lines 599-623 in my mezzmo.py file.
It will be something like this for you:
categories_text = 'video'
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,
}
li.setInfo('video', info)
Just remove any of the info dictionary items you don't need or set them to the proper value. You can remove any or all info dictionary items you don't need except mediatype, which you want to set. Then change li.setInfo to whatever you called your listitem.
Jeff