MythTV
master
|
Filesystem adapter for Backend, managing Photographs storage group. More...
#include <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... | |
![]() | |
QDir | GetImageFilters () const |
Get filters for detecting recognised images/videos. More... | |
ImageNodeType | GetImageType (const QString &ext) const |
Determine file type from its extension. More... | |
![]() | |
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 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... | |
Protected Member Functions | |
int | ImageId (int id) const |
QString | ImageId (const QString &id) const |
int | DbId (int id) const |
QString | DbIds (const QString &ids) const |
![]() | |
ImageAdapterBase () | |
Constructor. More... | |
virtual | ~ImageAdapterBase ()=default |
![]() | |
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 () | |
~DeviceManager () | |
Private Attributes | |
QString | m_hostname |
Host of SG. More... | |
int | m_hostport |
StorageGroup | m_sg |
Images storage group. More... | |
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 223 of file imagemanager.h.
|
inline |
Definition at line 226 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 410 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 490 of file imagemanager.cpp.
|
inline |
Construct URL of a remote image.
Definition at line 237 of file imagemanager.h.
|
inline |
Construct URL of the thumbnail of a remote image.
Definition at line 242 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.
|
inlineprotected |
Definition at line 251 of file imagemanager.h.
|
inlineprotected |
Definition at line 252 of file imagemanager.h.
|
inlineprotected |
Definition at line 253 of file imagemanager.h.
|
inlineprotected |
Definition at line 254 of file imagemanager.h.
|
private |
Host of SG.
Definition at line 258 of file imagemanager.h.
Referenced by MakeFileUrl(), and MakeThumbUrl().
|
private |
Definition at line 259 of file imagemanager.h.
Referenced by MakeFileUrl(), and MakeThumbUrl().
|
mutableprivate |
Images storage group.
Definition at line 262 of file imagemanager.h.
Referenced by GetAbsFilePath(), and GetScanDirs().