MythTV
master
|
Filesystem adapter for Backend, managing Photographs storage group. More...
#include <libmythmetadata/imagemanager.h>
Public Member Functions | |
ImageAdapterSg () | |
ImageItem * | CreateItem (const QFileInfo &fi, int parentId, int devId, const QString &base) const |
Construct a remote image from a file. More... | |
StringMap | GetScanDirs () const |
Returns SG dirs. More... | |
QString | GetAbsFilePath (const ImagePtrK &im) const |
Get absolute filepath for a remote image. More... | |
QString | MakeFileUrl (const QString &path) const |
Construct URL of a remote image. More... | |
QString | MakeThumbUrl (const QString &devPath, const QString &path="") const |
Construct URL of the thumbnail of a remote image. More... | |
Public Member Functions inherited from ImageAdapterBase | |
QDir | GetImageFilters () const |
Get filters for detecting recognised images/videos. More... | |
ImageNodeType | GetImageType (const QString &ext) const |
Determine file type from its extension. More... | |
Public Member Functions inherited from DeviceManager | |
QStringList | CloseDevices (int devId, const QString &action) |
Remove a device (or all devices) More... | |
QString | DeviceMount (int devId) const |
Get path at which the device is mounted. More... | |
QString | DeviceName (int devId) const |
Get model name of the device. More... | |
int | DeviceCount () const |
QString | ThumbDir (int fs) const |
Static Public Member Functions | |
static void | Notify (const QString &mesg, const QStringList &extra) |
Send message to all clients about remote ids. More... | |
Static Public Member Functions inherited from ImageAdapterBase | |
static QStringList | SupportedImages () |
Return recognised pictures. More... | |
static QStringList | SupportedVideos () |
Return recognised video extensions. More... | |
static QString | ConstructPath (const QString &path, const QString &name) |
Assembles a canonical file path without corrupting its absolute/relative nature. More... | |
static QString | BaseNameOf (const QString &path) |
Extracts file name (incl extension) from a filepath. More... | |
static QString | PathOf (const QString &path) |
Extracts path from a filepath. More... | |
static QString | FormatSize (int sizeKib) |
static QString | GetAbsThumbPath (const QString &devPath, const QString &path) |
Get absolute filepath for thumbnail of an image. More... | |
static QString | ThumbPath (const ImageItem &im) |
Thumbnails of videos are a JPEG snapshot with jpg suffix appended. More... | |
Static Protected Member Functions | |
static int | ImageId (int id) |
static QString | ImageId (const QString &id) |
static int | DbId (int id) |
static QString | DbIds (const QString &ids) |
Private Attributes | |
QString | m_hostname |
Host of SG. More... | |
int | m_hostport |
StorageGroup | m_sg |
Images storage group. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ImageAdapterBase | |
ImageAdapterBase () | |
Constructor. More... | |
virtual | ~ImageAdapterBase ()=default |
Protected Member Functions inherited from DeviceManager | |
int | OpenDevice (const QString &name, const QString &mount, MythMediaDevice *media=nullptr, QTemporaryDir *dir=nullptr) |
Define a new device and assign it a unique id. If the device is already known, its existing id is returned. More... | |
int | LocateMount (const QString &mount) const |
Find the id of a device. More... | |
StringMap | GetDeviceDirs () const |
Get all known devices. More... | |
QList< int > | GetAbsentees () |
Get list of mountpoints for non-import devices. More... | |
DeviceManager ()=default | |
~DeviceManager () | |
Filesystem adapter for Backend, managing Photographs storage group.
Scanner will scan SG. Creates images with positive ids and relative filepaths Thumbnails are stored in Temp SG.
Definition at line 234 of file imagemanager.h.
|
inline |
Definition at line 237 of file imagemanager.h.
ImageItem * ImageAdapterSg::CreateItem | ( | const QFileInfo & | fi, |
int | parentId, | ||
int | devId, | ||
const QString & | base | ||
) | const |
Construct a remote image from a file.
fi | File |
parentId | Id of the parent dir |
devId | Unused |
base | SG dir path |
Definition at line 414 of file imagemanager.cpp.
StringMap ImageAdapterSg::GetScanDirs | ( | ) | const |
Returns SG dirs.
Definition at line 474 of file imagemanager.cpp.
QString ImageAdapterSg::GetAbsFilePath | ( | const ImagePtrK & | im | ) | const |
Get absolute filepath for a remote image.
For the SG node the path of SG dir with most space is returned
im | Image |
Definition at line 491 of file imagemanager.cpp.
|
inline |
Construct URL of a remote image.
Definition at line 248 of file imagemanager.h.
|
inline |
Construct URL of the thumbnail of a remote image.
Definition at line 253 of file imagemanager.h.
|
static |
Send message to all clients about remote ids.
mesg | Message name |
extra | Message data |
Definition at line 463 of file imagemanager.cpp.
|
inlinestaticprotected |
Definition at line 262 of file imagemanager.h.
|
inlinestaticprotected |
Definition at line 263 of file imagemanager.h.
|
inlinestaticprotected |
Definition at line 264 of file imagemanager.h.
|
inlinestaticprotected |
Definition at line 265 of file imagemanager.h.
|
private |
Host of SG.
Definition at line 269 of file imagemanager.h.
Referenced by MakeFileUrl(), and MakeThumbUrl().
|
private |
Definition at line 270 of file imagemanager.h.
Referenced by MakeFileUrl(), and MakeThumbUrl().
|
mutableprivate |
Images storage group.
Definition at line 273 of file imagemanager.h.
Referenced by GetAbsFilePath(), and GetScanDirs().