Active subtitle path - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174) +---- Thread: Active subtitle path (/showthread.php?tid=373594) |
Active subtitle path - BaGRoS - 2023-06-27 I am looking for a way to retrieve the path to active captions currently being displayed, regardless of their location. Or is there a way to download the captions as a text variable? Is it possible to fetch captions from a stream? Active captions. I am working on creating an AI translator, but I cannot find a way to retrieve or download active captions. Any help would be appreciated. Unfortunately, my code is not functioning correctly. Code: def fetch_active_subtitle_path(kodi_ip_address: str, kodi_port: int) -> str: RE: Active subtitle path - scott967 - 2023-06-30 I tested your code. I don't see any property of "enabled" in the schema? I do note that 'name' returned an empty string; not sure what that's supposed to be. log here: lesiholeqo.kodi (paste) I think you want rather
but still "name" doesn't return much. For external sub all I get is Code: DEBUG:__main__:Active subtitle path: (External) scott s. . RE: Active subtitle path - BaGRoS - 2023-06-30 Hi Exactly how do I find the subtitle path?? Thus should be easy, but it's not. Many thanks, RE: Active subtitle path - scott967 - 2023-06-30 Sorry, no idea. My assumption is it would need a change to the JSON method to retrieve the path (I'm assuming it is available somewhere). update. I did take look at the code, and it wasn't obvious to me where to get the sub. I'm assuming the proposed requirement is to change the JSON-RPC response for method Player.GetProperties property currentsubtitle "name" attribute so that if the current subtitle is an external sub, the full path/filename is provided in the response. Not sure about the case of an internal text subtitle? scott s. . |