google-code-export / sagetv-addons

Automatically exported from code.google.com/p/sagetv-addons
1 stars 0 forks source link

Add ability to set Show language field #351

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For which plugin does this feature request apply?
SDEPG

Please describe the feature request below in as much detail as possible.
If possible, I would like to be able to create a filter that will automatically 
set the correct language for programs that are aired on foreign channels.

Original issue reported on code.google.com by gerald.b...@gmail.com on 26 Jan 2013 at 9:35

GoogleCodeExporter commented 9 years ago
Currently the language field is not being set in Sage API calls from this 
plugin.  It is hardcoded to null.

Add the ability to set the language via filters and generators.  The 
SageProgram object will have to be enhanced to support the language field.  
Keep an eye on discussions with Robert to see if a new language field is added 
to the SD service, which would change the approach to implementation here.

No ETA for this implementation, though I don't think it'll be much work to 
actually support it.

Original comment by de...@battams.ca on 27 Jan 2013 at 5:47

GoogleCodeExporter commented 9 years ago
SD beta server now supports this:

{"stationID":"24248","programs":"programID":"SH011798490000","md5":"jXS7r3DV1p5d
luw8Wk15gg","airDateTime":"2013-06-14T00:00:00Z","duration":3600,"cc":true,"ster
eo":true,"programLanguage":"Mandarin"}

But SD packs the language info into the airing details (and/or channel details; 
see sdjson & github tix for more info) and I believe Sage needs it set in the 
Program object, which will pose some problems.  I'll confirm all that when I 
dig into this a little deeper.  The sdjson API still needs to expose the 
language field as well before I can do anything within Sage:

https://code.google.com/p/sdjson/issues/detail?id=10

Original comment by de...@battams.ca on 15 Jun 2013 at 1:16

GoogleCodeExporter commented 9 years ago
Worse case scenario, you could use the airing object to retrieve the SageTV 
Show object and then set the language, similar to what I'm currently doing in 
my Groovy Airing Filter. This is not ideal since each Show typically has 
multiple Airings and you really only need to set the language at the first 
Airing. Processing subsequent Airings is unnecessary but unavoidable. This is 
really a limitation of SageTV since language is more a channel/station feature 
than a Show feature.

Original comment by gerald.b...@gmail.com on 15 Jun 2013 at 2:03

GoogleCodeExporter commented 9 years ago
This issue was closed by revision d0d04d25e36d.

Original comment by de...@battams.ca on 29 Jun 2013 at 2:36

GoogleCodeExporter commented 9 years ago
Here are the details of this fix from my commit message; this fix will be 
available in the next release.  The fix is _very_ lightly tested (i.e. almost 
no testing) so I will need you to verify things for this fix.  Here are the 
details...

The EPG plugin itself will now recognize and set a show's language if
its value is anything other than 'English' or null, which is assumed to
also be English.

The EPG plugin will also set a program's language based on the
descriptionLanguage value of a program.  So channels that, for example,
broadcast in French and also provide their descriptions in French will
now have their program's language value set to French.

Airing filters can also set its associated program's language now by
simply overriding the 'broadcastLanguage' property of the object within
the filter.  When that value is overridden, the EPG plugin will
recognize that after the filter executes and will reset the language in
the associated program.  This should simplify anyone's existing filters
greatly.

Airing generators CANNOT set its associated program's language at this
time.  An attempt to do so will generate a warning in the logs.  If
someone actually hits this and needs this functionality then I'll tackle
it then, otherwise it's way too much hassle for something that I doubt
will be used often by anyone.  The req'd fix to make this work for
airing generators is described in the comments of the code that would
need to be fixed.

Original comment by de...@battams.ca on 29 Jun 2013 at 2:40

GoogleCodeExporter commented 9 years ago

Original comment by de...@battams.ca on 5 Aug 2013 at 5:52