google / sagetv

SageTV is a cross-platform networked DVR and media management system
http://forums.sagetv.com/
Apache License 2.0
267 stars 174 forks source link

Make SD Plugin as good as possible :) #239

Closed Narflex closed 7 years ago

Narflex commented 7 years ago

Since I've now announced the end of SageTV EPG service as of 7/1/2017...I'll be using the SD plugin as of that point in time. Prior to that, I plan to start using it...and spend time assisting @enternoescape in any way I can to make it as solid as possible. :)

I've already noticed a few various issues with it when I was testing it out. @enternoescape do you want me to open individual issues for each of these things (and I'll gladly help fix them), or are you fine with just piling them in here? I'm not sure all of them can actually be fixed...but as I familiarize myself with their data format more, I'll have a better understanding of what exactly can be done and what can't.

Actually...how about we discuss what issues might be in here, and then ones we actually identify can have a new issue opened for them if it's not a simple fix?

enternoescape commented 7 years ago

It's strange that I didn't think about just using the favorites to get recommendations. That's a great idea.

enternoescape commented 7 years ago

Based on the favorites idea, I think I have thought of a system that pretty much ensures that very popularly suggested shows for the user generally get pushed to the top, but less popular shows will eventually get there too. It would get the next upcoming episode that would be recorded for each favorite. If there isn't one, it doesn't get counted at this time. This will help keep things from getting too repetitive throughout the year as shows start and end seasons they just won't be an influence on the results at that time. We then download the recommendations for all of those programs and keep count of how many times each program ID is returned and that program matches an airing on a channel the user actually has enabled. We take a top 5% percent or 48 (whichever is smaller) but no less than 3, grab a random 2 if possible from the rest of the pool. Anything that doesn't have a possible airing gets replaced with another random program from the pool. Then we create editorials for those. We also then set those values to -1 and ignore them until only 25% of the known pool is still available. When that happens, all of the -1 values are removed so that the used suggestions can re-enter the pool if associated programs still exist. This should help keep the tracked pool from getting out of control. You can see how as this cycles, the user will mostly see strongly recommended content, but most of the lesser recommended content should eventually surface.

This of course is a roughing of the complete idea and it likely would need tweaking to get it working fairly well for most people. We also would want to limit it to only refreshing once a day or few days.

Narflex commented 7 years ago

Sounds interesting...keep running with that idea and let me know if you need any help. :)

On Thu, Jan 19, 2017 at 5:40 PM, Joseph Shuttlesworth < notifications@github.com> wrote:

Based on the favorites idea, I think I have thought of a system that pretty much ensures that very popularly suggested shows for the user generally get pushed to the top, but less popular shows will eventually get there too. It would get the next upcoming episode that would be recorded for each favorite. If there isn't one, it doesn't get counted at this time. This will help keep things from getting too repetitive throughout the year as shows start and end seasons they just won't be an influence on the results at that time. We then download the recommendations for all of those programs and keep count of how many times each program ID is returned and that program matches an airing on a channel the user actually has enabled. We take a top 5% percent or 48 (whichever is smaller) but no less than 3, grab a random 2 if possible from the rest of the pool. Anything that doesn't have a possible airing gets replaced with another random program from the pool. Then we create editorials for those. We also then set those values to -1 and ignore them until only 25% of the known pool is still available. When that happens, all of the -1 values are removed so that the used suggestions can re-enter the pool if associated programs still exist. This should help keep the tracked pool from getting out of control. You can see how as this cycles, the user will mostly see strongly recommended content, but most of the lesser recommended content should eventually surface.

This of course is a roughing of the complete idea and it likely would need tweaking to get it working fairly well for most people. We also would want to limit it to only refreshing once a day or few days.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/sagetv/issues/239#issuecomment-273953270, or mute the thread https://github.com/notifications/unsubscribe-auth/ANEIDHqMsA3h5iGJwEJM3oLEKTEPXjLhks5rUBCcgaJpZM4LbIYs .

-- Jeffrey Kardatzke jkardatzke@google.com Google, Inc.

enternoescape commented 7 years ago

Well, after looking at the data more closely, it seems that at least with my favorites, I only get 16 unique recommendations total. Considering that I have cable and this was derived from 156 programs, I fear that the OTA users will get nothing at times. Out of that list only 4 are on public broadcast. I thought I saw tons more recommendations while getting EPG data, but I guess only a small fraction of them actually apply to my shows for the next two weeks. The good news is that the recommendations did not match any of my intelligent recordings so it is a different list in its own right.

Narflex commented 7 years ago

Is it possible to look up recommendations for airings in the past based on their external ID?

Jeff Kardatzke Sent from my Android

On Jan 20, 2017 5:18 PM, "Joseph Shuttlesworth" notifications@github.com wrote:

Well, after looking at the data more closely, it seems that at least with my favorites, I only get 16 unique recommendations total. Considering that I have cable and this was derived from 156 programs, I fear that the OTA users will get nothing at times. Out of that list only 4 are on public broadcast. I thought I saw tons more recommendations while getting EPG data, but I guess only a small fraction of them actually apply to my shows for the next two weeks. The good news is that the recommendations did not match any of my intelligent recordings so it is a different list in its own right.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/sagetv/issues/239#issuecomment-274220812, or mute the thread https://github.com/notifications/unsubscribe-auth/ANEIDCvs2AvL59VJD5Tf0Ts5rQswW1XTks5rUVzRgaJpZM4LbIYs .

enternoescape commented 7 years ago

It's only possible if the airing being looked up is for a show that's available somewhere in some lineup over the next few weeks. I'll see what I can do with that. Generally you get a lot of errors when you try to look things up blindly like that, but there's handling in the code for those situations already because that's approximately how series info is looked up.

enternoescape commented 7 years ago

In the vein of making things as good as possible. Did the free EPG service also automatically making first runs (based on original airing date) when TMS didn't mark them or has SageTV only been doing that internally? There's some clamoring that first runs not being marked consistently.

Narflex commented 7 years ago

Originally we just used the original air date, and if it was within 28 days of the Airing date then it was first run. Later one, we also added checking the 'Live' and the 'New' flag in programs and then also marking those as First Run. There was never any type of explicit marking programs as First Run in our EPG service. But if people are seeing differences, then I'd assume it's due to something relative to the New/Live flag (which you may not be populating).

If there were specific examples to look at, then we could figure out pretty easily what's different. :)

On Thu, Mar 9, 2017 at 3:41 AM, Joseph Shuttlesworth < notifications@github.com> wrote:

In the vein of making things as good as possible. Did the free EPG service also automatically making first runs (based on original airing date) when TMS didn't mark them or has SageTV only been doing that internally? There's some clamoring that first runs not being marked consistently.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/sagetv/issues/239#issuecomment-285329635, or mute the thread https://github.com/notifications/unsubscribe-auth/ANEIDIXe8JlSuf_EN4kb-OXVjr9DNECkks5rj-V4gaJpZM4LbIYs .

-- Jeffrey Kardatzke jkardatzke@google.com Google, Inc.

enternoescape commented 7 years ago

I pull in that information through getMisc(). Let me know if I'm likely missing something. I wasn't aware of this live tag you speak of, so I'll need to figure out where were we end up seeing that in the airing information and add that.

Narflex commented 7 years ago

I did spot one thing wrong there. The Premiere/Finale stuff isn't a bitmask of multiple values...it's just one bitmask for the whole misc field. So the part where you check isPremiere() and then apply the PREMIERE_MASK is incorrect. Right now for a Season Premiere for example, you will apply the 0x10 mask for Premiere and then also the 0x20 mask for SeasonPremiere....which add together to 0x30 which is the value for Series Premiere.

Aside from that...I don't really have any specifics on what people are indicating is wrong, so aside from not applying the LIVE_MASK when that's present, I don't have any other suggestions at this time. :)

On Thu, Mar 9, 2017 at 1:53 PM, Joseph Shuttlesworth < notifications@github.com> wrote:

I pull in that information through getMisc() https://github.com/google/sagetv/blob/master/java/sage/epg/sd/json/schedules/SDProgramSchedule.java#L312. Let me know if I'm likely missing something. I wasn't aware of this live tag you speak of, so I'll need to figure out where were we end up seeing that in the airing information and add that.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/sagetv/issues/239#issuecomment-285495432, or mute the thread https://github.com/notifications/unsubscribe-auth/ANEIDHkqzBl9C9HW27GFoXGxckfCLRwPks5rkHTJgaJpZM4LbIYs .

-- Jeffrey Kardatzke jkardatzke@google.com Google, Inc.

enternoescape commented 7 years ago

Well fixing that might fix something else. Thanks for taking a look. I'll push a fix for that shortly.

mattmunich commented 7 years ago

The chatter in this bug is fairly old now. Having just upgraded to 9.0.14.568 I am wondering if these issues are still a thing. Thanks!

enternoescape commented 7 years ago

I believe that I have addressed what can be addressed. Some of the concerns were related to functionality that SD doesn't offer and therefore I can't implement.