google / sagetv

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

Watched icon/flag behavior #446

Open graywolfusmc opened 3 years ago

graywolfusmc commented 3 years ago

Let's say I have multiple copies of an Airing (A, B, and C). I watch Airing A, then all Airings (A, B & C) have the Watched icon If I go in Airing A and uncheck the Watched checkbox, they all have the Watched icon removed. If instead of Airing A, I went to Airing B or C and unchecked the Watched checkbox, then Airing A still has the Watched icon but all other "copies" no longer have the Watched icon

Is there a parameter/setting that I can set so that all Airings of the same Episode will either be Watched or Unwatched and not a mixed bag??

Narflex commented 3 years ago

Yeah...this is one of those deep intricacies with how SageTV works. In the database, there's Watched, Airing and Show objects. Watched objects always reference an Airing. And Airing always references a Show.

If you mark an Airing as Watched, then it creates a Watched object that references the Airing...so that Airing indicates it is Watched. It also then sets a flag in the Show object to indicate that Show is watched. That then causes all Airings that reference that Show to indicate they are Watched (desirable behavior).

Now if you go back to Airing A in your example and clear Watched, it'll remove the Watched object that references Airing A and also clear the flag in the Show object...so none of them indicate they are Watched. However, if you go into B or C and clear Watched, it only clears the flag in the Show object...leaving the Watched object for A.

I don't think this issue was ever noticed until a few years ago...so it was over a decade until anybody noticed it and mentioned it to me. :) So we never did add any workarounds to have this behave differently. So now you know why it happens...sorry I don't have a solution to make it behave the way you're looking for...although I don't think the behavior should actually manifest as any real type of problem.

graywolfusmc commented 3 years ago

The issue arises particularly when checking Future Airings. If you have an Airing Watched object without a Show Watched object then you don't see the W Flag on the Future Airings. So either you record a copy that you don't need or in case of Conflicts, you have to do additional research into the Conflicting Shows to determine which (if any) might actually have a Watched object/file.

So is there a method where if a Show Watch object is cleared that all associated Airing Watch objects are also cleared?

Which module/section of code handles this?

Narflex commented 3 years ago

The issue arises particularly when checking Future Airings. If you have an Airing Watched object without a Show Watched object then you don't see the W Flag on the Future Airings. So either you record a copy that you don't need or in case of Conflicts, you have to do additional research into the Conflicting Shows to determine which (if any) might actually have a Watched object/file.

It seems like recording a copy that you don't need would only happen if you unmarked something as Watched that you didn't want recorded again, so I'm not sure why you'd unmark it watched in that case. For the conflict case, I'd think that would only happen if you had marked a future airing as Watched, and then unmarked another airing as Watched so that first one remained...that sounds like a more legitimate case, but I'd think that kind of user behavior would be very rare.

So is there a method where if a Show Watch object is cleared that all associated Airing Watch objects are also cleared? I don't think that was ever added, I checked yesterday.

Which module/section of code handles this? https://github.com/google/sagetv/blob/master/java/sage/BigBrother.java#L174

I'm also recalling a discussion at some point where this may also have been a desirable feature...where somebody wanted to be able to just mark single Airings as watched without marking the Show as watched, and this was the trick to do that.

It is pretty cool to have something I started building 19 years ago still be in use today though. :) Thanks for continuing your support and everyone else in the community!