eracknaphobia / plugin.video.psvue

Watch PS Vue thru Kodi
GNU General Public License v2.0
11 stars 16 forks source link

Merger with main and update #16

Closed snoopyjoe closed 6 years ago

snoopyjoe commented 6 years ago

Updating my fork with the main. I added the Live TV show and episode information so that more than the show icon and channel name is displayed in the Live TV section.

Also I'm not quite sure of commenting out xbmc.monitor in the psvue.py file. On my boxes this seems to be the only way for recently watched and added shows info gets saved to Sony's severs. Unless it's causing too many request.

eracknaphobia commented 6 years ago

Personally, I like to see the tv channel name in the live section. Most of the icons included the shows name in the picture. I guess having the shows name would be nice complement but not at the expense of losing the channel name. I also felt like it took to many button clicks to get the channel to play. Really if we're in the live tv section, shouldn't it just play live tv? This may have to resolved with a setting for user customization as a way to keep both options.

Also, I use kodi's JSON-RPC API to pull values of whats playing in kodi to display elsewhere (ie. Home Assistant, Kodi Remote for iOS) and all the titles with the font stylings in them are displayed as is (ex. FS1 [B][I][COLOR=FFFFFF66]Live[/COLOR][/I][/B]) which isn't great to look at. That's why I'd prefer to use only use that type of styling in the name parameter, which is what kodi displays in it's menu and leave the title parameter as plan text as that's what is passed through json. Again we could probably compromise by creating a setting to toggle this ability.

I'm surprised the put_resume_time works at all, since it wasn't really finished. Lines 374 - 378 in sony.py have hard coded values that need to be replaced. Are you sure you're not just seeing resume times kodi itself generates? The only time put_resume_time would be helpful is if you were jumping between the official apps and the kodi addon. Either way the function was put on the back burner (commented out) until those values could be dynamically generated. I think figuring out the timecodes and if it was fully watched were the tricky values I didn't get a chance to work on yet.

The add_to_favorites function should be what allows you to add shows to your ps vue account, as far as I can tell that works fine.

snoopyjoe commented 6 years ago

With the Live Tv section I was trying make it more like the psvue website where clicking Live Tv displays the show artwork, show title and synopsis. I fixed the one click play by adding the channel url to list_show and creating a condition for when the show is live. When Live TV uses list_channel it displays the same thing as the All Channels button. I can ask the forum if they like the detailed version of Live TV or the simplified version. Especially since they both have a single click play ability.

I'll probably remove some of the details like "live episode" and "live" as they were originally there to help with the playmedia links outside of the add-on. Clicking on All Channels and seeing Live in the info is now redundant. I left the On Demand just so there's no confusion. I usually only test on two skins to check all the text and info is readable, Kodi default and Grid which is similar to Mimic.

As for the xbmc monitor and put_resume, I never tested resume time and it doesn't appear to work, but for some reason it does update the recently watched section. I'll keep playing with it and see if I can make the resume time work as well.

snoopyjoe commented 6 years ago

So I got the resume time to work. It takes the kodi videoplayer timestamp, converts it to H:M:S then sends that to Sony. Some resume times may be off by a single second due to the conversion from floating point to integer. I also removed the extra styling details like "live episode" from the addon. Let me know how it looks on your end. So I didn't add any comments to the resume time code, was trying to hurry. I'll add them in my next commit. Thanks.

snoopyjoe commented 6 years ago

So the resume feature is fully dynamic now. Though I did notice that due to some streams having commercials on the PSVue website and no commercials on Kodi that the times can be off by a couple minutes. This seems to happen more when going from watching on PSVue site to Kodi, less the other way around. Also the "fully watched" stamp doesn't seem to have any affect on the stream in Kodi. I watched the same recording to the end on both Kodi and PSvue site and the nothing change. Both videos will ask to start from the last second of the recording since it played to the end. Anyway the code is there and works in case Sony changes something in the future.

eracknaphobia commented 6 years ago

Looks good, thanks!