Documentation
¶
Index ¶
- func DeleteEmptyTags(ctx jobs.JobContext)
- func DetectBadFiles(ctx jobs.JobContext)
- func ExtractMetadataFromPath(filePath, libraryPath string) (seriesTitle, chapterName string)
- func GenerateThumbnail(imageData []byte) (string, error)
- func IncrementalLibrarySync(ctx jobs.JobContext, changedPaths []string) error
- func LibrarySync(ctx jobs.JobContext)
- func RegenerateThumbnails(ctx jobs.JobContext)
- func ThumbnailForChapterFile(ctx context.Context, path string) (string, error)
- type Scanner
- type WatcherService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteEmptyTags ¶ added in v0.0.3
func DeleteEmptyTags(ctx jobs.JobContext)
DeleteEmptyTags removes tags that are no longer associated with any chapters.
func DetectBadFiles ¶ added in v0.0.3
func DetectBadFiles(ctx jobs.JobContext)
DetectBadFiles scans the library for chapter files that fail inspection (corrupt or invalid).
func ExtractMetadataFromPath ¶
ExtractMetadataFromPath uses simple heuristics to determine the series title and chapter name from a file's path. For example: /path/to/library/One-Piece/Chapter-100.cbz Series Title: One-Piece Chapter Name: Chapter-100.cbz
func GenerateThumbnail ¶
GenerateThumbnail takes raw image data, resizes it, encodes it as a Base64 JPEG, and returns it as a data URI string.
func IncrementalLibrarySync ¶ added in v0.1.3
func IncrementalLibrarySync(ctx jobs.JobContext, changedPaths []string) error
IncrementalLibrarySync performs an incremental scan of specific paths. It only scans the provided paths and their parent directories.
func LibrarySync ¶
func LibrarySync(ctx jobs.JobContext)
LibrarySync performs a full synchronization between the filesystem and the database.
func RegenerateThumbnails ¶
func RegenerateThumbnails(ctx jobs.JobContext)
RegenerateThumbnails regenerates thumbnails for all chapters and folders.
Types ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner is responsible for scanning the library and updating the database.
type WatcherService ¶ added in v0.1.3
type WatcherService struct {
// contains filtered or unexported fields
}
WatcherService watches the library directory for file system changes and triggers incremental scans when files are added, modified, or deleted.
func NewWatcherService ¶ added in v0.1.3
func NewWatcherService(ctx jobs.JobContext) *WatcherService
NewWatcherService creates a new file system watcher service.
func (*WatcherService) Start ¶ added in v0.1.3
func (w *WatcherService) Start() error
Start begins watching the library directory for changes.
func (*WatcherService) Stop ¶ added in v0.1.3
func (w *WatcherService) Stop() error
Stop stops the file watcher service.
func (*WatcherService) TriggerIncrementalScanForPath ¶ added in v0.1.3
func (w *WatcherService) TriggerIncrementalScanForPath(path string)
TriggerIncrementalScanForPath manually triggers an incremental scan for a specific path. This is used by the downloader when files are downloaded.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package chapterfiles routes chapter files (archives and PDF) to type-specific handlers.
|
Package chapterfiles routes chapter files (archives and PDF) to type-specific handlers. |