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.
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.
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.
Thanks for the patch, but I think we can stick to the thumbnailer provided by mcomix. The comicthumb.thumbnailer file above is part of it, so I guess it is packaged on most distributions (at least, it is on Arch). In that case, just install this package and Tumbler will produce thumbnails for these formats without further modification.
For existing plugins whose main dependency has an embedded thumbnailer, the question already arises as to what they add. So I think it's better not to add code to maintain in this case.