Kodi Community Forum
[RELEASE] XBMC Subtitles - Addon Script - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Subtitle Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=143)
+---- Thread: [RELEASE] XBMC Subtitles - Addon Script (/showthread.php?tid=126495)



RE: [RELEASE] XBMC Subtitles - Addon Script - Popeye - 2012-11-22

(2012-11-22, 11:07)amet Wrote:
(2012-11-22, 10:58)Popeye Wrote: Today you have a automatic setting to both auto search on next provider as well as grab the first hit. This is good.

The settings option to show keyboard could maybe be and option to auto-show the keyboard if the search has failed, while still keeping UI link to the kb for manual searches.

as I said before, the script is written with library users in mind, file mode is "not supported" as I dont use it Smile

Well, from my eden change both modes are easily supported. You have all folder names etc in your code already today. Also, even when using library mode, the folder name option can be used for better accuracy (tested and verified)

(2012-11-22, 11:07)amet Wrote:
(2012-11-22, 10:58)Popeye Wrote: The settings option for use folder names for lookups should work as I have described ( Big Grin ). With this setting enabled, a UI option to start the keyboard with a cleaned title would be show. This will allow a more generic search.
I dont mind it being like that, but here is a warning... I dont use the file mode, if we change it to the way you want it, we would expect you to maintain it Smile

I can maintain it. Big Grin

(2012-11-22, 11:07)amet Wrote:
(2012-11-22, 10:58)Popeye Wrote: The main UI today showing the playing title could show the playing file name and it's folder. This to help users pick the correct sub.

you can enable file name display for that, granted, folder should be shown in case the name is not descriptive

From code deciding what is descriptive or not is quite hard as you know. My idea was that you should at least display what you search for. This is not the case today.






RE: [RELEASE] XBMC Subtitles - Addon Script - amet - 2012-11-22

1. thats good, i'll review one more time but I would like these changes to go in Frodo only, lets leave Eden
2. I might refer you to this post in future Big Grin
3. I agree, problem is that almost every service searches in a different way and changes search string on the fly... we can eliminate setting "Display file name in results page", I wouldnt mind it displaying foldername/filename.avi all the time. Window might need some love to display full folder and file name in one line... as is some skins have issue of cutting long file names so you cant see it in full.


If we can get some major subtitle addons changes done in XBMC core after Frodo release we will have to rethink this whole addon... more to come if/once it gets in xbmc core



RE: [RELEASE] XBMC Subtitles - Addon Script - phate89 - 2012-11-22

(2012-11-21, 15:04)phate89 Wrote: it is possible to use the original title to look to subtitles or edit the plugin to add an option to do so?
Because italians are stupid and often add subtitles to tv show names (for example "breaking bad" becomes "breaking bad - danni collaterali"), so if i want the italian plot i use thtat title, but this breaks the subtitles addon because when it search it uses the long title and itasa (biggest italian translator website) and all subtitle makers use the original one...

Is it possible to do this? Because i tried to look to the code and i can't find a way to get the original name through the videoplayer api


RE: [RELEASE] XBMC Subtitles - Addon Script - amet - 2012-11-22

(2012-11-22, 13:06)phate89 Wrote:
(2012-11-21, 15:04)phate89 Wrote: it is possible to use the original title to look to subtitles or edit the plugin to add an option to do so?
Because italians are stupid and often add subtitles to tv show names (for example "breaking bad" becomes "breaking bad - danni collaterali"), so if i want the italian plot i use thtat title, but this breaks the subtitles addon because when it search it uses the long title and itasa (biggest italian translator website) and all subtitle makers use the original one...

Is it possible to do this? Because i tried to look to the code and i can't find a way to get the original name through the videoplayer api

what original name are you talking about? if item is in library Addon will search using Player VideoTitle... do you want to search using English or Italian title?




RE: [RELEASE] XBMC Subtitles - Addon Script - phate89 - 2012-11-22

(2012-11-22, 13:22)amet Wrote:
(2012-11-22, 13:06)phate89 Wrote:
(2012-11-21, 15:04)phate89 Wrote: it is possible to use the original title to look to subtitles or edit the plugin to add an option to do so?
Because italians are stupid and often add subtitles to tv show names (for example "breaking bad" becomes "breaking bad - danni collaterali"), so if i want the italian plot i use thtat title, but this breaks the subtitles addon because when it search it uses the long title and itasa (biggest italian translator website) and all subtitle makers use the original one...

Is it possible to do this? Because i tried to look to the code and i can't find a way to get the original name through the videoplayer api

what original name are you talking about? if item is in library Addon will search using Player VideoTitle... do you want to search using English or Italian title?

English title, because in the sub websites uses the original (english) title, but player videotitle is the localized one, so if i have in archive "breaking bad - danni collaterali" it searches that, but in itasa, opensubtitles, podnapisi it's always called only "breaking bad", so it returns no result.
The alternative is to manually select the english version so the title will be the correct one, but it's a manual process and i will also loose all the italian plots


RE: [RELEASE] XBMC Subtitles - Addon Script - amet - 2012-11-22

maybe we could call original title info label on that. something ITASA author might look into

Code:
xbmc.getInfoLabel("VideoPlayer.OriginalTitle")



RE: [RELEASE] XBMC Subtitles - Addon Script - phate89 - 2012-11-22

(2012-11-22, 14:08)amet Wrote: maybe we could call original title info label on that. something ITASA author might look into

Code:
xbmc.getInfoLabel("VideoPlayer.OriginalTitle")
It's not better to add an option in settings? If it's enabled it uses the localized title, if it's not it uses the original one..


RE: [RELEASE] XBMC Subtitles - Addon Script - amet - 2012-11-22

nope, you are about the only person that needs it...


RE: [RELEASE] XBMC Subtitles - Addon Script - phate89 - 2012-11-22

(2012-11-22, 14:15)amet Wrote: nope, you are about the only person that needs it...

I don't think so, itasa looks always with english names and all the people who uses italian names are affected by this, but it's your call

Btw the string you pass me returns an empty string, is that the original tv show name or just the episode name?


RE: [RELEASE] XBMC Subtitles - Addon Script - Popeye - 2012-11-22

(2012-11-22, 12:04)amet Wrote: 1. thats good, i'll review one more time but I would like these changes to go in Frodo only, lets leave Eden
2. I might refer you to this post in future Big Grin
3. I agree, problem is that almost every service searches in a different way and changes search string on the fly... we can eliminate setting "Display file name in results page", I wouldnt mind it displaying foldername/filename.avi all the time. Window might need some love to display full folder and file name in one line... as is some skins have issue of cutting long file names so you cant see it in full.


If we can get some major subtitle addons changes done in XBMC core after Frodo release we will have to rethink this whole addon... more to come if/once it gets in xbmc core

1. I will do one more fix of my eden branch (where search is triggered even when keyboard is canceled) and release this for friends to test. Then I'll look into your frodo branch.
2. Please do Big Grin
3. Marquee could be a solution for long names.

For the future I have one idea based on what I have done in one of my other addons. With the structure you have today all subtitle providers needs to be "compiled" into the addon. What I have done is a core addon only doing the core work and additional addons for their unique service all connected by a pre defined API.
In this specific case it would be to gather the playing file specific data and then send this data to the users installed subtitle service. The service will then manage the site specific searching and call back the results. The core would then handle the file placement, setting of subtitle and resume the video.
With this de-coupled setup anyone can develop a site specific addon without affecting the core and vice versa....




RE: [RELEASE] XBMC Subtitles - Addon Script - ronie - 2012-11-22

(2012-11-22, 12:04)amet Wrote: If we can get some major subtitle addons changes done in XBMC core

Image


RE: [RELEASE] XBMC Subtitles - Addon Script - amet - 2012-11-22

(2012-11-22, 16:08)Popeye Wrote:
(2012-11-22, 12:04)amet Wrote: 1. thats good, i'll review one more time but I would like these changes to go in Frodo only, lets leave Eden
2. I might refer you to this post in future Big Grin
3. I agree, problem is that almost every service searches in a different way and changes search string on the fly... we can eliminate setting "Display file name in results page", I wouldnt mind it displaying foldername/filename.avi all the time. Window might need some love to display full folder and file name in one line... as is some skins have issue of cutting long file names so you cant see it in full.


If we can get some major subtitle addons changes done in XBMC core after Frodo release we will have to rethink this whole addon... more to come if/once it gets in xbmc core

1. I will do one more fix of my eden branch (where search is triggered even when keyboard is canceled) and release this for friends to test. Then I'll look into your frodo branch.
2. Please do Big Grin
3. Marquee could be a solution for long names.

For the future I have one idea based on what I have done in one of my other addons. With the structure you have today all subtitle providers needs to be "compiled" into the addon. What I have done is a core addon only doing the core work and additional addons for their unique service all connected by a pre defined API.
In this specific case it would be to gather the playing file specific data and then send this data to the users installed subtitle service. The service will then manage the site specific searching and call back the results. The core would then handle the file placement, setting of subtitle and resume the video.
With this de-coupled setup anyone can develop a site specific addon without affecting the core and vice versa....

It's been done already... https://github.com/amet/OpenSubtitles-service

And a branch in subtitle addon work together but it needs some changes in core that are waiting for some better days Smile


RE: [RELEASE] XBMC Subtitles - Addon Script - Popeye - 2012-11-23

(2012-11-22, 19:04)amet Wrote: It's been done already... https://github.com/amet/OpenSubtitles-service

And a branch in subtitle addon work together but it needs some changes in core that are waiting for some better days Smile

Excellent Big Grin



RE: [RELEASE] XBMC Subtitles - Addon Script - phate89 - 2012-11-23

(2012-11-22, 14:08)amet Wrote: maybe we could call original title info label on that. something ITASA author might look into

Code:
xbmc.getInfoLabel("VideoPlayer.OriginalTitle")

With this label don't work, with a tv show it only gets an empty string, probably is ment to be used with movies? There are other apis?


RE: [RELEASE] XBMC Subtitles - Addon Script - amet - 2012-11-23

(2012-11-23, 02:11)phate89 Wrote:
(2012-11-22, 14:08)amet Wrote: maybe we could call original title info label on that. something ITASA author might look into

Code:
xbmc.getInfoLabel("VideoPlayer.OriginalTitle")

With this label don't work, with a tv show it only gets an empty string, probably is ment to be used with movies? There are other apis?

http://wiki.xbmc.org/index.php?title=InfoLabels