@
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&tmdb_id=$INFO[ListItem.Property(tmdb_id)]&type=movie)</value>
<value condition="String.IsEqual(ListItem.DBType,episode) + !String.IsEmpty(ListItem.DBID)">RunPlugin(plugin://plugin.video.themoviedb.helper/?info=play&tmdb_id=$INFO[ListItem.Property(tmdb_id)]&season=1&episode=1&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