Bug 341305 - kio thumbnail slave unable to create previews for .cbr files due to inabillity to identify unrar due to unrar having removed the --version flag since unrar 5.2.1
Summary: kio thumbnail slave unable to create previews for .cbr files due to inabillit...
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: thumbnail (show other bugs)
Version: 4.14.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
: 355368 (view as bug list)
Depends on:
Blocks: 367626
  Show dependency treegraph
 
Reported: 2014-11-26 20:37 UTC by Jörg Schuck
Modified: 2017-01-20 23:13 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed patch to fix the bug. (2.31 KB, patch)
2014-11-26 20:38 UTC, Jörg Schuck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Schuck 2014-11-26 20:37:47 UTC
Since the unfree unrar version has reached version 1:5.2.1-1 (currently at 1:5.2.2-1) the tumbnail preview for .cbr files failed, showing only the default document icon instead.  

Since okular had also been unable to open .cbr files since that point, i assumed a similar problem. Turns out, that since the mentioned version, unrar dropped the --version flag, leaving us only with the -v flag to identify it.

That suspicion was hardened by the fact since thumbnails were created as usual after a downgrade to unrar 1:5.1.7-1.

Based on the solution for okular from Albert Astals Cid i wrote a patch which implements a fallback check to the -v flag if the --version flag fails. Only if both checks fail, no unrar path is returned.

Reproducible: Always

Steps to Reproduce:
1. Start kde while unrar 1:5.2.2-1 or higher is installed.
2. Make sure Comicbook preview in Dolphin is enabled.
3. Navigate to a folder with at least one .cbr in it which has not yet gotten a thumbnail. (Cached thumbnails will continue to work).

Actual Results:  
Missing .cbr thumbnails will not be created.

Expected Results:  
New .cbr files getting their previews.

I will add my patch to this report. It has compiled without problems on my system with the code from the kde-runtime project as a base. I branched it from v4.14.3 of the repository.

After i restarted the patched kde, .cbr thumbnail production worked with both versions.
Comment 1 Jörg Schuck 2014-11-26 20:38:40 UTC
Created attachment 89736 [details]
Proposed patch to fix the bug.
Comment 2 Christoph Feck 2014-11-26 20:49:33 UTC
Thanks Jörg for the patch. There are some coding style issues which are best discussed at reviewboard.kde.org. If you do not want to create a review request there, I will go through it in the coming days.
Comment 3 Stefan Radermacher 2015-09-03 10:51:21 UTC
This is still an issue in Dolphin 15.08
Comment 4 Christoph Feck 2015-11-15 12:09:18 UTC
*** Bug 355368 has been marked as a duplicate of this bug. ***
Comment 5 BasioMeusPuga 2016-02-26 05:27:40 UTC
This bug still exists in Dolphin 15.12.2
Comment 6 Massimiliano Torromeo 2016-10-24 21:27:36 UTC
I just submitted a patch for this https://git.reviewboard.kde.org/r/129255/
Comment 7 Albert Astals Cid 2017-01-20 23:13:46 UTC
Git commit c734c5d5a1b47f749ef9230454f963b3b7daf573 by Albert Astals Cid.
Committed on 20/01/2017 at 23:13.
Pushed by aacid into branch 'Applications/16.12'.

Fixed unrar version check

The parameter "--version" stopped working since unrar 5.2 which was
released almost 2 years ago.

With this change this now becomes the minimum version required but
every distribution that is going to relase a version with
this commit has probably been using unrar > 5.2 for quite a while
so I don't think there is any need to provide a fallback.
Related: bug 367626

REVIEW: 129255

M  +1    -1    thumbnail/comiccreator.cpp

https://commits.kde.org/kio-extras/c734c5d5a1b47f749ef9230454f963b3b7daf573