Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move subtitle addon core handling to core. #3552

Merged
merged 5 commits into from
Nov 12, 2013
Merged

Conversation

jmarshallnz
Copy link
Contributor

This is primarily aimed at taking away some of the load from @amet at having to handle 1249591 subtitle services.

It moves the UI portion of the xbmc subtitles script into core, and has the services run as plugins from there. This will allow (in future) for better integration of downloading of subtitles. For now it's still a little clunky in that downloading of subtitles is still somewhat separate from embedded or external subs already on disk. Nonetheless, it's a starting point and IMO important to get that starting point in so that the subtitle service guys can get things done (it's a minor change for them) and so that skinners can get their changes done.

If anyone has any ideas on how it could be better integrated in the future, then that's cool - please discuss on forums to keep this focused on code discussion.

It does add a new window for skinners to deal with, but most already have it in place as most support the subtitles script. Their existing window can be transferred over just by renaming the file in most cases.

@Montellese: It relies on multi-select list settings, so a solution to that needs to happen first. Note that all it needs is a comma separated list of languages, so we don't actually need any special retrieving of a multi-select setting pre-broken down (as we'll just stuff it back together again).

@jmarshallnz
Copy link
Contributor Author

jenkins build this please

#empty strings from id 24104 to 24999
msgctxt "#24104"
msgid "Save subtitles to movie folder"
msgstr ""

This comment was marked as spam.

@ronie
Copy link
Member

ronie commented Nov 5, 2013

a thing i noticed is, xbmc is not settings focus to the list.
(can't do it in the skin as the list is still empty on windowopen)

i've updated DialogSubtitles.xml to use the new positioning goodies:
ronie@ab987f6

@arnova
Copy link
Member

arnova commented Nov 6, 2013

Overall looking good. I assume the stack handling is still on the todo-list?

@jmarshallnz
Copy link
Contributor Author

not on my list short-term, so if you could adapt what you have that might be useful.

@arnova
Copy link
Member

arnova commented Nov 7, 2013

Well I don't have anything yet beside "ideas" but this is certainly something I'd be willing to work on. When will this hit mainline?

@jmarshallnz
Copy link
Contributor Author

It's reliant on the list settings stuff, so towards the end of the merge window.

@jmarshallnz
Copy link
Contributor Author

@amet rebased up with @Montellese' list[string] implementation. Please test.

<delimiter>,</delimiter>
<minimum>1</minimum>
</constraints>
<control type="list" format="string" />

This comment was marked as spam.

This comment was marked as spam.

@jmarshallnz
Copy link
Contributor Author

jenkins build this please

<constraints>
<options>languages</options>
<delimiter>,</delimiter>
<minimum>1</minimum>

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@amet
Copy link
Contributor

amet commented Nov 11, 2013

@jmarshallnz I will try to test tonight to make sure all is ok with the service. are we ok to clean it up in the upcoming merge window before Gotham goes into freeze window or is what we have here final?

we should really take care of default services and stack movies, as much as I hate them :)

EDIT: just realized we missed merge window, didn't see it was 11th.. so we have some time to polish it and shove in in December.

@jmarshallnz
Copy link
Contributor Author

Fixes are fine after the fact. And this is ready to go in - it was reviewed during merge window.

@jmarshallnz
Copy link
Contributor Author

@amet: rebased from recent flurry of commits. Ready for your testing.

jenkins build this please

amet added a commit that referenced this pull request Nov 12, 2013
Move subtitle addon core handling to core.
@amet amet merged commit 8dc1825 into xbmc:master Nov 12, 2013
@jmarshallnz jmarshallnz deleted the SubsCore branch November 12, 2013 09:04
@xhaggi
Copy link
Member

xhaggi commented Nov 12, 2013

@jmarshallnz what do you think about replacing the country flag icons with these?
http://www.customicondesign.com/free-icons/flag-icon-set/all-in-one-country-flag-icon-set/

@amet
Copy link
Contributor

amet commented Nov 12, 2013

where were you 3 minutes ago??

EDIT: anyway its a skin thing, Jezz_X/ronie/you or whoever wants to change it is more than welcome to it

@xhaggi
Copy link
Member

xhaggi commented Nov 12, 2013

i can add a PR with the new ones, if you want?

@jmarshallnz
Copy link
Contributor Author

They don't appear to be freely distributable?

@xhaggi
Copy link
Member

xhaggi commented Nov 12, 2013

yeah you are right .. will look for some other ones.

@xhaggi
Copy link
Member

xhaggi commented Nov 12, 2013

https://www.gosquared.com/resources/flag-icons/

Usage:
  You're free to use this set for both personal and commercial projects
  (MIT License, see LICENSE.txt), and a back-link is not required
  (but certainly appreciated).

are they okay?

xhaggi added a commit to xhaggi/xbmc that referenced this pull request Nov 13, 2013
As discussed in xbmc#3552, this replace the subtitle flag icons with new
32x32 pixel icons from https://www.gosquared.com/resources/flag-icons/

This also fixes some wrong flags like uk. It's Ukrainian not United
Kingdom.
@MartijnKaijser
Copy link
Member

@jmarshallnz
it seems that the skin uses the old rectangular logos from the service addons which are now the icon.png
Rectangular and transparent icon.png are not allowed according to our repo guidelines (and i'm not going to make exceptions). So the service provider logo should get another .png filename.

Edit: fixed typos.

@jmarshallnz
Copy link
Contributor Author

They'll need icon.png for the add-ons manager I guess? If so, mayaswell make 'em square in the UI as well I should think - no point having two logos?

@MartijnKaijser
Copy link
Member

indeed for addon manager.
well rectangle ones look a bit better in the subtitle dialog than square ones i think.

@jmarshallnz
Copy link
Contributor Author

That might just be a skin thing though?

@amet: any opinion?

@MartijnKaijser
Copy link
Member

For reference Wunderground addon has it like in the resource folder
https://github.com/XBMC-Addons/weather.wunderground/blob/master/resources/logo/logo.jpg

@taxigps
Copy link
Member

taxigps commented Dec 3, 2013

@jmarshallnz no way to downlaod sub/idx subtitles now?

@jmarshallnz
Copy link
Contributor Author

That's a question for @amet

CStdString strSubPath = URIUtils::AddFileToFolder(strDestPath, strSubName);

// and copy the file across
CFile::Cache(strUrl, strSubPath);

This comment was marked as spam.

@amet
Copy link
Contributor

amet commented Dec 4, 2013

@taxigps I have no way of testing that... if you have a service that downloads sub/idx let me have it and we can just check for idx if ext is sub. should not be too hard

@amet
Copy link
Contributor

amet commented Dec 4, 2013

@jmarshallnz @taxigps something like this ? http://paste.ubuntu.com/6521191/

but as said earlier, I have nothing to test with... all done blind. it compiles though :)

@taxigps
Copy link
Member

taxigps commented Dec 4, 2013

@amet yes, the patch is ok. my service here https://github.com/taxigps/service.subtitles.shooter. you can test it. but not all movie have sub/idx subtitle.

@taxigps
Copy link
Member

taxigps commented Dec 5, 2013

@amet two problem of your patch.

  1. URIUtils::ReplaceExtension(strUrl,".idx"); not work, need change to strUrl = URIUtils::ReplaceExtension(strUrl,".idx");
  2. idx/sub subtitle can't load after cache. and it can load when restart the movie play.

@taxigps
Copy link
Member

taxigps commented Dec 5, 2013

@amet I have fixed the problem of the patch, and it works well in my test.

new patch here: http://paste.ubuntu.com/6523036/

@amet
Copy link
Contributor

amet commented Dec 5, 2013

@taxigps, feel free to make PR or push in as fix if you tested it... I won't be able test for few days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants