Podcast
Channel(subsonic, id, url=None, title=None, description=None, coverArt=None, originalImageUrl=None, status=None, episode=None)
Bases: Model
Object that holds all the info about a channel.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
The ID of the channel. |
url |
str | None
|
The URL of the channel. |
title |
str | None
|
The title of the channel. |
description |
str | None
|
The description of the channel. |
cover_art |
CoverArt | None
|
All the info related with the cover art of the channel. |
original_image_url |
str | None
|
The URL of the original image of the channel. |
status |
str | None
|
The status of the channel. |
episodes |
list[Episode] | None
|
List that holds all the info about all the episodes of the channel. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
create()
Create a new podcast with the info of the current one.
Returns:
Type | Description |
---|---|
Self
|
The object itself. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
delete()
Delete the podcast from the server.
Returns:
Type | Description |
---|---|
Self
|
The object itself. |
generate()
Return a new channel object with all the data updated from the API, using the endpoint that return the most information possible.
Useful for making copies with updated data or updating the object
itself with immutability, e.g., foo = foo.generate()
.
Returns:
Type | Description |
---|---|
Channel
|
A new object with all the updated info. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
Episode(subsonic, id, streamId=None, channelId=None, title=None, description=None, publishDate=None, status=None, parent=None, isDir=None, year=None, genre=None, coverArt=None, size=None, contentType=None, suffix=None, duration=None, bitRate=None, path=None)
Bases: Model
Object that holds all the info about a episode
Attributes:
Name | Type | Description |
---|---|---|
id |
(str) The ID of the episode |
|
stream_id |
str | None
|
The ID of the stream of the episode. |
channel |
Channel | None
|
The channel where the episode is from. |
title |
str | None
|
The title of the episode. |
description |
str | None
|
The description of the episode. |
publish_date |
datetime | None
|
The timestamp when the episode was publised. |
status |
str | None
|
The status of the episode. |
parent |
str | None
|
The ID of the parent of the episode. |
is_dir |
bool | None
|
If the episode is a directory. |
year |
int | None
|
The year when the episode was released. |
genre |
str | None
|
The name of the genre of the episode. |
cover_art |
CoverArt | None
|
All the info related with the cover art of the episode. |
size |
int | None
|
The size of the episode. |
content_type |
str | None
|
The HTTP Content-Type of the file of the episode. |
suffix |
str | None
|
The suffix of the filename of the file of the episode. |
duration |
int | None
|
The duration in seconds of the episode. |
bit_rate |
int | None
|
The bit rate of the episode. |
path |
str | None
|
The path of the episode. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
delete()
Delete the episode from the server.
Returns:
Type | Description |
---|---|
Self
|
The object itself. |
download()
Request the server to download the episode.
Returns:
Type | Description |
---|---|
Self
|
The object itself. |
generate()
Return a new episode object with all the data updated from the API, using the endpoint that return the most information possible.
Useful for making copies with updated data or updating the object
itself with immutability, e.g., foo = foo.generate()
.
Returns:
Type | Description |
---|---|
Episode
|
A new object with all the updated info. |