Jump to content

Channel times displayed (Guide)


KarterJK

Recommended Posts

KarterJK

On the Guide

the time displayed is set in increments of 1/2 hour, but

if the time is, let us say 9:45 the guide will show the 

  •   9:00 -   9:30 slot
  •   9:30 - 10:00 slot
  • 10:00 - 10:30 slot, etc. 

which is fine except if you select something in the 9:00 slot it can't play because the time has passed that it is showing

so is there a way to trim the channel guide to only show the current time forward 

I hope that makes sense

example if it is 9:45 the guide would show as

 

  •   9:45 - 10:00 slot
  • 10:00 - 10:30 slot
  • 10:30 - 11:00 slot

 that way when you selected a program it would always be playable

 

by the way I love this add on, I am hopefully going to be posting a write up on it (with demo) in the Windows ten forums

Edited by KarterJK
Link to comment
Share on other sites

krustyreturns

Good suggestion.  I'm pretty sure this will need to be addressed in the MBS side of things, hopefully @@Luke or someone will weigh in.  Please post the write up if/when its up!

Link to comment
Share on other sites

KarterJK

Good suggestion.  I'm pretty sure this will need to be addressed in the MBS side of things, hopefully @@Luke or someone will weigh in.  Please post the write up if/when its up!

Most definitely, I keep talking about Media Center explaining how it is still relevant, and your ServerWMC simply helps the case, again thank you. 

Link to comment
Share on other sites

It's a problem with the guide rendering.

You are not the first that reports this. :)

 

I tried it already multiple times. But I am not a javascript expert. And the full Guide rendering is javascript.

So any help is welcome. :)

Link to comment
Share on other sites

KarterJK

well, I am not necessarily a javascript expert but have dabbled a bit, and am taking a few courses.  

 

where would i look to play around with code?

[edit] umm think I found it, any additional thoughts would be helpful though :)

Edited by KarterJK
  • Like 1
Link to comment
Share on other sites

well, I am not necessarily a javascript expert but have dabbled a bit, and am taking a few courses.  

 

where would i look to play around with code?

 

The problem is in the following script

https://github.com/MediaBrowser/MediaBrowser/blob/master/MediaBrowser.WebDashboard/dashboard-ui/scripts/livetvguide.js

 

You can fork the mediabrowser stuff from github and run the server then on your machine..

If you don't like the fork stuff and only download the zip with the source and change something. That's also possible.

Then you just need to tell me what you changed and I will check it in....

 

If you need any information just let me know. It would be great if we can solve the problem.

Link to comment
Share on other sites

well, I am not necessarily a javascript expert but have dabbled a bit, and am taking a few courses.  

 

where would i look to play around with code?

[edit] umm think I found it, any additional thoughts would be helpful though :)

 

What thoughts do you need?

Link to comment
Share on other sites

KarterJK

What thoughts do you need?

My initial thoughts are that the livtvguide.js is not necessarily the problem, but more with the displaying of the results. The .js on my first scan seems to just collect the data, which is fine. it collects a week of data, but then I am uncertain how it is displayed.  I will just need to dig deeper.

 

I am currently working on a tile job on one of our bathroom showers, so need to finish that first, and then will get into it greater depth.  

It has been a while since I did heavy duty coding, I need to brush up a bit. (why the refresher course)

but,

It's like riding a bike, though, huh?  you never forget LOL

Edited by KarterJK
Link to comment
Share on other sites

My initial thoughts are that the livtvguide.js is not necessarily the problem, but more with the displaying of the results. The .js on my first scan seems to just collect the data, which is fine. it collects a week of data, but then I am uncertain how it is displayed.  I will just need to dig deeper.

 

I am currently working on a tile job on one of our bathroom showers, so need to finish that first, and then will get into it greater depth.  

It has been a while since I did heavy duty coding, I need to brush up a bit. (why the refresher course)

but,

It's like riding a bike, though, huh?  you never forget LOL

 

The html is created with that js script...

See links below..

 

https://github.com/MediaBrowser/MediaBrowser/blob/master/MediaBrowser.WebDashboard/dashboard-ui/scripts/livetvguide.js#L349

 

https://github.com/MediaBrowser/MediaBrowser/blob/master/MediaBrowser.WebDashboard/dashboard-ui/scripts/livetvguide.js#L300

Link to comment
Share on other sites

KarterJK

yes, I saw that but;

it is enclosed within an iframe, I am uncertain where that comes from, also I need to understand what css files they are working with, the css can control most of formatting.

 

Plus, I had a chance to take a closer look at this, and it appears that this entails a lot of jquery and html5 subroutines and coding, I am thinking that is beyond my scope of knowledge.  I know very little of html5, haven't even looked into it, and jquery I am only somewhat familiar with.  If it were php and javascript and html, my chances would be greater. I would/will have to do a lot cramming to begin to understand,what they are doing.

 

It will take a bit to put all the parts together.  

 

Who wrote this originally? wouldn't they be better equipped to handle this? I don't understand the inner working of the mediabrowser teams.

Link to comment
Share on other sites

techywarrior

KarterJK, I may take a look at the TV guide code in MBS this week and see if I can submit a pull request to fix the display. I took a quick look at the code and I see the problem, and probably more importantly, I have a solution that should work in mind.

 

One thing I am not seeing tho is why a show wouldn't be able to be played if it's time slot is incorrect. I don't even see a way you can directly play from the TV guide and even if you can there is nothing in the TV guide that actually specifies to the backend software what time the show is displayed at. Am I missing something in your description?

 

Note: I only looked at the stable release very quickly not the latest dev build so if the TV guide popup has changed in dev to allow playing directly let me know.

  • Like 1
Link to comment
Share on other sites

techywarrior

I have updated the code for the TV guide on my local machine but it is more demanding CPU wise due to the JS having to check for content in a cell for every minute instead of ever 30 (so instead of 48 cells per channel there are now 1440)

 

It will probably not be noticeable on a fast computer but I wonder how it will perform on a slower device with a guide that has lots of channels.

 

I'd appreciate if some people could test on their platforms and see what they think. I may take a look more in depth at the logic but since I didn't initially write the TV guide I need to figure out what the author was doing and what limitations they had to work around in the first place.

 

The benefit is that my update makes the guide accurate to the minute. It just so happens that there are a couple of shows tonight that end at x:01 or x:31 and I can see with my update how the guide shifts them over (just like a real tv guide :P )

 

If you would like to test please unzip the attached file and replace the files in

\AppData\Roaming\MediaBrowser-Server\System\dashboard-ui\

 

with them.

 

(it should just be /css/livetv.css and /scripts/livetvguide.js)

 

 

Oh, and make sure to clear your browser cache when you load the page otherwise you won't load the updated all.js and all.css that are built by MBS

tvguide.zip

Edited by techywarrior
Link to comment
Share on other sites

KarterJK

I have updated the code for the TV guide on my local machine but it is more demanding CPU wise due to the JS having to check for content in a cell for every minute instead of ever 30 (so instead of 48 cells per channel there are now 1440)

 

It will probably not be noticeable on a fast computer but I wonder how it will perform on a slower device with a guide that has lots of channels.

 

I'd appreciate if some people could test on their platforms and see what they think. I may take a look more in depth at the logic but since I didn't initially write the TV guide I need to figure out what the author was doing and what limitations they had to work around in the first place.

 

The benefit is that my update makes the guide accurate to the minute. It just so happens that there are a couple of shows tonight that end at x:01 or x:31 and I can see with my update how the guide shifts them over (just like a real tv guide :P )

 

If you would like to test please unzip the attached file and replace the files in

\AppData\Roaming\MediaBrowser-Server\System\dashboard-ui\

 

with them.

 

(it should just be /css/livetv.css and /scripts/livetvguide.js)

 

 

Oh, and make sure to clear your browser cache when you load the page otherwise you won't load the updated all.js and all.css that are built by MBS

Hi techywarrior,
 
Okay, I did download your .zip file and placed them in the correct spot, but it did not resolve the problem, perhaps I can show you, so you better understand
 
all of my caches have been flushed
I normally use Chrome and use the following
chrome://net-internals/#dns

 

 (Chromes DNS flush), plus I deleted cache in setting, I cleaned with CC, SlimCleaner, and windows Disc Cleaner just to be sure :)
now here is my typical screen, (located in Portland, Oregon US, on Pacific Time US)
 
if you look at where the arrow is pointing, it shows the time slot for "The Big Bang Theory", 
but look in right lower corner you will see my local time is 9:36 pm
so the slot I am pointing to is for 9:00 pm - 9:30 pm, (the show has already aired and is over)

 

,54d304a8a00cc_Image1.jpg

 

 

So if I clicked on it (let us say by accident) - knowing me that is very easy to do

here is what would appear.

 

You wont be able to view it because it is over, you can't even record it because it is over

 

 

54d308b51c50b_Image3.jpg

 

So what I was asking for is that the first time slot the begin time would be the actual local time (in this case 9:35 pm) and then the rest of the guide

so this particular episode or show would not even appear.

 

I hope that explains it a bit better.

Edited by KarterJK
Link to comment
Share on other sites

techywarrior

Ok  Karter, I see what you are saying now.

 

First, as Luke said the patch will not effect the hosted web client (so try it locally if you want to test). Second, I have not fixed what you just described (yet) but the good news is that the changes I made will allow me/us to do what you suggest (and I think it's a good suggestion so hopefully it will get merged in when I am done)

 

For now, if you view the web client locally on your server, you should see that Sirens (which starts 1 min after the hour in your screenshot) will now actually be shifted 1 minute over to the right and no longer line up with the shows that start on the hour. (you actually have a bunch of shows that have odd times so my changes should be pretty noticeable for you)

 

Since I only have 9 channels it's a little hard to test some things. What I'd really appreciate is for you to try my patch on your local server and let me know if the guide is still responsive or if it is very slow now.

 

In the meantime I'll look at making the change so that the guide starts exactly at the time the page is loaded instead of nearest hour. Only negative I can think of is that some shows may not be very noticeable since their box will be tiny but I don't think that's a big deal because it's the same way most tv guides work anyways.

Link to comment
Share on other sites

KarterJK

Ok  Karter, I see what you are saying now.

 

First, as Luke said the patch will not effect the hosted web client (so try it locally if you want to test). Second, I have not fixed what you just described (yet) but the good news is that the changes I made will allow me/us to do what you suggest (and I think it's a good suggestion so hopefully it will get merged in when I am done)

 

For now, if you view the web client locally on your server, you should see that Sirens (which starts 1 min after the hour in your screenshot) will now actually be shifted 1 minute over to the right and no longer line up with the shows that start on the hour. (you actually have a bunch of shows that have odd times so my changes should be pretty noticeable for you)

 

Since I only have 9 channels it's a little hard to test some things. What I'd really appreciate is for you to try my patch on your local server and let me know if the guide is still responsive or if it is very slow now.

 

In the meantime I'll look at making the change so that the guide starts exactly at the time the page is loaded instead of nearest hour. Only negative I can think of is that some shows may not be very noticeable since their box will be tiny but I don't think that's a big deal because it's the same way most tv guides work anyways.

ahhh, I didn't notice that .. good correction

I did notice that some of the lt. grey separator bars are missing on some slots (no biggie, just an observation)

 

Please forgive my lack of knowledge, I am not familiar with the patch process, only been using media browser for a few months now.  

I don't understand the terminology (or difference as to) hosted web client as opposed to local, so I will leave that Sven, since he knows what he is doing. :)

Edited by KarterJK
Link to comment
Share on other sites

techywarrior

ahhh, I didn't notice that .. good correction

 

I did notice that some of the lt. grey separator bars are missing on some slots (no biggie, just an observation) :)

That's strange. I'm not seeing that at all. In fact I changed the way those borders/separators worked as well because the previous way was a little bizarre. Instead of each entry having a gray border/separator each 30 min interval had one and then the entry was on top and hid the ones it covered (so even though a show was 2 hours long there would be gray borders every 30 minutes you couldn't see. (it looked really strange when I changed it to 1 minute intervals :) ) But since each entry has a border I'm not sure why you are not seeing them. Could be a tiny overlap I didn't take into account.

 

I did a real quick play with having the time start at the current time and it will take a little longer but I think I'll have something tomorrow or Friday.

 

I have to make sure that it only does it for the current day and not for the other days you can select. But that's really the only issue that will take any time. I think I have a good handle on the rest of the changes required.

Link to comment
Share on other sites

Ok, i tried it on my dev machine.....

I get the following...

 

It looks already very good, only not for the channels without a guide... :)

 

gvU8OgL.png

Edited by Sven
Link to comment
Share on other sites

techywarrior

Weird, I thought I removed that border in the CSS. I'll check again and confirm.

 

Also, your guide should see a drastic improvement in the display since it appears a LOT of your TV channels start/end shows at non-standard times (or at least US standard of 00/30 start times)

Link to comment
Share on other sites

Weird, I thought I removed that border in the CSS. I'll check again and confirm.

 

Also, your guide should see a drastic improvement in the display since it appears a LOT of your TV channels start/end shows at non-standard times (or at least US standard of 00/30 start times)

 

No problem.

Yes i know :) But i always clicked on the channels itself and looked at that guide. :)

Because i didn't had the time to check the javascript and css.

 

So a big thanks to you... :)

Link to comment
Share on other sites

techywarrior

Doh, I added the border CSS to the wrong class ;) Thanks for the notice Sven. Once I get KarterJK's request completed I'll post a new patch here for testing and submit the completed code to the repo with a pull request.

 

I'm pretty close to getting it done... the guide is looking like a real TV guide now!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...