a4k-openproject/json.openplayers

[Bug] Cannot Create Local Player (provider.local.json)

mriksman opened this issue · 1 comments

Describe the bug
Cannot get a local Player to work based on the sample provider.local.json

To Reproduce
Steps to reproduce the behavior:
Copy the provider.local.json sample Player from this website, and save into the Players folder
Set to contents to

{
 "id": "provider.local",
 "name": "Local",
 "tvshows": [
  [
   {
    "link": "/storage/emulated/0/TV Shows/",
    "steps": [
     "{clearname}.*S{season:02d}E{episode:02d}.*(avi|mp4|mkv)"
    ]
   }
  ]
 ]
}

Try and play a file from the Library
Error says 'Can't find a next item to play'. It doesn't matter if it's a stream or if there is a file located locally.

When the provider.local.json is removed, everything works OK (except without local file support)

Expected behavior
OpenMeta should use a Player file that points to local storage and use that before trying another Player file

Platform

  • Kodi version (18.2 Leia)
  • Device (Samsung Tablet)
  • Operating System (Android)

Log File

2019-05-10 03:06:24.904 T:3377   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: argument of type 'NoneType' is not iterable
                                            Traceback (most recent call last):
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.openmeta/addon.py", line 137, in <module>
                                                plugin.run()
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.openmeta/resources/lib/xswift2.py", line 900, in run
                                                items = self._dispatch(self.request.path)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.openmeta/resources/lib/xswift2.py", line 912, in _dispatch
                                                resp = view_func(**items)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.openmeta/resources/lib/nav_tvshows.py", line 205, in tv_play
                                                play_tvshows.play_episode(id, season, episode)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.openmeta/resources/lib/play_tvshows.py", line 25, in play_episode
                                                PLAYERS = meta_players.get_players('tvshows')
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.openmeta/resources/lib/meta_players.py", line 34, in get_players
                                                if not player.is_empty():
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.openmeta/resources/lib/meta_players.py", line 14, in is_empty
                                                if ',' in self.pluginid:
                                            TypeError: argument of type 'NoneType' is not iterable
                                            -->End of Python script error report<--
2019-05-10 03:06:25.129 T:28217   ERROR: Playlist Player: skipping unplayable item: 0, path [special://profile/addon_data/plugin.video.openmeta/TVShows/121361/Season 8/Game of Thrones - S08E03.strm]

I got it working with this;

{
 "name"			: "Local",
 "plugin" 		: "",
 "priority"     : 1,
 "id"           : "provider.local",
 "movies"       : [[{"link": "C:/Users/Michael Riksman/Downloads/Movies/", 
					 "steps": ["{title}*.*(avi|mp4|mkv)"]
				  }]],
 "tvshows"      : [[{"link": "c:/Downloads/TV Shows/", 
					 "steps": ["{clearname}.*S{season:02d}E{episode:02d}.*(avi|mp4|mkv)"]
				  }]]
}

I needed plugin: "" for it to work.

However, it won't recursively check directories. Each movie is in a separate folder. How can I make it recursively check all sub directories under 'link'?