General

Asynchronous Commands

Enums

Plugin

These enums are a subclass of the standard enum.Enum class. To retrieve one of these enums see the Plugin Interface.

Client

Through the client API, enums can be used by their member names and values interchangeably. Enum member names are case insensitive:

ItemType.Gallery == 1 # true
ItemType.Gallery == ItemType.gaLLeRy # true

It is recommended that enum members are used by their values and not names. Enum member names may change sometime in the future. It is not likely to happen but no promises.

class CommandState(value)

An enumeration.

failed = 6

command has finished with an error

finished = 4

command has finished succesfully

in_queue = 2

command has been scheduled to start

in_service = 1

command has been put in a service (but not started or stopped yet)

out_of_service = 0

command has not been put in any service yet

started = 3

command has been started

stopped = 5

command has been forcefully stopped without finishing

class ImageSize(value)

An enumeration.

Big = 2

Big image size

Medium = 3

Medium image size

Original = 1

Original image size

Small = 4

Small image size

x1280 = 12

A maximum width of 1280

x1600 = 11

A maximum width of 2400

x2400 = 10

A maximum width of 2400

x768 = 14

A maximum width of 768

x960 = 13

A maximum width of 960

class ItemSort(value)

An enumeration.

ArtistName = 20

Artist Name

CircleName = 40

Circle Name

CollectionDate = 52

Collection Date Added

CollectionGalleryCount = 54

Collection Gallery Count

CollectionName = 51

Collection Name

CollectionPublished = 53

Collection Date Published

CollectionRandom = 50

Collection Random

FilterName = 35

Tag

GalleryArtist = 3

Gallery Artist Name

GalleryCircle = 11

Gallery Circle

GalleryDate = 4

Gallery Date Added

GalleryPageCount = 10

Gallery Page Count

GalleryPublished = 5

Gallery Date Published

GalleryRandom = 1

Gallery Random

GalleryRating = 8

Gallery Rating

GalleryRead = 6

Gallery Last Read

GalleryReadCount = 9

Gallery Read Count

GalleryTitle = 2

Gallery Title

GalleryUpdated = 7

Gallery Last Updated

NamespaceTagNamespace = 30

Namespace

NamespaceTagTag = 31

Tag

ParodyName = 45

Parody Name

class ItemType(value)

An enumeration.

Artist = 7

Gallery Artist

Category = 8

Category

Circle = 11

Circle

Collection = 2

Collection

Filter = 3

Filter

Gallery = 1

Gallery

Grouping = 5

Gallery Namespace

Language = 9

Language

Page = 4

Page

Parody = 13

Gallery Parody

Status = 10

Status

Title = 6

Gallery Title

Url = 12

URL

class ItemsKind(value)

An enumeration.

all_items = 1

Add all items

inbox_items = 3

Add items from inbox

library_items = 2

Add items from library

tags_missing_inbox_items = 6

Add items with missing tags from inbox

tags_missing_items = 4

Add items with missing tags

tags_missing_library_items = 5

Add items with missing tags from library

class LogLevel(value)

An enumeration.

CRITICAL = 10

Critical

DEBUG = 2

Debug

ERROR = 8

Error

INFO = 4

Info

WARNING = 6

Warning

class LogType(value)

An enumeration.

Changelog = 1

Changelog

Download = 2

Download

Metadata = 3

Metadata

class NotificationScope(value)

An enumeration.

CurrentClient = 2

CurrentClient

Global = 1

Global

class NotificationType(value)

An enumeration.

Backup = 6

Backup

Custom = 99

Custom

Indexer = 8

Indexer

Meta = 1

Meta

PluginUpdate = 5

PluginUpdate

Restart = 3

Restart

Shutdown = 4

Shutdown

TrashSweeper = 7

TrashSweeper

Update = 2

Update

class PluginState(value)

An enumeration.

Disabled = 0

Puporsely disabled

Enabled = 4

Plugin is loaded and in use

Failed = 5

Failed because of error

Installed = 3

Allowed to be enabled

Registered = 2

Was just registered but not installed

Unloaded = 1

Unloaded because of dependencies, etc.

class Priority(value)

An enumeration.

High = 3

a high priority

Low = 1

a low priority

Medium = 2

a medium priority

class ProgressType(value)

An enumeration.

CheckPluginUpdate = 8

A check for plugin update

CheckUpdate = 3

A check for new update

GalleryScan = 5

Scanning for galleries

ItemAdd = 6

Adding items to the database

ItemRemove = 7

Removing items from the database

Request = 2

Network request

Unknown = 1

Unknown

UpdateApplication = 4

Updating application

UpdatePlugin = 9

Upldating plugin

class QueueType(value)

An enumeration.

Download = 2

a queue for downloading item

Metadata = 1

a queue for fetching metadata

class ServerCommand(value)

An enumeration.

Logout = 4

Logout

RequestAuth = 3

Request authentication

ServerQuit = 1

Shut down the server

ServerRestart = 2

Restart the server

class TemporaryViewType(value)

An enumeration.

GalleryAddition = 1

Contains gallery items to be added

class ViewType(value)

An enumeration.

All = 6

Contains all items except items in Trash

Favorite = 2

Contains all favourite items (mutually exclusive with items in Inbox)

Inbox = 3

Contains only items in Inbox

Library = 1

Contains all items except items in Inbox and Trash

ReadLater = 5

Contains only items in ReadLater

Trash = 4

Contains only items in Trash

Exceptions

These are errors that HPX may raise. Any error raised not on this list is an unhandled exception and usually classifies as a critical error.

exception HappypandaError(msg)

Code: 100

Base Happypanda exception, all exceptions will derive from this.

exception CoreError(where, message)

Code: 101

Base Happypanda core exception, all core exceptions will derive from this.

Args:

where: where the error occured message: explanation of error

exception TimeoutError(where, message)

Code: 102

Timed out

exception SettingsError(where, message)

Code: 110

Base settings error

exception SettingsNoExistError(where, message)

Code: 111

Settings doesn’t exist error

exception InvalidSettingError(where, message)

Code: 112

Invalid setting error

exception CommandError(where, message)

Code: 120

Base command error

exception CommandAlreadyRunningError(where, message)

Code: 121

Command is already running

exception ScanError(where, message)

Code: 130

Item scan error

exception PluginError(name_or_node, message)

Code: 200

Base plugin exception, all plugin exceptions will derive from this.

Args:

name: name of plugin message: explanation of error

exception PluginAttributeError(name_or_node, message)

Code: 201

Plugin Attribute Error.

exception PluginCommandError(name_or_node, message)

Code: 202

Plugin Command Error.

exception PluginCommandNotFoundError(name_or_node, message)

Code: 203

Plugin Command Not Found Error.

exception PluginHandlerError(name_or_node, message)

Code: 204

Plugin Handler Error.

exception PluginSignatureError(name_or_node, message)

Code: 205

Plugin Signature Error.

exception PluginLoadError(name_or_node, message)

Code: 206

Plugin Load Error.

exception PluginInitError(name_or_node, message)

Code: 207

Plugin Init Error.

exception PluginInstallError(name_or_node, message)

Code: 208

Plugin Install Error.

exception PluginUpdateError(node, *args, **kwargs)

Code: 210

Plugin Update No HPlugin Error.

exception PluginUpdateHPluginError(node, *args, **kwargs)

Code: 211

Plugin Update HPlugin Error.

exception PluginUpdateInvalidURLError(node, *args, **kwargs)

Code: 212

Plugin Update Invalid Url Error.

exception PluginUpdateCheckError(node, *args, **kwargs)

Code: 213

Plugin Update Check Error.

exception PluginUpdateDownloadError(node, *args, **kwargs)

Code: 214

Plugin Update Down Error.

exception PluginNoHandlerError(name_or_node, message)

Code: 215

Plugin No Handler Error.

exception DatabaseError(where, message)

Code: 300

Base database exception, all database exceptions will derive from this.

exception DatabaseInitError(msg)

Code: 301

Database initialization error.

exception DatabaseVersionError(msg)

Code: 302

Database version error.

exception DatabaseItemNotFoundError(where, message)

Code: 303

Database item not found error

exception DatabaseDataError(where, message)

Code: 304

Database data error

exception EmptyNameError(where, message)

Code: 305

Database empty name error

exception ServerError(where, message)

Code: 400

Base server exception, all server exceptions will derive from this.

exception ClientDisconnectError(where, message)

Code: 401

Client disconnected.

exception InvalidMessage(where, message)

Code: 403

Invalid message error.

exception APIError(where, message)

Code: 404

API error.

exception APIRequirementError(where, message)

Code: 405

API requirement error.

exception AuthError(where, msg)

Code: 406

Auth Base Error.

exception AuthRequiredError(where, msg)

Code: 407

exception SessionExpiredError(where, session_id)

Code: 408

Session expired error.

exception EnumError(where, message)

Code: 409

Enum error.

exception ParsingError(where, message)

Code: 410

exception AuthWrongCredentialsError(where, msg)

Code: 411

exception AuthMissingCredentials(where, msg)

Code: 412

exception UserPermissionError(where='', msg='')

Code: 413

exception ClientError(name, msg)

Code: 500

Base client exception, all client exceptions will derive from this.

Args:

name: name of client msg: error message

exception ConnectionError(name, msg)

Code: 501

Server connection error.

exception ServerDisconnectError(name, msg)

Code: 502

Server disconnected.

exception ArchiveError(message)

Code: 600

Base archive exception, all archive exceptions will derive from this

exception ArchiveCreateError(filepath, error)

Code: 601

Could not create archive object

exception ArchiveCorruptError(filepath)

Code: 602

Bad file found in archive

exception ArchiveFileNotFoundError(f, archive_f)

Code: 603

File not found in archive

exception ArchiveUnsupportedError(f)

Code: 604

Unsupported archive

exception ArchiveExtractError(message)

Code: 605

Archive extraction error

exception ArchiveExistError(f)

Code: 606

Archive does not exist error

exception NotAnArchiveError(f)

Code: 607

Not an archive

exception NetworkError(message, properties=None)

Code: 700

Base network exception, all network exceptions will derive from this

exception DownloadError(message, properties=None)

Code: 750

Base download exception, all download exceptions will derive from this

exception DownloadMoveError(message, properties=None)

Code: 751

Failed to move downloaded resource

exception ItemError(where, message, item=None)

Code: 800

Base item exception, all item exceptions will derive from this

exception FailedToMoveError(where, message, item=None)

Code: 801

Failed to move item source error

exception JSONParseError(json_data, name, msg)

Code: 900

JSON parse error.

Guidelines

Database

Hierarchy

Collection -> Grouping -> Gallery -> Page

Note

Grouping is not actually a direct descendant of Collection as can be seen below, but it is sometimes helpful to think of it as such.

Special Notes

  • Gallery

    • A Gallery can have multiple Title, Artist and Parody

    • A Gallery can be in multiple Collection and GalleryFilter

    • A Gallery can only be in one Grouping

    • A Gallery will always be in a Grouping

  • Tags

    Gallery and Page are the only taggable items. Collection and Grouping are not taggable, but they can display, and are searchable through tags of their children Gallery.

Alias

Parent

Note

You can right-click on the image and choose “Show image” to view it in its full dimensions

_images/schema.png