Release plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners
@nessus

I think that the below should capture all possible scenarios.

Also, note that you should use Container.Update(path) instead of ActivateWindow(videos,path,return) if you're already inside MyVideoNav as that will keep the path history.

xml:

<variable name="PlayBrowseButtonAction">
<value condition="[String.IsEqual(ListItem.DBType,tvshow) | String.IsEqual(ListItem.DBType,season)] + !String.IsEmpty(ListItem.DBID) + Window.IsVisible(MyVideoNav.xml)">Container.Update($INFO[ListItem.DBID,videodb://tvshows/titles/,/])</value>
<value condition="[String.IsEqual(ListItem.DBType,tvshow) | String.IsEqual(ListItem.DBType,season)] + !String.IsEmpty(ListItem.DBID) + !Window.IsVisible(MyVideoNav.xml)">ActivateWindow(videos,$INFO[ListItem.DBID,videodb://tvshows/titles/,/],return)</value>
<value condition="ListItem.IsFolder + Window.IsVisible(MyVideoNav.xml)">Container.Update($INFO[ListItem.FolderPath])</value>
<value condition="ListItem.IsFolder + !Window.IsVisible(MyVideoNav.xml)">ActivateWindow(videos,$INFO[ListItem.FolderPath],return)</value>
<value condition="!ListItem.IsFolder + !String.IsEmpty(ListItem.FilenameAndPath)">AlarmClock(PlayMovie,PlayMedia($INFO[ListItem.FilenameAndPath]),00:01,silent)</value>
</variable>

xml:

<variable name="PlayBrowseButtonLabel">
<value condition="ListItem.IsFolder">$LOCALIZE[1024]</value>
<value condition="!ListItem.IsFolder + !String.IsEmpty(ListItem.FilenameAndPath)">$LOCALIZE[208]</value>
<value>$LOCALIZE[15067]</value>
</variable>

(2020-05-27, 20:22)nessus Wrote: 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.

A few reasons:
  1. It's the only way to provide settings to allow the user to choose between autoplaying local items or presenting the select dialog.
  2. It ensures filepaths in the plugin are consistently named.
  3. Even though some library info is merged, it is still a plugin entry which also uses online information. The filepath should reflect that it isn't a library item - otherwise there is no consistent way to tell between a plugin item with a DBID and a "true" library item which only uses library information.
  4. It prevents the possibility of a recursive loop where the local file is a .strm that runs a script using the TMDbHelper play command.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
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 jurialmunkey - 2020-05-28, 10:34
Logout Mark Read Team Forum Stats Members Help
plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners2