sircharlo / meeting-media-manager

A cross platform app to download and present media (pictures and videos) for congregation meetings of Jehovah’s Witnesses in any language. Features include recurring and custom media management, congregation sync, and media presentation tools for hybrid, in-person or fully remote Zoom meetings.
GNU Affero General Public License v3.0
126 stars 23 forks source link

[BUG] lff media is included for 5-min bible studies #874

Closed mtdvlpr closed 1 year ago

mtdvlpr commented 1 year ago

Describe the bug When a bible study for the apply yourself portion of the midweek meeting includes images/videos in the referenced lff lesson, they are included in the media list. Since the instructions specify that such videos are not to be played during the assignment but merely referenced, they should preferably not be included in the media list.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'December 26 - January 1'
  2. Click on 'Fetch media'
  3. Do 'Open presentation mode'
  4. See 'Jehovah has done so much for me' video

Expected behavior The media referenced for a 5-min bible study should be ignored

System specs (please complete the following information):

Additional context @sircharlo, since you have more knowledge about the fetching logic, maybe you know an easy fix for this. The only solution I can think of is comparing the paragraph numbers of all referenced lff media and only using the media of the latest paragraph (since that's the congregation bible study).

sircharlo commented 1 year ago

There it is! That's why I had disabled it in the previous version, now I remember. Related to #744 and #745. There's no easy fix here from a "logic" point of view here, from what I can see. Media from refs can either be processed (like what was needed for the picture in #744) or ignored (like for video in the 5 min. talk during the week of Dec. 26-Jan 1st). The only thing I can think of, would be to ignore videos for ref media (as videos to be shown during a meeting will always be linked to "directly" in the JWPUB db, not from refs), while processing images normally (sometimes, images from refs are used by speakers/students and can contain useful information).

mtdvlpr commented 1 year ago

I'm confused. Isn't it only supposed to do that for internal refs of internal refs. The lff book isn't an internal ref, right?

sircharlo commented 1 year ago

No, I'm confused. 😕

744 was [checks] media from a Document referred to from an InternalLink.

This current issue is [adjusts glasses] a video being fetched from a Document referred to from the Extract table. The problem is that this is exactly the same was that the CBS media gets fetched.

sircharlo commented 1 year ago

Programmatically, there's no way to distinguish from Extract numbers 76 and 79...

image

mtdvlpr commented 1 year ago

Yeah, that's what I thought! But we do provide the 2 with a different paragraph number. The cbs has par nr 8 and the bible study would have par nr 5 for example. Maybe that can be used to safely distinguish between the two. We should make sure that this will always work as intended, since it's a bit of a dirty trick

sircharlo commented 1 year ago

Yeah, some sort of "get number of paragraphs in main document": image

Combined with "only include videos from current Extract if paragraph number of Extract is gte number of paragraphs minus 4":

image

Like you said, it's a dirty trick, but it would work.

mtdvlpr commented 1 year ago

Yeah, btw, what do you use to get this UI for the jwpub database?

sircharlo commented 1 year ago

Yeah, btw, what do you use to get this UI for the jwpub database?

https://sqlitebrowser.org/dl/ - Free and cross-platform!