Created attachment 180868 [details] Test TC file SUMMARY The current version of Tellico (v4.1.1, Ubuntu package 4.1.1-1ubuntu2 using Qt6) has a regression when loading directory images as compared to Tellico v3.5.5. In particular, image links with id="file:///...." produce "WARNING image not found: "file:///...."" instead of displaying the image. STEPS TO REPRODUCE 1. Save the attached TC file as "tellico-test.tc" 2. Save the attached JPEG file as /data/videos/POSTERS/passion-of-the-christ.jpeg 3. Start tellico from the command line: "tellico tellico-test.tc" 4. Observe that the image is NOT loaded into the directory / list of entries, and that the warning "WARNING image not found: "file:///data/videos/POSTERS/passion-of-the-christ.jpeg"" is generated on the terminal. OBSERVED RESULT Under Tellico v4.1.1, the image does not load as expected in the directory / list of entries; instead, a default icon is shown and a warning is generated. It DOES display correctly in the detail panel when the item is selected, at least under ZAPGroup-Video-Narrow.xsl (of which I am the author). EXPECTED RESULT Under Tellico v3.5.5, the image showed correctly with no warnings. SOFTWARE/OS VERSIONS Ubuntu Version: 25.04 (Plucky Puffin) Tellico Package Version: 4.1.1-1ubuntu2 KDE Plasma Version: 6.3.4 KDE Frameworks Version: 6.12.0 Qt Version: 6.8.3 DETAILED TECHNICAL INFORMATION First of all, thank you for all your hard work with Tellico -- it's an application I've been cheerfully using for many years. I've even submitted my own theme, ZAP Group Video Narrow, which you've placed on the KDE Store for Tellico. I have a Python script called make-tellico that generates a video.tc file (the script can be found at https://www.zap.org.au/git-browser/video-utils.git/). As part of this script, all video poster images are stored in /data/videos/POSTERS; they are NOT stored in video.tc. The TC file is, of course, just a ZIP file containing tellico.xml. In that XML file, I have: <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE tellico PUBLIC "-//Robby Stephenson/DTD Tellico V11.0//EN" "http://periapsis.org/tellico/dtd/v11/tellico.dtd"> <tellico xmlns="http://periapsis.org/tellico/" syntaxVersion="11"> <collection title="Local collection of videos" type="3" ZAPGroupVersion="6"> ... <entry id="1"> <title>The Passion of the Christ</title> <year>2004</year> <cover>file:///data/videos/POSTERS/passion-of-the-christ.jpeg</cover> <type>Movie</type> <certification>MA15+</certification> <filename>file:///data/videos/passion-of-the-christ.iso</filename> <iso-title>4</iso-title> ... </entry> ... <images> ... <image link="true" width="380" height="562" format="JPEG" id="file:///data/videos/POSTERS/passion-of-the-christ.jpeg"/> ... </images> </collection> </tellico> Note, in particular, that the <cover> element has a local file:// URL, which is reused in the <image> element. This worked correctly in v3.5.5. In v4.1.1, ImageZipArchive::imageById() in src/images/imagedirectory.cpp fails to load the URL "file:///data/videos/POSTERS/passion-of-the-christ.jpeg", hence generating the warning on line 246 of the code. If the <image> element is changed to use "/data/videos/POSTERS/passion-of-the-christ.jpeg" as the id attribute (instead of "file:///data..."), the image DOES display in the directory / list of entries. HOWEVER, this leads to another problem. In particular, note that my Tellico config file ~/.config/tellicorc contains: [General Options] Image Location=ImagesInAppDir At this point, loading the TC file copies every poster from /data/videos/POSTERS to ~/.local/share/tellico/data -- in my case, with a real TC file containing over 5700 entries, almost 100MB worth of images! Is it possible to fix ImageZipArchive::imageById() to work with "file:///" URLs, or (perhaps a better solution) implement another mode for "Image Location", say "ImagesInAbsoluteDir", which would use the images at a particular location without any copying. I'm not an expert in Qt/C++ programming, but let me know if I could assist -- certainly with debugging, if nothing else! Once again, thanks for Tellico.
Created attachment 180869 [details] Test JPEG file To be saved as /data/videos/POSTERS/passion-of-the-christ.jpeg
(In reply to John Zaitseff from comment #0) > The current version of Tellico (v4.1.1, Ubuntu package 4.1.1-1ubuntu2 using > Qt6) has a regression when loading directory images as compared to Tellico > v3.5.5. In particular, image links with id="file:///...." produce "WARNING > image not found: "file:///...."" instead of displaying the image. Thanks for the detailed write-up. I'll take a look at the regression. > At this point, loading the TC file copies every poster from > /data/videos/POSTERS to ~/.local/share/tellico/data -- in my case, with a > real TC file containing over 5700 entries, almost 100MB worth of images! That's essentially intentional as a shortcut for some of the searches that may return image location instead of reading the image contents into the XML itself. > Is it possible to fix ImageZipArchive::imageById() to work with "file:///" > URLs, or (perhaps a better solution) implement another mode for "Image > Location", say "ImagesInAbsoluteDir", which would use the images at a > particular location without any copying. Individual images can be marked as links only, such that no copying takes place. In the XML, it's a link="true" attribute where the id is the path. In the GUI, it's the checkbox in the image selection in the entry editor. Maybe that would fit the bill for what you need?
(In reply to Robby Stephenson from comment #2) Thank you for your reply! You mentioned: > Individual images can be marked as links only, such that no copying takes > place. In the XML, it's a link="true" attribute where the id is the path. In > the GUI, it's the checkbox in the image selection in the entry editor. Maybe > that would fit the bill for what you need? That's exactly what used to happen under Tellico v3.5.5: images of the form <image link="true" width="380" height="562" format="JPEG" id="file:///data/videos/POSTERS/passion-of-the-christ.jpeg"/> did NOT get copied anywhere (as far as I know) -- note the "link=true" setting. If that behaviour could be restored, that would be great, and there would be no need for a new "ImagesInAbsoluteDir" setting.
Git commit 2137e1c2124f9e9abdab951803146f15429078dc by Robby Stephenson. Committed on 04/05/2025 at 16:33. Pushed by rstephenson into branch '4.1'. Add unit test to verify successful image request for local image links Bug 503645 was already incidently fixed as part of other clean-up by commit f3b85d86e9925b5defb2848d2b34ecdddd0f0601 A +17 -0 src/tests/data/image_link_test.xml M +44 -0 src/tests/tellicoreadtest.cpp M +1 -0 src/tests/tellicoreadtest.h https://invent.kde.org/office/tellico/-/commit/2137e1c2124f9e9abdab951803146f15429078dc
(In reply to John Zaitseff from comment #3) > That's exactly what used to happen under Tellico v3.5.5: images of the form > > <image link="true" width="380" height="562" format="JPEG" > id="file:///data/videos/POSTERS/passion-of-the-christ.jpeg"/> > > did NOT get copied anywhere (as far as I know) -- note the "link=true" > setting. If that behaviour could be restored, that would be great, and > there would be no need for a new "ImagesInAbsoluteDir" setting. I really apologize, I read past your report too quickly and missed the fact that you were already using the image links. As it turns out, I'd already fixed this issue recently through some other work, and so it will be in v4.1.2 shortly. Thanks again for the details info and for your feedback!
Git commit f7f998549786edd0fafe15edcfa7ace5da3d815a by Robby Stephenson. Committed on 04/05/2025 at 16:41. Pushed by rstephenson into branch 'master'. Add unit test to verify successful image request for local image links Bug 503645 was already incidently fixed as part of other clean-up by commit f3b85d86e9925b5defb2848d2b34ecdddd0f0601 A +17 -0 src/tests/data/image_link_test.xml M +44 -0 src/tests/tellicoreadtest.cpp M +1 -0 src/tests/tellicoreadtest.h https://invent.kde.org/office/tellico/-/commit/f7f998549786edd0fafe15edcfa7ace5da3d815a