Opened 6 years ago
Closed 5 years ago
#12424 closed Patch - Feature (Fixed)
Replacement Gallery using MythUI & Storage Groups
Reported by: | Owned by: | Roger Siddons | |
---|---|---|---|
Priority: | minor | Milestone: | 0.28 |
Component: | Plugin - MythGallery | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Notes
Tested with Qt 4.8 and Qt 5.2.1
Backend manages images in Storage Group and supports multiple frontends/service clients.
Backend generates thumbnails for FE's and service clients. They are pre-generated in a (low-priority) background thread to improve FE performance. They are also generated on-demand when necessary.
Thumbnails reside in <BE user>/.mythtv/tmp/Photographs. FE's cache displayed images & thumbnails in <FE user>/.mythtv/cache/themecache/<themedir>. Both caches are synced to the Db to prevent cache overflow.
The Thumbnail View screen implements zoom by switching buttonlist widgets. A theme must define an "images0" buttonlist (most zoomed-out) and can optionally define others to enable zoom. The default theme provides 10x6, 8x4, 6x3, 4x2 views.
Provides basic management functions (Create Dir, Delete, Copy/Move?) which can be password-protected to thwart little fingers/prevent data loss.
Provides some basic animated slideshow transitions using zoom, rotate, fade, translate and a framework for easily adding more.
Displays Exif metadata and date/orientaton of videos. Images can be sorted by metadata timestamp. Photos are auto-rotated using Exif data; video auto-rotation TBD.
Never writes Exif metadata to image files. Exif standards are poorly defined and modification may lead to corruption/data loss. Images may (should) have read-only permissions. Orientation overrides are stored in Db only.
The menu is a 'smart' in that the displayed optons depend upon the item(s) selected.
Deficiencies/Known Issues.
Uses current schema (>1318). However its use of the db has changed and is not compatible with old 'New Image Gallery'. Clear image database ("gallery_files" table) first. It abuses the current schema - a schema update is required to tidy it up.
Does not yet support mythmediaserver.
Services API is incomplete.
Videos are not played in correct orientation.
Slideshow zoom wobbles between 70% - 110% zoom.
Not integrated with shutdown. Initial scans of large libraries will take a significant time to generate thumbnails.
Patches (No dependencies)
- MythUI image centring. Images that are smaller than a widget are centred, but the image zoom is currently ignored. This results in a slideshow image being displaced when it is zoomed. This patch improves the problem but it may not be a complete solution as the image still wobbles when being zoomed.
- MythUI image re-sizing. An image is currently re-sized before being orientated. This results in the bottom of portrait-orientated pics going off-screen. This patch orientates an image before determining its size.
- MythUI image orientation. Orientation is currently inverted -portrait images are shown upside-down.
- Replacement gallery. Lots of new/deleted/renamed files but all isolated Gallery code, except for frontend/main (key bindings & startup) and mythuifilebrowser (to make it sub-classable)
Attachments (15)
Change History (38)
Changed 6 years ago by
Attachment: | 0001-Centre-zoomed-images.patch added |
---|
Changed 6 years ago by
Attachment: | 0004-Replacement-Gallery-using-MythUI-storage-groups.patch added |
---|
Gallery
comment:1 Changed 6 years ago by
Roger, This work looks very interesting. I have Q regarding images cache location on FE side. Is it possible to change cache from themecache to remotecache ? I'm asking as themecache is usually highly static while remotecache is much more dynamic. In diskless systems static nature of themecache seems to be convenient for squashfs ro share while remotecache can be NFS share to central server storage. I'm using such approach with high success in minimyth2. When this change will be in place - I'll love to give it try in my home/minimyth2 :-)
Changed 6 years ago by
Attachment: | 0005-Cache-FE-gallery-images-in-remotecache-for-Minimyth2.patch added |
---|
Minimyth2 customisation
comment:2 Changed 6 years ago by
Warpme,
Gallery can not specify the cache location - it is determined in the depths of MythUIImage which presumably uses themecache as most images are/were theme elements.
Your point makes sense though. Gallery images may be scaled differently by each theme, but there will be no conflict (due to the cache naming) and moving them out of the themecache prevents needless duplication where themes use the same sized widgets (or the default gallery theme).
It's something to consider if/when it gets adopted. In the meantime I've attached a patch (lightly tested) that crudely diverts gallery images to remotecache for you. Note the storage group is hard-coded.
comment:3 Changed 6 years ago by
Roger, I applied this first on my test BE (300 test pictures). I really like Your work. Some things needs to be polished but overall look is VERY promising. After so good experience I applied patches to production environment (7k pictures). On production I'm not able to finish initial scan. BE segfaults after sometime after starting scan. Looking on traces I see segfault in image.scanner. GDB produced +10M log file before I killed it. I suspect it is because massive amount of threads launched by image.scanner. I can try to produce GDB trace but this will be multi-tenths MB file... Let me know how can I help You with loving this issue.
comment:5 Changed 6 years ago by
Milestone: | unknown → 0.28 |
---|---|
Owner: | set to paulh |
Status: | new → accepted |
comment:9 Changed 6 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:10 Changed 6 years ago by
Resolution: | fixed |
---|---|
Status: | closed → new |
comment:11 Changed 5 years ago by
Version 1 (above) has numerous issues, mainly that it doesn't support frontend devices (CD's/USBs)
Following patches contain a replacement Version 2 - a major redesign.
Patches 0006-0012 add Myth support for the new design. Patch 0013 is the new design - mostly internal changes. Patches 0014 & 0015 provide a fix (work-around) for an issue peculiar to Qt 5.4.1
Changed 5 years ago by
Attachment: | 0006-MediaMonitor-Support-ejection-of-specific-device.patch added |
---|
Changed 5 years ago by
Attachment: | 0007-RemoteFile-Fix-writing-of-local-files.patch added |
---|
Changed 5 years ago by
Attachment: | 0008-RemoteFile-CopyFile-Don-t-overwrite-existing-files-b.patch added |
---|
Changed 5 years ago by
Attachment: | 0009-RemoteFile-Add-Move-operation.patch added |
---|
Changed 5 years ago by
Attachment: | 0010-MythUI-Don-t-draw-empty-text.patch added |
---|
Changed 5 years ago by
Attachment: | 0011-MythUI-Signal-when-image-loaded.patch added |
---|
Changed 5 years ago by
Attachment: | 0012-MythUI-Empty-menu-getter.patch added |
---|
Changed 5 years ago by
Attachment: | 0013-Gallery-Redesign-to-support-local-media.patch added |
---|
Changed 5 years ago by
Attachment: | 0014-Gallery-Use-common-orientation.patch added |
---|
Changed 5 years ago by
Attachment: | 0015-MythUI-Handle-deviant-image-orientation-behaviour-by.patch added |
---|
comment:12 Changed 5 years ago by
Owner: | changed from paulh to Roger Siddons |
---|---|
Status: | new → assigned |
Roger, assigning your open patches to yourself. Feel free to unassign if you prefer a review.
comment:22 Changed 5 years ago by
Roger, reading your last two comments about thumbnail orientation and the made changes, my patch in #12278 might be obsolete now.
comment:23 Changed 5 years ago by
Resolution: | → Fixed |
---|---|
Status: | assigned → closed |
Patch 1