These must be pretty easy to implement (it's just an archive with image files inside) and it's extremely useful.
Would you want it to display just the first picture in the archive or multiple ones to give you a better idea of the content?
The first (which is usually the cover of the comic) is perfectly fine IMO.
My laptop with the work I had done died yesterday, I'll try working on this on my notebook, but I can't make any promises.
Created attachment 6169 A patch that should do what is requested in this bug report. This should be enough to close this bug. I'm not sure if all the code is according to the code style of this project. I tried my best though. A review would be nice :)
I'm experiecing a segfault: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffe9196700 (LWP 23061)] 0x00007fffecf82a48 in comicbook_thumbnailer_get_cover_file (dir=0x62c840, thumbnailer=0x6fa3a0) at comicbook-thumbnailer.c:192 192 file = g_file_new_for_path(g_strconcat(g_file_get_path(dir), "/", g_strdup((gchar*)g_ptr_array_index(files, 0)), NULL)); Running as root it doesn't segfault but the thumbnail is not shown, just keeps creating folders as /tmp. Cbz files are not processed. Aside from that, some questions/observations: - libcurl headers are included but besides curl_global_init and url_global_cleanup anything else is used, so is it really needed? (it seems to be a leftover from cover-thumbnailer, am I right?) - invoking unrar and unzip commands, I don't think this is safe, I guess it would be wiser to use zlib or equivalent. - missing support for cb7(7z), cba(ace) and cbt(tar)?
I just realized I worked on this 4 years ago but it seems I never actually got this merged. I'll try to rebase this and address the issues this weekend.
Created attachment 9267 Add comicbook thumbnailer plugin Reworked the previous patch to use libarchive. This addresses all of the comments from the previous review. - removed mentions of libcurl - no longer invokes command line programs to extract the first image - zip, tar, rar and 7z archives are now supported, I couldn't find if libarchive supports ace as well. If it does we probably have to add just 1 more line to this patch.
Created attachment 9270 thunar screenshot of cbr thumbnail Why not just use the desktop thumbnailer functionality? $ cat /usr/share/thumbnailers/comicthumb.desktop [Thumbnailer Entry] TryExec=comicthumb Exec=comicthumb %u %o %s MimeType=application/x-cb7;application/x-cbr;application/x-cbt;application/x-cbz;application/x-ext-cb7;application/x-ext-cbr;application/x-ext-cbt;application/x-ext-cbz;application/vnd.comicbook-rar *requires mcomix (https://sourceforge.net/projects/mcomix).
Sorry, file should be /usr/share/thumbnailers/comicthumb.thumbnailer
I was not aware this existed but I suppose that works too.
ToZ's solution is pretty simple but depends on users setting it up or packagers doing the heavy lift. I like the attached patch, very convenient to users but it adds 650+ lines of code to a project that has no dedicated maintainer (Ali said he'll be back, but that's been a while ago). Well, this is not an easy call and I'm not tumbler's maintainer, so I'm sorry but I won't merge until it's clear which approach makes more sense to tumbler.
Alright, that makes sense. Just ping me if someone wants changes before merging at some point. And otherwise users indeed always have the workaround with mcomix that ToZ suggested.
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/tumbler/-/issues/5. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev