2011-02-27, 20:22
Hello everyone and amet in particular,
First off thanks again for the great addon. I've only recently updated to Dharma/10.0 and while my old skin is lacking proper support (MediaStream Redux) I've been using the new addon with Confluence and find it a valuable feature of XBMC.
I've posted before about adding my own service to for local subtitles and now, after finally completing all the scripts and configuration for the rest of my automated media setup, am getting around to it.
Looking for an API I found several of your posts amet directing people to existing service.py's for reference. I've tried reading a couple of updated service script sources but I'm still having trouble "reverse engineering" your exact interface:
1. It seems like there are two main functions that must be implemented, search_subtitles and download_subtitles. Are there any other mandatory functions (or heaven forbid variables)?
2. What do all the input parameters mean? Specifically, what does rar/set_temp mean and what are their expected types? Same for zip_subs/sub_folder/session_id?
3. I see both of these functions return a tuple of 3 items each. What are their types? It seems like search_subtitles returns: a list (of tuples?), some unknown string and a message (msg) I've yet to see used. download_subtitles is a boolean (which is usually False but I can't see the significance), a language string (is this a known set in XBMC? where can I find it?) and a subtitles file (full path?). I'm unlclear about some of their uses and types.
4. Are there any expected side effects to these functions besides of course extracting the downloaded file if necessary?
What I think I'm looking for is a more documented sample script (with as few utility/private functions or clearly marked ones) or perhaps an API document to get me started.
I'm sorry for the long post and am accepting PMs of course (if preferred) in reply.
Thanks.
First off thanks again for the great addon. I've only recently updated to Dharma/10.0 and while my old skin is lacking proper support (MediaStream Redux) I've been using the new addon with Confluence and find it a valuable feature of XBMC.
I've posted before about adding my own service to for local subtitles and now, after finally completing all the scripts and configuration for the rest of my automated media setup, am getting around to it.
Looking for an API I found several of your posts amet directing people to existing service.py's for reference. I've tried reading a couple of updated service script sources but I'm still having trouble "reverse engineering" your exact interface:
1. It seems like there are two main functions that must be implemented, search_subtitles and download_subtitles. Are there any other mandatory functions (or heaven forbid variables)?
2. What do all the input parameters mean? Specifically, what does rar/set_temp mean and what are their expected types? Same for zip_subs/sub_folder/session_id?
3. I see both of these functions return a tuple of 3 items each. What are their types? It seems like search_subtitles returns: a list (of tuples?), some unknown string and a message (msg) I've yet to see used. download_subtitles is a boolean (which is usually False but I can't see the significance), a language string (is this a known set in XBMC? where can I find it?) and a subtitles file (full path?). I'm unlclear about some of their uses and types.
4. Are there any expected side effects to these functions besides of course extracting the downloaded file if necessary?
What I think I'm looking for is a more documented sample script (with as few utility/private functions or clearly marked ones) or perhaps an API document to get me started.
I'm sorry for the long post and am accepting PMs of course (if preferred) in reply.
Thanks.