Jump to content
zomboided

Problem with mixed content directories?

Recommended Posts

zomboided

Hello, thanks for Emby and the plugin, it's really great and works brilliantly with Kodi.

I have the usual Movie and TV library set up, but I also have a separate Documentaries library which has a mixed content.  Everytime I boot I see this error appear, which I don't think was there before I had the Documentaries library.

https://www.dropbox.com/s/rmt0qoi7l8hzg71/kodi.log?dl=0

It's not a big deal as I can browse and play the contents of the library, but as an addon dev myself I see this in the log all the time and have finally gotten around to reporting it ;-)

Cheers

 

 

Share this post


Link to post
Share on other sites
Luke

Hi, is there an entry in the server log at the same time, like for instance the http server rejecting a request?

Also what addon do you develop?

Share this post


Link to post
Share on other sites
zomboided

Hey, I develop a popular VPN plugin for LibreELEC, plus I have some stuff I just use personally to help me manage Kodi against my family trying to break it.

Here's the server log https://www.dropbox.com/s/xszxa2x9g226rwj/embyserver.txt?dl=0 it probably covers a number of restarts but one deliberate one at 08:18.  In this example I'm running Emby and Kodi on the same Windows box (192.168.1.72), but I get the same problem on my RPi boxes too, connecting to the same Emby server.

I restarted the client to recreate a couple times.  He's the view from the client so you can see the time stamps which are within a few seconds.

2020-08-01 08:18:06.372 T:892  NOTICE: Emby -> ---[ START EMBYCLIENT ]---
2020-08-01 08:18:06.373 T:892  NOTICE: Emby.emby.client -> state cannot be empty
2020-08-01 08:18:06.544 T:892  NOTICE: EMBY.entrypoint.default -> path: ?type=mixed&mode=browse&id=f7b93310b9e773b95c46ee83d72464bc&reload= params: {
                                                "type": "mixed",
                                                "mode": "browse",
                                                "id": "f7b93310b9e773b95c46ee83d72464bc"
                                            }
2020-08-01 08:18:06.546 T:892  NOTICE: EMBY.entrypoint.default -> --[ v:f7b93310b9e773b95c46ee83d72464bc/mixed ] None
2020-08-01 08:18:06.595 T:9492  NOTICE: ZTools : (service.py) Starting Zomboided Tools service, version is 0.7.2
2020-08-01 08:18:06.595 T:9492  NOTICE: ZTools : (service.py) Kodi build is 18.7 Git:20200520-f14f7a84e3
2020-08-01 08:18:06.624 T:892  NOTICE: EMBY.default -> ERROR:: 'Device name cannot be null'
                                            Traceback (most recent call last):
                                              File "C:\Users\Matt\AppData\Roaming\Kodi\addons\plugin.video.emby\default.py", line 41, in <module>
                                                Events()
                                              File "C:\Users\Matt\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\entrypoint\default.py", line 150, in __init__
                                                browse(params.get('type'), params.get('id'), params.get('folder'), server)
                                              File "C:\Users\Matt\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\entrypoint\default.py", line 391, in browse
                                                view = EMBY['api'].get_item(view_id)
                                              File "C:\Users\Matt\AppData\Roaming\Kodi\addons\plugin.video.emby\libraries\emby\core\api.py", line 138, in get_item
                                                return  self.users("/Items/%s" % item_id)
                                              File "C:\Users\Matt\AppData\Roaming\Kodi\addons\plugin.video.emby\libraries\emby\core\api.py", line 86, in users
                                                return  self._get("Users/{UserId}%s" % handler, params)
                                              File "C:\Users\Matt\AppData\Roaming\Kodi\addons\plugin.video.emby\libraries\emby\core\api.py", line 53, in _get
                                                return  self._http("GET", handler, {'params': params})
                                              File "C:\Users\Matt\AppData\Roaming\Kodi\addons\plugin.video.emby\libraries\emby\core\api.py", line 50, in _http
                                                return  self.client.request(request)
                                              File "C:\Users\Matt\AppData\Roaming\Kodi\addons\plugin.video.emby\libraries\emby\core\http.py", line 86, in request
                                                data = self._request(data)
                                              File "C:\Users\Matt\AppData\Roaming\Kodi\addons\plugin.video.emby\libraries\emby\core\http.py", line 190, in _request
                                                self._get_header(data)
                                              File "C:\Users\Matt\AppData\Roaming\Kodi\addons\plugin.video.emby\libraries\emby\core\http.py", line 228, in _get_header
                                                self._authorization(data)
                                              File "C:\Users\Matt\AppData\Roaming\Kodi\addons\plugin.video.emby\libraries\emby\core\http.py", line 235, in _authorization
                                                raise KeyError("Device name cannot be null")
                                            KeyError: 'Device name cannot be null'
2020-08-01 08:18:06.625 T:892  NOTICE: EMBY.default -> ---<[ default ]
2020-08-01 08:18:06.773 T:9276   ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.emby/?type=mixed&mode=browse&id=f7b93310b9e773b95c46ee83d72464bc&reload=

 

Share this post


Link to post
Share on other sites
zomboided

Hey, any ideas with this one, do you need any more debug?

Share this post


Link to post
Share on other sites
Luke

Hi, not yet, sorry. It's on our backlog for review.

  • Like 1

Share this post


Link to post
Share on other sites
zomboided

Ok, no problem, thanks for the reply.  This isn't a big deal for me, I was just wandering.

Share this post


Link to post
Share on other sites
quickmic
Posted (edited)

I have the same problem, but with "homevideos".

You can try as follows:

open file:

/home/quickmic/.kodi/addons/plugin.video.emby/resources/lib/entrypoint/default.py (modify path to your actual kodi installation folder)

search and replace this line:

"browse(params.get('type'), params.get('id'), params.get('folder'), server)"

with that one:

"browse(params.get('type'), params.get('id'), params.get('folder'), params.get('server'))"

 

I'm still testing this fix, but at least the kodi.log is now clean.

 

Update:

This fix does not address the core issue. I'm working on that, but for the moment you can use it as a dirty workaround.

Edited by quickmic

Share this post


Link to post
Share on other sites
zomboided

Thanks @quickmic I tried it and I get the same assert as previously.  Thanks for the suggestion though.

Share this post


Link to post
Share on other sites
quickmic

Thanks, for the feedback, I'll try with "mixed content". Hoping I can find the actual problem.

  • Like 1

Share this post


Link to post
Share on other sites
quickmic
Posted (edited)

Still haven't found a proper solution, but I can tell you it's a timing issue and I know where the problem is located.

e.g. If I deactivate Estuary-modv2 Skin, the one I'm using, no issue.

NOTICE: EMBY.entrypoint.default -> path: ?type=mixed&mode=browse&id=f7b93310b9e773b95c46ee83d72464bc&reload= params: {
                                                "type": "mixed",
                                                "mode": "browse",
                                                "id": "f7b93310b9e773b95c46ee83d72464bc"
                                            }

The log record comes from a very early event call, before emby-for-kodi plugin wasn't fully initialized.

If I start with default skin, this event call will not be triggered. If I switch to mod-skin after booting with default skin, the event is also called, but as emby-for-kodi is fully loaded, the call doesn't raise the issue.

I could skip the event call before emby-for-kodi is fully loaded, but this would be a dirty hack.

 

Edited by quickmic

Share this post


Link to post
Share on other sites
zomboided

Yeah, confirmed.  I'm using the super clean Lyrebird skin, which maybe is dead/dying from a support perspective 😞

If I switched back to Estuary, the problem goes away.

You think this is a problem with all mod skins or is this something that really needs fixing on a skin by skin basis?

Share this post


Link to post
Share on other sites
quickmic

Yesterday after my posting, I guess I found a propper solution. This should fix all possible issues related to that matter, but still testing it.

I drop it here as soon as I'm confinced, it has no sideeffects.

 

  • Like 1

Share this post


Link to post
Share on other sites
quickmic
Posted (edited)

try as follows...

modify this file: /home/quickmic/.kodi/addons/plugin.video.emby/default.py

 

replace this section:

#################################################################################################

from entrypoint import Events

#################################################################################################

 

with this code:

#################################################################################################
from helper import window

#Verify emby for kodi plugin is fully loaded, timeout after 30 seconds
EmbyOnline = False

for i in range(60):
    if window('emby_online.bool'):
        EmbyOnline = True
        from entrypoint import Events
        break
    else:
        xbmc.sleep(500)

if not EmbyOnline:
    exit()

#################################################################################################

 

Please let me know, if this fixes the issue...

 

thanks

Edited by quickmic
  • Like 1

Share this post


Link to post
Share on other sites
zomboided

Excellent job, thanks!  Don't see any issues - here's the log from the boot time.  It's not barfing after it finds that mixed content library any more.

2020-08-28 17:06:38.918 T:6660  NOTICE: EMBY.patch -> --->[ patch ]
2020-08-28 17:06:38.919 T:11436  NOTICE: EMBY.hooks.webservice -> --->[ webservice/57578 ]
2020-08-28 17:06:38.932 T:6660  NOTICE: EMBY.patch -> --[ check updates/181167264 ]
2020-08-28 17:06:40.730 T:6660  NOTICE: EMBY.patch -> --<[ objects/181167264 ]
2020-08-28 17:06:41.474 T:6660  NOTICE: EMBY.service -> -->[ service ]
2020-08-28 17:06:41.476 T:6660  NOTICE: EMBY.service -> Delay startup by 0 seconds.
2020-08-28 17:06:42.428 T:336  NOTICE: EMBY.entrypoint.service -> --->>>[ EMBY ]
2020-08-28 17:06:42.435 T:336  NOTICE: EMBY.entrypoint.service -> Version: 4.1.19
2020-08-28 17:06:42.437 T:336  NOTICE: EMBY.entrypoint.service -> KODI Version: 18.7 Git:20200520-f14f7a84e3
2020-08-28 17:06:42.449 T:336  NOTICE: EMBY.entrypoint.service -> Platform: Windows
2020-08-28 17:06:42.465 T:336  NOTICE: EMBY.entrypoint.service -> OS: Kodi/7893MB
2020-08-28 17:06:42.467 T:336  NOTICE: EMBY.entrypoint.service -> Python Version: 2.7.13 (default, Jul 14 2017, 17:41:26) [MSC v.1900 64 bit (AMD64)]
2020-08-28 17:06:42.490 T:336  NOTICE: EMBY.entrypoint.service -> Using dynamic paths: True
2020-08-28 17:06:42.491 T:336  NOTICE: EMBY.entrypoint.service -> Log Level: 1
2020-08-28 17:06:42.969 T:336  NOTICE: EMBY.entrypoint.service -> ---[ db/None ]
2020-08-28 17:06:45.528 T:336  NOTICE: Emby -> ---[ START EMBYCLIENT ]---
2020-08-28 17:06:47.586 T:336  NOTICE: EMBY.views -> Unable to retrieve libraries: NotConnected
2020-08-28 17:06:47.736 T:336  NOTICE: EMBY.client -> DeviceId loaded: 2A5B40E92A6745628638475FF16AAD99
2020-08-28 17:06:47.813 T:2624  NOTICE: EMBY.hooks.monitor -> --->[ listener ]
2020-08-28 17:06:47.819 T:728  NOTICE: Emby -> ---[ STOPPED EMBYCLIENT: default ]---
2020-08-28 17:06:47.830 T:728  NOTICE: EMBY.connect -> --[ server/default ]
2020-08-28 17:06:47.887 T:728  NOTICE: Emby -> ---[ START EMBYCLIENT ]---
2020-08-28 17:06:47.947 T:728  NOTICE: Emby.emby.core.connection_manager -> Begin connect
2020-08-28 17:06:49.842 T:728  NOTICE: Emby.emby.core.connection_manager -> Found Servers: [{u'Name': u'Emby', u'Id': u'5d91b4cf32f741bab43949e651dea575', u'Address': u'http://{emby-server}'}]
2020-08-28 17:06:49.914 T:728  NOTICE: Emby.emby.core.connection_manager -> Begin connectToServers, with 1 servers
2020-08-28 17:06:49.915 T:728  NOTICE: Emby.emby.core.connection_manager -> testing connection mode 0 with server Emby
2020-08-28 17:06:49.915 T:728  NOTICE: Emby.emby.core.connection_manager -> tryConnect url: http://{emby-server}/emby/system/info/public
2020-08-28 17:06:50.298 T:728  NOTICE: Emby.emby.core.connection_manager -> calling onSuccessfulConnection with connection mode 0 with server Emby
2020-08-28 17:06:50.780 T:728  NOTICE: Emby.emby.client -> User is authenticated.
2020-08-28 17:06:53.460 T:2044  NOTICE: EMBY.hooks.monitor -> -->[ q:monitor/LoadServer ]
2020-08-28 17:06:53.461 T:2044  NOTICE: EMBY.hooks.monitor -> --[ post capabilities/5d91b4cf32f741bab43949e651dea575 ]
2020-08-28 17:06:53.500 T:1472  NOTICE: Emby.emby.core.ws_client -> Websocket url: ws://{emby-server}/embywebsocket?api_key={emby-token}&device_id=2A5B40E92A6745628638475FF16AAD99
2020-08-28 17:06:53.737 T:728  NOTICE: EMBY.setup -> ---<[ setup ]
2020-08-28 17:06:53.821 T:10608  NOTICE: EMBY.library -> --->[ library ]
2020-08-28 17:06:54.383 T:336  NOTICE: EMBY.entrypoint.service -> [ onNotification/plugin.video.emby/ServerOnline ]
2020-08-28 17:06:54.384 T:1472  NOTICE: Emby.emby.core.ws_client -> --->[ websocket ]
2020-08-28 17:06:55.110 T:7596  NOTICE: Emby -> ---[ START EMBYCLIENT ]---
2020-08-28 17:06:55.340 T:7596  NOTICE: EMBY.entrypoint.default -> path: ?type=mixed&mode=browse&id=f7b93310b9e773b95c46ee83d72464bc&reload= params: {
                                                "type": "mixed",
                                                "mode": "browse",
                                                "id": "f7b93310b9e773b95c46ee83d72464bc"
                                            }
2020-08-28 17:06:55.345 T:7596  NOTICE: EMBY.entrypoint.default -> --[ v:f7b93310b9e773b95c46ee83d72464bc/mixed ] None
2020-08-28 17:06:55.800 T:10608  NOTICE: EMBY.database -> [emby] 1 rows updated.
2020-08-28 17:06:57.220 T:10608  NOTICE: Previous line repeats 4 times.
2020-08-28 17:06:57.220 T:10608  NOTICE: EMBY.library -> --[ retrieve changes ] 2020-08-28T09:25:58z
2020-08-28 17:06:59.507 T:10608  NOTICE: EMBY.library -> --<[ retrieve changes ]
2020-08-28 17:06:59.523 T:10608  NOTICE: EMBY.library -> -->[ q:userdata/Episode/1972043205768 ]
2020-08-28 17:06:59.548 T:10608  NOTICE: EMBY.helper.utils -> ---[ screensaver/ ] {u'jsonrpc': u'2.0', u'id': 1, u'result': True}
2020-08-28 17:06:59.708 T:12028  NOTICE: EMBY.objects.core.tvshows -> USERDATA episode [569/569] 24522: Queen Thistle's Teapot
2020-08-28 17:07:00.723 T:12028  NOTICE: EMBY.database -> [emby] 1 rows updated.
2020-08-28 17:07:00.790 T:12028  NOTICE: EMBY.database -> [video] 1 rows updated.
2020-08-28 17:07:00.880 T:12028  NOTICE: EMBY.library -> --<[ q:userdata/1972043205768 ]
2020-08-28 17:07:02.734 T:10608  NOTICE: EMBY.library -> --[ sync/2020-08-28T16:05:02z ]
2020-08-28 17:07:02.746 T:10608  NOTICE: EMBY.helper.utils -> ---[ screensaver/ ] {u'jsonrpc': u'2.0', u'id': 1, u'result': True}
2020-08-28 17:07:02.823 T:11292  NOTICE: VideoInfoScanner: Starting scan ..
2020-08-28 17:07:02.825 T:11292  NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:00
2020-08-28 17:07:02.860 T:336  NOTICE: EMBY.hooks.monitor -> -->[ kodi scan/video ]
2020-08-28 17:07:02.860 T:336  NOTICE: EMBY.objects.monitor -> [ xbmc/VideoLibrary.OnScanStarted ]
2020-08-28 17:07:02.861 T:336  NOTICE: EMBY.hooks.monitor -> --<[ kodi scan/video ]
2020-08-28 17:07:02.861 T:336  NOTICE: EMBY.objects.monitor -> [ xbmc/VideoLibrary.OnScanFinished ]
2020-08-28 17:07:03.790 T:7596  NOTICE: EMBY.default -> ---<[ default ]

 

  • Like 1

Share this post


Link to post
Share on other sites
quickmic

Just checking, did you had any issues with this fix?

Share this post


Link to post
Share on other sites
zomboided

Hello, no issues at all on my Windows dev machine and I've restarted Kodi on that 10s of times since I made the change you suggested.

I have not tried it on any of my 'live' Kodi Raspberry Pi boxes for fear of family reprisal if it didn't work.  Do you want me to do try it there too, or am I good to wait for the update?  It's no bother if this is worth doing to give you confidence.

  • Like 1

Share this post


Link to post
Share on other sites
quickmic

Thanks for the feedback.

No, you can wait for the update. Just checking, if you had issues with this fix so far. Actually it's very good, you have tested on Windows.

I have only Linux systems, Raspberry Libreelec and Vero4K OSMC.

 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...