iiab / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
4 stars 5 forks source link

Display video/bookshelf original URL (or canonical URL if possible!) to all users [ASIDE: upload of offline video works, despite red error "Failed to Move Cover File" in web UI] #107

Open avni opened 9 months ago

avni commented 9 months ago

Is your feature request related to a problem? Please describe. After I downloaded a video, I could not easily find the source URL from the Books or Edit Metadata page.

Describe the solution you'd like When viewing or editing a downloaded media, in addition to publisher, it would be helpful to see the source URL. This can be for testing purposes (my use case), but I can also see educators wanting to view source URL to verify veracity or accuracy of content. e.g., https://www.youtube.com/watch?v=OnTYLyNUPMc

Describe alternatives you've considered I can see the source URL on the Tasks page, but this requires me inferring which video URL refers to which downloaded video available on the Books page. Also I expect that some educators using an IIAB install may not be Admins and hence not able to access the Tasks page.

Additional context These are the 2 pages where seeing the source URL will be helpful. You could make it so that the field is not editable on the edit page if you want to restrict changing the URL after downlaoding.

Screenshot 2024-01-20 at 6 24 18 PM Screenshot 2024-01-20 at 6 24 27 PM
holta commented 9 months ago

Definitely!

Other metadata is also urgently needed by educators & students too. Possibly including things like:

LATER ON ALSO: Film/Audio/Book criticism(s), keywords and/or ratings — contributed by "offline" Student/Volunteer Librarians.

Related "canonicalized" URL discussion:

Also related:

holta commented 5 months ago

@deldesir can we make this happen in June, to be refined later as nec?

(Or if not yet, what higher-priority prep work needs to happen first?)

deldesir commented 5 months ago

No problem. Let's plan this for next week.

holta commented 4 months ago

To Do:

1) Many curriculum devs (parents, tutors, teachers, etc) will strongly prefer Source: URL on the very bottom of the description.

To reduce distraction.

“Offline First” is not just a slogan: this needs to be tried (soon).

2) Other curatorial metadata like HH:MM:SS, e.g. video duration, will need to be surfaced far more prominently (for educators, kids, etc) in coming months — as summarized here:

https://github.com/iiab/calibre-web/issues/107#issuecomment-1902439943

(Pasted in from...)

holta commented 4 months ago

Regarding this PR just merged...

...a question for @deldesir:

1) I inserted the word "Internet" within "Original Internet URL:" to help educators/kids understand that the original video came from the ONline Internet...

2) But what happens with this code when the original was an OFFline (local, grassroots community) video[*] — do you know?

[*] Or possibly even original OFFline photo??

holta commented 4 months ago
  1. But what happens with this code when the original [was] an OFFline (local, grassroots community) video — do you know?

[@deldesir responded on PR #185:] An offline resource shared would be better identifiable by the the publisher name IMO. Could be an individual, an institution...

Here's the technical answer to my question above — this is exactly what happened when I tried to upload 2.8MB OFFline video "sample-5s - Unknown.mp4" to LRN2:

Failed to Move Cover File /library/calibre-web/Unknown/sample-5s - Unknown (1000): [Errno 2] No such file or directory: '/tmp/calibre_web/97da78f4fcd9095d11967496de38b04e.cover.jpg'

(immediate screenshot of https://lrn2.org/live/admin/book/1000 below) image

(screenshot of https://lrn2.org/live/ below) image

(screenshot of https://lrn2.org/live/book/1000 below) image

In short, the process is rather ugly: (but at least it does work in the end, and "Original Internet URL:" field does not appear, which is the correct behavior!)

Incidental URLs:

holta commented 4 months ago

[*] Or possibly even original OFFline photo??

Upload of an OFFline photo works! Example of an 86.7 KB .WEBP photo just uploaded:

(screenshot of https://lrn2.org/live/ below) image

(screenshot of https://lrn2.org/live/book/1001 below) image

(screenshot of https://lrn2.org/live/admin/book/1001 below) image

deldesir commented 4 months ago

I will work on this. I'll use ffmpeg directly since our tests with https://github.com/smartcrop/smartcrop.py were not conclusive.

holta commented 4 months ago

what happened when I tried to upload 2.8MB OFFline video "sample-5s - Unknown.mp4" to LRN2:

Failed to Move Cover File /library/calibre-web/Unknown/sample-5s - Unknown (1000): [Errno 2] No such file or directory: '/tmp/calibre_web/97da78f4fcd9095d11967496de38b04e.cover.jpg'

Progress — I'm hoping this PR can be merged today [or very soon] — if it's confirmed to be solid:

holta commented 4 months ago

A bookshelf's original URL and key context (description etc!?) should also definitely be displayed for everyone (eventually, well before end of 2024 if possible!?)

Right now bookshelves unfortunately don't provide any "lineage" details or "structural" details[*] except for the bookshelf title — as can be seen here:

image Screenshot from: https://lrn2.org/live/shelf/44

[*] e.g. what is the average HH:MM:SS of every video on the shelf — to help all teachers/parents very quickly organize their lesson plan?

holta commented 4 months ago

Just FYI ugly HTML <br><br> tags are displayed, concatenated on the bottom of video description in many-if-not-most cases:

<br><br>Original Internet URL: ...

Not an emergency and not the end of the world. But this should really be fixed. (Users should see "Original Internet URL: ..." on a completely separate line.)

Related:

deldesir commented 4 months ago

The regression is fixed by upstream commit https://github.com/janeczku/calibre-web/commit/551828f8cf8fb9f052d90456a3eb7ebaa8529cc6