Release plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners
@jurialmunkey 
OK... this is my code for my play/close/browse button action...
xml:
<variable name="PlayBrowseButtonAction">
  <value condition="String.IsEqual(ListItem.DBType,movie) + !String.IsEmpty(ListItem.FilenameAndPath) + !String.StartsWith(ListItem.FilenameAndPath,plugin://)">AlarmClock(PlayMovie,PlayMedia($INFO[ListItem.FilenameAndPath]),00:01,silent)</value>
  <value condition="String.IsEqual(ListItem.DBType,movie) + !String.IsEmpty(ListItem.DBID)">RunPlugin(plugin://plugin.video.themoviedb.helper/?info=play&amp;tmdb_id=$INFO[ListItem.Property(tmdb_id)]&amp;type=movie)</value>
  <value condition="String.IsEqual(ListItem.DBType,episode) + !String.IsEmpty(ListItem.DBID)">RunPlugin(plugin://plugin.video.themoviedb.helper/?info=play&amp;tmdb_id=$INFO[ListItem.Property(tmdb_id)]&amp;season=1&amp;episode=1&amp;type=episode)</value>
  <value condition="[String.IsEqual(ListItem.DBType,tvshow) | String.IsEqual(ListItem.DBType,season)] + !String.IsEmpty(ListItem.DBID)">ActivateWindow(videos,videodb://tvshows/titles/$INFO[ListItem.DBID]/,return)</value>
</variable>

...and this is my variable for the label in that button...
xml:
<variable name="PlayBrowseButtonLabel">
  <value condition="[String.IsEqual(ListItem.DBType,tvshow) | String.IsEqual(ListItem.DBType,season) | String.IsEqual(ListItem.DBType,artist)] + !String.StartsWith(ListItem.FilenameAndPath,plugin://)">$LOCALIZE[1024]</value>
  <value condition="!String.StartsWith(ListItem.FilenameAndPath,plugin://)">$LOCALIZE[208]</value>
<value>$LOCALIZE[15067]</value>
</variable>

...with which i am showing the appropriate label for every action. I've replaced the !String.StartsWith(ListItem.FilenameAndPath,plugin://) check with !String.IsEmpty(ListItem.DBID) which is working fine but i am not sure this covers all scenarios. The previous behavior was working properly in all cases and also in other plugins that provided similar content. Is this code can be any better?.

In any case, i am still don't understand why the ListItem.FilenameAndPath has to point to the plugin:// path for all items even for the local ones.


Cheers
Nessus
Reply


Messages In This Thread
RE: TheMovieDB Helper - by jurialmunkey - 2019-07-31, 11:47
RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - by nessus - 2020-05-27, 20:22
Logout Mark Read Team Forum Stats Members Help
plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners2