Models
NZB
Bases: ParentModel
Represents a complete NZB file.
file
cached
property
file: File
The main content file (episode, movie, etc) in the NZB. This is determined by finding the largest file in the NZB and may not always be accurate.
files
instance-attribute
File objects representing the files included in the NZB.
groups
cached
property
Tuple of unique groups across all the files in the NZB.
meta
class-attribute
instance-attribute
Optional creator-definable metadata for the contents of the NZB.
names
cached
property
Tuple of unique file names across all the files in the NZB. May return an empty tuple if it fails to extract the name for every file.
par2_percentage
cached
property
par2_percentage: float
Percentage of the size of all the .par2
files relative to the total size.
posters
cached
property
Tuple of unique posters across all the files in the NZB.
stems
cached
property
Tuple of unique file stems (basename) across all the files in the NZB. May return an empty tuple if it fails to extract the stem for every file.
suffixes
cached
property
Tuple of unique file extensions across all the files in the NZB. May return an empty tuple if it fails to extract the extension for every file.
has_par2
has_par2() -> bool
has_rar
has_rar() -> bool
is_obfuscated
is_obfuscated() -> bool
is_rar
is_rar() -> bool
Meta
Bases: ParentModel
Optional creator-definable metadata for the contents of the NZB.
password
cached
property
password: str | None
Return the first password from Meta.passwords
if it exists, None otherwise.
This is essentially just syntactic sugar for password = passwords[0] if passwords else None
because although the spec allows multiple passwords, single passwords are far more common.
Segment
File
Bases: ParentModel
Represents a complete file, consisting of segments that make up a file.
datetime
instance-attribute
datetime: UTCDateTime
The date and time when the file was posted, in UTC.
name
cached
property
name: str
Complete name of the file with it's extension extracted from the subject. May return an empty string if it fails to extract the name.
stem
cached
property
stem: str
Base name of the file without it's extension extracted from the File.name
.
May return an empty string if it fails to extract the stem.
suffix
cached
property
suffix: str
Extension of the file extracted from the File.name
.
May return an empty string if it fails to extract the extension.
is_obfuscated
is_obfuscated() -> bool
is_par2
is_par2() -> bool