Giter VIP home page Giter VIP logo

library-api's Introduction

Library API Logo

Library API

Github Actions Status TypeScript Commitizen friendly lerna license

An API for accessing information related to meetings and publications of Jehovah's Witnesses.


๐Ÿ“ฆ Packages

Library API offers the following packages:

Package Description Changelog
Library Media A desktop app that makes sharing meeting media easy View
Library Express An express server for providing easy access to publication information View
Library Core Core tools used in other packages that can be used to build your own app View

๐Ÿ“– Documentation

Documentation for all packages can be viewed here.

๐Ÿ’ก Motivation

There is no publicly available API for this information and the data structure is not created in a way to make things simple to parse or access.

These packages aim to provide an API that provides the information without having to dig into the internals of existing apps.

We also aim to provide sample applications that use this API.

โ“ Support

For instructions on how to use the individual packages view them using the links above.

If you have any issues or feature requests please check if this had already been suggested on our issues page and if not then select "New issue".

๐Ÿ›  Development

If you would like to contribute then thank you in advance! Library API uses the following tools for development you will need to install:

  • VSCode as an IDE, you should be prompted to install recommended extensions when first opening the project
  • Yarn (Classic) for package management

You may also want to be familiar with the following (although some of these are automatic):

Run the following commands to get started:

# Bootstrap project (install dependencies & build TS definitions)
yarn bootstrap

# Run a command in a certain workspace
yarn workspace [workspace] [command]
# For example to run `yarn dev` in the `express` workspace
yarn workspace @library-api/express dev
# Shortcuts exist for the main packages, this is equivalent to the above
yarn express dev

library-api's People

Contributors

benshelton avatar brodiejones avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

library-api's Issues

[Bug] Cannot scrub videos

Packages & versions

Media

Describe the bug

When showing a video on the display, it is not possible to scrub/seek the timeline because it moves the window. However moving the window whilst a video is playing is sometimes desirable so finding a way to allow both may be difficult.

Reproduction steps

  1. Start playing a video
  2. Try and use the timeline seek on the display window to go forward/back

Expected behavior

The window does not move

Additional context

This would be redundant if #41 was implemented

[Feature] Include images from related publications

Packages

Core

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

As an example, the study book for the CBS has images/videos that aren't included in the current media lists.

This is because the images and media links are all stored within the publication itself so you need to download the publication first so that they can be extracted (this is the same in JW Library)

Describe alternatives you've considered

Manually showing these images/videos

Additional context

Hopefully the structure is similar to either WT or OCLM publications so we can reuse one of those queries. OCLM needs to have some database entries to indicate that a certain week will be including media from chapter X of the publication.

[Feature] Show Paragraph Number on Image

Packages

Media

Describe the solution you'd like

When an image is meant to be shown with a paragraph, the text "(See paragraph x)" is normally at the end of the image description. This means you have to scroll down on each description to see what paragraphs they relate to.

It would be easier if we could in some way extract that number and display it on the image itself (similar to how the Download icon overlays videos that are not downloaded)

Describe alternatives you've considered

Scrolling down the description to view the paragraph number

Additional context

Although images would never show the Download icon I don't think it would look good on the top right. Perhaps the bottom left which would match how the song number is displayed on song video thumbnails.

Also we need a way to do this across languages so a regex will probably be difficult to get working on all languages. If there is any extra metadata we can take about the image itself from the publication db that indicates what paragraph it relates to that would be a better option.

[Feature] Allow choosing an extra song

Packages

Media

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

For the opening song of a public talk or maybe some other meetings such as the CO visit, the song will not be included in the publication.

There should be a way to select any song to be played, maybe from a dropdown.

Describe alternatives you've considered

Using another app, or using #10 when implemented.

Additional context

N/A

[Bug] Publications not loading

Packages & versions

Library Media 0.11

Describe the bug

Recent weeks do not load either the watchtower or oclm.

Reproduction steps

N/A

Expected behavior

N/A

Additional context

N/A

[Feature] Update Publications if outdated

Packages

Media (will likely involve Core)

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

Publications themselves sometimes receive updates, normally this is just to text but can also contain bigger changes, such as an image change.

I have no idea how this is checked internally. We need to figure that out and then apply the same check on each download to make sure we currently have the latest version downloaded in Media.

Describe alternatives you've considered

Deleting cache and restarting.

Additional context

N/A

[Feature] Allow Displaying Custom Images/Video

Packages

Media

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

Allow displaying any image or video, not just the ones contained within a publication. This can be helpful for Public Talk images for example.

This should probably be a file chooser with some basic validation for the file extension.

Describe alternatives you've considered

Using another app, but that defeats the point of having one place to display media.

Additional context

N/A

[Bug] Clearing Downloads doesn't reset cache

Packages & versions

Media

Describe the bug

If a week doesn't exist in the catalog you currently need to Clear Downloads from the settings to redownload it.

Even after downloading again though the catalog is still cached. To use the new one you need to quit and reopen the app.

Reproduction steps

  1. Try to view a week not in the downloaded catalog, but that is in the latest
  2. Clear Downloads
  3. Download new catalog

Expected behavior

The week should now appear without needing to quit and reopen

Additional context

N/A

[Feature] Update Catalog if a newer version exists

Packages

Core

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

I'm pretty sure there is an internal endpoint where you can provide a catalog version and it tells you whether a newer version exists, at which point you can download again. We should be able to check that and redownload if necessary.

Describe alternatives you've considered

Removing the catalog and downloading fresh.

Additional context

N/A

[Feature] Alternative Media Displays

Packages

Media (possibly Core for metadata)

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

Currently we only show Videos and Images. It would be nice to have an alternative view where the media is grouped by item instead, so you just have to scroll down as the meeting progresses and have the next media ready.

Describe alternatives you've considered

N/A

Additional context

N/A

[Feature] Add Version Number

Packages

Media

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

For external users there's no clear indication what version of the app is being used. This should be provided in some way and then notes added to the bug_report template on how to find that so it can be added.

Describe alternatives you've considered

None

Additional context

N/A

[Bug] Hover effect on tiles gets stuck

Packages & versions

Media 0.7.0

Describe the bug

On the Control Panel when viewing media for a publication, in some cases you can have multiple image/video tiles displaying the hover effect.

Reproduction steps

  1. Go to Publication
  2. Move cursor rapidly over the window

Expected behavior

Only 1 can ever have the hover effect. Ideally when the cursor leaves the window all disappear.

Additional context

I think we can achieve this by adding the mouse position handlers to the window or page, rather than each individual item, and then passing the positions down to each tile. Then the components themselves can check if they are within those coordinates.

[Bug] Week did not load correctly

Packages

Media

Describe the bug

On 23 May, opening the app caused the control panel to not show a week in the dropdown. It loaded from a date (looks like the week before)

To Reproduce

  1. Open on 23 May

Expected behavior

It should show the WT for the week starting 17 May

Screenshots

N/A

Additional context

N/A

[Bug] Library Media Resize Glitch on Windows Machine

Packages & versions

Media v0.11.0

Describe the bug

I attempted to compile and test Library Media for Windows.
When I tried to resize the media display window, it shot off the screen and became very small.
Unfortunately, this would make it unusable for a Windows machine.

Reproduction steps

  • Download and build Library Media on a Windows machine
  • Try to resize the media display window

Expected behavior

I expected the window to resize smoothly, just like any other window.

[Feature] Media Documentation & Link

Packages

Media

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

Media has no documentation available, although it's fairly simple a few key pages would be ideal.

Within the app itself a menu item that links to the documentation would also be helpful.

Describe alternatives you've considered

None

Additional context

N/A

[Feature] Add a Download All button

Packages

Media

Describe the solution you'd like

On the Control Panel when viewing a publication you have to download each video individually. Instead we could add a Download button.

  • Only shows if there are 1+ videos not downloaded
  • Will download all items
    • Sends a request through IPC
    • Sets the downloading state of each tile
    • Sets all videos to downloaded when complete

Describe alternatives you've considered

We can still download them individually, it's just slow

Additional context

N/A

[Feature] Add log file & support link

Packages

Media

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

We should use a logging package (maybe morgan) to keep logs of certain actions which will help debugging in future. This means we can also add a support menu item which allows entering a message and attaches a copy of that log (with consent).

Describe alternatives you've considered

None

Additional context

N/A

[Feature] Add way to delete "old" publications

Packages

Media

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

Over time the space being used for publications will grow. Likely anything older than the current is never going to be used again so can be removed if desired.

We should add an option in settings to Delete Older Publications which does this.

Describe alternatives you've considered

Deleting everything.

Additional context

N/A

[Feature] Allow adding multiple custom images

Packages

Media

Describe the solution you'd like

On the custom media page you can currently only upload 1 piece of media at a time and it is immediately previewed.

Instead we could allow uploading multiple pieces and then they all show up underneath similar to how publication media is displayed. The description would just be the file name. We could probably show previews for the images too, videos unlikely but just a generic placeholder would be fine for those, the file name should be sufficient.

Describe alternatives you've considered

Current Experience

Additional context

N/A

[Feature] Add a Download All Songs button

Packages

Media

Describe the solution you'd like

Rather than having to download all songs one by one, have a button that downloads them all.

Probably makes sense to put this on the Songs page.

Describe alternatives you've considered

Download them individually

Additional context

N/A

[Feature] Disable Rounded Corners on Display

Packages

Media

Describe the solution you'd like

There is already a roundedCorners: false setting but due to a bug this stops the app from quitting.

Once electron/electron#28686 is resolved we should be able to use this setting again.

Describe alternatives you've considered

N/A

Additional context

N/A

[Feature] Background Music

Packages

Media

Describe the solution you'd like

Before and after meetings it's customary to play kingdom melodies at a low volume. This can be done on jw.org but it would be good to provide built in functionality to do this. The Songs tab would be a good place.

Describe alternatives you've considered

Playing from jw.org

Additional context

N/A

[Feature] More Native MacOS App Icon

Packages

Media

Describe the solution you'd like

The app icon is square and too large, it would look nicer if it suited the newer macos icon format (rounded corners and smaller)

This icon can be just for MacOS based on the electron builder config.

Describe alternatives you've considered

N/A

Additional context

N/A

[Feature] Add Video Controls to control panel

Packages

Media

Describe the solution you'd like

Rather than having controls on the display itself, it would be less distracting for the audience if the controls were in the control panel, in the controls at the bottom.

Describe alternatives you've considered

As is will work but is distracting.

Additional context

N/A

[Bug] Scrollbars are inconsistent

Packages

Media

Describe the bug

For some reason the scrollbars look different depending on the device.

To Reproduce

  1. Go to Control Panel & view media
  2. On some devices the scrollbar has a white background & shifts the content over

Expected behavior

A transparent scrollbar which overlays the content and disappears when not active, similar to the "default" mac experience.

Screenshots

image

Additional context

Creating a custom scrollbar similar to https://gist.github.com/devinrhode2/2573411 could help.

[Bug] Media refuses to close unless force quit

Packages & versions

Media 0.10.0

Describe the bug

When trying to quit, Control Panel closes, Display does not and seems to prevent the application fully closing.

Reproduction steps

Try to close Library Media, either by closing the window or normal Quit.

Expected behavior

Application quits

Additional context

To get around this for now, right click on the app icon in the dock, hold Option and Force Quit.

[Feature] Auto Update App

Packages

Media

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

After #18 is done, we should be able to add auto-update functionality with something like electron-updater.

Describe alternatives you've considered

Update manually

Additional context

N/A

[Feature] Use new Media Details

Packages

All

Describe the solution you'd like

Media details used to all be stored in the catalog. Now though they are in a separate NDJSON file, so newer videos no longer have associated media (see #53)

We should transition the getMediaDetails to be based off this NDJSON file instead, in a new method, although the DTO can stay the same I believe.

Describe alternatives you've considered

Placeholders were added in #54, but we have no title or image so it's unclear what the video is.

Additional context

Endpoint is https://app.jw-cdn.org/catalogs/media/E.json.gz (adjusting for language I assume, untested)

[Feature] Add Support for more file extensions

Packages

Media

Describe the solution you'd like

The current supported filetypes are very limited, and Electron supports way more. They should be tested and added.

The most notable one is .jpeg which should've been included from the start.

Describe alternatives you've considered

N/A

Additional context

N/A

[Feature] Fade images in and out

Packages

Media

Describe the solution you'd like

When images are being displayed it would be nice to have a transition rather than just abruptly showing the image. Videos already have fades in them anyway so it's not necessary for those.

Describe alternatives you've considered

N/A

Additional context

I tried this in early development but couldn't get it to work when changing between 2 pictures.

[Feature] Persist state of Control Panel screens

Packages

Media

Describe the solution you'd like

When going between screens the screen will reload. This is particularly noticeable when returning to the Publication page as it has to reload the default publication.

Ideally we can persist this state. As this uses a router we could use keep-alive to keep the pages in memory.

Describe alternatives you've considered

We could also not use nested routes and swap out the components using v-show. This could get a bit messy though.

Additional context

N/A

[Feature] Persist the state of the helper text on display

Packages

Media

Describe the solution you'd like

If the user right clicks to hide the helper text on the Display window, when the app is reopened the helper text reappears. Similar to how we persist the state of the window positions, we should also persist whether or not the helper text is showing so that on reopen it will be as it was before the app closed.

Describe alternatives you've considered

N/A

Additional context

N/A

[Feature] Hide Text on Display

Packages

Media

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

Have some way to hide the "Nothing Displaying" text on the display window. It can then be used as a dark screen.

The simplest option would be some interaction on the display itself, such as a right click.

Describe alternatives you've considered

None

Additional context

N/A

[Feature] Multi Language Support

Packages

All

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

Currently the media is hard coded to Language 0 (English) which is used in a few queries. This should be an optional parameter that we can provide.

Core

  • The catalog database contains a list of possible languages which can be returned with a new method
  • Update anything with hard coded languages to accept a param

Express

  • Add another query param to endpoints for languages

Media

  • Add a language selection using another dropdown, populated using the core languages method. These options only need to be retrieved once per catalog download.
  • Pass the language as a param to core methods

Describe alternatives you've considered

None

Additional context

N/A

[Bug] Remove full window titles

Packages & versions

Library Media 0.7.0

Describe the bug

When screen sharing, the window titles become double barrelled because Zoom already prepends the program to the window title.

Reproduction steps

Screen Share from Zoom, window title is "Library Media - Library Media - Display"

Expected behavior

Window title should be "Library Media - Display"

Additional context

N/A

[Feature] Add Packaged App to Assets

Packages

Media

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

Currently the only way to create Library Media is to build it yourself which isn't practical. At least the MacOS app should be available on the release assets and a link added from the readme to download it (along with instructions)

The app itself probably needs to be code signed, that needs experimenting with.

Describe alternatives you've considered

Build it yourself

Additional context

N/A

[Feature] Ignore some images

Packages

Core

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

Some images are never going to be displayed, namely:

  • The "Square" versions of images that are used in other contexts even though a widescreen version exists
  • Publication thumbnails

We should be able to filter out these when requesting images. This could be a param so that if someone didn't want this filter they could opt out of it, but the default should be to not include them.

Describe alternatives you've considered

Showing them all is fine, just messy.

Additional context

N/A

[Feature] Build Universal Binary

Packages

Media

Describe the solution you'd like

Build both an M1 compatible version and an Intel one and then bundle them together.

Describe alternatives you've considered

Providing both versions as separate downloads may also work

Additional context

[Bug] OCLM for week 21-27 Jun does not load

Packages & versions

Media 0.9.0

Describe the bug

Throws error Cannot load details for video: mwb_E_202105#89

Reproduction steps

Try to load the week of 12-27 June for OCLM

Expected behavior

Workbook loads

Additional context

N/A

[Bug] Media Controls Flicker when a video is shown

Packages & versions

Media v0.7.0

Describe the bug

When a video is first played, the controls show briefly and then fade out.

Reproduction steps

Play a video

Expected behavior

The video plays without any controls showing, controls only show when hovering over the video

Additional context

N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.