Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLockPath ¶
GetLockPath returns the path to the queue lock file
func GetQueuePath ¶
GetQueuePath returns the path to the queue file
Types ¶
type Queue ¶
type Queue struct {
Items []*plex.MediaItem `json:"items"`
LastUpdated time.Time `json:"last_updated"`
}
Queue represents a persistent download queue
func (*Queue) Add ¶
Add appends items to the queue, avoiding duplicates by Key Returns the number of items actually added (excluding duplicates)
func (*Queue) Clear ¶
Clear removes all items from the queue and deletes the file with exclusive lock
func (*Queue) RemoveByKeys ¶
RemoveByKeys removes items with matching keys from the persisted queue. This method reloads from disk, removes the specified items, and saves back. This ensures items added by other instances while processing are preserved. The in-memory queue (q) is also updated to reflect the new state.
Click to show internal directories.
Click to hide internal directories.