Enhanced Media Badges

Ok… so looking at your log file it seem that the xvid badge works sometime but not others… am I correct?

For instance in your log you select a file called '2. Full Grown Boy’

This generates an xml file with the correct xvid badge, log line 27867:-


Then the file is correctly requested at lines 28123-28136:-

15:26:29 WebServer: http request path:
/thumbnails/MediaBadges/XVID.png
15:26:29 Localize: aTVLanguage: en
15:26:29 WebServer: pms address:

15:26:29 WebServer: cleaned path:
/thumbnails/MediaBadges/XVID.png
15:26:29 WebServer: PlexConnect options:
{‘aTVScreenResolution’: ‘720’, ‘aTVFirmwareVersion’: ‘5.1’, ‘aTVLanguage’: ‘en’, ‘aTVAddress’: ‘10.0.0.22’}
15:26:29 WebServer: additional arguments:

15:26:29 WebServer: serving *.png: /thumbnails/MediaBadges/XVID.png
15:26:29 WebServer: http request header:
Host: trailers.apple.com

I’m completely stumped :frowning: Have you tried a restart of the aTV?

OK. I Can help ya there. The select episode screen shows no XviD but then the detail page shows the XviD badge. Does this help that it’s a certain view?

May be… could you point a web browser to the following address (adding you PMS IP/PORT) and post the resulting xml.

PMS_IP:PORT/library/metadata/85209/children?unwatched=1

Ok, I’ve figured out the problem… I just don’t think there’s a solution for it :frowning:

PMS’s video codec reporting seems very flaky. For instance at the Media element level only a general definition of the video codec is given, in the case of xvid it’s reported as “mpeg4”, which is fine as xvid is an mpeg4 codec. However there are other mpeg4 codecs such as Divx, so to get the real codecID you need to read the value from the stream element, but the problem is that from the episode list level xml you don’t have access to the stream elements, so there’s no way to pull in the real codec name :frowning:

OK I get ya. Just a thought? What about of you name it mpeg4 at the first level and then in the details level then have XviD there? That would work. Yes?

Sure that would work… I guess the real question is how many mpeg4-part2 codecs are there? I can only think of xvid and divx which are basically the same. So could we safely mark all mpeg4-part2 files as xvid.

Ok… new commit that treats all mpeg4-part2 files as xvid… I guess we wait and see if it causes any other problems :slight_smile:

Sure. Sounds good. I’ll keep an eye out for obscure or other codecs which fit the bill.

Shockwave… just confirm for me that the new commit works for you, thanks.

Shockwave.... just confirm for me that the new commit works for you, thanks.

confirmed. works great. and you were right there is only xvid and divx too. so just xvid is good enough.

thanks for the relentless help. (maybe you can help me out with my non-related other request I posted? :-) )

Request

Audio Channels:  1.0

Video Codec: MPEG4

1.0 added… Forgot all about good old mono :smiley:

MPEG4 isn’t just one codec, it’s defined as 30 different parts, for instance:-

mpeg4-part 2 is H263, xvid and Divx
mpeg4-part 10 is H264, avc

Request:

Video: ASF (is this even a thing?), wmv1, wmv3

Audio: wmav2 (I think this is Audio)

I wouldnt be offended if you didnt add them, just kinda a small thing that would be nice to have :p my aunt added some old files to her server with all that.

04:29:13 WebServer: File Not Found:
Traceback (most recent call last):
  File "/root/PlexConnect/WebServer.py", line 213, in do_GET
    f = open(sys.path[0] + sep + "assets" + self.path, "rb")
IOError: [Errno 2] No such file or directory: '/root/PlexConnect/assets/thumbnails/MediaBadges/asf.png'

04:29:13 WebServer: File Not Found:
Traceback (most recent call last):
File “/root/PlexConnect/WebServer.py”, line 213, in do_GET
f = open(sys.path[0] + sep + “assets” + self.path, “rb”)
IOError: [Errno 2] No such file or directory: ‘/root/PlexConnect/assets/thumbnails/MediaBadges/wmv1.png’

04:29:13 WebServer: File Not Found:
Traceback (most recent call last):
File “/root/PlexConnect/WebServer.py”, line 213, in do_GET
f = open(sys.path[0] + sep + “assets” + self.path, “rb”)
IOError: [Errno 2] No such file or directory: ‘/root/PlexConnect/assets/thumbnails/MediaBadges/wmav2.png’

04:29:16 WebServer: File Not Found:
Traceback (most recent call last):
File “/root/PlexConnect/WebServer.py”, line 213, in do_GET
f = open(sys.path[0] + sep + “assets” + self.path, “rb”)
IOError: [Errno 2] No such file or directory: ‘/root/PlexConnect/assets/thumbnails/MediaBadges/asf.png’

04:29:16 WebServer: File Not Found:
Traceback (most recent call last):
File “/root/PlexConnect/WebServer.py”, line 213, in do_GET
f = open(sys.path[0] + sep + “assets” + self.path, “rb”)
IOError: [Errno 2] No such file or directory: ‘/root/PlexConnect/assets/thumbnails/MediaBadges/wmv1.png’

04:29:16 WebServer: File Not Found:
Traceback (most recent call last):
File “/root/PlexConnect/WebServer.py”, line 213, in do_GET
f = open(sys.path[0] + sep + “assets” + self.path, “rb”)
IOError: [Errno 2] No such file or directory: ‘/root/PlexConnect/assets/thumbnails/MediaBadges/wmav2.png’

04:29:17 WebServer: File Not Found:
Traceback (most recent call last):
File “/root/PlexConnect/WebServer.py”, line 213, in do_GET
f = open(sys.path[0] + sep + “assets” + self.path, “rb”)
IOError: [Errno 2] No such file or directory: ‘/root/PlexConnect/assets/thumbnails/MediaBadges/asf.png’

04:29:17 WebServer: File Not Found:
Traceback (most recent call last):
File “/root/PlexConnect/WebServer.py”, line 213, in do_GET
f = open(sys.path[0] + sep + “assets” + self.path, “rb”)
IOError: [Errno 2] No such file or directory: ‘/root/PlexConnect/assets/thumbnails/MediaBadges/wmv3.png’

04:29:17 WebServer: File Not Found:
Traceback (most recent call last):
File “/root/PlexConnect/WebServer.py”, line 213, in do_GET
f = open(sys.path[0] + sep + “assets” + self.path, “rb”)
IOError: [Errno 2] No such file or directory: ‘/root/PlexConnect/assets/thumbnails/MediaBadges/wmav2.png’

Tell your aunt the badges have now been updated :smiley:

Tell your aunt the badges have now been updated :D

Thanks a ton for adding them! I would donate if I could but my Paypal has been permanently suspended right now... so that will have to wait :p

Found a weird bug when navigating a tv show using the current commit as of this post:

17:17:20 WebServer: File Not Found:Traceback (most recent call last):
File "/Applications/PlexConnect/WebServer.py", line 213, in do_GET
f = open(sys.path[0] + sep + "assets" + self.path, "rb")
IOError: [Errno 2] No such file or directory: '/Applications/PlexConnect/assets/thumbnails/MediaBadges/mpeg.png'

17:17:20 WebServer: File Not Found:
Traceback (most recent call last):
File “/Applications/PlexConnect/WebServer.py”, line 213, in do_GET
f = open(sys.path[0] + sep + “assets” + self.path, “rb”)
IOError: [Errno 2] No such file or directory: ‘/Applications/PlexConnect/assets/thumbnails/MediaBadges/mpeg1video.png’

17:17:20 WebServer: File Not Found:
Traceback (most recent call last):
File “/Applications/PlexConnect/WebServer.py”, line 213, in do_GET
f = open(sys.path[0] + sep + “assets” + self.path, “rb”)
IOError: [Errno 2] No such file or directory: ‘/Applications/PlexConnect/assets/thumbnails/MediaBadges/mp2.png’

Not a bug… Just means that none of those badges exist at the moment… well ok then kind of a bug, I guess we should catch missing badges and log a proper message :smiley:

Do you want them adding? If so post the xml for the files in question so I can take a look at the codec info.

If they could be added it would be great :)

Here is the files xml from PMS:

<?xml version="1.0" encoding="UTF-8"?>














Another issue (off topic) when I have fanart turned off it displays an "all episodes" option when viewing tv shows but when fanart is turned on it does not, is it supposed to act this way or is this another bug?  :ph34r:

Note - again all default settings in settings tab outside of fanart on or off after fresh git clone...

>>Another issue (off topic) when I have fanart turned off it displays an "all episodes" option when viewing tv shows but when fanart is turned on it does not, is it supposed to act this way or is this another bug?   :ph34r:

 
Seems to be by design -
Season_List.xml:
                {{COPY(Directory)}}
Season_List_Fanart.xml:
                {{COPY(Directory:title::All=|Season=COPY)}}

The "All Episodes" is cut out intentionally - though I have no idea about the original intention. :-O

I guess, Roidy needs to better answer this one...

Gotcha. That worked perfectly for the missing "all episodes" section using Fanart via Season_List_Fanart.xml view. Thanks for the quick fix...again :)

*Not trying to be a pain in the a$$, just noticed this while I was trying to flip fanart on/off to get the badge bug to appear then seen it and figured why not let ya know now (even tho off topic) just trying to give ya guys feedback to help improve your code base when I find these bug's or silly mistakes that are easily missed and totally understandble. I know I made quite a few making the helper app for OS X. Thanks for all the work you guys are doing with so many different improvements with the code its very much appreciated by everyone.

Edit - Added the missing badges here, not sure if its what you were after (looks wise) but it was an attempt never the less ;)

commit

mpeg.png mpeg1video.png mp2.png

Edit 2 - Thanks for adding em to the main code. Looks much better then my attempt :)

mpeg.png mpeg1video.png mp2.png