Missing docs in ubuntu website

Bug #1474035 reported by Alejandro J. Cura
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Developer Portal
Fix Released
High
David Callé
thumbnailer (Ubuntu)
Fix Released
High
Unassigned

Bug Description

There are no docs for the thumbnailer's QML plugin in https://developer.ubuntu.com/api/qml/current/

Changed in thumbnailer:
importance: Undecided → High
assignee: nobody → James Henstridge (jamesh)
Revision history for this message
Michał Karnicki (karni) wrote :

Not only for the QML plugin, but there's no docs for C++ API either.

Revision history for this message
Michi Henning (michihenning) wrote :

David Calle has kindly agree to take care of the publishing of the QML doc. (I didn't assign the bug to him because I can't find the launchpad ID.)

The Qt interface has complete doc that's provided in the doc package (as soon as we do the next landing).

Revision history for this message
David Callé (davidc3) wrote :

Added myself.

Changed in developer-ubuntu-com:
assignee: nobody → David Callé (davidc3)
importance: Undecided → High
Revision history for this message
Michi Henning (michihenning) wrote :

Thanks David!

Set to triaged for thumbnailer so we can still track it.

Changed in thumbnailer:
status: New → Triaged
Revision history for this message
Michi Henning (michihenning) wrote :

Doc for Qt interface has just passed silo approval. Should land within a few hours.

Changed in thumbnailer (Ubuntu):
status: New → Triaged
importance: Undecided → High
no longer affects: thumbnailer
Revision history for this message
David Callé (davidc3) wrote :
Revision history for this message
Michi Henning (michihenning) wrote :

Thanks for that David! I spotted a few minor errors and omissions. Could you look at these please?

In "How to use it":

image://thumbnailer/<file path>"

should be

image://thumbnailer/<file URI>

Also, on the same line, the comment "local videos and pictures" really should be "local videos, audio files, or pictures"

image://albumart/album=Blur:+The+Best+Of&artist=Blur"

It looks like the "+" signs should be "%20"? (This also appears in the URI after this one.)

The "Cosmos Laundromat" and "Cry Me A River" URIs should have %20 instead of spaces.

It might be nice to add an example that same box that shows how to extract a thumbnail from an image file (just to make it clear that this can be done too).

It would be good to mention the media.getArtUri() method, which creates a thumbnailer URI. Otherwise, people are likely to cobble the URIs together by hand and get it wrong half the time...

I think the page needs some explanation of semantics. Specifically:

The thumbnailer always preserves aspect ratio.

Returned thumbnails may be smaller than what was asked for because the thumbnailer never up-scales. If the original artwork is smaller than what was asked for, the largest possible thumbnail will be returned. Thumbnails are never larger than 1920 pixels in the larger dimension (even if the original artwork is larger).

Requests with either dimension < 0 are invalid and return an error.

Requests for (0,0) mean "as large as possible" (subject to the 1920 pixel limit).

Requests for (x,0) or (0,y) mean the same as (x,x) and (y,y), respectively.

Revision history for this message
Michi Henning (michihenning) wrote :

Sorry, the media.getArtUri() method doesn't apply to QML. It is provided by the mediascanner API.

But that raises another question: we also have a Qt API. The doc for that is provided by the thumbnailer-qt-doc package. Would it be worth mentioning this somewhere?

Revision history for this message
Michi Henning (michihenning) wrote :

"Requests for (x,0) or (0,y) mean the same as (x,x) and (y,y), respectively."

Correction:

(x,0) means "I don't care how tall, but no wider than x". The height is determined by the aspect ratio.

Similar for (0,y), which leaves the width unconstrained.

Revision history for this message
David Callé (davidc3) wrote :

Thanks Michi, that's very useful. I've updated the page. The example will be updated as well.

Revision history for this message
Michi Henning (michihenning) wrote :

Great, thanks David! Can you please let me know when the example image is done, so I can close?

Revision history for this message
Michi Henning (michihenning) wrote :

Hi David, any movement on this? The image still shows the incorrect information. Also, a link to the qt doc package would probably be useful.

Revision history for this message
Michi Henning (michihenning) wrote :

This is still not fixed. Can we please update the incorrect information?

Revision history for this message
David Callé (davidc3) wrote :

Excuse me Michi, but I'm not sure which changes you want here. Is it just the formatting of URI (which are, in all displayed cases, correctly parsed by Qt/QML)?

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

Sorry David, I was going by your comment #10 which mentioned that the example would be updated.

image://albumart/album=Blur:+The+Best+Of&artist=Blur

Does this really work? (I can't try it out right now.)

If all the examples in the image work, then we can close this. Can you confirm?

Revision history for this message
David Callé (davidc3) wrote :

Just tried and it works.

image://albumart/album=Blur:%20The%20Best%20Of&artist=Blur
image://albumart/album=Blur:+The+Best+Of&artist=Blur
image://albumart/album=Blur: The Best Of&artist=Blur

All return the same result.

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

Very cool, thanks for checking! And my apologies for my mistaken reminder!

I'll mark as fix released.

Changed in thumbnailer (Ubuntu):
status: Triaged → Fix Released
Changed in developer-ubuntu-com:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.