https://bugs.kde.org/show_bug.cgi?id=503645

            Bug ID: 503645
           Summary: Regression when loading directory images in
                    src/images/imagedirectory.cpp
    Classification: Applications
           Product: tellico
           Version: 4.1.1
          Platform: Ubuntu
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: ro...@periapsis.org
          Reporter: j.zaits...@zap.org.au
  Target Milestone: ---

Created attachment 180868
  --> https://bugs.kde.org/attachment.cgi?id=180868&action=edit
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.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to