Models
Resolution
PageInfo
Bases: BaseModel
Media information about the page, as returned by pymediainfo.MediaInfo.
chroma_subsampling
class-attribute
instance-attribute
chroma_subsampling: str | None = None
Chroma subsampling.
color_space
class-attribute
instance-attribute
color_space: str | None = None
Color space of the page.
compression
class-attribute
instance-attribute
compression: str | None = None
Compression method used on the page.
compression_mode
class-attribute
instance-attribute
compression_mode: str | None = None
Type of compression used on the page.
format_info
class-attribute
instance-attribute
format_info: str | None = None
Additional information about the format.
resolution
class-attribute
instance-attribute
resolution: Resolution = Resolution()
Resolution of the page.
MangaInfo
Bases: BaseModel
Media information about the manga archive, as returned by pymediainfo.MediaInfo.
page_count
class-attribute
instance-attribute
page_count: int = 0
Number of pages in the volume archive.
pages
class-attribute
instance-attribute
A tuple of PageInfo
objects representing the pages inside the volume archive.
If partial_scan()
was called, then this will only have a maximum of 3 pages: smallest, median, and largest.
If full_scan()
was called, then this will have have a PageInfo
object for every page in the archive.
average_page_size
average_page_size() -> ByteSize
Calculate the average page size of the volume archive.
Returns:
Type | Description |
---|---|
ByteSize
|
The average page size of the volume archive. |
Source code in src/mangainfo/_models.py
largest_page
largest_page() -> PageInfo
Find the largest page in the archive by size.
Returns:
Type | Description |
---|---|
PageInfo
|
The largest page in the archive. |
mediainfo
mediainfo() -> str
Generate a mediainfo-esque string describing the archive, including information about the smallest, median, and largest pages in the archive.
Returns:
Type | Description |
---|---|
str
|
A string formatted similarly to mediainfo output, providing information about the archive. |
Source code in src/mangainfo/_models.py
median_page
median_page() -> PageInfo
Find the median page in the archive by size.
Returns:
Type | Description |
---|---|
PageInfo
|
The median page in the archive. |
Source code in src/mangainfo/_models.py
smallest_page
smallest_page() -> PageInfo
Find the smallest page in the archive by size.
Returns:
Type | Description |
---|---|
PageInfo
|
The smallest page in the archive. |
unique_resolutions
unique_resolutions() -> tuple[tuple[Resolution, int], ...]
Count the occurrences of unique resolutions in the archive.
Returns:
Type | Description |
---|---|
tuple[tuple[Resolution, int], ...]
|
A tuple of tuples containing unique resolutions and their counts, sorted by frequency in descending order. |