Video
AudioTrack(subsonic, id, name=None, languageCode=None)
Bases: Model
Object that holds all the info about an audio track.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
The ID of the audio track. |
name |
str | None
|
The name of the audio track. |
language_code |
str | None
|
The code of the language in which the audio track is in. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_video.py
Captions(subsonic, id, name=None)
Bases: Model
Object that holds all the info about captions:
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
The ID of the captions. |
name |
str | None
|
The ID of the captions. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_video.py
Video(subsonic, id, title=None, parent=None, album=None, artist=None, track=None, year=None, genre=None, coverArt=None, size=None, contentType=None, suffix=None, transcodedContentType=None, transcodedSuffix=None, duration=None, bitRate=None, path=None, userRating=None, averageRating=None, playCount=None, discNumber=None, created=None, starred=None, albumId=None, artistId=None, type=None, bookmarkPosition=None, originalWidth=None, originalHeight=None, played=None, bpm=None, comment=None, sortName=None, musicBrainzId=None, genres=None, artists=None, displayArtist=None, albumArtists=None, displayAlbumArtist=None, contributors=None, displayComposer=None, moods=None, replayGain=None)
Bases: Model
Object that holds all the info about a video.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
The ID of the song. |
title |
str | None
|
The title of the song. |
parent |
str | None
|
The ID of the parent of the song. |
track |
int | None
|
The track |
year |
int | None
|
The year when the song was released. |
genre |
Genre | None
|
All the info related with the genre of the song. |
size |
int | None
|
The size of the file of the song. |
content_type |
str | None
|
The HTTP ContentType of the file of the song. |
suffix |
str | None
|
The suffix of the filename of the file of the song. |
transcoded_content_type |
str | None
|
The HTTP ContentType of the transcoded file of the song. |
transcoded_suffix |
str | None
|
The suffix of the filename of the transcoded file of the song. |
duration |
int | None
|
The duration in seconds of the song. |
bit_rate |
int | None
|
The bit rate of the song. |
path |
str | None
|
The path of the song. |
user_rating |
int | None
|
The rating given to the song by the user. |
average_rating |
float | None
|
The average rating of all the user for the song. |
play_count |
int | None
|
The number of the times the song has been played. |
disc_number |
int | None
|
The disc number of the song. |
type |
str | None
|
The type of media. |
bookmark_position |
int | None
|
The position in seconds where the song is bookmarked for the authenticated user. |
album |
Album | None
|
All the info related with the album of the song. |
artist |
Artist | None
|
All the info related with the main artist of the song. |
cover_art |
CoverArt | None
|
All the info related with the cover art of the song. |
created |
datetime | None
|
The timestamp when the song was created. |
starred |
datetime | None
|
The timestamp when the song was starred by the authenticated user if they have. |
played |
datetime | None
|
The timestamp when the song was last played. |
bpm |
int | None
|
The bpm of the song. |
comment |
str | None
|
The comment of the song. |
sort_name |
str | None
|
The sort name of the song. |
music_brainz_id |
str | None
|
The ID of the MusicBrainz entry of the song. |
genres |
list[ItemGenre | None
|
List that holds all the info about all the genres of the song. |
artists |
list[Artist] | None
|
List that holds all the info about all the artists that made the song. |
display_artist |
str | None
|
The display name of the artist of the song. |
album_artists |
list[Artist] | None
|
List that holds all the info about all the artists that made the album where the song is from. |
display_album_artist |
str | None
|
THe display name of the artist of the album of the song. |
contributors |
list[Contributor] | None
|
List that holds all the info about all the contributors of the song. |
display_composer |
str | None
|
The display name of the composer of the song. |
moods |
list[str] | None
|
List off all the moods of the song. |
replay_gain |
ReplayGain | None
|
All the info about the replay gain of the song. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_video.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
|
generate()
Return a new video 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 |
---|---|
Video
|
A new object with all the updated info. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_video.py
get_video_info()
Get all the extra info about the video, it's
set to the info
attribute of the object.
Returns:
Type | Description |
---|---|
VideoInfo
|
The extra info returned by the server. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_video.py
VideoInfo(subsonic, video_id, id, captions=None, audioTrack=None, conversion=None)
Bases: Model
Object that holds all the info about extra video info.
Attributes:
Name | Type | Description |
---|---|---|
video_id |
str
|
The ID of the video where the extra info are from. |
id |
str
|
The ID of the extra info. |
captions |
Captions | None
|
All the info about the captions of the video. |
conversion |
Video | None
|
All the info about the converted video of this one. |
audio_tracks |
dict[str, AudioTrack] | None
|
A dict that holds all the info about the audio tracks of the video, with the key being the language code of the audio track and the value the info about the track itself. |