Opened 11 years ago

Closed 9 years ago

#4400 closed enhancement (wontfix)

PHP Gallery 2 Integration

Reported by: jshoor Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: Plugin - MythGallery Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: no

Description

This patch integrates PHP Gallery 2(http://gallery.menalto.com/) into MythGallery. It leverages the "Gallery Remote Protocol" and is a read-only integration. (The File... menu item is disabled.) The patch caches all of the image data to the local MythGalleryDir? for improved performance.
There are two new settings that were added to support the integration.

1) PHP Gallery URL - Point this to your PHP Gallery installation.

2) Refresh Gallery Cache - Enabling this setting forces the MythGallery to go back to the PHP Gallery server to refresh its cached images.

Please note that the Gallery Remote Protocol has a few of its own limitations that I was not able to work around (If anyone has any ideas, please let me know.):

1) It does not leverage the PHP Gallery sort order. It only seems to return items in alphabetical order.

2) It does not leverage PHP Gallery defined highlight. The integration just uses the first item in the album as the highlight.

3) It does not support item types other than images.

When the new PHP Gallery XML-RPC Protocol is released, I would assume that this patch could be ported.

Attachments (2)

phpgallery2.patch (22.7 KB) - added by jshoor 11 years ago.
phpgallery2-030908.patch (26.6 KB) - added by jshoor 11 years ago.
Updated Php Gallery 2 integration patch

Download all attachments as: .zip

Change History (8)

Changed 11 years ago by jshoor

Attachment: phpgallery2.patch added

comment:1 Changed 11 years ago by elkin@…

Have you tried if this patch also works with Gallery version 1.6?

comment:2 Changed 11 years ago by jshoor

Since the Gallery Remote Protocol only works with Gallery 2, I assume it would not work. However, shouldn't you be able to just point MythGallery to your Gallery 1.6 file system? This is what I used to do before I migrated to G2.

BTW - I am still working out a few bugs in my patch related to thumbnail locations and non-cached slideshows. I should be uploading a newer version of the patch in the next few days.

Changed 11 years ago by jshoor

Attachment: phpgallery2-030908.patch added

Updated Php Gallery 2 integration patch

comment:3 Changed 11 years ago by jshoor

This upgraded integration still has the same limitations due to the Gallery 2 API; however, I reworked it significantly since the latest version and it should be very usable at this point.

My original approach was to only download images from the remote site when needed; however, I ran into problems controlling the event loop due to the fact that the http classes are asynchronous. Additionally, I found that the performance really suffered when you tried to do large slideshows across multiple folders.

This version of the integration follows a similar approach to MythMusic where all images are downloaded at once. While it is slower initially, there is far less code needed, since once the files are local, the rest of the plug-in works normally.

To use the integration, there are three new settings in the configuration screen. Once, configured there should be a Download option available from the File Submenu.

Feedback is always appreciated.

comment:4 Changed 10 years ago by stuartm

Component: mythgalleryPlugin - MythGallery

comment:5 in reply to:  description Changed 9 years ago by anonymous

Replying to jshoor:

This patch integrates PHP Gallery 2(http://gallery.menalto.com/) into MythGallery. It leverages the "Gallery Remote Protocol" and is a read-only integration. (UUU File... menu item is disabled.) The patch caches all of the image data to the local MythGalleryDir? for improved performance.
There are two new settings that were added to support the integration.

1) PHP Gallery URL - Point this to your PHP Gallery installation.

2) Refresh Gallery Cache - Enabling this setting forces the MythGallery to go back to the PHP Gallery server to refresh its cached images.

Please note that the Gallery Remote Protocol has a few of its own limitations that I was not able to work around (If anyone has any ideas, please let me know.):

1) It does not leverage the PHP Gallery sort order. It only seems to return items in alphabetical order.

2) It does not leverage PHP Gallery defined highlight. The integration just uses the first item in the album as the highlight.

3) It does not support item types other than images.

When the new PHP Gallery XML-RPC Protocol is released, I would assume that this patch could be ported.

comment:6 Changed 9 years ago by stuartm

Resolution: wontfix
Status: newclosed

The patch uses QT widgets instead of mythui, so won't be accepted. I believe Beirdo has plans to write his own patch for Gallery integration.

Note: See TracTickets for help on using tickets.