Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Movies with commercials can get marked as Watched too early #242

Closed
andyvshr opened this issue Jan 6, 2017 · 13 comments
Closed

Movies with commercials can get marked as Watched too early #242

andyvshr opened this issue Jan 6, 2017 · 13 comments

Comments

@andyvshr
Copy link
Contributor

andyvshr commented Jan 6, 2017

Current;y, a movie's run time is used to determine when the movie has been fully watched, but this has can cause a problem when the movie is on a channel that has commercials. So, for example: if the run time is listed as 2:30, but the airing time is 3:30, then stopping the movie after or near the 2:30 mark will mark the movie as watched and it will restart instead of resume the next time it is played.

A potential fix for this could be to ignore the run time value if the airing time is much longer -- perhaps consider 10-20 minutes per hour to be commercial filler and ignore the run time if the per hour difference is larger than that. This would take into account shorter and longer movies, rather than just looking for a run time vs airing time difference of 20-30 minutes overall.

@CraziFuzzy
Copy link
Contributor

CraziFuzzy commented Jan 9, 2017

Are you sure this is using 'runtime'? Sage on it's own doesn't really KNOW about runtime, as far as I know - an airing has it's duration, and I think that is it.

The way the watched status gets set IS different between a movie and other media, but this is only different in the absolute time at the end that is used. A movie will be marked watched if it's watched duration is within 10 minutes from end, while a non-movie will be watched if it's watched duration is within 5 minutes from the end. This difference is done to accommodate the added length of a movie's credits, and the likelihood that you'll stop watching when the credits start. There is an additional check that the watched duration needs to be at least 66% of the show's full duration, to limit setting watched too early in very short airings.

@andyvshr
Copy link
Contributor Author

andyvshr commented Jan 9, 2017

Sure there's a runtime value -- check out the detailed info pages for some movies. They may not all have it, but it can be there.

And, I'm basing this on my conversation with Jeff a couple weeks ago regarding a possible reason for a 3:30 movie getting marked as watched after watching 2:30 of it :)

@CraziFuzzy
Copy link
Contributor

My point was that the watched logic is using the Airing objects 'duration' property, which SHOULD be the length of the recording, not the runtime of the movie. That, to me, would be what should be fixed if anything.

@CraziFuzzy
Copy link
Contributor

The 'Run Time' on the detailed info is the duration of the 'Show' object, which the watched logic doesn't seem to look at.

@Narflex
Copy link
Member

Narflex commented Jan 9, 2017 via email

@CraziFuzzy
Copy link
Contributor

Hmmm.. I had jumped right to the BigBrother.isFullWatch() function, and saw it just looking at the airing - for some reason I skipped right over most of the isWatched() function. Even there, I don't see where it's looking at the Show's duration anywhere, just checks the Show.isWatched(), which seems to return true even if 1 millisecond of the show is watched (lastWatched > 0).

@andyvshr
Copy link
Contributor Author

andyvshr commented Jan 9, 2017

It seems to be handled in BigBrother.java around this line, where it has chosen to use the show's duration:
validDuration = s.duration;

@Narflex
Copy link
Member

Narflex commented Jan 9, 2017 via email

@Narflex
Copy link
Member

Narflex commented Jan 9, 2017 via email

@andyvshr
Copy link
Contributor Author

andyvshr commented Jan 9, 2017

I was all set to say it sounded fine to me, but then I checked out the recorded movie from FX I had last tested this against. It actually shows a run time of 2:45 and an airing time of 3:30, so 165/210 is a ratio of about 0.79. Based on those times, it seems to have 12.9 minutes of commercials per hour, which is a lot less than I thought any movie would have.

Assuming half-hour time slots, I wonder if my original idea of allowing more time for commercials in longer movies is not a good idea and just check that the difference is more than a 30 minute time slot? Would any commercial-free channels really have more than 30 minutes of dead time between shows?

@Narflex
Copy link
Member

Narflex commented Jan 9, 2017 via email

Narflex added a commit that referenced this issue Jan 9, 2017
…ercials

This is done by only using the running time for a movie if it is within 20 minutes of the
Airing duration. Otherwise, we use the airing duration which would allow for commercials.

Fixes issue #242
@Narflex Narflex closed this as completed Jan 9, 2017
@CraziFuzzy
Copy link
Contributor

While looking in that code, and unrelated tho this issue, is there a reason to use Sage.MILLIS_PER_MIN instead of just 60000L? I ask mainly because there are quite a few statics already using 60000L.

@Narflex
Copy link
Member

Narflex commented Jan 10, 2017 via email

JREkiwi pushed a commit to JREkiwi/sagetv that referenced this issue Dec 30, 2018
…ercials

This is done by only using the running time for a movie if it is within 20 minutes of the
Airing duration. Otherwise, we use the airing duration which would allow for commercials.

Fixes issue google#242
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants