ERRORS when enabling EPG and RECORDING images from WMC
#1
Bug 
Hello,

When I disable hide EPG and Recording images from WMC options, some channels are not shown in Kodi. This happens since I started using XBMC/Kodi and ServerWMC.

Here is the complete log:
http://pastebin.com/mn9k9WbE

When channel EPG entries are loaded correctly I get:

Code:
2015/06/20 20:22:13.922 Received client request: Xxxxxx-PC|XXX.XXX.XXX.XXX|GetEntries|60688|1434738215|1435083815
2015/06/20 20:22:13.934 GetEntries> Channel: DISCOVERY CHANNEL, EPG entries: 79
2015/06/20 20:22:13.934 Finished request GetEntries in 0,02s

But on some channels, loading EPG entries throws an exception and the entire channel and its EPG contents are ignored:

Code:
2015/06/20 20:22:14.203 Received client request: Xxxxxx-PC|XXX.XXX.XXX.XXX|GetEntries|62971|1434738215|1435083815
2015/06/20 20:22:14.214 ProcessClientRequest> error: System.UriFormatException: URI no válido: URI está vacío.
   en System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   en ServerWMC.Worker.RecService.ProcessGuideImage(FrontEndClient client, String path, String cacheDirFullName, Boolean logErrors)
   en ServerWMC.Worker.RecService.GetProgramImage(FrontEndClient client, Program program, String cacheFolder, Boolean logErrors)
   en ServerWMC.Worker.RecService.GetEntries(FrontEndClient client, String channelID, String start_t, String end_t)
   en ServerWMC.Worker.Worker.ProcessClientRequest(String request)
2015/06/20 20:22:14.214 Finished request GetEntries in 0,01s

The same for recordings:

Code:
2015/06/20 20:22:10.712 Received client request: Xxxxxx-PC|XXX.XXX.XXX.XXX|GetRecordings
2015/06/20 20:22:10.970 GetRecordings error: System.UriFormatException: URI no válido: URI está vacío.
   en System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   en ServerWMC.Worker.RecService.ProcessGuideImage(FrontEndClient client, String path, String cacheDirFullName, Boolean logErrors)
   en ServerWMC.Worker.RecService.GetProgramImage(FrontEndClient client, Program program, String cacheFolder, Boolean logErrors)
   en ServerWMC.Worker.RecService.GetRecordings(FrontEndClient client)
2015/06/20 20:22:10.970 Finished request GetRecordings in 0,26s

In both cases, the exception message is: "ProcessClientRequest> error: System.UriFormatException: invalid URI: empty URI."

All channels have entries with and without guide images extracted from the same sources: TheTVDB and TMDB.

Here is an example of the MXF file injected to WMC (validated by loadmxf, no errors):

GuideImage tag:

Code:
<GuideImage id="i118" imageUrl="http://image.tmdb.org/t/p/w342/cpl7R5d3qwWvykRRSxdhQ0htstU.jpg" uid="!Image!Cdigofuente"/>
<GuideImage id="i119" imageUrl="http://thetvdb.com/banners/_cache/fanart/original/259014-1.jpg" uid="!Image!LightningPoint"/>

Program tag without extra metadata:

Code:
<Program description="Xune Elipe presenta este programa dedicado al panorama musical asturiano." id="46" isSeries="1" keywords="k4" title="El Club Musical" uid="!Program!0064701708644AA2"/>

Program tag with metadata:

Code:
<Program description="XIII ha estado injustamente encerrado en un campo de rendición por el Director de la Agencia Nacional de Seguridad. Tras dos años de cautiverio, XIII emprende una audaz fuga ayudado por dos misteriosos aliados. Estos aliados resultan ser el Ex-presidente Sheridan y una psicótica asesina, Irina Svetlanova.XIII: La serie es un thriller de acción basado en el cómic de Jean Van Hamme y William Vance que ya tuvo adaptación televisiva en 2008 en formato miniserie y que estaba protagonizada por Stephen Dorff y Val Kilmer." guideImage="i94" halfStars="6" id="45" isSeries="1" keywords="k8,k801" mpaaRating="2" series="si1" title="XIII" uid="!Program!00646FEA518BE417" year="2008">
    <DirectorRole person="p25" rank="1"/>
    <WriterRole person="p33" rank="1"/>
    <ActorRole person="p37" rank="5"/>
    <ActorRole person="p38" rank="6"/>
    <ActorRole person="p39" rank="7"/>
    <ActorRole person="p40" rank="8"/>
    <ActorRole person="p41" rank="9"/>
    <ActorRole person="p42" rank="10"/>
    <ActorRole person="p43" rank="11"/>
    <ActorRole person="p44" rank="12"/>
    <ActorRole person="p45" rank="13"/>
</Program>

Channels parsed without errors shows guide images, actors, director and writers in Kodi EPG view perfectly when using Isengard 15.0. When I enable those two options, ignore EPG and Recording images from WMC, everything works as expected, I can see all channels and EPG but obviously, not guide images are shown.

I can provide whatever logs or config info you need.

Thank you and great work, ServerWMC is fantastic Nod
Reply
#2
is it possible that any of your imageUrl in the extracted data are blank strings?

Looking at our code for "ProcessDuideImage" we only try to process the image if WMC has a GuideImage attribute and the GuideImage.ImageURL field is not null. BUt we dont check for an empty string or otherwise handle exceptions if it is not a correctly formatted URL/URI. We simply pass the ImageURL into the URI class constructor, which in this case is throwing an exception that isnt caught until the outer channel/recording processing loop, causing that channel/recording to be skipped. Obviously we should be dealing with any exception within ProcessGuideImage so that you just end up with no image but not losing the whole channel or recording from the list Smile

But in the meantime if you can make sure all ImageURL fields are either populated with a valid URL or are null (rather than empty string) that should hopefully get you working
pvr.wmc TV addon and ServerWMC Backend Development Team
http://bit.ly/ServerWMC
Reply
#3
Yes, I'm reviewing the MXF generated and there is GuideImage tag with an emtpy imageUrl attribute which is screwing up the whole thing...

Quote:Obviously we should be dealing with any exception within ProcessGuideImage so that you just end up with no image but not losing the whole channel or recording from the list
That would be fantastic Big Grin

But this is clearly my fault, I'm fixing it.

THANK YOU.
Reply
#4
@_WiLloW_, good catch - we'll fix it on our end too. If you would like an early test build with this fix for your debugging let me know.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#5
Yes, please.

Thank you!
Reply
#6
Cool. I pm'd you a test build.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#7
Problem solved! No errors and now the EPG is showing all channels with guide images and all recordings.

Everything working as expected in all versions from Gotham to Isengard.

A BIG THANK YOU! Nod
Reply
#8
your welcome, and thanks to scarecrow for locating the bug.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply

Logout Mark Read Team Forum Stats Members Help
ERRORS when enabling EPG and RECORDING images from WMC0