(2017-08-07, 08:59)Roman_V_M Wrote: If you add a directory item with isFolder=False but do not touch its 'isPlayble' property (important!), it allows you to execute arbitrary code in a plugin call without raising errors. This includes starting playback with xbmc.Player class. In this case your playable path won't be monitored by the database.
Are you sure? because I comment out every isPlayable and change a bit play function because without isPlayable the `setResolvedUrl()` stop playing it.
I do this when someone pick item that I added to execute video:
Code:
file_url="http://127.0.0.1/server/file.mkv"
details = {
'plot': xbmc.getInfoLabel('ListItem.Plot'),
'title': xbmc.getInfoLabel('ListItem.Title'),
'sorttitle': xbmc.getInfoLabel('ListItem.Title'),
'rating': xbmc.getInfoLabel('ListItem.Rating'),
'duration': xbmc.getInfoLabel('ListItem.Duration'),
'mpaa': xbmc.getInfoLabel('ListItem.Mpaa'),
'year': xbmc.getInfoLabel('ListItem.Year'),
'tagline': xbmc.getInfoLabel('ListItem.Tagline'),
'episode': xbmc.getInfoLabel('ListItem.Episode'),
'aired': xbmc.getInfoLabel('ListItem.Premiered'),
'tvshowtitle': xbmc.getInfoLabel('ListItem.TVShowTitle'),
'votes': xbmc.getInfoLabel('ListItem.Votes'),
'originaltitle': xbmc.getInfoLabel('ListItem.OriginalTitle'),
'size': xbmc.getInfoLabel('ListItem.Size'),
'season': xbmc.getInfoLabel('ListItem.Season'),
}
item = xbmcgui.ListItem(details.get('title', 'Unknown'), thumbnailImage=xbmc.getInfoLabel('ListItem.Thumb'), path=file_url)
item.setInfo(type='Video', infoLabels=details)
player = xbmc.Player()
player.play(item=file_url, listitem=item)
But still I end up having row added to database:
Code:
idFile=1, idPath=1, strFilename=file.mkv, playCount='', lastPlayed=2017-08-09, dateAdded=''
after playing given file (both in Kodi 17.3 and Leia).