Closed Malakai-DB closed 2 years ago
I'm not able to replicate this while using ErsatzTV. Can you enable debug logging (Addons -> JellyCon -> Add-on Actions -> Show add-on settings -> Advanced -> Enable debug logging) and share that output?
The line I'm looking for specifically will start with get_play_url - media_source:
Thanks for your reply. The debug logging is below.
PS : since yesterday I also uninstalled and reinstalled the plugin and I see now that Jellycon is in version 0.5.7+py3.
Also (maybe it is an important information), Jellyfin is installed in a docker container on my server (not the same hardware as my RPI4 which has LibreElec on it) using latest jellyfin/jellyfin image from dockerhub and having only the port 8096 mapped.
The line you asked for says : INFO <general>: JELLYFIN.resources.lib.play_utils -> DEBUG::resources/lib/play_utils.py:1125 get_play_url - media_source: {0}
2022-08-27 16:05:50.322 T:2783 INFO <general>: initializing python engine.
2022-08-27 16:05:51.098 T:2783 INFO <general>: JELLYFIN.default -> DEBUG::default.py:16 About to enter mainEntryPoint()
2022-08-27 16:05:51.099 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:46 ===== JellyCon START =====
2022-08-27 16:05:51.105 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:57 Running Python: sys.version_info(major=3, minor=8, micro=9, releaselevel='final', serial=0)
2022-08-27 16:05:51.105 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:58 Running JellyCon: 0.5.7+py3
2022-08-27 16:05:51.106 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:59 Kodi BuildVersion: 19.4 (19.4.0) Git:19.4-Matrix
2022-08-27 16:05:51.106 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:60 Kodi Version: 19
2022-08-27 16:05:51.106 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:61 Script argument data: ['plugin://plugin.video.jellycon/', '-1', '?item_id=1ed8d400xxxxxxxxxx40c0fc503991e9&mode=PLAY', 'resume:false']
2022-08-27 16:05:51.106 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:317 Parameter string: ?item_id=1ed8d400xxxxxxxxxx40c0fc503991e9&mode=PLAY
2022-08-27 16:05:51.107 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:318 Plugin Path string: plugin://plugin.video.jellycon/
2022-08-27 16:05:51.107 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:326 JellyCon -> Detected parameters: {'item_id': '1ed8d400xxxxxxxxxx40c0fc503991e9', 'mode': 'PLAY', 'request_path': '/'}
2022-08-27 16:05:51.107 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:64 Script params: {'item_id': '1ed8d400xxxxxxxxxx40c0fc503991e9', 'mode': 'PLAY', 'request_path': '/'}
2022-08-27 16:05:51.107 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:140 JellyCon -> Mode: PLAY
2022-08-27 16:05:51.108 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:141 JellyCon -> URL: None
2022-08-27 16:05:51.108 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:804 == ENTER: PLAY ==
2022-08-27 16:05:51.108 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:806 PLAY ACTION PARAMS: {'item_id': '1ed8d400xxxxxxxxxx40c0fc503991e9', 'mode': 'PLAY', 'request_path': '/'}
2022-08-27 16:05:51.108 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:817 AUTO_RESUME: -1
2022-08-27 16:05:51.109 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:820 FORCE_TRANSCODE: False
2022-08-27 16:05:51.109 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:823 media_source_id:
2022-08-27 16:05:51.109 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:826 subtitle_stream_index: None
2022-08-27 16:05:51.110 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:829 audio_stream_index: None
2022-08-27 16:05:51.114 T:2783 INFO <general>: JELLYFIN.resources.lib.functions -> INFO::resources/lib/functions.py:847 Sending jellycon_play_action : {'action': 'play', 'item_id': '1ed8d400xxxxxxxxxx40c0fc503991e9', 'auto_resume': '-1', 'force_transcode': False, 'media_source_id': '', 'subtitle_stream_index': None, 'audio_stream_index': None}
2022-08-27 16:05:51.115 T:2783 INFO <general>: JELLYFIN.resources.lib.play_utils -> DEBUG::resources/lib/play_utils.py:241 playFile id(1ed8d400xxxxxxxxxx40c0fc503991e9) resume(-1) force_transcode(False)
2022-08-27 16:05:51.156 T:2783 INFO <general>: JELLYFIN.resources.lib.play_utils -> DEBUG::resources/lib/play_utils.py:252 Playfile item: {'Name': 'MyChannel (DVB)', 'ServerId': '2d95109dxxxxxxxxxx0d5764c0f71050', 'Id': '1ed8d400xxxxxxxxxx40c0fc503991e9', 'Etag': '97d72608cxxxxxxxxxxc9317792bbc79', 'DateCreated': '2022-08-23T17:32:14.206Z', 'CanDelete': False, 'CanDownload': False, 'PreferredMetadataLanguage': '', 'PreferredMetadataCountryCode': '', 'SortName': '00001.0-MyChannel (DVB)', 'ForcedSortName': '', 'ExternalUrls': [], 'MediaSources': [{'Protocol': 'File', 'Id': '1ed8d400xxxxxxxxxx40c0fc503991e9', 'Type': 'Placeholder', 'Name': 'MyChannel (DVB)', 'IsRemote': False, 'ReadAtNativeFramerate': False, 'IgnoreDts': False, 'IgnoreIndex': False, 'GenPtsInput': False, 'SupportsTranscoding': True, 'SupportsDirectStream': True, 'SupportsDirectPlay': True, 'IsInfiniteStream': True, 'RequiresOpening': False, 'RequiresClosing': False, 'RequiresLooping': False, 'SupportsProbing': True, 'MediaStreams': [], 'MediaAttachments': [], 'Formats': [], 'RequiredHttpHeaders': {}}], 'EnableMediaSourceDisplay': True, 'CustomRating': '', 'ChannelId': None, 'Overview': '', 'Taglines': [], 'Genres': [], 'PlayAccess': 'Full', 'Number': '1', 'ChannelNumber': '1', 'RemoteTrailers': [], 'ProviderIds': {'ExternalServiceId': 'TVHclient LiveTvService'}, 'IsFolder': False, 'ParentId': 'b26028d1xxxxxxxxxx2f1bfc13f523d2', 'Type': 'TvChannel', 'People': [], 'Studios': [], 'GenreItems': [], 'LocalTrailerCount': 0, 'UserData': {'PlaybackPositionTicks': 0, 'PlayCount': 6, 'IsFavorite': False, 'LastPlayedDate': '2022-08-26T16:51:01.8218474Z', 'Played': False, 'Key': '1ed8d400-xxxx-xxxx-7c40-c0fc503991e9'}, 'SpecialFeatureCount': 0, 'DisplayPreferencesId': 'b5f10d1xxxxxxxxxxb2d3b2fda19134d', 'Tags': [], 'PrimaryImageAspectRatio': 1.6666666666666667, 'MediaStreams': [], 'ImageTags': {'Primary': '2a0b2ceexxxxxxxxxx5a14977b1d7032'}, 'BackdropImageTags': [], 'ImageBlurHashes': {}, 'LocationType': 'Remote', 'MediaType': 'Video', 'LockedFields': [], 'LockData': False, 'ChannelType': 'TV', 'CurrentProgram': {'Name': 'Best Show Ever', 'ServerId': '2d95109dxxxxxxxxxx0d5764c0f71050', 'Id': '406b7f107axxxxxxxxxx434e70a4ea10', 'DateCreated': '2022-08-23T17:32:43.1437869Z', 'SortName': 'best show ever', 'ExternalUrls': [], 'EnableMediaSourceDisplay': True, 'ChannelId': '1ed8d400xxxxxxxxxx40c0fc503991e9', 'ChannelName': 'MyChannel (DVB)', 'Overview': "This is really the best show ever.", 'Taglines': [], 'Genres': [], 'RunTimeTicks': 17999998976, 'PlayAccess': 'Full', 'ChannelNumber': '1', 'RemoteTrailers': [], 'ProviderIds': {}, 'ParentId': '1ed8d400xxxxxxxxxx40c0fc503991e9', 'Type': 'Program', 'People': [], 'Studios': [], 'GenreItems': [], 'LocalTrailerCount': 0, 'UserData': {'PlaybackPositionTicks': 0, 'PlayCount': 0, 'IsFavorite': False, 'Played': False, 'Key': '406b7f10-xxxx-xxxx-9866-434e70a4ea10'}, 'SpecialFeatureCount': 0, 'Tags': [], 'PrimaryImageAspectRatio': 1.7776, 'ImageTags': {'Primary': '93a7c507xxxxxxxxxx634a83d41f3dc0'}, 'BackdropImageTags': [], 'ImageBlurHashes': {}, 'MediaType': 'Video', 'EndDate': '2022-08-27T13:20:00.0000000Z', 'LockedFields': [], 'LockData': False, 'ChannelPrimaryImageTag': '2a0b2ceexxxxxxxxxx5a14977b1d7032', 'StartDate': '2022-08-27T12:50:00.0000000Z'}}
2022-08-27 16:05:51.189 T:2783 INFO <general>: JELLYFIN.resources.lib.play_utils -> DEBUG::resources/lib/play_utils.py:1631 PlaybackInfo : /Items/1ed8d400xxxxxxxxxx40c0fc503991e9/PlaybackInfo?MaxStreamingBitrate=75000000
2022-08-27 16:05:51.190 T:2783 INFO <general>: JELLYFIN.resources.lib.play_utils -> DEBUG::resources/lib/play_utils.py:1632 PlaybackInfo : {'Name': 'Kodi', 'MaxStaticBitrate': 75000000, 'MaxStreamingBitrate': 75000000, 'MusicStreamingTranscodingBitrate': 256000, 'TimelineOffsetSeconds': 5, 'TranscodingProfiles': [{'Type': 'Audio'}, {'Container': 'ts', 'Protocol': 'hls', 'Type': 'Video', 'AudioCodec': 'ac3', 'VideoCodec': 'h264', 'MaxAudioChannels': '8'}, {'Container': 'jpeg', 'Type': 'Photo'}], 'DirectPlayProfiles': [{'Type': 'Video'}, {'Type': 'Audio'}, {'Type': 'Photo'}], 'ResponseProfiles': [], 'ContainerProfiles': [], 'CodecProfiles': [], 'SubtitleProfiles': [{'Format': 'srt', 'Method': 'External'}, {'Format': 'srt', 'Method': 'Embed'}, {'Format': 'ass', 'Method': 'External'}, {'Format': 'ass', 'Method': 'Embed'}, {'Format': 'sub', 'Method': 'Embed'}, {'Format': 'sub', 'Method': 'External'}, {'Format': 'ssa', 'Method': 'Embed'}, {'Format': 'ssa', 'Method': 'External'}, {'Format': 'smi', 'Method': 'Embed'}, {'Format': 'smi', 'Method': 'External'}, {'Format': 'pgssub', 'Method': 'Embed'}, {'Format': 'pgssub', 'Method': 'External'}, {'Format': 'dvdsub', 'Method': 'Embed'}, {'Format': 'dvdsub', 'Method': 'External'}, {'Format': 'pgs', 'Method': 'Embed'}, {'Format': 'pgs', 'Method': 'External'}]}
2022-08-27 16:05:51.217 T:2783 INFO <general>: JELLYFIN.resources.lib.play_utils -> DEBUG::resources/lib/play_utils.py:1634 PlaybackInfo : {'MediaSources': [{'Protocol': 'Http', 'Id': '269288209', 'Path': 'http://mytvheadend.local:9981/stream/channelid/26xxxxx09?ticket=de019019xxxxxxxxxx660d2cd96fca6a468316a7', 'Type': 'Default', 'IsRemote': False, 'ReadAtNativeFramerate': False, 'IgnoreDts': False, 'IgnoreIndex': False, 'GenPtsInput': False, 'SupportsTranscoding': True, 'SupportsDirectStream': True, 'SupportsDirectPlay': True, 'IsInfiniteStream': True, 'RequiresOpening': False, 'RequiresClosing': False, 'BufferMs': 1500, 'RequiresLooping': False, 'SupportsProbing': True, 'MediaStreams': [{'VideoRange': 'SDR', 'VideoRangeType': 'SDR', 'DisplayTitle': 'SDR', 'NalLengthSize': '0', 'IsInterlaced': True, 'IsDefault': False, 'IsForced': False, 'Type': 'Video', 'Index': -1, 'IsExternal': False, 'IsTextSubtitleStream': False, 'SupportsExternalStream': False}, {'DisplayTitle': '', 'IsInterlaced': False, 'IsDefault': False, 'IsForced': False, 'Type': 'Audio', 'Index': -1, 'IsExternal': False, 'IsTextSubtitleStream': False, 'SupportsExternalStream': False}], 'MediaAttachments': [], 'Formats': [], 'RequiredHttpHeaders': {}, 'DefaultAudioStreamIndex': -1}], 'PlaySessionId': '387c948dxxxxxxxxxxfacad5c11b5121'}
2022-08-27 16:05:51.217 T:2783 INFO <general>: JELLYFIN.resources.lib.play_utils -> DEBUG::resources/lib/play_utils.py:383 play_session_id: 387c948dxxxxxxxxxxfacad5c11b5121
2022-08-27 16:05:51.218 T:2783 INFO <general>: JELLYFIN.resources.lib.play_utils -> DEBUG::resources/lib/play_utils.py:1125 get_play_url - media_source: {0}
2022-08-27 16:05:51.222 T:2783 ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'KeyError'>
Error Contents: 'Container'
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.jellycon/default.py", line 18, in <module>
main_entry_point()
File "/storage/.kodi/addons/plugin.video.jellycon/resources/lib/tracking.py", line 23, in wrapper
value = func(*args, **kwargs)
File "/storage/.kodi/addons/plugin.video.jellycon/resources/lib/functions.py", line 146, in main_entry_point
play_action(params)
File "/storage/.kodi/addons/plugin.video.jellycon/resources/lib/functions.py", line 848, in play_action
play_file(play_info)
File "/storage/.kodi/addons/plugin.video.jellycon/resources/lib/tracking.py", line 23, in wrapper
value = func(*args, **kwargs)
File "/storage/.kodi/addons/plugin.video.jellycon/resources/lib/play_utils.py", line 384, in play_file
playurl, playback_type, listitem_props = get_play_url(selected_media_source, play_session_id, channel_id)
File "/storage/.kodi/addons/plugin.video.jellycon/resources/lib/play_utils.py", line 1146, in get_play_url
container = media_source["Container"]
KeyError: 'Container'
-->End of Python script error report<--
2022-08-27 16:05:51.560 T:2783 INFO <general>: Python interpreter stopped
----
2022-08-27 16:23:23.400 T:1093 INFO <general>: initializing python engine.
2022-08-27 16:23:24.152 T:1093 INFO <general>: JELLYFIN.default -> DEBUG::default.py:16 About to enter mainEntryPoint()
2022-08-27 16:23:24.153 T:1093 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:46 ===== JellyCon START =====
2022-08-27 16:23:24.159 T:1093 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:57 Running Python: sys.version_info(major=3, minor=8, micro=9, releaselevel='final', serial=0)
2022-08-27 16:23:24.159 T:1093 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:58 Running JellyCon: 0.5.7+py3
2022-08-27 16:23:24.160 T:1093 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:59 Kodi BuildVersion: 19.4 (19.4.0) Git:19.4-Matrix
2022-08-27 16:23:24.160 T:1093 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:60 Kodi Version: 19
2022-08-27 16:23:24.160 T:1093 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:61 Script argument data: ['plugin://plugin.video.jellycon/', '5', '?mode=SHOW_ADDON_MENU&type=library_item&view_id=b26028d1xxxxxxxxxx2f1bfc13f523d2', 'resume:false']
2022-08-27 16:23:24.161 T:1093 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:317 Parameter string: ?mode=SHOW_ADDON_MENU&type=library_item&view_id=b26028d1xxxxxxxxxx2f1bfc13f523d2
2022-08-27 16:23:24.161 T:1093 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:318 Plugin Path string: plugin://plugin.video.jellycon/
2022-08-27 16:23:24.161 T:1093 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:326 JellyCon -> Detected parameters: {'mode': 'SHOW_ADDON_MENU', 'type': 'library_item', 'view_id': 'b26028d1xxxxxxxxxx2f1bfc13f523d2', 'request_path': '/'}
2022-08-27 16:23:24.162 T:1093 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:64 Script params: {'mode': 'SHOW_ADDON_MENU', 'type': 'library_item', 'view_id': 'b26028d1xxxxxxxxxx2f1bfc13f523d2', 'request_path': '/'}
2022-08-27 16:23:24.195 T:1093 INFO <general>: JELLYFIN.resources.lib.menu_functions -> DEBUG::resources/lib/menu_functions.py:1131 VIEW_INFO : {'Name': 'Live TV', 'ServerId': '2d95109dxxxxxxxxxx0d5764c0f71050', 'Id': 'b26028d1xxxxxxxxxx2f1bfc13f523d2', 'Etag': 'd5bda1fxxxxxxxxxx58e49b8acc17564', 'DateCreated': '2022-08-23T17:30:12.5383099Z', 'CanDelete': False, 'CanDownload': False, 'SortName': 'live tv', 'ForcedSortName': 'Live TV', 'ExternalUrls': [], 'Path': '/config/metadata/views/livetv', 'EnableMediaSourceDisplay': True, 'ChannelId': None, 'Taglines': [], 'Genres': [], 'PlayAccess': 'Full', 'RemoteTrailers': [], 'ProviderIds': {}, 'IsFolder': True, 'ParentId': None, 'Type': 'UserView', 'People': [], 'Studios': [], 'GenreItems': [], 'LocalTrailerCount': 0, 'UserData': {'PlaybackPositionTicks': 0, 'PlayCount': 0, 'IsFavorite': False, 'Played': False, 'Key': 'b26028d1-xxxx-xxxx-c82f-1bfc13f523d2'}, 'ChildCount': 2, 'SpecialFeatureCount': 0, 'DisplayPreferencesId': 'cb46bc72exxxxxxxxxx072de3a65b93a', 'Tags': [], 'CollectionType': 'livetv', 'ImageTags': {}, 'BackdropImageTags': [], 'ImageBlurHashes': {}, 'LocationType': 'FileSystem', 'LockedFields': [], 'LockData': False}
2022-08-27 16:23:24.221 T:1093 INFO <general>: JELLYFIN.resources.lib.functions -> DEBUG::resources/lib/functions.py:166 ===== JellyCon FINISHED =====
2022-08-27 16:23:24.221 T:1093 INFO <general>: CPythonInvoker(9, /storage/.kodi/addons/plugin.video.jellycon/default.py): script successfully run
2022-08-27 16:23:24.566 T:1093 INFO <general>: Python interpreter stopped
2022-08-27 16:23:27.680 T:998 INFO <general>: JELLYFIN.resources.lib.websocket_client -> DEBUG::resources/lib/websocket_client.py:281 Reconnecting WebSocket
2022-08-27 16:23:32.690 T:998 INFO <general>: JELLYFIN.resources.lib.websocket_client -> DEBUG::resources/lib/websocket_client.py:237 Error: Handshake status 404 Not Found
2022-08-27 16:23:38.648 T:910 INFO <general>: JELLYFIN.resources.lib.menu_functions -> DEBUG::resources/lib/menu_functions.py:1188 set_library_window_values Called forced=False
2022-08-27 16:23:38.701 T:910 INFO <general>: JELLYFIN.resources.lib.widgets -> DEBUG::resources/lib/widgets.py:65 set_background_image Called forced=False
2022-08-27 16:23:38.720 T:910 INFO <general>: JELLYFIN.resources.lib.widgets -> DEBUG::resources/lib/widgets.py:80 set_background_image: Need to load more backgrounds 0 - 0
2022-08-27 16:23:38.750 T:910 INFO <general>: JELLYFIN.resources.lib.widgets -> DEBUG::resources/lib/widgets.py:108 set_background_image: Loaded 0 more backgrounds
2022-08-27 16:23:52.691 T:998 INFO <general>: JELLYFIN.resources.lib.websocket_client -> DEBUG::resources/lib/websocket_client.py:281 Reconnecting WebSocket
2022-08-27 16:23:58.826 T:910 INFO <general>: JELLYFIN.resources.lib.menu_functions -> DEBUG::resources/lib/menu_functions.py:1188 set_library_window_values Called forced=False
2022-08-27 16:23:58.871 T:910 INFO <general>: JELLYFIN.resources.lib.widgets -> DEBUG::resources/lib/widgets.py:65 set_background_image Called forced=False
2022-08-27 16:23:58.893 T:910 INFO <general>: JELLYFIN.resources.lib.widgets -> DEBUG::resources/lib/widgets.py:80 set_background_image: Need to load more backgrounds 0 - 0
2022-08-27 16:23:58.925 T:910 INFO <general>: JELLYFIN.resources.lib.widgets -> DEBUG::resources/lib/widgets.py:108 set_background_image: Loaded 0 more backgrounds
2022-08-27 16:24:02.707 T:998 INFO <general>: JELLYFIN.resources.lib.websocket_client -> DEBUG::resources/lib/websocket_client.py:237 Error: Handshake status 404 Not Found
2022-08-27 16:24:19.051 T:910 INFO <general>: JELLYFIN.resources.lib.menu_functions -> DEBUG::resources/lib/menu_functions.py:1188 set_library_window_values Called forced=False
2022-08-27 16:24:19.094 T:910 INFO <general>: JELLYFIN.resources.lib.widgets -> DEBUG::resources/lib/widgets.py:65 set_background_image Called forced=False
2022-08-27 16:24:19.115 T:910 INFO <general>: JELLYFIN.resources.lib.widgets -> DEBUG::resources/lib/widgets.py:80 set_background_image: Need to load more backgrounds 0 - 0
2022-08-27 16:24:19.140 T:910 INFO <general>: JELLYFIN.resources.lib.widgets -> DEBUG::resources/lib/widgets.py:108 set_background_image: Loaded 0 more backgrounds
It looks like when using tvheadend there's a different api response for some reason. Fortunately, it seems easy to account for locally as the container is only needed in rare cases. If you'd like to do some testing, then edit the file /storage/.kodi/addons/plugin.video.jellycon/resources/lib/play_utils.py
and change line 1146 from container = media_source["Container"]
to container = media_source.get("Container", "")
. That should be enough to make it start working for you, though you may have to restart Kodi before it will take effect. Also be aware that when playing live tv there's quite a delay from when you hit play until it actually starts playing (I think this is a server thing, but I haven't looked into it much yet).
After changing the line 1146 to what you suggested, the stream works correctly ONLY if Allow direct file playback
is set.
If not, I get the error below :
2022-08-27 23:19:30.099 T:4041 ERROR <general>: CCurlFile::Open failed with code 404 for http://myjellyfinserver/Videos/876411bxxxxxxxxxxb5316f840ced514/stream?static=True&PlaySessionId=83dfb1b10xxxxxxxxxx370525b74ec30&MediaSourceId=7xxxxx3&LiveStreamId=None:
2022-08-27 23:19:30.100 T:4041 ERROR <general>: CFileCache::Open - <http://myjellyfinserver/Videos/876411bxxxxxxxxxxb5316f840ced514/stream?static=True&PlaySessionId=83dfb1b10xxxxxxxxxx370525b74ec30&MediaSourceId=7xxxxx3&LiveStreamId=None> failed to open
2022-08-27 23:19:30.100 T:4041 ERROR <general>: CVideoPlayer::OpenInputStream - error opening [http://myjellyfinserver/Videos/876411bxxxxxxxxxxb5316f840ced514/stream?static=True&PlaySessionId=83dfb1b10xxxxxxxxxx370525b74ec30&MediaSourceId=7xxxxx3&LiveStreamId=None]
Frankly the reason I was setting up Jellyfin was in case the Internet speed between the place I was on vacation and my home was not enough for direct play (direct play is already possible with the TVHeadEnd plugin on Kodi). So I need transcoding to work in this case (which does on my Android phone and on Firefox).
If you have any other ideas to make transcoding work I am all ears.
PS : thank you for the effort you already put into resolving this.
And on the server side I get :
[23:40:01] [INF] [48] TVHeadEnd.AccessTicketHandler: [TVHclient] AccessTicketHandler.GetAccessTicket: New ticket (#24) created for channelId=7xxxxx3
[23:40:01] [INF] [129] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for myuser. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[23:40:01] [INF] [129] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Kodi, Path=http://mytvheadendserver:9981/stream/channelid/7xxxxx3?ticket=11d07a5exxxxxxxxxx441c132e25a6d486efec87, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/876411b3-xxxx-xxxx-3b53-16f840ced514/stream?MediaSourceId=7xxxxx3&Static=true&AudioStreamIndex=-1&api_key=<token>
[23:40:01] [ERR] [48] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL HEAD /Videos/876411bxxxxxxxxxxb5316f840ced514/stream.
MediaBrowser.Common.Extensions.ResourceNotFoundException: Exception of type 'MediaBrowser.Common.Extensions.ResourceNotFoundException' was thrown.
at Emby.Server.Implementations.Library.MediaSourceManager.GetLiveStreamWithDirectStreamProvider(String id, CancellationToken cancellationToken)
at Jellyfin.Api.Helpers.StreamingHelpers.GetStreamingState(StreamingRequestDto streamingRequest, HttpRequest httpRequest, IAuthorizationContext authorizationContext, IMediaSourceManager mediaSourceManager, IUserManager userManager, ILibraryManager libraryManager, IServerConfigurationManager serverConfigurationManager, IMediaEncoder mediaEncoder, EncodingHelper encodingHelper, IDlnaManager dlnaManager, IDeviceManager deviceManager, TranscodingJobHelper transcodingJobHelper, TranscodingJobType transcodingJobType, CancellationToken cancellationToken)
at Jellyfin.Api.Controllers.VideosController.GetVideoStream(Guid itemId, String container, Nullable`1 static, String params, String tag, String deviceProfileId, String playSessionId, String segmentContainer, Nullable`1 segmentLength, Nullable`1 minSegments, String mediaSourceId, String deviceId, String audioCodec, Nullable`1 enableAutoStreamCopy, Nullable`1 allowVideoStreamCopy, Nullable`1 allowAudioStreamCopy, Nullable`1 breakOnNonKeyFrames, Nullable`1 audioSampleRate, Nullable`1 maxAudioBitDepth, Nullable`1 audioBitRate, Nullable`1 audioChannels, Nullable`1 maxAudioChannels, String profile, String level, Nullable`1 framerate, Nullable`1 maxFramerate, Nullable`1 copyTimestamps, Nullable`1 startTimeTicks, Nullable`1 width, Nullable`1 height, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 videoBitRate, Nullable`1 subtitleStreamIndex, Nullable`1 subtitleMethod, Nullable`1 maxRefFrames, Nullable`1 maxVideoBitDepth, Nullable`1 requireAvc, Nullable`1 deInterlace, Nullable`1 requireNonAnamorphic, Nullable`1 transcodingMaxAudioChannels, Nullable`1 cpuCoreLimit, String liveStreamId, Nullable`1 enableMpegtsM2TsMode, String videoCodec, String subtitleCodec, String transcodeReasons, Nullable`1 audioStreamIndex, Nullable`1 videoStreamIndex, Nullable`1 context, Dictionary`2 streamOptions)
at lambda_method1334(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Jellyfin.Server.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[23:40:01] [ERR] [129] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL GET /Videos/876411bxxxxxxxxxxb5316f840ced514/stream.
MediaBrowser.Common.Extensions.ResourceNotFoundException: Exception of type 'MediaBrowser.Common.Extensions.ResourceNotFoundException' was thrown.
at Emby.Server.Implementations.Library.MediaSourceManager.GetLiveStreamWithDirectStreamProvider(String id, CancellationToken cancellationToken)
at Jellyfin.Api.Helpers.StreamingHelpers.GetStreamingState(StreamingRequestDto streamingRequest, HttpRequest httpRequest, IAuthorizationContext authorizationContext, IMediaSourceManager mediaSourceManager, IUserManager userManager, ILibraryManager libraryManager, IServerConfigurationManager serverConfigurationManager, IMediaEncoder mediaEncoder, EncodingHelper encodingHelper, IDlnaManager dlnaManager, IDeviceManager deviceManager, TranscodingJobHelper transcodingJobHelper, TranscodingJobType transcodingJobType, CancellationToken cancellationToken)
at Jellyfin.Api.Controllers.VideosController.GetVideoStream(Guid itemId, String container, Nullable`1 static, String params, String tag, String deviceProfileId, String playSessionId, String segmentContainer, Nullable`1 segmentLength, Nullable`1 minSegments, String mediaSourceId, String deviceId, String audioCodec, Nullable`1 enableAutoStreamCopy, Nullable`1 allowVideoStreamCopy, Nullable`1 allowAudioStreamCopy, Nullable`1 breakOnNonKeyFrames, Nullable`1 audioSampleRate, Nullable`1 maxAudioBitDepth, Nullable`1 audioBitRate, Nullable`1 audioChannels, Nullable`1 maxAudioChannels, String profile, String level, Nullable`1 framerate, Nullable`1 maxFramerate, Nullable`1 copyTimestamps, Nullable`1 startTimeTicks, Nullable`1 width, Nullable`1 height, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 videoBitRate, Nullable`1 subtitleStreamIndex, Nullable`1 subtitleMethod, Nullable`1 maxRefFrames, Nullable`1 maxVideoBitDepth, Nullable`1 requireAvc, Nullable`1 deInterlace, Nullable`1 requireNonAnamorphic, Nullable`1 transcodingMaxAudioChannels, Nullable`1 cpuCoreLimit, String liveStreamId, Nullable`1 enableMpegtsM2TsMode, String videoCodec, String subtitleCodec, String transcodeReasons, Nullable`1 audioStreamIndex, Nullable`1 videoStreamIndex, Nullable`1 context, Dictionary`2 streamOptions)
at lambda_method1341(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Jellyfin.Server.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
After several hours of banging my head against a wall, I'm accepting the fact that I genuinely don't understand tvheadend and I'm unable to get it working with ersatztv (which is the only live tv "provider" I have available). Unfortunately, this means that I have nothing to test against and can't replicate the issues you're having. The only conclusion I can reasonably make is that tvheadend is returning completely different data than other live tv sources added directly to the server, but without a way to replicate and debug it myself I'm not going to be able to do much about it. This might just have to wait until somebody with more live tv sources can investigate further.
First of all thank you for all the effort you already put in solving this issue. The idea is that the web player of Jellyfin (both on Firefox and on the Android app*) are working with the same configuration on Jellyfin server. Maybe there is something in there that could help investigating further. I will try to see if I find a way to make it easier for you to test it, but sadly I am away from my setup this week and couldn't really allocate time.
@mcarlton00
I managed to put up a docker config with a static mp4 file to stream via TVHeadEnd to Jellyfin.
All you have to do is to download the archive from here (link valid 7 days starting from the moment I posted this comment), extract it somewhere where you have docker and docker-compose installed (maybe on a VM) and do a docker-compose up -d
.
There are 2 containers (tvheadend and jellyfin). With both started and once connected on the Jellyfin one (port 8096) you can go to channels and there should be only one channel present. If you try to play it you should start to see the video playing (after some "buffering" time) and you can also transcode it.
I think this will allow you to reproduce my setup and see why Jellycon can't stream the channel if Allow direct file playback
is unset in the configuration (if set, it streams, but for direct streaming I already have TVHeadEnd plugin on Kodi, I was interested in the transcoding feature of Jellyfin, when bandwidth isn't enough, like on vacation through vpn).
PS: sometimes when trying to stream the channel from TVHeadEnd, you get an error in the logs regarding the input (the mp4 file) and streaming doesn't work anymore. I think this is due to the fact that the input is not really an iptv stream but a static mp4 file. When this happens, all you have to do is to restart the TVHeadEnd container to make the stream work again (keep that in mind when checking from Jellycon -> if it still works in Jellyfin web then it is a problem in Jellycon, if not, then you have to restart the container and test again).
Thanks
Describe the bug I installed the plugin as explained here on my LibreElec 10.0.2 (on a RPI4) with Kodi v19.4 without issues. Setting the account wasn't a problem either. For the moment all I have set in Jellyfin is the TVHeadEnd plugin (no other media than TV channels and recordings). When I try to stream a channel (or watch a recording), I get an error on Kodi and nothing happens. Streaming the same channels work from the Jellyfin Android app (installed from F-Droid) and from Firefox.
To Reproduce
Expected behavior The channels should start to stream as it happens on the Android app and on Firefox.
Logs
Just as an information, the folder
/storage/.kodi/userdata/addon_data/plugin.video.jellycon/
was present on the FS.System :