This forum has been archived. All content is frozen. Please use KDE Discuss instead.

keneric (generic thumbnailer) dosen't work anymore

Tags: None
(comma "," separated)
hizoka
Registered Member
Posts
9
Karma
0
OS
Hello,

with the latest (or next to latest) version, kernic does not work anymore.
The sources are here.

I like it, it's a thumbnailer that uses a script to create thumbnails.
The script must be in the PATH and named stripPicture.
Image

I use it to create the mkv thumbnails from attached images and to display only one image based on their names for the folders.

Dolphin should have desktop files in /usr/share/kservices5/ or ${HOME}/.local/share/kservices5/.
Image
Desktop file eg:
Code: Select all
[Desktop Entry]
Type=Service
Name=Folder only one image (Keneric)
X-KDE-ServiceTypes=ThumbCreator
MimeType=inode/directory;
X-KDE-Library=keneric
CacheThumbnail=true


Now Dolphin always sees the desktop files in the thumbnailers tab of the configuration.

But, I guess kernic is not called because, stripPicture is not running now and ~/.cache/keneric isn't created.
I tried to use a simple echo to in file in the script file but nothing is created.


I need it, any idea what the problem is?
I tried to rebuild also the sources...


Thank you very much and sorry for my english !
Have a nice day.


EDIT:
Before:
Image
Image

After apt dist-upgrade:
Image
Image
hizoka
Registered Member
Posts
9
Karma
0
OS
Hello, happy new year :)

No one has any ideas? :(

Maybe the post can be moved to System & Utilities or Dolphin?
User avatar
claydoh
Registered Member
Posts
1170
Karma
9
OS
You would have to ask the developer of the utility about this, perhaps it needs to be updated to work on more current Plasma systems.

The keneric library might need to be rebuilt against the current system libraries, or something along those lines?


claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
hizoka
Registered Member
Posts
9
Karma
0
OS
I sended a mail 2 weeks ago without reply.

I don't use c++ but the code is simply and seems OK.

I have tryed to change it to just create a folder but nothing happens...

I rebuilded it many times.
User avatar
claydoh
Registered Member
Posts
1170
Karma
9
OS
Is the location of the script files (~/.local/bin) in your $PATH?


claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
hizoka
Registered Member
Posts
9
Karma
0
OS
The script is in /usr/bin/

If I edit the sources of keneric and I leave only a folder creation, the folder isn't created.

So I guess the problem is before the script execute.
hizoka
Registered Member
Posts
9
Karma
0
OS
I tryed to create the simplest thumbnailer but without success...

keneric.h :
Code: Select all
#ifndef KENERIC_THUMBNAILER_H
#define KENERIC_THUMBNAILER_H

#include <QStringList>
#include <kio/thumbcreator.h>

class Keneric : public ThumbCreator
{
public:
    Keneric();
    virtual ~Keneric();

    virtual bool create(const QString &path, int w, int h, QImage &img);
    virtual Flags flags() const;
};

#endif


keneric.cpp :
Code: Select all
#include "keneric.h"

#include <QDir>
#include <iostream>
#include <fstream>
using namespace std;

extern "C"
{
    Q_DECL_EXPORT ThumbCreator *new_creator()
    {
        return new Keneric();
    }
}

Keneric::Keneric()
{
}

Keneric::~Keneric()
{
}

bool Keneric::create(const QString &path, int width, int height, QImage &img)
{
    QString kenericDirectory("/tmp/keneric/");
    QDir directory(kenericDirectory);
    directory.mkpath(".");

    fstream my_file;
    my_file.open("/tmp/keneric.txt", ios::out);
    my_file << "super test";
    my_file.close();

    fstream my_file2;
    my_file2.open("/home/hizoka/keneric.txt", ios::out);
    my_file2 << "super test";
    my_file2.close();

    return false;
}

ThumbCreator::Flags Keneric::flags() const
{   
    return None;
}


CMakeLists.txt :
Code: Select all
project(keneric)

cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set(QT_MIN_VERSION "5.2.0")

find_package(ECM 1.0.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

include(FeatureSummary)
include(WriteBasicConfigVersionFile)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)

find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Gui)
find_package(KF5 REQUIRED COMPONENTS KIO)

include_directories(
    ${CMAKE_CURRENT_BINARY_DIR}
    )

set( keneric_PART_SRCS
  keneric.cpp
)

add_library(keneric MODULE ${keneric_PART_SRCS})

target_link_libraries(keneric Qt5::Gui KF5::KIOWidgets)

install(TARGETS keneric DESTINATION ${PLUGIN_INSTALL_DIR})


hizo-keneric-folder.desktop :
Code: Select all
[Desktop Entry]
Type=Service
Name=HizoDossiers
X-KDE-ServiceTypes=ThumbCreator
MimeType=inode/directory;
X-KDE-Library=keneric
CacheThumbnail=true


I create the /usr/lib/x86_64-linux-gnu/qt5/plugins/keneric.so:
Code: Select all
mkdir builddir
cd builddir
cmake .. -DCMAKE_INSTALL_PREFIX=$(kf5-config --prefix) -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
sudo make install


But no file or folder created... :'(
hizoka
Registered Member
Posts
9
Karma
0
OS
Arf...

There is no problem with the thumbnailers...

It's a f***ing bug into dolphin....

If I delete the PreviewSettings group in the dolphinrc file, everything works...

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


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]