ecleese / plexWatchWeb

A web front-end for plexWatch.
254 stars 41 forks source link

Icon for Samsung SmartTV Plex App #55

Closed rcork closed 10 years ago

rcork commented 10 years ago

I really like the new icons for the players but i notice that when i use the Samsung SmartTV Plex app, there is no icon. It just shows the generic "icon missing" icon. Any plans to add icons for Samsung?

ecleese commented 10 years ago

Ah, I missed Samsung. Will add in 1.5.0.11 dev. I looked for LG too but can't find any icons for that platform.

ecleese commented 10 years ago

Give 1.5.0.11 dev a test and let me know if the icon is appearing now. I don't have a samsung tv for testing so I took a guess on what PMS reports for the platform name.

Thanks

rcork commented 10 years ago

Unfortunately it doesn't report Samsung as the platform. It has "TV [model]" for the platform. For example, i have two samsung smart tv's. Here's what they report as platform:

TV PN59D7000_USA - this is a 59" D series plasma TV UN40F6300 - this is a 40" F series LCD

I only have two devices to test with but looks like they always start with "TV" and then a model number. I looked for somewhere in the Plex app and also in the tv menu to change that but i believe it's what is passed by the Plex app for Samsung, not user configurable.

rcork commented 10 years ago

I just dug through the plexWatch db and took a look at the actual xml field and the platform is empty. The title field holds the platforms i noted above.

rcork commented 10 years ago

FYI..i posted to the Samsung forum to see if they could include the platform in the next release. However, Samsung is notorious for taking ages to approve a new release. And even then, they don't approve them for devices over 2 years old so this wouldn't help those with older devices.

https://forums.plex.tv/index.php/topic/93901-feature-suggesion-return-samsung-for-platform-in-now-playing/

rcork commented 10 years ago

This code works in current_activity

}else if(empty($sessions->Player['platform'])) { if(strstr($sessions->Player['title'], 'Apple')) { $platformImage = "images/platforms/atv.png"; //Code below matches Samsung naming standard: [Display Technology: 2 Letters][Size: 2 digits][Generation: 1 letter][Model: 4 digits] }else if(preg_match("/TV [a-z][a-z]\d\d[a-z]\d\d\d\d/i",$sessions->Player['title'])) { $platformImage = "images/platforms/samsung.png"; } else{ $platformImage = "images/platforms/platform-default.png"; }

ecleese commented 10 years ago

Yeah I wish they could be more consistent across all platforms but your workaround looks good to me. I will add it to next version. Thanks for sharing.

ecleese commented 10 years ago

Hmm, just found a tv model where this preg_match won't work so I'm going to have to generalize it a bit more. No biggie but it'll change a little.