efl.ethumb_client.EthumbClient Class

class efl.ethumb_client.EthumbClient(func, *args, **kargs)

New in version 1.17.

This client is the recommended way to generate thumbnails with Ethumb. All you have to do is create a client instance, wait it to be connected to server, configure thumbnail parameters and then start feed it with file_set(), exists() generate(). Basic steps are:

  • instantiate EthumbClient, wait for func to be called with success.

  • set various parameters, like format and size.

  • loop on original files:

    • c.file_set(file)

    • if not c.exists(): c.generate(generated_cb)

It is recommended explicit call to disconnect() function when you don’t need the thumbnailer anymore.

Parameters
  • func – function to call when connection with server is established.

  • *args – Any other parameters will be passed back in the callback function

  • **kargs – Any other keyword parameters will be passed back in the callback function

Expected func signature:

func(client, status, *args, **kargs)

with status being True for successful connection or False on error.

Raises
  • TypeError – if func is not callable.

  • SystemError – if it was not possible to connect to server, allocate memory or use DBus.