| Summary: | No previews for cbr comic books | ||
|---|---|---|---|
| Product: | [Applications] dolphin | Reporter: | KDE Neon user <emailmeat> |
| Component: | view-engine: icons mode | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | massimiliano.torromeo, nate, samrog131 |
| Priority: | NOR | ||
| Version First Reported In: | 16.12.2 | ||
| Target Milestone: | --- | ||
| Platform: | Neon | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Bug Depends on: | 341305 | ||
| Bug Blocks: | |||
|
Description
KDE Neon user
2016-08-21 04:37:40 UTC
A possible dublicate of the 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: https://bugs.kde.org/show_bug.cgi?id=341305 I took a look at the source code and found the problem.
When the archive is a rar file the thumbnailer has an algorithm to identify the presence of an unrar binary and when it finds one in the path it calls it with "--version" but both that unrar and rar binaries do not accept that argument and instead they expect arguments to have a single dash (just "-version").
I tested this with a dirty hack (tm) by moving /usr/bin/unrar to /usr/bin/unrar-bin and replacing it with the a bash script and the thumbnails are now being generated correctly.
For anyone interested, the script looks like this (do not forget to "chmod 755"):
#!/bin/bash
if [ "$1" = "--version" ]; then
exec unrar-bin -version
fi
exec unrar-bin "$@"
Massimiliano, would you be able to upload a patch for the CBR plugin to http://phabricator.kde.org/? Looks like it should be a one-character change. Fixed with the commit c734c5d5a1b47f749ef9230454f963b3b7daf573. https://cgit.kde.org/kio-extras.git/commit/?id=c734c5d5a1b47f749ef9230454f963b3b7daf573 Fantastic! Gettin' things done... |