diff --git a/reference/Api/index.html b/reference/Api/index.html index e991ba4..72e159e 100644 --- a/reference/Api/index.html +++ b/reference/Api/index.html @@ -1710,7 +1710,7 @@

- Source code in src/knuckles/_api.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_api.py
25
 26
 27
@@ -1898,7 +1898,7 @@ 

- Source code in src/knuckles/_api.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_api.py
103
 104
 105
@@ -2069,7 +2069,7 @@ 

- Source code in src/knuckles/_api.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_api.py
157
 158
 159
@@ -2232,7 +2232,7 @@ 

- Source code in src/knuckles/_api.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_api.py
129
 130
 131
diff --git a/reference/Bookmarks/index.html b/reference/Bookmarks/index.html
index ef6a342..d6a6416 100644
--- a/reference/Bookmarks/index.html
+++ b/reference/Bookmarks/index.html
@@ -1666,7 +1666,7 @@ 

categories/bookmarks/">bookmark endpoints in the Subsonic API.

- Source code in src/knuckles/_bookmarks.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
17
 18
 19
def __init__(self, api: Api, subsonic: "Subsonic") -> None:
@@ -1787,7 +1787,7 @@ 

- Source code in src/knuckles/_bookmarks.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
50
 51
 52
@@ -1893,7 +1893,7 @@ 

method chaining.

- Source code in src/knuckles/_bookmarks.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
 94
  95
  96
@@ -1995,7 +1995,7 @@ 

- Source code in src/knuckles/_bookmarks.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
32
 33
 34
@@ -2075,7 +2075,7 @@ 

- Source code in src/knuckles/_bookmarks.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
21
 22
 23
@@ -2142,7 +2142,7 @@ 

- Source code in src/knuckles/_bookmarks.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
108
 109
 110
@@ -2270,7 +2270,7 @@ 

- Source code in src/knuckles/_bookmarks.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
120
 121
 122
@@ -2415,7 +2415,7 @@ 

bookmark.

- Source code in src/knuckles/_bookmarks.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
76
 77
 78
diff --git a/reference/Browsing/index.html b/reference/Browsing/index.html
index 6a81088..d7b43dd 100644
--- a/reference/Browsing/index.html
+++ b/reference/Browsing/index.html
@@ -1900,7 +1900,7 @@ 

in the Subsonic API.

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
23
 24
 25
def __init__(self, api: Api, subsonic: "Subsonic") -> None:
@@ -1992,7 +1992,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
168
 169
 170
@@ -2097,7 +2097,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
199
 200
 201
@@ -2203,7 +2203,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
183
 184
 185
@@ -2310,7 +2310,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
131
 132
 133
@@ -2445,7 +2445,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
307
 308
 309
@@ -2613,7 +2613,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
275
 276
 277
@@ -2752,7 +2752,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
107
 108
 109
@@ -2890,7 +2890,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
146
 147
 148
@@ -3009,7 +3009,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
 88
  89
  90
@@ -3091,7 +3091,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
77
 78
 79
@@ -3188,7 +3188,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
60
 61
 62
@@ -3297,7 +3297,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
41
 42
 43
@@ -3380,7 +3380,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
27
 28
 29
@@ -3497,7 +3497,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
359
 360
 361
@@ -3627,7 +3627,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
338
 339
 340
@@ -3744,7 +3744,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
214
 215
 216
@@ -3863,7 +3863,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
379
 380
 381
@@ -3974,7 +3974,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
241
 242
 243
@@ -4087,7 +4087,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
260
 261
 262
@@ -4162,7 +4162,7 @@ 

- Source code in src/knuckles/_browsing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
229
 230
 231
diff --git a/reference/Chat/index.html b/reference/Chat/index.html
index 9b4911d..7d514af 100644
--- a/reference/Chat/index.html
+++ b/reference/Chat/index.html
@@ -1576,7 +1576,7 @@ 

in the Subsonic API.

- Source code in src/knuckles/_chat.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_chat.py
16
 17
 18
def __init__(self, api: Api, subsonic: "Subsonic") -> None:
@@ -1668,7 +1668,7 @@ 

- Source code in src/knuckles/_chat.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_chat.py
20
 21
 22
@@ -1740,7 +1740,7 @@ 

- Source code in src/knuckles/_chat.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_chat.py
34
 35
 36
diff --git a/reference/Exceptions/index.html b/reference/Exceptions/index.html
index 4b87438..9910023 100644
--- a/reference/Exceptions/index.html
+++ b/reference/Exceptions/index.html
@@ -2062,7 +2062,7 @@ 

generate a model using a previous one.

- Source code in src/knuckles/exceptions.py + Source code in .venv/lib/python3.11/site-packages/knuckles/exceptions.py
20
 21
 22
@@ -2199,7 +2199,7 @@ 

Returns: The exception of the given error code

- Source code in src/knuckles/exceptions.py + Source code in .venv/lib/python3.11/site-packages/knuckles/exceptions.py
139
 140
 141
diff --git a/reference/Internet Radio/index.html b/reference/Internet Radio/index.html
index 0d4ff87..8b68ce2 100644
--- a/reference/Internet Radio/index.html	
+++ b/reference/Internet Radio/index.html	
@@ -1630,7 +1630,7 @@ 

categories/internet-radio">internet radio endpoints in the Subsonic API.

- Source code in src/knuckles/_internet_radio.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_internet_radio.py
16
 17
 18
@@ -1756,7 +1756,7 @@ 

- Source code in src/knuckles/_internet_radio.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_internet_radio.py
59
 60
 61
@@ -1880,7 +1880,7 @@ 

- Source code in src/knuckles/_internet_radio.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_internet_radio.py
116
 117
 118
@@ -1994,7 +1994,7 @@ 

- Source code in src/knuckles/_internet_radio.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_internet_radio.py
37
 38
 39
@@ -2082,7 +2082,7 @@ 

- Source code in src/knuckles/_internet_radio.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_internet_radio.py
22
 23
 24
@@ -2231,7 +2231,7 @@ 

- Source code in src/knuckles/_internet_radio.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_internet_radio.py
 83
  84
  85
diff --git a/reference/Jukebox/index.html b/reference/Jukebox/index.html
index 8c54fc6..a207ce9 100644
--- a/reference/Jukebox/index.html
+++ b/reference/Jukebox/index.html
@@ -1738,7 +1738,7 @@ 

categories/jukebox">jukebox control endpoint in the Subsonic API.

- Source code in src/knuckles/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
16
 17
 18
@@ -1834,7 +1834,7 @@ 

- Source code in src/knuckles/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
118
 119
 120
@@ -1913,7 +1913,7 @@ 

- Source code in src/knuckles/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
135
 136
 137
@@ -1985,7 +1985,7 @@ 

- Source code in src/knuckles/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
22
 23
 24
@@ -2090,7 +2090,7 @@ 

- Source code in src/knuckles/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
148
 149
 150
@@ -2199,7 +2199,7 @@ 

- Source code in src/knuckles/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
52
 53
 54
@@ -2338,7 +2338,7 @@ 

- Source code in src/knuckles/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
179
 180
 181
@@ -2429,7 +2429,7 @@ 

- Source code in src/knuckles/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
165
 166
 167
@@ -2546,7 +2546,7 @@ 

- Source code in src/knuckles/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
100
 101
 102
@@ -2627,7 +2627,7 @@ 

- Source code in src/knuckles/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
72
 73
 74
@@ -2701,7 +2701,7 @@ 

- Source code in src/knuckles/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
37
 38
 39
@@ -2776,7 +2776,7 @@ 

- Source code in src/knuckles/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
86
 87
 88
diff --git a/reference/Lists/index.html b/reference/Lists/index.html
index 6d340a1..2af11cb 100644
--- a/reference/Lists/index.html
+++ b/reference/Lists/index.html
@@ -1990,7 +1990,7 @@ 

in the Subsonic API.

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
19
 20
 21
@@ -2117,7 +2117,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
493
 494
 495
@@ -2273,7 +2273,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
219
 220
 221
@@ -2437,7 +2437,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
468
 469
 470
@@ -2593,7 +2593,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
190
 191
 192
@@ -2772,7 +2772,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
579
 580
 581
@@ -2957,7 +2957,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
310
 311
 312
@@ -3159,7 +3159,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
543
 544
 545
@@ -3367,7 +3367,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
273
 274
 275
@@ -3548,7 +3548,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
416
 417
 418
@@ -3707,7 +3707,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
138
 139
 140
@@ -3865,7 +3865,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
391
 392
 393
@@ -4021,7 +4021,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
113
 114
 115
@@ -4177,7 +4177,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
366
 367
 368
@@ -4333,7 +4333,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
 88
  89
  90
@@ -4487,7 +4487,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
343
 344
 345
@@ -4638,7 +4638,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
64
 65
 66
@@ -4793,7 +4793,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
442
 443
 444
@@ -4952,7 +4952,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
164
 165
 166
@@ -5110,7 +5110,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
518
 519
 520
@@ -5266,7 +5266,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
248
 249
 250
@@ -5361,7 +5361,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
686
 687
 688
@@ -5520,7 +5520,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
611
 612
 613
@@ -5719,7 +5719,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
650
 651
 652
@@ -5868,7 +5868,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
717
 718
 719
@@ -5983,7 +5983,7 @@ 

- Source code in src/knuckles/_lists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
698
 699
 700
diff --git a/reference/Media Annotation/index.html b/reference/Media Annotation/index.html
index 3625dae..78dd9d7 100644
--- a/reference/Media Annotation/index.html	
+++ b/reference/Media Annotation/index.html	
@@ -1702,7 +1702,7 @@ 

categories/media-annotation/">media annotations endpoints in the Subsonic API.

- Source code in src/knuckles/_media_annotation.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
17
 18
 19
def __init__(self, api: Api, subsonic: "Subsonic") -> None:
@@ -1795,7 +1795,7 @@ 

- Source code in src/knuckles/_media_annotation.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
141
 142
 143
@@ -1933,7 +1933,7 @@ 

- Source code in src/knuckles/_media_annotation.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
157
 158
 159
@@ -2109,7 +2109,7 @@ 

- Source code in src/knuckles/_media_annotation.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
111
 112
 113
@@ -2244,7 +2244,7 @@ 

- Source code in src/knuckles/_media_annotation.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
36
 37
 38
@@ -2349,7 +2349,7 @@ 

- Source code in src/knuckles/_media_annotation.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
51
 52
 53
@@ -2454,7 +2454,7 @@ 

- Source code in src/knuckles/_media_annotation.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
21
 22
 23
@@ -2559,7 +2559,7 @@ 

- Source code in src/knuckles/_media_annotation.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
81
 82
 83
@@ -2664,7 +2664,7 @@ 

- Source code in src/knuckles/_media_annotation.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
 96
  97
  98
@@ -2769,7 +2769,7 @@ 

- Source code in src/knuckles/_media_annotation.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
66
 67
 68
diff --git a/reference/Media Library Scanning/index.html b/reference/Media Library Scanning/index.html
index eb339f4..780445b 100644
--- a/reference/Media Library Scanning/index.html	
+++ b/reference/Media Library Scanning/index.html	
@@ -1577,7 +1577,7 @@ 

- Source code in src/knuckles/_media_library_scanning.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_library_scanning.py
17
 18
 19
@@ -1643,7 +1643,7 @@ 

- Source code in src/knuckles/_media_library_scanning.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_library_scanning.py
23
 24
 25
@@ -1712,7 +1712,7 @@ 

- Source code in src/knuckles/_media_library_scanning.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_library_scanning.py
35
 36
 37
diff --git a/reference/Media Retrieval/index.html b/reference/Media Retrieval/index.html
index 21c5a7d..1ea663f 100644
--- a/reference/Media Retrieval/index.html	
+++ b/reference/Media Retrieval/index.html	
@@ -1666,7 +1666,7 @@ 

categories/media-retrieval/">media retrieval endpoints in the Subsonic API.

- Source code in src/knuckles/_media_retrieval.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
26
 27
 28
def __init__(self, api: Api, subsonic: "Subsonic") -> None:
@@ -1774,7 +1774,7 @@ 

- Source code in src/knuckles/_media_retrieval.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
136
 137
 138
@@ -1939,7 +1939,7 @@ 

- Source code in src/knuckles/_media_retrieval.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
303
 304
 305
@@ -2099,7 +2099,7 @@ 

- Source code in src/knuckles/_media_retrieval.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
204
 205
 206
@@ -2295,7 +2295,7 @@ 

- Source code in src/knuckles/_media_retrieval.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
249
 250
 251
@@ -2451,7 +2451,7 @@ 

- Source code in src/knuckles/_media_retrieval.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
282
 283
 284
@@ -2600,7 +2600,7 @@ 

- Source code in src/knuckles/_media_retrieval.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
173
 174
 175
@@ -2831,7 +2831,7 @@ 

- Source code in src/knuckles/_media_retrieval.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
 87
  88
  89
diff --git a/reference/Playlists/index.html b/reference/Playlists/index.html
index efd2578..2b57a28 100644
--- a/reference/Playlists/index.html
+++ b/reference/Playlists/index.html
@@ -1630,7 +1630,7 @@ 

categories/playlists/">playlists endpoints in the Subsonic API.

- Source code in src/knuckles/_playlists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_playlists.py
16
 17
 18
@@ -1768,7 +1768,7 @@ 

- Source code in src/knuckles/_playlists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_playlists.py
58
 59
 60
@@ -1915,7 +1915,7 @@ 

- Source code in src/knuckles/_playlists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_playlists.py
135
 136
 137
@@ -2020,7 +2020,7 @@ 

- Source code in src/knuckles/_playlists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_playlists.py
43
 44
 45
@@ -2126,7 +2126,7 @@ 

- Source code in src/knuckles/_playlists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_playlists.py
22
 23
 24
@@ -2314,7 +2314,7 @@ 

- Source code in src/knuckles/_playlists.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_playlists.py
 94
  95
  96
diff --git a/reference/Podcast/index.html b/reference/Podcast/index.html
index 51a5d80..dca570a 100644
--- a/reference/Podcast/index.html
+++ b/reference/Podcast/index.html
@@ -1702,7 +1702,7 @@ 

categories/podcast/">podcast endpoints in the Subsonic API.

- Source code in src/knuckles/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
16
 17
 18
@@ -1798,7 +1798,7 @@ 

- Source code in src/knuckles/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
119
 120
 121
@@ -1903,7 +1903,7 @@ 

- Source code in src/knuckles/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
134
 135
 136
@@ -2008,7 +2008,7 @@ 

- Source code in src/knuckles/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
165
 166
 167
@@ -2114,7 +2114,7 @@ 

- Source code in src/knuckles/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
149
 150
 151
@@ -2222,7 +2222,7 @@ 

- Source code in src/knuckles/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
62
 63
 64
@@ -2348,7 +2348,7 @@ 

- Source code in src/knuckles/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
41
 42
 43
@@ -2467,7 +2467,7 @@ 

- Source code in src/knuckles/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
22
 23
 24
@@ -2580,7 +2580,7 @@ 

- Source code in src/knuckles/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
 80
  81
  82
@@ -2679,7 +2679,7 @@ 

- Source code in src/knuckles/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
107
 108
 109
diff --git a/reference/Searching/index.html b/reference/Searching/index.html
index e5c7d8e..20e6f0e 100644
--- a/reference/Searching/index.html
+++ b/reference/Searching/index.html
@@ -1576,7 +1576,7 @@ 

categories/searching/">bookmark endpoints in the Subsonic API.

- Source code in src/knuckles/_searching.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_searching.py
19
 20
 21
@@ -1778,7 +1778,7 @@ 

- Source code in src/knuckles/_searching.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_searching.py
100
 101
 102
@@ -2052,7 +2052,7 @@ 

- Source code in src/knuckles/_searching.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_searching.py
146
 147
 148
diff --git a/reference/Sharing/index.html b/reference/Sharing/index.html
index 4c79aa4..8ca4b41 100644
--- a/reference/Sharing/index.html
+++ b/reference/Sharing/index.html
@@ -1630,7 +1630,7 @@ 

categories/sharing/">sharing endpoints in the Subsonic API.

- Source code in src/knuckles/_sharing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_sharing.py
17
 18
 19
@@ -1755,7 +1755,7 @@ 

- Source code in src/knuckles/_sharing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_sharing.py
54
 55
 56
@@ -1890,7 +1890,7 @@ 

- Source code in src/knuckles/_sharing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_sharing.py
118
 119
 120
@@ -1995,7 +1995,7 @@ 

- Source code in src/knuckles/_sharing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_sharing.py
35
 36
 37
@@ -2078,7 +2078,7 @@ 

- Source code in src/knuckles/_sharing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_sharing.py
23
 24
 25
@@ -2204,7 +2204,7 @@ 

- Source code in src/knuckles/_sharing.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_sharing.py
 84
  85
  86
diff --git a/reference/Subsonic/index.html b/reference/Subsonic/index.html
index 51ca8eb..f9c5b2f 100644
--- a/reference/Subsonic/index.html
+++ b/reference/Subsonic/index.html
@@ -1832,7 +1832,7 @@ 

- Source code in src/knuckles/_subsonic.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_subsonic.py
55
 56
 57
diff --git a/reference/System/index.html b/reference/System/index.html
index c9bd0e2..657e184 100644
--- a/reference/System/index.html
+++ b/reference/System/index.html
@@ -1612,7 +1612,7 @@ 

categories/system/">system endpoints in the Subsonic API.

- Source code in src/knuckles/_system.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_system.py
21
 22
 23
@@ -1725,7 +1725,7 @@ 

- Source code in src/knuckles/_system.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_system.py
66
 67
 68
@@ -1826,7 +1826,7 @@ 

- Source code in src/knuckles/_system.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_system.py
38
 39
 40
@@ -1896,7 +1896,7 @@ 

- Source code in src/knuckles/_system.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_system.py
50
 51
 52
@@ -1972,7 +1972,7 @@ 

- Source code in src/knuckles/_system.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_system.py
27
 28
 29
diff --git a/reference/User Management/index.html b/reference/User Management/index.html
index 690bb92..b219100 100644
--- a/reference/User Management/index.html	
+++ b/reference/User Management/index.html	
@@ -1648,7 +1648,7 @@ 

categories/user-management/">user management endpoints in the Subsonic API.

- Source code in src/knuckles/_user_management.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
16
 17
 18
def __init__(self, api: Api, subsonic: "Subsonic") -> None:
@@ -1754,7 +1754,7 @@ 

- Source code in src/knuckles/_user_management.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
321
 322
 323
@@ -2114,7 +2114,7 @@ 

- Source code in src/knuckles/_user_management.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
 91
  92
  93
@@ -2405,7 +2405,7 @@ 

- Source code in src/knuckles/_user_management.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
306
 307
 308
@@ -2509,7 +2509,7 @@ 

- Source code in src/knuckles/_user_management.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
20
 21
 22
@@ -2620,7 +2620,7 @@ 

- Source code in src/knuckles/_user_management.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
53
 54
 55
@@ -3020,7 +3020,7 @@ 

- Source code in src/knuckles/_user_management.py + Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
199
 200
 201
diff --git a/reference/models/Album/index.html b/reference/models/Album/index.html
index 436f5c6..163a96f 100644
--- a/reference/models/Album/index.html
+++ b/reference/models/Album/index.html
@@ -2050,7 +2050,7 @@ 

- Source code in src/knuckles/models/_album.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
167
 168
 169
@@ -2298,7 +2298,7 @@ 

- Source code in src/knuckles/models/_album.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
263
 264
 265
@@ -2375,7 +2375,7 @@ 

- Source code in src/knuckles/models/_album.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
279
 280
 281
@@ -2522,7 +2522,7 @@ 

- Source code in src/knuckles/models/_album.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
 81
  82
  83
@@ -2620,7 +2620,7 @@ 

- Source code in src/knuckles/models/_album.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
102
 103
 104
@@ -2714,7 +2714,7 @@ 

- Source code in src/knuckles/models/_album.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
38
 39
 40
@@ -2792,7 +2792,7 @@ 

- Source code in src/knuckles/models/_album.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
24
 25
 26
@@ -2890,7 +2890,7 @@ 

- Source code in src/knuckles/models/_album.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
54
 55
 56
diff --git a/reference/models/Artist Index/index.html b/reference/models/Artist Index/index.html
index 64048ba..471fe2e 100644
--- a/reference/models/Artist Index/index.html	
+++ b/reference/models/Artist Index/index.html	
@@ -1570,7 +1570,7 @@ 

- Source code in src/knuckles/models/_artist_index.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist_index.py
21
 22
 23
diff --git a/reference/models/Artist/index.html b/reference/models/Artist/index.html
index 56330c9..71d2eb4 100644
--- a/reference/models/Artist/index.html
+++ b/reference/models/Artist/index.html
@@ -1790,7 +1790,7 @@ 

- Source code in src/knuckles/models/_artist.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
100
 101
 102
@@ -1924,7 +1924,7 @@ 

- Source code in src/knuckles/models/_artist.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
139
 140
 141
@@ -2001,7 +2001,7 @@ 

- Source code in src/knuckles/models/_artist.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
155
 156
 157
@@ -2164,7 +2164,7 @@ 

- Source code in src/knuckles/models/_artist.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
34
 35
 36
@@ -2274,7 +2274,7 @@ 

- Source code in src/knuckles/models/_artist.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
61
 62
 63
diff --git a/reference/models/Bookmark/index.html b/reference/models/Bookmark/index.html
index eb0b898..e2faf96 100644
--- a/reference/models/Bookmark/index.html
+++ b/reference/models/Bookmark/index.html
@@ -1699,7 +1699,7 @@ 

- Source code in src/knuckles/models/_bookmark.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_bookmark.py
30
 31
 32
@@ -1796,7 +1796,7 @@ 

- Source code in src/knuckles/models/_bookmark.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_bookmark.py
69
 70
 71
@@ -1870,7 +1870,7 @@ 

- Source code in src/knuckles/models/_bookmark.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_bookmark.py
 98
  99
 100
@@ -1939,7 +1939,7 @@ 

- Source code in src/knuckles/models/_bookmark.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_bookmark.py
51
 52
 53
@@ -2020,7 +2020,7 @@ 

- Source code in src/knuckles/models/_bookmark.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_bookmark.py
84
 85
 86
diff --git a/reference/models/Chat Message/index.html b/reference/models/Chat Message/index.html
index 71627c5..d04435e 100644
--- a/reference/models/Chat Message/index.html	
+++ b/reference/models/Chat Message/index.html	
@@ -1577,7 +1577,7 @@ 

- Source code in src/knuckles/models/_chat_message.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_chat_message.py
20
 21
 22
diff --git a/reference/models/Contributor/index.html b/reference/models/Contributor/index.html
index 699c170..d71400d 100644
--- a/reference/models/Contributor/index.html
+++ b/reference/models/Contributor/index.html
@@ -1579,7 +1579,7 @@ 

- Source code in src/knuckles/models/_contributor.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_contributor.py
21
 22
 23
diff --git a/reference/models/Cover Art/index.html b/reference/models/Cover Art/index.html
index 302cf27..12ce6f7 100644
--- a/reference/models/Cover Art/index.html	
+++ b/reference/models/Cover Art/index.html	
@@ -1556,7 +1556,7 @@ 

- Source code in src/knuckles/models/_cover_art.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_cover_art.py
16
 17
 18
diff --git a/reference/models/Genre/index.html b/reference/models/Genre/index.html
index a914d3b..7452164 100644
--- a/reference/models/Genre/index.html
+++ b/reference/models/Genre/index.html
@@ -1637,7 +1637,7 @@ 

:type albumCount: int | None, optional

- Source code in src/knuckles/models/_genre.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_genre.py
34
 35
 36
@@ -1721,7 +1721,7 @@ 

:rtype: Genre

- Source code in src/knuckles/models/_genre.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_genre.py
59
 60
 61
@@ -1815,7 +1815,7 @@ 

- Source code in src/knuckles/models/_genre.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_genre.py
17
 18
 19
diff --git a/reference/models/Internet Radio Station/index.html b/reference/models/Internet Radio Station/index.html
index cf45f8b..c7a156a 100644
--- a/reference/models/Internet Radio Station/index.html	
+++ b/reference/models/Internet Radio Station/index.html	
@@ -1673,7 +1673,7 @@ 

- Source code in src/knuckles/models/_internet_radio_station.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_internet_radio_station.py
20
 21
 22
@@ -1758,7 +1758,7 @@ 

- Source code in src/knuckles/models/_internet_radio_station.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_internet_radio_station.py
58
 59
 60
@@ -1832,7 +1832,7 @@ 

- Source code in src/knuckles/models/_internet_radio_station.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_internet_radio_station.py
87
 88
 89
@@ -1901,7 +1901,7 @@ 

- Source code in src/knuckles/models/_internet_radio_station.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_internet_radio_station.py
35
 36
 37
@@ -1992,7 +1992,7 @@ 

- Source code in src/knuckles/models/_internet_radio_station.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_internet_radio_station.py
73
 74
 75
diff --git a/reference/models/Jukebox/index.html b/reference/models/Jukebox/index.html
index aa436c2..9d47e23 100644
--- a/reference/models/Jukebox/index.html
+++ b/reference/models/Jukebox/index.html
@@ -1795,7 +1795,7 @@ 

- Source code in src/knuckles/models/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
24
 25
 26
@@ -1928,7 +1928,7 @@ 

- Source code in src/knuckles/models/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
159
 160
 161
@@ -2000,7 +2000,7 @@ 

:rtype: Self

- Source code in src/knuckles/models/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
129
 130
 131
@@ -2071,7 +2071,7 @@ 

- Source code in src/knuckles/models/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
49
 50
 51
@@ -2171,7 +2171,7 @@ 

- Source code in src/knuckles/models/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
184
 185
 186
@@ -2287,7 +2287,7 @@ 

- Source code in src/knuckles/models/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
141
 142
 143
@@ -2397,7 +2397,7 @@ 

- Source code in src/knuckles/models/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
114
 115
 116
@@ -2471,7 +2471,7 @@ 

- Source code in src/knuckles/models/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
 99
 100
 101
@@ -2590,7 +2590,7 @@ 

- Source code in src/knuckles/models/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
83
 84
 85
@@ -2666,7 +2666,7 @@ 

- Source code in src/knuckles/models/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
62
 63
 64
@@ -2732,7 +2732,7 @@ 

- Source code in src/knuckles/models/_jukebox.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
73
 74
 75
diff --git a/reference/models/Lyrics/index.html b/reference/models/Lyrics/index.html
index aaeb8ad..c601c31 100644
--- a/reference/models/Lyrics/index.html
+++ b/reference/models/Lyrics/index.html
@@ -1578,7 +1578,7 @@ 

- Source code in src/knuckles/models/_lyrics.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_lyrics.py
18
 19
 20
diff --git a/reference/models/Model/index.html b/reference/models/Model/index.html
index 572b203..660ae01 100644
--- a/reference/models/Model/index.html
+++ b/reference/models/Model/index.html
@@ -1530,7 +1530,7 @@ 

access the OpenSubsonic REST API.

- Source code in src/knuckles/models/_model.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_model.py
13
 14
def __init__(self, subsonic: "Subsonic") -> None:
     self._subsonic = subsonic
diff --git a/reference/models/Music Directory/index.html b/reference/models/Music Directory/index.html
index dc5b34e..2953436 100644
--- a/reference/models/Music Directory/index.html	
+++ b/reference/models/Music Directory/index.html	
@@ -1638,7 +1638,7 @@ 

- Source code in src/knuckles/models/_music_directory.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_music_directory.py
31
 32
 33
diff --git a/reference/models/Music Folder/index.html b/reference/models/Music Folder/index.html
index cedd54d..f5467ec 100644
--- a/reference/models/Music Folder/index.html	
+++ b/reference/models/Music Folder/index.html	
@@ -1595,7 +1595,7 @@ 

- Source code in src/knuckles/models/_music_folder.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_music_folder.py
17
 18
 19
@@ -1663,7 +1663,7 @@ 

- Source code in src/knuckles/models/_music_folder.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_music_folder.py
23
 24
 25
diff --git a/reference/models/Now Playing Entry/index.html b/reference/models/Now Playing Entry/index.html
index d489732..a99f88c 100644
--- a/reference/models/Now Playing Entry/index.html	
+++ b/reference/models/Now Playing Entry/index.html	
@@ -1601,7 +1601,7 @@ 

- Source code in src/knuckles/models/_now_playing_entry.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_now_playing_entry.py
24
 25
 26
diff --git a/reference/models/Play Queue/index.html b/reference/models/Play Queue/index.html
index a928445..86d7acd 100644
--- a/reference/models/Play Queue/index.html	
+++ b/reference/models/Play Queue/index.html	
@@ -1663,7 +1663,7 @@ 

- Source code in src/knuckles/models/_play_queue.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_play_queue.py
29
 30
 31
@@ -1757,7 +1757,7 @@ 

- Source code in src/knuckles/models/_play_queue.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_play_queue.py
48
 49
 50
@@ -1810,7 +1810,7 @@ 

:rtype: Self

- Source code in src/knuckles/models/_play_queue.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_play_queue.py
63
 64
 65
diff --git a/reference/models/Playlist/index.html b/reference/models/Playlist/index.html
index 57ff53e..df16777 100644
--- a/reference/models/Playlist/index.html
+++ b/reference/models/Playlist/index.html
@@ -1803,7 +1803,7 @@ 

- Source code in src/knuckles/models/_playlist.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
38
 39
 40
@@ -1956,7 +1956,7 @@ 

- Source code in src/knuckles/models/_playlist.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
135
 136
 137
@@ -2050,7 +2050,7 @@ 

- Source code in src/knuckles/models/_playlist.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
 86
  87
  88
@@ -2136,7 +2136,7 @@ 

- Source code in src/knuckles/models/_playlist.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
124
 125
 126
@@ -2205,7 +2205,7 @@ 

- Source code in src/knuckles/models/_playlist.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
73
 74
 75
@@ -2305,7 +2305,7 @@ 

- Source code in src/knuckles/models/_playlist.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
160
 161
 162
@@ -2408,7 +2408,7 @@ 

- Source code in src/knuckles/models/_playlist.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
107
 108
 109
diff --git a/reference/models/Podcast/index.html b/reference/models/Podcast/index.html
index ccc5729..61fe316 100644
--- a/reference/models/Podcast/index.html
+++ b/reference/models/Podcast/index.html
@@ -1786,7 +1786,7 @@ 

- Source code in src/knuckles/models/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
146
 147
 148
@@ -1893,7 +1893,7 @@ 

- Source code in src/knuckles/models/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
186
 187
 188
@@ -1967,7 +1967,7 @@ 

- Source code in src/knuckles/models/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
201
 202
 203
@@ -2036,7 +2036,7 @@ 

- Source code in src/knuckles/models/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
173
 174
 175
@@ -2311,7 +2311,7 @@ 

- Source code in src/knuckles/models/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
43
 44
 45
@@ -2450,7 +2450,7 @@ 

- Source code in src/knuckles/models/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
117
 118
 119
@@ -2516,7 +2516,7 @@ 

- Source code in src/knuckles/models/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
106
 107
 108
@@ -2585,7 +2585,7 @@ 

- Source code in src/knuckles/models/_podcast.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
 86
  87
  88
diff --git a/reference/models/Replay Gain/index.html b/reference/models/Replay Gain/index.html
index d78d571..5f12935 100644
--- a/reference/models/Replay Gain/index.html	
+++ b/reference/models/Replay Gain/index.html	
@@ -1613,7 +1613,7 @@ 

- Source code in src/knuckles/models/_replay_gain.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_replay_gain.py
24
 25
 26
diff --git a/reference/models/Scan Status/index.html b/reference/models/Scan Status/index.html
index b78dea4..a3ed5d5 100644
--- a/reference/models/Scan Status/index.html	
+++ b/reference/models/Scan Status/index.html	
@@ -1567,7 +1567,7 @@ 

- Source code in src/knuckles/models/_scan_status.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_scan_status.py
17
 18
 19
diff --git a/reference/models/Search Result/index.html b/reference/models/Search Result/index.html
index c2f6ec9..78b1279 100644
--- a/reference/models/Search Result/index.html	
+++ b/reference/models/Search Result/index.html	
@@ -1581,7 +1581,7 @@ 

- Source code in src/knuckles/models/_search_result.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_search_result.py
25
 26
 27
diff --git a/reference/models/Share/index.html b/reference/models/Share/index.html
index ec7c49b..627aacf 100644
--- a/reference/models/Share/index.html
+++ b/reference/models/Share/index.html
@@ -1734,7 +1734,7 @@ 

- Source code in src/knuckles/models/_share.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_share.py
35
 36
 37
@@ -1862,7 +1862,7 @@ 

- Source code in src/knuckles/models/_share.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_share.py
 78
  79
  80
@@ -1960,7 +1960,7 @@ 

- Source code in src/knuckles/models/_share.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_share.py
116
 117
 118
@@ -2029,7 +2029,7 @@ 

- Source code in src/knuckles/models/_share.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_share.py
60
 61
 62
@@ -2109,7 +2109,7 @@ 

- Source code in src/knuckles/models/_share.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_share.py
105
 106
 107
diff --git a/reference/models/Song/index.html b/reference/models/Song/index.html
index c3b58ac..1d8b37e 100644
--- a/reference/models/Song/index.html
+++ b/reference/models/Song/index.html
@@ -2119,7 +2119,7 @@ 

- Source code in src/knuckles/models/_song.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_song.py
 91
  92
  93
@@ -2397,7 +2397,7 @@ 

- Source code in src/knuckles/models/_song.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_song.py
202
 203
 204
@@ -2467,7 +2467,7 @@ 

- Source code in src/knuckles/models/_song.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_song.py
251
 252
 253
@@ -2578,7 +2578,7 @@ 

- Source code in src/knuckles/models/_song.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_song.py
262
 263
 264
@@ -2684,7 +2684,7 @@ 

- Source code in src/knuckles/models/_song.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_song.py
237
 238
 239
@@ -2756,7 +2756,7 @@ 

- Source code in src/knuckles/models/_song.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_song.py
215
 216
 217
@@ -2822,7 +2822,7 @@ 

- Source code in src/knuckles/models/_song.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_song.py
226
 227
 228
diff --git a/reference/models/Starred Content/index.html b/reference/models/Starred Content/index.html
index 01e874d..19a9b95 100644
--- a/reference/models/Starred Content/index.html	
+++ b/reference/models/Starred Content/index.html	
@@ -1581,7 +1581,7 @@ 

- Source code in src/knuckles/models/_starred_content.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_starred_content.py
25
 26
 27
diff --git a/reference/models/System/index.html b/reference/models/System/index.html
index 591391a..85d0b5f 100644
--- a/reference/models/System/index.html
+++ b/reference/models/System/index.html
@@ -1609,7 +1609,7 @@ 

- Source code in src/knuckles/models/_system.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_system.py
55
 56
 57
@@ -1771,7 +1771,7 @@ 

- Source code in src/knuckles/models/_system.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_system.py
25
 26
 27
diff --git a/reference/models/User/index.html b/reference/models/User/index.html
index d51eaef..66530c3 100644
--- a/reference/models/User/index.html
+++ b/reference/models/User/index.html
@@ -1853,7 +1853,7 @@ 

- Source code in src/knuckles/models/_user.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_user.py
43
 44
 45
@@ -2022,7 +2022,7 @@ 

- Source code in src/knuckles/models/_user.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_user.py
184
 185
 186
@@ -2097,7 +2097,7 @@ 

The object itself.

- Source code in src/knuckles/models/_user.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_user.py
 99
 100
 101
@@ -2227,7 +2227,7 @@ 

- Source code in src/knuckles/models/_user.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_user.py
173
 174
 175
@@ -2296,7 +2296,7 @@ 

- Source code in src/knuckles/models/_user.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_user.py
86
 87
 88
@@ -2367,7 +2367,7 @@ 

- Source code in src/knuckles/models/_user.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_user.py
142
 143
 144
diff --git a/reference/models/Video/index.html b/reference/models/Video/index.html
index b79b66e..bf30422 100644
--- a/reference/models/Video/index.html
+++ b/reference/models/Video/index.html
@@ -1679,7 +1679,7 @@ 

- Source code in src/knuckles/models/_video.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_video.py
31
 32
 33
@@ -1782,7 +1782,7 @@ 

- Source code in src/knuckles/models/_video.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_video.py
53
 54
 55
@@ -2303,7 +2303,7 @@ 

- Source code in src/knuckles/models/_video.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_video.py
183
 184
 185
@@ -2581,7 +2581,7 @@ 

- Source code in src/knuckles/models/_video.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_video.py
294
 295
 296
@@ -2662,7 +2662,7 @@ 

- Source code in src/knuckles/models/_video.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_video.py
312
 313
 314
@@ -2791,7 +2791,7 @@ 

- Source code in src/knuckles/models/_video.py + Source code in .venv/lib/python3.11/site-packages/knuckles/models/_video.py
 75
  76
  77
diff --git a/search/search_index.json b/search/search_index.json
index 189a5e9..a3089f6 100644
--- a/search/search_index.json
+++ b/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Knuckles","text":"

A OpenSubsonic API wrapper for Python 3.11.0+.

"},{"location":"#compatiblity","title":"Compatiblity","text":"

Knuckles only works with servers compatible with the REST API version 1.4.0 onwards (Subsonic 4.2+). It follows strictly the OpenSubsonic API Spec, it being fully retro-compatible with the original Subsonic API.

"},{"location":"#quickstart","title":"Quickstart","text":"

...

"},{"location":"#acknowledgements","title":"Acknowledgements","text":"

Created with by Jorge \"Kutu\" Dob\u00f3n Blanco.

"},{"location":"reference/Api/","title":"Api","text":""},{"location":"reference/Api/#knuckles._api.Api","title":"Api(url, username, password, client, use_https=True, use_token=True, request_method=RequestMethod.GET)","text":"

Class in charge of managing the access to the REST API of the OpenSubsonic server.

Parameters:

Name Type Description Default url str

The base URL that points to the server, without the /rest/ path.

required username str

The name of the user to login as in the API.

required password str

The password of the user to login as in the API.

required client str

The name of the client to report to the API.

required use_https bool

If HTTPS should be used.

True use_token bool

If the modern token based authentication should be used.

True request_method RequestMethod

If the requests should send the data as GET parameters or POST form data.

GET Source code in src/knuckles/_api.py
def __init__(\n    self,\n    url: str,\n    username: str,\n    password: str,\n    client: str,\n    use_https: bool = True,\n    use_token: bool = True,\n    request_method: RequestMethod = RequestMethod.GET,\n) -> None:\n    \"\"\"Class in charge of managing the access to the REST API of\n    the OpenSubsonic server.\n\n    Args:\n        url: The base URL that points to the server,\n            **without** the `/rest/` path.\n        username: The name of the user to login as in the API.\n        password: The password of the user to login as in the API.\n        client: The name of the client to report to the API.\n        use_https:  If HTTPS should be used.\n        use_token: If the modern token based authentication should be used.\n        request_method: If the requests should send the data as\n            GET parameters or POST form data.\n    \"\"\"\n    pass\n\n    self.username = username\n    self.password = password\n    self.client = client\n    self.use_token = use_token\n    self.request_method = request_method\n\n    # Sanitize url and ensure the correct protocol is used\n    parsed_url: ParseResult = urlparse(url)\n\n    # If the user accidentally specifies a protocol the url goes to netloc instead\n    base_url: str = parsed_url.path if parsed_url.path != \"\" else parsed_url.netloc\n\n    if use_https:\n        self.url = f\"https://{base_url}\"\n    else:\n        self.url = f\"http://{base_url}\"\n
"},{"location":"reference/Api/#knuckles._api.Api.generate_url","title":"generate_url(endpoint, extra_params)","text":"

Using the PreparedRequest object of the Requests request package generates a valid URL for any endpoint with a valid authentication parameter.

Parameters:

Name Type Description Default endpoint str

The endpoint to be appended in the URL, without the leading /rest/.

required extra_params dict[str, Any]

The extra parameters to be added to the URL.

required

Returns:

Type Description str

A valid URL pointing to the desired endpoint and with the requested parameters, including the ones needed for authentication.

Source code in src/knuckles/_api.py
def generate_url(self, endpoint: str, extra_params: dict[str, Any]) -> str:\n    \"\"\"Using the PreparedRequest object of the Requests request package\n    generates a valid URL for any endpoint with\n    a valid authentication parameter.\n\n\n    Args:\n        endpoint: The endpoint to be appended in the URL, **without** the\n            leading `/rest/`.\n        extra_params: The extra parameters to be added to the URL.\n\n    Returns:\n        A valid URL pointing to the desired endpoint and with the\n            requested parameters, including the ones needed\n            for authentication.\n    \"\"\"\n\n    prepared_request = PreparedRequest()\n    prepared_request.prepare_url(\n        f\"{self.url}/rest/{endpoint}\", {**self._generate_params(extra_params)}\n    )\n\n    # Ignore the type error caused by the url parameter of prepared_request\n    # as the prepare_url method always set it to a string.\n    return prepared_request.url  # type: ignore [return-value]\n
"},{"location":"reference/Api/#knuckles._api.Api.json_request","title":"json_request(endpoint, extra_params=None)","text":"

Makes a request to the OpenSubsonic server REST API and returns the data from the subsonic_response property. Should never be used with non-json compatible endpoints.

Parameters:

Name Type Description Default endpoint str

The endpoint to be appended in the URL, without the leading /rest/.

required extra_params dict[str, Any] | None

Extra parameters to the added to the request.

None

Raises:

Type Description code_error

Raise an error if the server reports and issue with the request in the form of a code error, the raised follows the form CodeErrorXX where XX is the raised code error. UnknownCodeError is raised if the error code is not part of the standard.

Returns:

Type Description dict[str, Any]

The data contained in the subsonic_response property.

Source code in src/knuckles/_api.py
def json_request(\n    self, endpoint: str, extra_params: dict[str, Any] | None = None\n) -> dict[str, Any]:\n    \"\"\"Makes a request to the OpenSubsonic server REST API and returns the\n    data from the `subsonic_response` property. Should **never** be used\n    with non-json compatible endpoints.\n\n    Args:\n        endpoint: The endpoint to be appended in the URL, **without** the\n            leading `/rest/`.\n        extra_params: Extra parameters to the added to the request.\n\n    Raises:\n        code_error: Raise an error if the server reports and issue with the\n            request in the form of a code error, the raised follows\n            the form `CodeErrorXX` where `XX` is the raised code error.\n            `UnknownCodeError` is raised if the error code\n            is not part of the standard.\n\n    Returns:\n        The data contained in the `subsonic_response` property.\n    \"\"\"\n\n    response = self.raw_request(endpoint, extra_params)\n\n    json_response: dict[str, Any] = response.json()[\"subsonic-response\"]\n\n    if json_response[\"status\"] == \"failed\":\n        code_error: ERROR_CODE_EXCEPTION = get_error_code_exception(\n            json_response[\"error\"][\"code\"]\n        )\n\n        raise code_error(json_response[\"error\"][\"message\"])\n\n    return json_response\n
"},{"location":"reference/Api/#knuckles._api.Api.raw_request","title":"raw_request(endpoint, extra_params=None)","text":"

Makes a request to the OpenSubsonic server REST API.

Parameters:

Name Type Description Default endpoint str

The endpoint to be appended in the URL, without the leading /rest/.

required extra_params dict[str, Any] | None

Extra parameters to the added to the request.

None

Returns:

Type Description Response

The requests response object of the executed request.

Source code in src/knuckles/_api.py
def raw_request(\n    self, endpoint: str, extra_params: dict[str, Any] | None = None\n) -> Response:\n    \"\"\"Makes a request to the OpenSubsonic server REST API.\n\n    Args:\n        endpoint: The endpoint to be appended in the URL, **without** the\n            leading `/rest/`.\n        extra_params: Extra parameters to the added to the request.\n\n    Returns:\n        The\n            [`requests`](https://docs.python-requests.org/en/latest/index.html)\n            `response` object of the executed request.\n    \"\"\"\n    match self.request_method:\n        case RequestMethod.POST:\n            return requests.post(\n                url=f\"{self.url}/rest/{endpoint}\",\n                data=json.dumps(self._generate_params(extra_params)),\n            )\n\n        case RequestMethod.GET | _:\n            return requests.get(\n                url=f\"{self.url}/rest/{endpoint}\",\n                params=self._generate_params(extra_params),\n            )\n
"},{"location":"reference/Bookmarks/","title":"Bookmarks","text":""},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks","title":"Bookmarks(api, subsonic)","text":"

Class that contains all the methods needed to interact with the bookmark endpoints in the Subsonic API.

Source code in src/knuckles/_bookmarks.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n    self.subsonic = subsonic\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.create_bookmark","title":"create_bookmark(song_or_video_id, position, comment=None)","text":"

Creates a new bookmark for the authenticated user.

Parameters:

Name Type Description Default song_or_video_id str

The ID of the song or video to bookmark.

required position int

A position in milliseconds to be indicated with the song or video.

required comment str | None

A comment to be attached with the song or video.

None

Returns:

Type Description Bookmark

An object that contains all the info of the new created bookmark.

Source code in src/knuckles/_bookmarks.py
def create_bookmark(\n    self, song_or_video_id: str, position: int, comment: str | None = None\n) -> Bookmark:\n    \"\"\"Creates a new bookmark for the authenticated user.\n\n    Args:\n        song_or_video_id: The ID of the song or video to bookmark.\n        position: A position in milliseconds to be indicated with the song\n            or video.\n        comment: A comment to be attached with the song or video.\n\n    Returns:\n        An object that contains all the info of the new created\n            bookmark.\n    \"\"\"\n\n    self.api.json_request(\n        \"createBookmark\",\n        {\"id\": song_or_video_id, \"position\": position, \"comment\": comment},\n    )\n\n    # Fake the song structure given by in the API.\n    return Bookmark(\n        self.subsonic, {\"id\": song_or_video_id}, position=position, comment=comment\n    )\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.delete_bookmark","title":"delete_bookmark(song_or_video_id)","text":"

Deletes a bookmark for the authenticated user.

Parameters:

Name Type Description Default song_or_video_id str

The ID of the song or video to delete its bookmark.

required

Returns: The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_bookmarks.py
def delete_bookmark(self, song_or_video_id: str) -> \"Subsonic\":\n    \"\"\"Deletes a bookmark for the authenticated user.\n\n    Args:\n        song_or_video_id: The ID of the song or video to delete its\n            bookmark.\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n    self.api.json_request(\"deleteBookmark\", {\"id\": song_or_video_id})\n\n    return self.subsonic\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.get_bookmark","title":"get_bookmark(bookmark_id)","text":"

Get all the info of a bookmark given its ID.

Parameters:

Name Type Description Default bookmark_id str

The id of the bookmark to get.

required

Returns:

Type Description Bookmark | None

A object that contains all the info of the requested bookmark.

Source code in src/knuckles/_bookmarks.py
def get_bookmark(self, bookmark_id: str) -> Bookmark | None:\n    \"\"\"Get all the info of a bookmark given its ID.\n\n    Args:\n        bookmark_id: The id of the bookmark to get.\n\n    Returns:\n        A object that contains all the info of the requested bookmark.\n    \"\"\"\n\n    bookmarks = self.get_bookmarks()\n\n    for bookmark in bookmarks:\n        if bookmark.song.id == bookmark_id:\n            return bookmark\n\n    return None\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.get_bookmarks","title":"get_bookmarks()","text":"

Get all the bookmarks created by the authenticated user.

Returns:

Type Description list[Bookmark]

A list containing all the bookmarks for the authenticated user.

Source code in src/knuckles/_bookmarks.py
def get_bookmarks(self) -> list[Bookmark]:\n    \"\"\"Get all the bookmarks created by the authenticated user.\n\n    Returns:\n        A list containing all the bookmarks for the authenticated user.\n    \"\"\"\n\n    response = self.api.json_request(\"getBookmarks\")[\"bookmarks\"][\"bookmark\"]\n\n    return [Bookmark(self.subsonic, **bookmark) for bookmark in response]\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.get_play_queue","title":"get_play_queue()","text":"

Get the play queue of the authenticated user.

Returns:

Type Description PlayQueue

An object that contains all the info of the play queue of the user.

Source code in src/knuckles/_bookmarks.py
def get_play_queue(self) -> PlayQueue:\n    \"\"\"Get the play queue of the authenticated user.\n\n    Returns:\n        An object that contains all the info of the\n            play queue of the user.\n    \"\"\"\n\n    response = self.api.json_request(\"getPlayQueue\")[\"playQueue\"]\n\n    return PlayQueue(self.subsonic, **response)\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.save_play_queue","title":"save_play_queue(song_ids, current_song_id=None, position=None)","text":"

Saves a new play queue for the authenticated user.

Parameters:

Name Type Description Default song_ids list[str]

A list with all the songs to add to the queue.

required current_song_id str | None

The ID of the current playing song.

None position int | None

A position in milliseconds of where the current song playback it at.

None

Returns:

Type Description PlayQueue

An object that contains all the info of the new saved play queue.

Source code in src/knuckles/_bookmarks.py
def save_play_queue(\n    self,\n    song_ids: list[str],\n    current_song_id: str | None = None,\n    position: int | None = None,\n) -> PlayQueue:\n    \"\"\"Saves a new play queue for the authenticated user.\n\n    Args:\n        song_ids: A list with all the songs to add to the queue.\n        current_song_id: The ID of the current playing song.\n        position: A position in milliseconds of where the current song\n            playback it at.\n\n    Returns:\n        An object that contains all the info of the new\n            saved play queue.\n    \"\"\"\n\n    self.api.json_request(\n        \"savePlayQueue\",\n        {\"id\": song_ids, \"current\": current_song_id, \"position\": position},\n    )\n\n    # Fake the song structure given by in the API.\n    songs = []\n    for song_id in song_ids:\n        songs.append({\"id\": song_id})\n\n    return PlayQueue(self.subsonic, songs, current_song_id, position)\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.update_bookmark","title":"update_bookmark(song_or_video_id, position, comment=None)","text":"

Updates a bookmark for the authenticated user.

Parameters:

Name Type Description Default song_or_video_id str

The ID of the song or video to update its bookmark.

required position int

A position in milliseconds to be indicated with the song or video.

required comment str | None

A comment to be attached with the song or video.

None

Returns: An object that contains all the info of the new created bookmark.

Source code in src/knuckles/_bookmarks.py
def update_bookmark(\n    self, song_or_video_id: str, position: int, comment: str | None = None\n) -> Bookmark:\n    \"\"\"Updates a bookmark for the authenticated user.\n\n    Args:\n        song_or_video_id: The ID of the song or video to update its\n            bookmark.\n        position: A position in milliseconds to be indicated with the song\n            or video.\n        comment: A comment to be attached with the song or video.\n    Returns:\n        An object that contains all the info of the new created\n            bookmark.\n    \"\"\"\n\n    return self.create_bookmark(song_or_video_id, position, comment)\n
"},{"location":"reference/Browsing/","title":"Browsing","text":""},{"location":"reference/Browsing/#knuckles._browsing.Browsing","title":"Browsing(api, subsonic)","text":"

Class that contains all the methods needed to interact with the browsing endpoints in the Subsonic API.

Source code in src/knuckles/_browsing.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n    self.subsonic = subsonic\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_album","title":"get_album(album_id)","text":"

Get all the info about an album.

Parameters:

Name Type Description Default album_id str

The ID of the album to get its info.

required

Returns:

Type Description Album

An object that contains all the info about the requested album.

Source code in src/knuckles/_browsing.py
def get_album(self, album_id: str) -> Album:\n    \"\"\"Get all the info about an album.\n\n    Args:\n        album_id: The ID of the album to get its info.\n\n    Returns:\n        An object that contains all the info about\n            the requested album.\n    \"\"\"\n\n    response = self.api.json_request(\"getAlbum\", {\"id\": album_id})[\"album\"]\n\n    return Album(self.subsonic, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_album_info","title":"get_album_info(album_id)","text":"

Get all the extra info about an album.

Parameters:

Name Type Description Default album_id str

The ID of the album to get its extra info.

required

Returns:

Type Description AlbumInfo

An object that contains all the extra info about the requested album.

Source code in src/knuckles/_browsing.py
def get_album_info(self, album_id: str) -> AlbumInfo:\n    \"\"\"Get all the extra info about an album.\n\n    Args:\n        album_id: The ID of the album to get its extra info.\n\n    Returns:\n        An object that contains all the extra info about\n            the requested album.\n    \"\"\"\n\n    response = self.api.json_request(\"getAlbumInfo2\", {\"id\": album_id})[\"albumInfo\"]\n\n    return AlbumInfo(self.subsonic, album_id, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_album_info_non_id3","title":"get_album_info_non_id3(album_id)","text":"

Get all the extra info about an album. Not organized according ID3 tags.

Parameters:

Name Type Description Default album_id str

The ID of the album to get its extra info.

required

Returns:

Type Description AlbumInfo

An object that contains all the extra info about the requested album.

Source code in src/knuckles/_browsing.py
def get_album_info_non_id3(self, album_id: str) -> AlbumInfo:\n    \"\"\"Get all the extra info about an album. Not organized according\n    ID3 tags.\n\n    Args:\n        album_id: The ID of the album to get its extra info.\n\n    Returns:\n        An object that contains all the extra info about\n            the requested album.\n    \"\"\"\n\n    response = self.api.json_request(\"getAlbumInfo\", {\"id\": album_id})[\"albumInfo\"]\n\n    return AlbumInfo(self.subsonic, album_id, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_artist","title":"get_artist(artist_id)","text":"

Get all the info about an artist.

Parameters:

Name Type Description Default artist_id str

The ID of the artist to get its info.

required

Returns:

Type Description Artist

An object that contains all the info about the requested artist.

Source code in src/knuckles/_browsing.py
def get_artist(self, artist_id: str) -> Artist:\n    \"\"\"Get all the info about an artist.\n\n    Args:\n        artist_id: The ID of the artist to get its info.\n\n    Returns:\n        An object that contains all the info about\n            the requested artist.\n    \"\"\"\n\n    response = self.api.json_request(\"getArtist\", {\"id\": artist_id})[\"artist\"]\n\n    return Artist(self.subsonic, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_artist_info","title":"get_artist_info(artist_id, max_similar_artists=None, include_similar_artists_not_present=None)","text":"

Get all the extra info about an artist.

Parameters:

Name Type Description Default artist_id str

The ID of the artist to get its extra info.

required max_similar_artists int | None

The max number of similar artists to return.

None include_similar_artists_not_present bool | None

Include similar artists that are not present in any the media library.

None

Returns:

Type Description ArtistInfo

An object that contains all the extra info about the requested artist.

Source code in src/knuckles/_browsing.py
def get_artist_info(\n    self,\n    artist_id: str,\n    max_similar_artists: int | None = None,\n    include_similar_artists_not_present: bool | None = None,\n) -> ArtistInfo:\n    \"\"\"Get all the extra info about an artist.\n\n    Args:\n        artist_id: The ID of the artist to get its extra info.\n        max_similar_artists: The max number of similar artists to\n            return.\n        include_similar_artists_not_present: Include similar artists\n            that are not present in any the media library.\n\n    Returns:\n        An object that contains all the extra info about\n            the requested artist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getArtistInfo2\",\n        {\n            \"id\": artist_id,\n            \"count\": max_similar_artists,\n            \"includeNotPresent\": include_similar_artists_not_present,\n        },\n    )[\"artistInfo2\"]\n\n    return ArtistInfo(self.subsonic, artist_id, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_artist_info_non_id3","title":"get_artist_info_non_id3(artist_id, max_similar_artists=None, include_similar_artists_not_present=None)","text":"

Get all the extra info about an artist. Not organized according ID3 tags.

Parameters:

Name Type Description Default artist_id str

The ID of the artist to get its extra info.

required max_similar_artists int | None

The max number of similar artists to return.

None include_similar_artists_not_present bool | None

Include similar artists that are not present in any the media library.

None

Returns:

Type Description ArtistInfo

An object that contains all the extra info about the requested artist.

Source code in src/knuckles/_browsing.py
def get_artist_info_non_id3(\n    self,\n    artist_id: str,\n    max_similar_artists: int | None = None,\n    include_similar_artists_not_present: bool | None = None,\n) -> ArtistInfo:\n    \"\"\"Get all the extra info about an artist. Not organized according\n    ID3 tags.\n\n    Args:\n        artist_id: The ID of the artist to get its extra info.\n        max_similar_artists: The max number of similar artists to\n            return.\n        include_similar_artists_not_present: Include similar artists\n            that are not present in any the media library.\n\n    Returns:\n        An object that contains all the extra info about\n            the requested artist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getArtistInfo\",\n        {\n            \"id\": artist_id,\n            \"count\": max_similar_artists,\n            \"includeNotPresent\": include_similar_artists_not_present,\n        },\n    )[\"artistInfo\"]\n\n    return ArtistInfo(self.subsonic, artist_id, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_artists","title":"get_artists(music_folder_id=None)","text":"

Get all the registered artists in the server.

Parameters:

Name Type Description Default music_folder_id str | None

A music folder ID to reduce the scope of the artists to return.

None

Returns:

Type Description list[Artist]

A list with all the info about all the received artists.

Source code in src/knuckles/_browsing.py
def get_artists(self, music_folder_id: str | None = None) -> list[Artist]:\n    \"\"\"Get all the registered artists in the server.\n\n    Args:\n        music_folder_id: A music folder ID to reduce the scope of the\n            artists to return.\n\n    Returns:\n        A list with all the info about all the received artists.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getArtists\", {\"musicFolderId\": music_folder_id}\n    )[\"artists\"][\"index\"]\n\n    artists: list[Artist] = []\n\n    for index in response:\n        for artist_data in index[\"artist\"]:\n            artist = Artist(self.subsonic, **artist_data)\n            artists.append(artist)\n\n    return artists\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_artists_indexed","title":"get_artists_indexed(music_folder_id, modified_since)","text":"

Get all the registered artist indexed alphabetically.

Parameters:

Name Type Description Default music_folder_id str

A music folder ID to reduce the scope where the artist should be from.

required modified_since int

Time in milliseconds since the artist have changed its collection.

required

Returns:

Type Description ArtistIndex

An object containt all the artist alphabetically indexed.

Source code in src/knuckles/_browsing.py
def get_artists_indexed(\n    self, music_folder_id: str, modified_since: int\n) -> ArtistIndex:\n    \"\"\"Get all the registered artist indexed alphabetically.\n\n    Args:\n        music_folder_id: A music folder ID to reduce the scope\n            where the artist should be from.\n        modified_since: Time in milliseconds since the artist have changed\n            its collection.\n\n    Returns:\n        An object containt all the artist alphabetically indexed.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getIndexes\",\n        {\"musicFolderId\": music_folder_id, \"ifModifiedSince\": modified_since},\n    )[\"indexes\"]\n\n    return ArtistIndex(subsonic=self.subsonic, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_genre","title":"get_genre(genre_name)","text":"

Get all the info of a genre.

Parameters:

Name Type Description Default genre_name str

The name of the genre to get its info.

required

Returns:

Type Description Genre | None

An object that contains all the info about the requested genre.

Source code in src/knuckles/_browsing.py
def get_genre(self, genre_name: str) -> Genre | None:\n    \"\"\"Get all the info of a genre.\n\n    Args:\n        genre_name: The name of the genre to get its info.\n\n    Returns:\n        An object that contains all the info\n            about the requested genre.\n    \"\"\"\n\n    genres = self.get_genres()\n\n    for genre in genres:\n        if genre.value == genre_name:\n            return genre\n\n    return None\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_genres","title":"get_genres()","text":"

Get all the available genres in the server.

Returns:

Type Description list[Genre]

A list with all the registered genres in the server.

Source code in src/knuckles/_browsing.py
def get_genres(self) -> list[Genre]:\n    \"\"\"Get all the available genres in the server.\n\n    Returns:\n        A list with all the registered genres in the server.\n    \"\"\"\n\n    response = self.api.json_request(\"getGenres\")[\"genres\"][\"genre\"]\n\n    return [Genre(self.subsonic, **genre) for genre in response]\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_music_directory","title":"get_music_directory(music_directory_id)","text":"

Get the info of a music directory.

Parameters:

Name Type Description Default music_directory_id str

The ID of the music directory to get its info.

required

Returns:

Type Description MusicDirectory

An object that holds all the info about the requested music directory.

Source code in src/knuckles/_browsing.py
def get_music_directory(self, music_directory_id: str) -> MusicDirectory:\n    \"\"\"Get the info of a music directory.\n\n    Args:\n        music_directory_id: The ID of the music directory to get its info.\n\n    Returns:\n        An object that holds all the info about the requested music\n            directory.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getMusicDirectory\", {\"id\": music_directory_id}\n    )[\"directory\"]\n\n    return MusicDirectory(subsonic=self.subsonic, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_music_folder","title":"get_music_folder(music_folder_id)","text":"

Get the info of a music folder.

Parameters:

Name Type Description Default music_folder_id str

The ID of the music folder to get.

required

Returns:

Type Description MusicFolder | None

An object that contains all the info about the requested music folder, or None if it wasn't found.

Source code in src/knuckles/_browsing.py
def get_music_folder(self, music_folder_id: str) -> MusicFolder | None:\n    \"\"\"Get the info of a music folder.\n\n    Args:\n        music_folder_id: The ID of the music folder to get.\n\n    Returns:\n        An object that contains all the info about the\n            requested music folder, or None if it wasn't found.\n    \"\"\"\n\n    music_folders = self.get_music_folders()\n\n    for music_folder in music_folders:\n        if music_folder.id == music_folder_id:\n            return music_folder\n\n    return None\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_music_folders","title":"get_music_folders()","text":"

Get all the top level music folders.

Returns:

Type Description list[MusicFolder]

A list that contains all the info about all the available music folders.

Source code in src/knuckles/_browsing.py
def get_music_folders(self) -> list[MusicFolder]:\n    \"\"\"Get all the top level music folders.\n\n    Returns:\n        A list that contains all the info about all the available\n            music folders.\n    \"\"\"\n\n    response = self.api.json_request(\"getMusicFolders\")[\"musicFolders\"][\n        \"musicFolder\"\n    ]\n\n    return [MusicFolder(self.subsonic, **music_folder) for music_folder in response]\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_similar_songs","title":"get_similar_songs(song_id, song_count=None)","text":"

Get similar songs to the given one.

Parameters:

Name Type Description Default song_id str

The ID of the song to get similar songs.

required song_count int | None

The number of songs to return.

None

Returns:

Type Description list[Song]

A list that contains all the songs that are similar to the given one.

Source code in src/knuckles/_browsing.py
def get_similar_songs(\n    self, song_id: str, song_count: int | None = None\n) -> list[Song]:\n    \"\"\"Get similar songs to the given one.\n\n    Args:\n        song_id: The ID of the song to get similar songs.\n        song_count: The number of songs to return.\n\n    Returns:\n        A list that contains all the songs that are similar\n            to the given one.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getSimilarSongs2\", {\"id\": song_id, \"count\": song_count}\n    )[\"similarSongs2\"][\"song\"]\n\n    return [Song(subsonic=self.subsonic, **song) for song in response]\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_similar_songs_non_id3","title":"get_similar_songs_non_id3(song_id, song_count=None)","text":"

Get similar songs to the given one. Not organized according ID3 tags.

Parameters:

Name Type Description Default song_id str

The ID of the song to get similar songs.

required song_count int | None

The number of songs to return.

None

Returns:

Type Description list[Song]

A list that contains all the songs that are similar to the given one.

Source code in src/knuckles/_browsing.py
def get_similar_songs_non_id3(\n    self, song_id: str, song_count: int | None = None\n) -> list[Song]:\n    \"\"\"Get similar songs to the given one. Not organized according\n    ID3 tags.\n\n    Args:\n        song_id: The ID of the song to get similar songs.\n        song_count: The number of songs to return.\n\n    Returns:\n        A list that contains all the songs that are similar\n            to the given one.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getSimilarSongs\", {\"id\": song_id, \"count\": song_count}\n    )[\"similarSongs\"][\"song\"]\n\n    return [Song(subsonic=self.subsonic, **song) for song in response]\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_song","title":"get_song(song_id)","text":"

Get all the info about a song.

Parameters:

Name Type Description Default song_id str

The ID of the song to get its info.

required

Returns:

Type Description Song

An object that contains all the info about the requested song.

Source code in src/knuckles/_browsing.py
def get_song(self, song_id: str) -> Song:\n    \"\"\"Get all the info about a song.\n\n    Args:\n        song_id: The ID of the song to get its info.\n\n    Returns:\n        An object that contains all the info\n            about the requested song.\n    \"\"\"\n\n    response = self.api.json_request(\"getSong\", {\"id\": song_id})[\"song\"]\n\n    return Song(self.subsonic, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_top_songs","title":"get_top_songs(artist_name, max_num_of_songs)","text":"

Get the top rated songs in the server.

Parameters:

Name Type Description Default artist_name str

Limit the ranked songs to the ones created by the given artist.

required max_num_of_songs int

The max number of songs to return.

required

Returns:

Type Description list[Song]

A list that contains the top rated songs of the server.

Source code in src/knuckles/_browsing.py
def get_top_songs(self, artist_name: str, max_num_of_songs: int) -> list[Song]:\n    \"\"\"Get the top rated songs in the server.\n\n    Args:\n        artist_name: Limit the ranked songs to the ones created by the\n            given artist.\n        max_num_of_songs: The max number of songs to return.\n\n    Returns:\n        A list that contains the top rated songs of the server.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getTopSongs\", {\"artist\": artist_name, \"count\": max_num_of_songs}\n    )[\"topSongs\"][\"song\"]\n\n    return [Song(subsonic=self.subsonic, **song) for song in response]\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_video","title":"get_video(video_id)","text":"

Get all the info about a video.

Parameters:

Name Type Description Default video_id str

The ID of the video to get its info.

required

Returns:

Type Description Video | None

An object that contains all the info about the requested video.

Source code in src/knuckles/_browsing.py
def get_video(self, video_id: str) -> Video | None:\n    \"\"\"Get all the info about a video.\n\n    Args:\n        video_id: The ID of the video to get its info.\n\n    Returns:\n        An object that contains all the info about\n            the requested video.\n    \"\"\"\n\n    videos = self.get_videos()\n\n    for video in videos:\n        if video.id == video_id:\n            return video\n\n    return None\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_video_info","title":"get_video_info(video_id)","text":"

Get all the extra info about a video.

Parameters:

Name Type Description Default video_id str

The ID of the video to get its extra info.

required

Returns:

Type Description VideoInfo

An object that holds all the extra info about the requested video.

Source code in src/knuckles/_browsing.py
def get_video_info(self, video_id: str) -> VideoInfo:\n    \"\"\"Get all the extra info about a video.\n\n    Args:\n        video_id: The ID of the video to get its extra info.\n\n    Returns:\n        An object that holds all the extra info about\n            the requested video.\n    \"\"\"\n\n    response = self.api.json_request(\"getVideoInfo\", {\"id\": video_id})[\"videoInfo\"]\n\n    return VideoInfo(self.subsonic, video_id=video_id, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_videos","title":"get_videos()","text":"

Get all the registered videos in the server.

Returns:

Type Description list[Video]

A list with all the info about al the videos available in the server.

Source code in src/knuckles/_browsing.py
def get_videos(self) -> list[Video]:\n    \"\"\"Get all the registered videos in the server.\n\n    Returns:\n        A list with all the info about al the videos\n            available in the server.\n    \"\"\"\n\n    response = self.api.json_request(\"getVideos\")[\"videos\"][\"video\"]\n\n    return [Video(self.subsonic, **video) for video in response]\n
"},{"location":"reference/Chat/","title":"Chat","text":""},{"location":"reference/Chat/#knuckles._chat.Chat","title":"Chat(api, subsonic)","text":"

Class that contains all the methods needed to interact with the chat endpoints in the Subsonic API.

Source code in src/knuckles/_chat.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n    self.subsonic = subsonic\n
"},{"location":"reference/Chat/#knuckles._chat.Chat.add_chat_message","title":"add_chat_message(message)","text":"

Add chat message.

Parameters:

Name Type Description Default message str

The message content to add.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_chat.py
def add_chat_message(self, message: str) -> \"Subsonic\":\n    \"\"\"Add chat message.\n\n    Args:\n        message: The message content to add.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n    self.api.json_request(\"addChatMessage\", {\"message\": message})\n\n    return self.subsonic\n
"},{"location":"reference/Chat/#knuckles._chat.Chat.get_chat_messages","title":"get_chat_messages()","text":"

Get all send chat messages.

Returns:

Type Description list[ChatMessage]

A list with all the messages info.

Source code in src/knuckles/_chat.py
def get_chat_messages(self) -> list[ChatMessage]:\n    \"\"\"Get all send chat messages.\n\n    Returns:\n        A list with all the messages info.\n    \"\"\"\n\n    response: list[dict[str, Any]] = self.api.json_request(\"getChatMessages\")[\n        \"chatMessages\"\n    ][\"chatMessage\"]\n\n    messages = [ChatMessage(self.subsonic, **message) for message in response]\n\n    return messages\n
"},{"location":"reference/Exceptions/","title":"Exceptions","text":""},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode0","title":"ErrorCode0","text":"

Bases: Exception

Raised when the server returns an error code 0, it being a generic error.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode10","title":"ErrorCode10","text":"

Bases: Exception

Raised when the server returns an error code 10, meaning that a parameter for the requested endpoint is missing. Should never be raised because Knuckles takes care for enforcing mandatory parameters, if you have encountered this exception the server may have broke the OpenSubsonic API.

If you suspect that this is an issue caused by Knuckles itself, please report it to upstream.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode20","title":"ErrorCode20","text":"

Bases: Exception

Raised when the server returns an error code 20, meaning that the client has a lower RESP API version than the server. Should never be raised given that Knuckles supports up to the latest Subsonic REST API version.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode30","title":"ErrorCode30","text":"

Bases: Exception

Raised when the server returns an error code 30, meaning that the server has a lower RESP API version than the client.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode40","title":"ErrorCode40","text":"

Bases: Exception

Raised when the server returns an error code 40, meaning that the given user doesn't exists or the password is incorrect.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode41","title":"ErrorCode41","text":"

Bases: Exception

Raised when the server returns an error code 42, meaning that token authentication is not available.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode50","title":"ErrorCode50","text":"

Bases: Exception

Raised when the server returns an error code 50, meaning that the authenticated user is no authorized for the requested action.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode60","title":"ErrorCode60","text":"

Bases: Exception

Raised when the server return an error code 60, meaning that the Subsonic trial period has ended.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode70","title":"ErrorCode70","text":"

Bases: Exception

Raised when the server returns an error code 70, meaning that the requested data wasn't found.

"},{"location":"reference/Exceptions/#knuckles.exceptions.InvalidRatingNumber","title":"InvalidRatingNumber","text":"

Bases: ValueError

Raised when input an invalid rating weight in a method of the API.

"},{"location":"reference/Exceptions/#knuckles.exceptions.MissingRequiredProperty","title":"MissingRequiredProperty","text":"

Bases: Exception

Raised when a property required to call a method is missing.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ResourceNotFound","title":"ResourceNotFound(message='Unable to generate the model as it does not exist in the server', *args)","text":"

Bases: Exception

Raised when a resource could not be retrieve to generate a model using a previous one.

Source code in src/knuckles/exceptions.py
def __init__(\n    self,\n    message: str = (\n        \"Unable to generate the model as it does not exist in the server\"\n    ),\n    *args: str,\n) -> None:\n    super().__init__(message, *args)\n
"},{"location":"reference/Exceptions/#knuckles.exceptions.ShareInvalidSongList","title":"ShareInvalidSongList","text":"

Bases: ValueError

Raised when a method in a share is called with an invalid song list.

"},{"location":"reference/Exceptions/#knuckles.exceptions.UnknownErrorCode","title":"UnknownErrorCode","text":"

Bases: Exception

Raised when the server returns an error code that doesn't have a specific core error exception.

"},{"location":"reference/Exceptions/#knuckles.exceptions.get_error_code_exception","title":"get_error_code_exception(error_code)","text":"

Converts a numeric error code to its corresponding error code exception

Parameters:

Name Type Description Default error_code int

The number of the error to get its exception.

required

Returns: The exception of the given error code

Source code in src/knuckles/exceptions.py
def get_error_code_exception(\n    error_code: int,\n) -> ERROR_CODE_EXCEPTION:\n    \"\"\"Converts a numeric error code to its corresponding error code exception\n\n    Args:\n        error_code: The number of the error to get its exception.\n\n    Returns: The exception of the given error code\n    \"\"\"\n    match error_code:\n        case 0:\n            return ErrorCode0\n        case 10:\n            return ErrorCode10\n        case 20:\n            return ErrorCode20\n        case 30:\n            return ErrorCode30\n        case 40:\n            return ErrorCode40\n        case 41:\n            return ErrorCode41\n        case 50:\n            return ErrorCode50\n        case 60:\n            return ErrorCode60\n        case 70:\n            return ErrorCode70\n        case _:\n            return UnknownErrorCode\n
"},{"location":"reference/Internet%20Radio/","title":"Internet Radio","text":""},{"location":"reference/Internet%20Radio/#knuckles._internet_radio.InternetRadio","title":"InternetRadio(api, subsonic)","text":"

Class that contains all the methods needed to interact with the internet radio endpoints in the Subsonic API.

Source code in src/knuckles/_internet_radio.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Internet%20Radio/#knuckles._internet_radio.InternetRadio.create_internet_radio_station","title":"create_internet_radio_station(stream_url, name, homepage_url=None)","text":"

Create a new internet radio station.

Parameters:

Name Type Description Default stream_url str

The URL of the stream to be added to the internet radio station.

required name str

The name of the new created internet radio station.

required homepage_url str | None

An URL for the homepage of the internet radio station.

None

Returns:

Type Description Subsonic

An object that holds all the data about the new created internet radio station.

Source code in src/knuckles/_internet_radio.py
def create_internet_radio_station(\n    self, stream_url: str, name: str, homepage_url: str | None = None\n) -> \"Subsonic\":\n    \"\"\"Create a new internet radio station.\n\n    Args:\n        stream_url: The URL of the stream to be added to the\n            internet radio station.\n        name: The name of the new created internet radio station.\n        homepage_url: An URL for the homepage of the internet\n            radio station.\n\n    Returns:\n        An object that holds all the data about the new created\n            internet radio station.\n    \"\"\"\n\n    self.api.json_request(\n        \"createInternetRadioStation\",\n        {\"streamUrl\": stream_url, \"name\": name, \"homepageUrl\": homepage_url},\n    )\n\n    return self.subsonic\n
"},{"location":"reference/Internet%20Radio/#knuckles._internet_radio.InternetRadio.delete_internet_radio_station","title":"delete_internet_radio_station(internet_radio_station_id)","text":"

Delete an internet radio station.

Parameters:

Name Type Description Default internet_radio_station_id str

The ID of the internet radio station to delete.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_internet_radio.py
def delete_internet_radio_station(\n    self, internet_radio_station_id: str\n) -> \"Subsonic\":\n    \"\"\"Delete an internet radio station.\n\n    Args:\n        internet_radio_station_id: The ID of the internet radio station\n            to delete.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n    self.api.json_request(\n        \"deleteInternetRadioStation\", {\"id\": internet_radio_station_id}\n    )\n\n    return self.subsonic\n
"},{"location":"reference/Internet%20Radio/#knuckles._internet_radio.InternetRadio.get_internet_radio_station","title":"get_internet_radio_station(internet_radio_station_id)","text":"

Get all the info related with a internet radio station.

Parameters:

Name Type Description Default internet_radio_station_id str

The ID of the internet radio station to get its info.

required

Returns:

Type Description InternetRadioStation | None

An object that contains all the info about the requested internet radio station.

Source code in src/knuckles/_internet_radio.py
def get_internet_radio_station(\n    self, internet_radio_station_id: str\n) -> InternetRadioStation | None:\n    \"\"\"Get all the info related with a internet radio station.\n\n    Args:\n        internet_radio_station_id: The ID of the internet radio station\n            to get its info.\n\n    Returns:\n        An object that contains all the info about the requested\n            internet radio station.\n    \"\"\"\n\n    stations = self.get_internet_radio_stations()\n\n    for station in stations:\n        if station.id == internet_radio_station_id:\n            return station\n\n    return None\n
"},{"location":"reference/Internet%20Radio/#knuckles._internet_radio.InternetRadio.get_internet_radio_stations","title":"get_internet_radio_stations()","text":"

Get all the internet radio stations available in the server.

Returns:

Type Description list[InternetRadioStation]

A list with all the reported internet radio stations.

Source code in src/knuckles/_internet_radio.py
def get_internet_radio_stations(\n    self,\n) -> list[InternetRadioStation]:\n    \"\"\"Get all the internet radio stations available in the server.\n\n    Returns:\n        A list with all the reported internet radio stations.\n    \"\"\"\n\n    response = self.api.json_request(\"getInternetRadioStations\")[\n        \"internetRadioStations\"\n    ][\"internetRadioStation\"]\n\n    return [InternetRadioStation(self.subsonic, **station) for station in response]\n
"},{"location":"reference/Internet%20Radio/#knuckles._internet_radio.InternetRadio.update_internet_radio_station","title":"update_internet_radio_station(internet_radio_station_id, stream_url, name, homepage_url=None)","text":"

Update the data of an internet radio station.

Parameters:

Name Type Description Default internet_radio_station_id str

The ID of the internet radio station to edit its data.

required stream_url str

A new stream URL for the internet radio station.

required name str

a new name for the internet radio station.

required homepage_url str | None

A new homepage URL for the internet radio station.

None

Returns:

Type Description Subsonic

An object that holds all the data about the new updated internet radio station.

Source code in src/knuckles/_internet_radio.py
def update_internet_radio_station(\n    self,\n    internet_radio_station_id: str,\n    stream_url: str,\n    name: str,\n    homepage_url: str | None = None,\n) -> \"Subsonic\":\n    \"\"\"Update the data of an internet radio station.\n\n    Args:\n        internet_radio_station_id: The ID of the internet radio station\n            to edit its data.\n        stream_url: A new stream URL for the internet radio station.\n        name: a new name for the internet radio station.\n        homepage_url: A new homepage URL for the internet radio\n            station.\n\n    Returns:\n        An object that holds all the data about the new updated\n            internet radio station.\n    \"\"\"\n    self.api.json_request(\n        \"updateInternetRadioStation\",\n        {\n            \"id\": internet_radio_station_id,\n            \"streamUrl\": stream_url,\n            \"name\": name,\n            \"homepageUrl\": homepage_url,\n        },\n    )\n\n    return self.subsonic\n
"},{"location":"reference/Jukebox/","title":"Jukebox","text":""},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl","title":"JukeboxControl(api, subsonic)","text":"

Class that contains all the methods needed to interact with the jukebox control endpoint in the Subsonic API.

Source code in src/knuckles/_jukebox.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.add","title":"add(songs_ids)","text":"

Add songs to the jukebox playlist.

Parameters:

Name Type Description Default songs_ids list[str]

A list of song IDs to add to the jukebox playlist.

required

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in src/knuckles/_jukebox.py
def add(self, songs_ids: list[str]) -> Jukebox:\n    \"\"\"Add songs to the jukebox playlist.\n\n    Args:\n        songs_ids: A list of song IDs to add to the jukebox playlist.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"jukeboxControl\", {\"action\": \"add\", \"id\": songs_ids}\n    )[\"jukeboxStatus\"]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.clear","title":"clear()","text":"

Clear the playlist of the jukebox.

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in src/knuckles/_jukebox.py
def clear(self) -> Jukebox:\n    \"\"\"Clear the playlist of the jukebox.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n    response = self.api.json_request(\"jukeboxControl\", {\"action\": \"clear\"})[\n        \"jukeboxStatus\"\n    ]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.get","title":"get()","text":"

Get all the info related with the current playlist of the jukebox.

Returns:

Type Description Jukebox

An object that holds all the info related with the playlist of the jukebox.

Source code in src/knuckles/_jukebox.py
def get(self) -> Jukebox:\n    \"\"\"Get all the info related with the current playlist of\n    the jukebox.\n\n    Returns:\n        An object that holds all the info related with\n            the playlist of the jukebox.\n    \"\"\"\n\n    response = self.api.json_request(\"jukeboxControl\", {\"action\": \"get\"})[\n        \"jukeboxPlaylist\"\n    ]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.remove","title":"remove(index)","text":"

Remove a song from the playlist of the jukebox.

Parameters:

Name Type Description Default index int

The index of the song to remove from the playlist.

required

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in src/knuckles/_jukebox.py
def remove(self, index: int) -> Jukebox:\n    \"\"\"Remove a song from the playlist of the jukebox.\n\n    Args:\n        index: The index of the song to remove from the playlist.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"jukeboxControl\", {\"action\": \"remove\", \"index\": index}\n    )[\"jukeboxStatus\"]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.set","title":"set(songs_ids)","text":"

Set the song playlist for the jukebox.

Parameters:

Name Type Description Default songs_ids list[str]

A list of song IDs to set the jukebox playlist.

required

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in src/knuckles/_jukebox.py
def set(self, songs_ids: list[str]) -> Jukebox:\n    \"\"\"Set the song playlist for the jukebox.\n\n    Args:\n        songs_ids: A list of song IDs to set the jukebox playlist.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"jukeboxControl\", {\"action\": \"set\", \"id\": songs_ids}\n    )[\"jukeboxStatus\"]\n\n    # Preset the song list as this call changes it in a predictable way\n    return Jukebox(\n        self.subsonic, **response, entry=[{\"id\": song_id} for song_id in songs_ids]\n    )\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.set_gain","title":"set_gain(gain)","text":"

Set the gain of the playback of the jukebox.

Parameters:

Name Type Description Default gain float

A number between 0 and 1 (inclusive) to be set as the gain.

required

Raises:

Type Description ValueError

Raised if the given gain is not between 0 and 1.

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in src/knuckles/_jukebox.py
def set_gain(self, gain: float) -> Jukebox:\n    \"\"\"Set the gain of the playback of the jukebox.\n\n    Args:\n        gain: A number between 0 and 1 (inclusive) to be set as the gain.\n\n    Raises:\n        ValueError: Raised if the given gain is not between 0 and 1.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    if not 1 > gain > 0:\n        raise ValueError(\"The gain should be between 0 and 1 (inclusive)\")\n\n    response = self.api.json_request(\n        \"jukeboxControl\", {\"action\": \"setGain\", \"gain\": gain}\n    )[\"jukeboxStatus\"]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.shuffle","title":"shuffle()","text":"

Shuffle all the songs in the playlist of the jukebox.

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in src/knuckles/_jukebox.py
def shuffle(self) -> Jukebox:\n    \"\"\"Shuffle all the songs in the playlist of the jukebox.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\"jukeboxControl\", {\"action\": \"shuffle\"})[\n        \"jukeboxStatus\"\n    ]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.skip","title":"skip(index, offset=0)","text":"

Skip the playback of the current song in the jukebox playlist.

Parameters:

Name Type Description Default index int

The index of the song to skip to.

required offset float

The offset of seconds to start playing the next song.

0

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in src/knuckles/_jukebox.py
def skip(self, index: int, offset: float = 0) -> Jukebox:\n    \"\"\"Skip the playback of the current song in the jukebox playlist.\n\n    Args:\n        index: The index of the song to skip to.\n        offset: The offset of seconds to start playing the next song.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"jukeboxControl\", {\"action\": \"skip\", \"index\": index, \"offset\": offset}\n    )[\"jukeboxStatus\"]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.start","title":"start()","text":"

Start the playback of the current song in the jukebox playlist.

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in src/knuckles/_jukebox.py
def start(self) -> Jukebox:\n    \"\"\"Start the playback of the current song in the jukebox playlist.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\"jukeboxControl\", {\"action\": \"start\"})[\n        \"jukeboxStatus\"\n    ]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.status","title":"status()","text":"

Get all the info related with the current state of the jukebox.

Returns:

Type Description Jukebox

An object that holds all the info related with the scate of the jukebox.

Source code in src/knuckles/_jukebox.py
def status(self) -> Jukebox:\n    \"\"\"Get all the info related with the current state of\n    the jukebox.\n\n    Returns:\n        An object that holds all the info related with\n            the scate of the jukebox.\n    \"\"\"\n\n    response = self.api.json_request(\"jukeboxControl\", {\"action\": \"status\"})[\n        \"jukeboxStatus\"\n    ]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.stop","title":"stop()","text":"

Stop the playback of the current song in the jukebox playlist.

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in src/knuckles/_jukebox.py
def stop(self) -> Jukebox:\n    \"\"\"Stop the playback of the current song in the jukebox playlist.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\"jukeboxControl\", {\"action\": \"stop\"})[\n        \"jukeboxStatus\"\n    ]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Lists/","title":"Lists","text":""},{"location":"reference/Lists/#knuckles._lists.Lists","title":"Lists(api, subsonic)","text":"

Class that contains all the methods needed to interact with the lists endpoints in the Subsonic API.

Source code in src/knuckles/_lists.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_alphabetical_by_artist","title":"get_album_list_alphabetical_by_artist(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized alphabetically by their artist name. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized alphabetically by their artist name.

Source code in src/knuckles/_lists.py
def get_album_list_alphabetical_by_artist(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized alphabetically\n    by their artist name. Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized alphabetically by their artist name.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"alphabeticalByArtist\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_alphabetical_by_artist_non_id3","title":"get_album_list_alphabetical_by_artist_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized alphabetically by their artist name. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized alphabetically by their artist name.

Source code in src/knuckles/_lists.py
def get_album_list_alphabetical_by_artist_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized alphabetically\n    by their artist name. Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized alphabetically by their artist name.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"alphabeticalByArtist\",\n        num_of_albums,\n        album_list_offset,\n        music_folder_id,\n        False,\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_alphabetical_by_name","title":"get_album_list_alphabetical_by_name(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized alphabetically by their names. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized alphabetically by their names.

Source code in src/knuckles/_lists.py
def get_album_list_alphabetical_by_name(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized alphabetically\n    by their names. Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized alphabetically by their names.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"alphabeticalByName\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_alphabetical_by_name_non_id3","title":"get_album_list_alphabetical_by_name_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized alphabetically by their names. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized alphabetically by their names.

Source code in src/knuckles/_lists.py
def get_album_list_alphabetical_by_name_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized alphabetically\n    by their names. Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized alphabetically by their names.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"alphabeticalByName\",\n        num_of_albums,\n        album_list_offset,\n        music_folder_id,\n        False,\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_by_genre","title":"get_album_list_by_genre(genre_name, num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get all the albums that are tagged with the given genre. Not organized according ID3 tags.

Parameters:

Name Type Description Default genre_name str

The name of the genre that all the albums must be tagged with.

required num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums that are tagged with the given album.

Source code in src/knuckles/_lists.py
def get_album_list_by_genre(\n    self,\n    genre_name: str,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get all the albums that are tagged with the given genre. Not organized\n    according ID3 tags.\n\n    Args:\n        genre_name: The name of the genre that all the albums must be tagged\n            with.\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            that are tagged with the given album.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"byGenre\",\n        num_of_albums,\n        album_list_offset,\n        music_folder_id,\n        genre=genre_name,\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_by_genre_non_id3","title":"get_album_list_by_genre_non_id3(genre_name, num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get all the albums that are tagged with the given genre. Not organized according ID3 tags.

Parameters:

Name Type Description Default genre_name str

The name of the genre that all the albums must be tagged with.

required num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums that are tagged with the given album.

Source code in src/knuckles/_lists.py
def get_album_list_by_genre_non_id3(\n    self,\n    genre_name: str,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get all the albums that are tagged with the given genre.\n    Not organized according ID3 tags.\n\n    Args:\n        genre_name: The name of the genre that all the albums\n            must be tagged with.\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            that are tagged with the given album.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"byGenre\",\n        num_of_albums,\n        album_list_offset,\n        music_folder_id,\n        False,\n        genre=genre_name,\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_by_year","title":"get_album_list_by_year(from_year, to_year, num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get all the album registered by the server that were created between the given year range.

Parameters:

Name Type Description Default from_year int

The minimum year of the range where the albums were created.

required to_year int

The maximum year of the range where the albums were created.

required num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums that where released in the given year range.

Source code in src/knuckles/_lists.py
def get_album_list_by_year(\n    self,\n    from_year: int,\n    to_year: int,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get all the album registered by the server that were created between\n    the given year range.\n\n    Args:\n        from_year: The minimum year of the range where the albums\n            were created.\n        to_year: The maximum year of the range where the albums\n            were created.\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            that where released in the given year range.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"byYear\",\n        num_of_albums,\n        album_list_offset,\n        music_folder_id,\n        fromYear=from_year,\n        toYear=to_year,\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_by_year_non_id3","title":"get_album_list_by_year_non_id3(from_year, to_year, num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get all the album registered by the server that were created between the given year range.

Parameters:

Name Type Description Default from_year int

The minimum year of the range where the albums were created.

required to_year int

The maximum year of the range where the albums were created.

required num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums that where released in the given year range.

Source code in src/knuckles/_lists.py
def get_album_list_by_year_non_id3(\n    self,\n    from_year: int,\n    to_year: int,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get all the album registered by the server that were created between\n    the given year range.\n\n    Args:\n        from_year: The minimum year of the range where the albums\n            were created.\n        to_year: The maximum year of the range where the albums\n            were created.\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            that where released in the given year range.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"byYear\",\n        num_of_albums,\n        album_list_offset,\n        music_folder_id,\n        False,\n        fromYear=from_year,\n        toYear=to_year,\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_frequent","title":"get_album_list_frequent(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the most frequent listened to the least. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from the most frequent listened to the least.

Source code in src/knuckles/_lists.py
def get_album_list_frequent(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the most frequent listened to the least.\n    Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from the most frequent listened to the least.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"frequent\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_frequent_non_id3","title":"get_album_list_frequent_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the most frequent listened to the least. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from the most frequent listened to the least.

Source code in src/knuckles/_lists.py
def get_album_list_frequent_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the most frequent listened to the least.\n    Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from the most frequent listened to the least.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"frequent\", num_of_albums, album_list_offset, music_folder_id, False\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_highest","title":"get_album_list_highest(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the highest rated to the lowest ones. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

The number of albums to be in the list.

None album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from the highest rated to the lowest ones.

Source code in src/knuckles/_lists.py
def get_album_list_highest(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the highest rated to the lowest ones. Not organized according ID3 tags.\n\n    Args:\n        num_of_albums: The number of albums to be in the list.\n        album_list_offset: The number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: The ID of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from the highest rated to the lowest ones.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"highest\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_highest_non_id3","title":"get_album_list_highest_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the highest rated to the lowest ones. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

The number of albums to be in the list.

None album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from the highest rated to the lowest ones.

Source code in src/knuckles/_lists.py
def get_album_list_highest_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the highest rated to the lowest ones. Not organized according ID3 tags.\n\n    Args:\n        num_of_albums: The number of albums to be in the list.\n        album_list_offset: The number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: The ID of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from the highest rated to the lowest ones.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"highest\", num_of_albums, album_list_offset, music_folder_id, False\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_newest","title":"get_album_list_newest(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the newest added to the oldest. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

The number of albums to be in the list.

None album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from newest to oldest.

Source code in src/knuckles/_lists.py
def get_album_list_newest(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the newest added to the oldest. Not organized according ID3 tags.\n\n    Args:\n        num_of_albums: The number of albums to be in the list.\n        album_list_offset: The number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: The ID of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from newest to oldest.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"newest\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_newest_non_id3","title":"get_album_list_newest_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the newest added to the oldest. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

The number of albums to be in the list.

None album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from newest to oldest.

Source code in src/knuckles/_lists.py
def get_album_list_newest_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the newest added to the oldest. Not organized according ID3 tags.\n\n    Args:\n        num_of_albums: The number of albums to be in the list.\n        album_list_offset: The number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: The ID of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from newest to oldest.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"newest\", num_of_albums, album_list_offset, music_folder_id, False\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_random","title":"get_album_list_random(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a random list of albums from the server.

Parameters:

Name Type Description Default num_of_albums int | None

The number of albums to be in the list.

None album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about random albums.

Source code in src/knuckles/_lists.py
def get_album_list_random(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a random list of albums from the server.\n\n    Args:\n        num_of_albums: The number of albums to be in the list.\n        album_list_offset: The number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: The ID of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about random albums.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"random\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_random_non_id3","title":"get_album_list_random_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a random list of albums from the server. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

The number of albums to be in the list.

None album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about random albums.

Source code in src/knuckles/_lists.py
def get_album_list_random_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a random list of albums from the server. Not organized\n    according ID3 tags.\n\n    Args:\n        num_of_albums: The number of albums to be in the list.\n        album_list_offset: The number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: The ID of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about random albums.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"random\", num_of_albums, album_list_offset, music_folder_id, False\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_recent","title":"get_album_list_recent(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the most recent listened to the least. not organized according id3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from the most recent listened to the least.

Source code in src/knuckles/_lists.py
def get_album_list_recent(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the most recent listened to the least.\n    not organized according id3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from the most recent listened to the least.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"recent\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_recent_non_id3","title":"get_album_list_recent_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the most recent listened to the least. not organized according id3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from the most recent listened to the least.

Source code in src/knuckles/_lists.py
def get_album_list_recent_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the most recent listened to the least.\n    not organized according id3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from the most recent listened to the least.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"recent\", num_of_albums, album_list_offset, music_folder_id, False\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_starred","title":"get_album_list_starred(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of the albums that have been starred by the authenticated user. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums starred by the user.

Source code in src/knuckles/_lists.py
def get_album_list_starred(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of the albums that have been starred by\n    the authenticated user. Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            starred by the user.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"starred\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_starred_non_id3","title":"get_album_list_starred_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of the albums that have been starred by the authenticated user. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums starred by the user.

Source code in src/knuckles/_lists.py
def get_album_list_starred_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of the albums that have been starred by\n    the authenticated user. Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            starred by the user.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"starred\", num_of_albums, album_list_offset, music_folder_id, False\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_now_playing","title":"get_now_playing()","text":"

Get the songs that are currently playing by all the users.

Returns:

Type Description list[NowPlayingEntry]

A list that holds all the info about all the song that are current playing by all the users.

Source code in src/knuckles/_lists.py
def get_now_playing(self) -> list[NowPlayingEntry]:\n    \"\"\"Get the songs that are currently playing by all the users.\n\n    Returns:\n        A list that holds all the info about all the\n            song that are current playing by all the users.\n    \"\"\"\n\n    response = self.api.json_request(\"getNowPlaying\")[\"nowPlaying\"][\"entry\"]\n\n    return [NowPlayingEntry(subsonic=self.subsonic, **entry) for entry in response]\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_random_songs","title":"get_random_songs(num_of_songs=None, genre_name=None, from_year=None, to_year=None, music_folder_id=None)","text":"

Get random songs registered in the server.

Parameters:

Name Type Description Default num_of_songs int | None

The number of songs to return.

None genre_name str | None

The genre that the songs must have it tagged on them.

None from_year int | None

The minimum year where the songs were released.

None to_year int | None

The maximum year where the songs were released.

None music_folder_id str | None

An ID of a music folder to limit where the songs should be from.

None

Returns:

Type Description list[Song]

A list that contains all the info about that were randomly selected by the server.

Source code in src/knuckles/_lists.py
def get_random_songs(\n    self,\n    num_of_songs: int | None = None,\n    genre_name: str | None = None,\n    from_year: int | None = None,\n    to_year: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Song]:\n    \"\"\"Get random songs registered in the server.\n\n    Args:\n        num_of_songs: The number of songs to return.\n        genre_name: The genre that the songs must\n            have it tagged on them.\n        from_year: The minimum year where the songs\n            were released.\n        to_year: The maximum year where the songs\n            were released.\n        music_folder_id: An ID of a music folder\n            to limit where the songs should be from.\n\n    Returns:\n        A list that contains all the info about\n            that were randomly selected by the server.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getRandomSongs\",\n        {\n            \"size\": num_of_songs,\n            \"genre\": genre_name,\n            \"fromYear\": from_year,\n            \"toYear\": to_year,\n            \"musicFolderId\": music_folder_id,\n        },\n    )[\"randomSongs\"][\"song\"]\n\n    return [Song(subsonic=self.subsonic, **song) for song in response]\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_songs_by_genre","title":"get_songs_by_genre(genre_name, num_of_songs=None, song_list_offset=None, music_folder_id=None)","text":"

Get all the songs tagged with the given genre.

Parameters:

Name Type Description Default genre_name str

The name of the genre that all the songs must be tagged with.

required num_of_songs int | None

The number of songs that the list should have.

None song_list_offset int | None

the number of songs to offset in the list, useful for pagination.

None music_folder_id str | None

An ID of a music folder where all the songs should be from.

None

Returns:

Type Description list[Song]

A list that contains all the info about that are tagged with the given genre.

Source code in src/knuckles/_lists.py
def get_songs_by_genre(\n    self,\n    genre_name: str,\n    num_of_songs: int | None = None,\n    song_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Song]:\n    \"\"\"Get all the songs tagged with the given genre.\n\n    Args:\n        genre_name: The name of the genre that all the songs\n            must be tagged with.\n        num_of_songs: The number of songs that the list\n            should have.\n        song_list_offset: the number of songs to offset in the list,\n            useful for pagination.\n        music_folder_id: An ID of a music folder where all the songs\n            should be from.\n\n    Returns:\n        A list that contains all the info about\n            that are tagged with the given genre.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getSongsByGenre\",\n        {\n            \"genre\": genre_name,\n            \"count\": num_of_songs,\n            \"offset\": song_list_offset,\n            \"musicFolderId\": music_folder_id,\n        },\n    )[\"songsByGenre\"][\"song\"]\n\n    return [Song(subsonic=self.subsonic, **song) for song in response]\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_starred","title":"get_starred(music_folder_id=None)","text":"

Get all the songs, albums and artists starred by the authenticated user.

Parameters:

Name Type Description Default music_folder_id str | None

An ID of a music folder where all the songs albums, and artists should be from.

None

Returns:

Type Description StarredContent

An object that holds all the info about all the starred songs, albums and artists by the user.

Source code in src/knuckles/_lists.py
def get_starred(self, music_folder_id: str | None = None) -> StarredContent:\n    \"\"\"Get all the songs, albums and artists starred by the authenticated\n    user.\n\n    Args:\n        music_folder_id: An ID of a music folder where all the songs\n            albums, and artists should be from.\n\n    Returns:\n        An object that holds all the info about all the starred\n            songs, albums and artists by the user.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getStarred2\", {\"musicFolderId\": music_folder_id}\n    )[\"starred2\"]\n\n    return StarredContent(subsonic=self.subsonic, **response)\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_starred_non_id3","title":"get_starred_non_id3(music_folder_id=None)","text":"

Get all the songs, albums and artists starred by the authenticated user. Not organized according ID3 tags.

Parameters:

Name Type Description Default music_folder_id str | None

An ID of a music folder where all the songs albums, and artists should be from.

None

Returns:

Type Description StarredContent

An object that holds all the info about all the starred songs, albums and artists by the user.

Source code in src/knuckles/_lists.py
def get_starred_non_id3(self, music_folder_id: str | None = None) -> StarredContent:\n    \"\"\"Get all the songs, albums and artists starred by the authenticated\n    user. Not organized according ID3 tags.\n\n    Args:\n        music_folder_id: An ID of a music folder where all the songs\n            albums, and artists should be from.\n\n    Returns:\n        An object that holds all the info about all the starred\n            songs, albums and artists by the user.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getStarred\", {\"musicFolderId\": music_folder_id}\n    )[\"starred\"]\n\n    return StarredContent(subsonic=self.subsonic, **response)\n
"},{"location":"reference/Media%20Annotation/","title":"Media Annotation","text":""},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation","title":"MediaAnnotation(api, subsonic)","text":"

Class that contains all the methods needed to interact with the media annotations endpoints in the Subsonic API.

Source code in src/knuckles/_media_annotation.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n    self.subsonic = subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.remove_rating","title":"remove_rating(song_id)","text":"

Remove the rating entry of a song.

Parameters:

Name Type Description Default song_id str

The ID of the song which entry should be removed.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_media_annotation.py
def remove_rating(self, song_id: str) -> \"Subsonic\":\n    \"\"\"Remove the rating entry of a song.\n\n    Args:\n        song_id: The ID of the song which entry should\n            be removed.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"setRating\", {\"id\": song_id, \"rating\": 0})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.scrobble","title":"scrobble(song_id, time, submission=True)","text":"

Scrobble (register) that some song have been locally played or is being played.

Parameters:

Name Type Description Default song_id list[str]

The ID of the song to scrobble.

required time list[datetime]

How many times in second the song has been listened.

required submission bool

If true it will be registered that the song was played, if false the song will be scrobble as now playing.

True

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_media_annotation.py
def scrobble(\n    self, song_id: list[str], time: list[datetime], submission: bool = True\n) -> \"Subsonic\":\n    \"\"\"Scrobble (register) that some song have been locally played or\n    is being played.\n\n    Args:\n        song_id: The ID of the song to scrobble.\n        time: How many times in second the song has been listened.\n        submission: If true it will be registered that the song **was\n            played**, if false the song will be scrobble as\n            **now playing**.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n    self.api.json_request(\n        \"scrobble\",\n        # Multiply by 1000 because the API uses\n        # milliseconds instead of seconds for UNIX time\n        {\n            \"id\": song_id,\n            \"time\": [int(seconds.timestamp()) * 1000 for seconds in time],\n            \"submission\": submission,\n        },\n    )\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.set_rating","title":"set_rating(song_id, rating)","text":"

The the rating of a song.

Parameters:

Name Type Description Default song_id str

The ID of the song to set its rating.

required rating int

The rating between 1 and 5 (inclusive) to set the rating of the song to.

required

Raises:

Type Description InvalidRatingNumber

Raised when a number that is not between 1 and 5 (inclusive) has been pass in into the rating parameter.

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_media_annotation.py
def set_rating(self, song_id: str, rating: int) -> \"Subsonic\":\n    \"\"\"The the rating of a song.\n\n    Args:\n        song_id: The ID of the song to set its rating.\n        rating: The rating between 1 and 5 (inclusive) to set\n            the rating of the song to.\n\n    Raises:\n        InvalidRatingNumber: Raised when a number that is not\n            between 1 and 5 (inclusive) has been pass in into\n            the `rating` parameter.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    if rating not in range(1, 6):\n        raise InvalidRatingNumber(\n            (\n                \"Invalid rating number, \"\n                + \"only numbers between 1 and 5 (inclusive) are allowed\"\n            )\n        )\n\n    self.api.json_request(\"setRating\", {\"id\": song_id, \"rating\": rating})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.star_album","title":"star_album(album_id)","text":"

Star an album from the server.

Parameters:

Name Type Description Default album_id str

The ID of the album to star.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_media_annotation.py
def star_album(self, album_id: str) -> \"Subsonic\":\n    \"\"\"Star an album from the server.\n\n    Args:\n        album_id: The ID of the album to star.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"star\", {\"albumId\": album_id})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.star_artist","title":"star_artist(artist_id)","text":"

Star an artist from the server.

Parameters:

Name Type Description Default artist_id str

The ID of the artist to star.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_media_annotation.py
def star_artist(self, artist_id: str) -> \"Subsonic\":\n    \"\"\"Star an artist from the server.\n\n    Args:\n        artist_id: The ID of the artist to star.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"star\", {\"artistId\": artist_id})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.star_song","title":"star_song(song_id)","text":"

Star a song from the server.

Parameters:

Name Type Description Default song_id str

The ID of the song to star.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_media_annotation.py
def star_song(self, song_id: str) -> \"Subsonic\":\n    \"\"\"Star a song from the server.\n\n    Args:\n        song_id: The ID of the song to star.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"star\", {\"id\": song_id})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.unstar_album","title":"unstar_album(album_id)","text":"

Unstar an album from the server.

Parameters:

Name Type Description Default album_id str

The ID of the album to unstar.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_media_annotation.py
def unstar_album(self, album_id: str) -> \"Subsonic\":\n    \"\"\"Unstar an album from the server.\n\n    Args:\n        album_id: The ID of the album to unstar.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"unstar\", {\"albumId\": album_id})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.unstar_artist","title":"unstar_artist(artist_id)","text":"

Unstar an artist from the server.

Parameters:

Name Type Description Default artist_id str

The ID of the artist to unstar.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_media_annotation.py
def unstar_artist(self, artist_id: str) -> \"Subsonic\":\n    \"\"\"Unstar an artist from the server.\n\n    Args:\n        artist_id: The ID of the artist to unstar.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"unstar\", {\"artistId\": artist_id})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.unstar_song","title":"unstar_song(song_id)","text":"

Unstar a song from the server.

Parameters:

Name Type Description Default song_id str

The ID of the song to unstar.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_media_annotation.py
def unstar_song(self, song_id: str) -> \"Subsonic\":\n    \"\"\"Unstar a song from the server.\n\n    Args:\n        song_id: The ID of the song to unstar.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"unstar\", {\"id\": song_id})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Library%20Scanning/","title":"Media Library Scanning","text":""},{"location":"reference/Media%20Library%20Scanning/#knuckles._media_library_scanning.MediaLibraryScanning","title":"MediaLibraryScanning(api, subsonic)","text":"

Class that contains all the methods needed to interact with the media library scanning endpoints in the Subsonic API.

Source code in src/knuckles/_media_library_scanning.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Media%20Library%20Scanning/#knuckles._media_library_scanning.MediaLibraryScanning.get_scan_status","title":"get_scan_status()","text":"

Get the status of the scanning of the library.

Returns:

Type Description ScanStatus

An object that holds all the info about the current state of the scanning of the library.

Source code in src/knuckles/_media_library_scanning.py
def get_scan_status(self) -> ScanStatus:\n    \"\"\"Get the status of the scanning of the library.\n\n    Returns:\n        An object that holds all the info about the\n            current state of the scanning of the library.\n    \"\"\"\n\n    response = self.api.json_request(\"getScanStatus\")[\"scanStatus\"]\n\n    return ScanStatus(self.subsonic, **response)\n
"},{"location":"reference/Media%20Library%20Scanning/#knuckles._media_library_scanning.MediaLibraryScanning.start_scan","title":"start_scan()","text":"

Request to the server to start a scanning of the library.

Returns:

Type Description ScanStatus

An object that holds all the info about the current state of the scanning of the library.

Source code in src/knuckles/_media_library_scanning.py
def start_scan(self) -> ScanStatus:\n    \"\"\"Request to the server to start a scanning of the library.\n\n    Returns:\n        An object that holds all the info about the\n            current state of the scanning of the library.\n    \"\"\"\n\n    response = self.api.json_request(\"startScan\")[\"scanStatus\"]\n\n    return ScanStatus(self.subsonic, **response)\n
"},{"location":"reference/Media%20Retrieval/","title":"Media Retrieval","text":""},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval","title":"MediaRetrieval(api, subsonic)","text":"

Class that contains all the methods needed to interact with the media retrieval endpoints in the Subsonic API.

Source code in src/knuckles/_media_retrieval.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n    self.subsonic = subsonic\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.download","title":"download(song_or_video_id, file_or_directory_path)","text":"

Download a song or video from the server.

Parameters:

Name Type Description Default song_or_video_id str

The ID of the song or video to download.

required file_or_directory_path Path

The path where the downloaded file should be saved. If the given path is a directory then the file will be downloaded inside of it, if its a valid file path it will be downloaded using this exact filename.

required

Returns:

Type Description Path

The path where the song or video was finally saved.

Source code in src/knuckles/_media_retrieval.py
def download(self, song_or_video_id: str, file_or_directory_path: Path) -> Path:\n    \"\"\"Download a song or video from the server.\n\n    Args:\n        song_or_video_id: The ID of the song or video to download.\n        file_or_directory_path: The path where the downloaded file should\n            be saved. If the given path is a directory then the file will\n            be downloaded inside of it, if its a valid file path it will be\n            downloaded using this exact filename.\n\n    Returns:\n        The path where the song or video was finally saved.\n    \"\"\"\n\n    response = self.api.raw_request(\"download\", {\"id\": song_or_video_id})\n\n    def determinate_filename(file_response: Response) -> str:\n        filename = (\n            file_response.headers[\"Content-Disposition\"]\n            .split(\"filename=\")[1]\n            .strip()\n        )\n\n        # Remove leading quote char\n        if filename[0] == '\"':\n            filename = filename[1:]\n\n        # Remove trailing quote char\n        if filename[-1] == '\"':\n            filename = filename[:-1]\n\n        return filename\n\n    return self._handle_download(\n        response, file_or_directory_path, determinate_filename\n    )\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.get_avatar","title":"get_avatar(username, file_or_directory_path)","text":"

Download the avatar image of a user from the server.

Parameters:

Name Type Description Default username str

The username of the user to get its avatar from.

required file_or_directory_path Path

The path where the downloaded file should be saved. If the given path is a directory then the file will be downloaded inside of it, if its a valid file path it will be downloaded using this exact filename.

required

Returns:

Type Description Path

The path where the avatar image was finally saved.

Source code in src/knuckles/_media_retrieval.py
def get_avatar(self, username: str, file_or_directory_path: Path) -> Path:\n    \"\"\"Download the avatar image of a user from the server.\n\n    Args:\n        username: The username of the user to get its avatar from.\n        file_or_directory_path: The path where the downloaded file should\n            be saved. If the given path is a directory then the file will\n            be downloaded inside of it, if its a valid file path it will be\n            downloaded using this exact filename.\n\n    Returns:\n        The path where the avatar image was finally saved.\n    \"\"\"\n\n    response = self.api.raw_request(\"getAvatar\", {\"username\": username})\n\n    def determinate_filename(file_response: Response) -> str:\n        file_extension = guess_extension(\n            file_response.headers[\"content-type\"].partition(\";\")[0].strip()\n        )\n\n        return username + file_extension if file_extension else username\n\n    return self._handle_download(\n        response, file_or_directory_path, determinate_filename\n    )\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.get_captions","title":"get_captions(caption_id, file_or_directory_path, subtitles_file_format=SubtitlesFileFormat.VTT)","text":"

Download a video caption file from the server.

Parameters:

Name Type Description Default caption_id str

The ID of the caption to download.

required file_or_directory_path Path

The path where the downloaded file should be saved. If the given path is a directory then the file will be downloaded inside of it, if its a valid file path it will be downloaded using this exact filename.

required subtitles_file_format SubtitlesFileFormat

The format that the subtitle file should have.

VTT

Returns:

Type Description Path

The path where the captions was finally saved.

Source code in src/knuckles/_media_retrieval.py
def get_captions(\n    self,\n    caption_id: str,\n    file_or_directory_path: Path,\n    subtitles_file_format: SubtitlesFileFormat = SubtitlesFileFormat.VTT,\n) -> Path:\n    \"\"\"Download a video caption file from the server.\n\n    Args:\n        caption_id: The ID of the caption to download.\n        file_or_directory_path: The path where the downloaded file should\n            be saved. If the given path is a directory then the file will\n            be downloaded inside of it, if its a valid file path it will be\n            downloaded using this exact filename.\n        subtitles_file_format: The format that the subtitle file should\n            have.\n\n    Returns:\n        The path where the captions was finally saved.\n    \"\"\"\n\n    # Check if the given file format is a valid one\n    SubtitlesFileFormat(subtitles_file_format.value)\n\n    response = self.api.raw_request(\n        \"getCaptions\",\n        {\"id\": caption_id, \"format\": subtitles_file_format.value},\n    )\n\n    def determinate_filename(file_response: Response) -> str:\n        mime_type = file_response.headers[\"content-type\"].partition(\";\")[0].strip()\n\n        # application/x-subrip is not a valid MIME TYPE so a manual check is needed\n        file_extension: str | None = None\n        if mime_type == \"application/x-subrip\":\n            file_extension = \".srt\"\n        else:\n            file_extension = guess_extension(mime_type)\n\n        return caption_id + file_extension if file_extension else caption_id\n\n    return self._handle_download(\n        response, file_or_directory_path, determinate_filename\n    )\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.get_cover_art","title":"get_cover_art(cover_art_id, file_or_directory_path, size=None)","text":"

Download the cover art from the server.

Parameters:

Name Type Description Default cover_art_id str

The ID of the cover art to download.

required file_or_directory_path Path

The path where the downloaded file should be saved. If the given path is a directory then the file will be downloaded inside of it, if its a valid file path it will be downloaded using this exact filename.

required size int | None

The width in pixels that the image should have, the cover arts are always squares.

None

Returns:

Type Description Path

The path where the captions was finally saved.

Source code in src/knuckles/_media_retrieval.py
def get_cover_art(\n    self, cover_art_id: str, file_or_directory_path: Path, size: int | None = None\n) -> Path:\n    \"\"\"Download the cover art from the server.\n\n    Args:\n        cover_art_id: The ID of the cover art to download.\n        file_or_directory_path: The path where the downloaded file should\n            be saved. If the given path is a directory then the file will\n            be downloaded inside of it, if its a valid file path it will be\n            downloaded using this exact filename.\n        size: The width in pixels that the image should have,\n            the cover arts are always squares.\n\n    Returns:\n        The path where the captions was finally saved.\n    \"\"\"\n\n    response = self.api.raw_request(\n        \"getCoverArt\", {\"id\": cover_art_id, \"size\": size}\n    )\n\n    def determinate_filename(file_response: Response) -> str:\n        file_extension = guess_extension(\n            file_response.headers[\"content-type\"].partition(\";\")[0].strip()\n        )\n\n        return cover_art_id + file_extension if file_extension else cover_art_id\n\n    return self._handle_download(\n        response, file_or_directory_path, determinate_filename\n    )\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.get_lyrics","title":"get_lyrics(artist_name=None, song_title=None)","text":"

Get the lyrics of a song.

Parameters:

Name Type Description Default artist_name str | None

The name of the artist that made the song to get its lyrics from.

None song_title str | None

The title of the song to get its lyrics from.

None

Returns:

Type Description Lyrics

An object that contains all the info about the requested lyrics.

Source code in src/knuckles/_media_retrieval.py
def get_lyrics(\n    self, artist_name: str | None = None, song_title: str | None = None\n) -> Lyrics:\n    \"\"\"Get the lyrics of a song.\n\n    Args:\n        artist_name: The name of the artist that made the song to get its\n            lyrics from.\n        song_title: The title of the song to get its lyrics from.\n\n    Returns:\n        An object that contains all the info about the requested\n            lyrics.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getLyrics\", {\"artist\": artist_name, \"title\": song_title}\n    )[\"lyrics\"]\n\n    return Lyrics(subsonic=self.subsonic, **response)\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.hls","title":"hls(song_or_video_id, custom_bitrates=None, audio_track_id=None)","text":"

Get the URL required to stream a song or video with hls.m3u8.

Parameters:

Name Type Description Default song_or_video_id str

The ID of the song or video to stream.

required custom_bitrates list[str] | None

The bitrate that the server should try to limit the stream to. If more that one is specified the server will create a variant playlist, suitable for adaptive bitrate streaming.

None audio_track_id str | None

The ID of an audio track to be added to the stream if video is being streamed.

None

Returns:

Type Description str

An URL with all the needed parameters to start a streaming with hls.m3u8 using a GET request.

Source code in src/knuckles/_media_retrieval.py
def hls(\n    self,\n    song_or_video_id: str,\n    custom_bitrates: list[str] | None = None,\n    audio_track_id: str | None = None,\n) -> str:\n    \"\"\"Get the URL required to stream a song or video with hls.m3u8.\n\n    Args:\n        song_or_video_id: The ID of the song or video to stream.\n        custom_bitrates: The bitrate that the server should try to\n            limit the stream to. If more that one is specified the\n            server will create a `variant playlist`, suitable for adaptive\n            bitrate streaming.\n        audio_track_id: The ID of an audio track to be added to the stream\n            if video is being streamed.\n\n    Returns:\n        An URL with all the needed parameters to start a streaming\n            with hls.m3u8 using a GET request.\n    \"\"\"\n\n    return self.subsonic.api.generate_url(\n        \"hls.m3u8\",\n        {\n            \"id\": song_or_video_id,\n            \"bitRate\": custom_bitrates,\n            \"audioTrack\": audio_track_id,\n        },\n    )\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.stream","title":"stream(song_or_video_id, max_bitrate_rate=None, stream_format=None, time_offset=None, size=None, estimate_content_length=None, converted=None)","text":"

Get the URL required to stream a song or video.

Parameters:

Name Type Description Default song_or_video_id str

The ID of the song or video to get its steam URL

required max_bitrate_rate int | None

The max bitrate the stream should have.

None stream_format str | None

The format the song or video should be. Warning: The available formats are dependant of the server implementation. The only secure format is \"raw\", which disabled transcoding at all.

None time_offset int | None

An offset where the stream should start. It may not work with video, depending of the server configuration.

None size str | None

The maximum resolution of the streaming in the format WxH, only works with video streaming.

None estimate_content_length bool | None

When set to true the response with have the Content-Length HTTP header set to a estimated duration for the streamed song or video.

None converted bool | None

If set to true the server will try to stream a transcoded version in MP4. Only works with video streaming.

None

Returns:

Type Description str

An URL with all the needed parameters to start a streaming using a GET request.

Source code in src/knuckles/_media_retrieval.py
def stream(\n    self,\n    song_or_video_id: str,\n    max_bitrate_rate: int | None = None,\n    stream_format: str | None = None,\n    time_offset: int | None = None,\n    size: str | None = None,\n    estimate_content_length: bool | None = None,\n    converted: bool | None = None,\n) -> str:\n    \"\"\"Get the URL required to stream a song or video.\n\n    Args:\n        song_or_video_id: The ID of the song or video to get its\n            steam URL\n        max_bitrate_rate: The max bitrate the stream should have.\n        stream_format: The format the song or video should be.\n            **Warning**: The available formats are dependant of the\n            server implementation. The only secure format is \"raw\",\n            which disabled transcoding at all.\n        time_offset: An offset where the stream should start. It may\n            not work with video, depending of the server configuration.\n        size: The maximum resolution of the streaming in the format `WxH`,\n            only works with video streaming.\n        estimate_content_length: When set to true the response with have\n            the `Content-Length` HTTP header set to a estimated duration\n            for the streamed song or video.\n        converted: If set to true the server will try to stream a\n            transcoded version in `MP4`. Only works with video\n            streaming.\n\n    Returns:\n        An URL with all the needed parameters to start a streaming\n            using a GET request.\n    \"\"\"\n\n    return self.subsonic.api.generate_url(\n        \"stream\",\n        {\n            \"id\": song_or_video_id,\n            \"maxBitRate\": max_bitrate_rate,\n            \"format\": stream_format,\n            \"timeOffset\": time_offset,\n            \"size\": size,\n            \"estimateContentLength\": estimate_content_length,\n            \"converted\": converted,\n        },\n    )\n
"},{"location":"reference/Playlists/","title":"Playlists","text":""},{"location":"reference/Playlists/#knuckles._playlists.Playlists","title":"Playlists(api, subsonic)","text":"

Class that contains all the methods needed to interact with the playlists endpoints in the Subsonic API.

Source code in src/knuckles/_playlists.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Playlists/#knuckles._playlists.Playlists.create_playlist","title":"create_playlist(name, comment=None, public=None, song_ids=None)","text":"

Create a new playlist for the authenticated user.

Parameters:

Name Type Description Default name str

The name of the playlist to be created.

required comment str | None

A comment to be added to the new created playlist.

None public bool | None

If the song should be public or not.

None song_ids list[str] | None

A list of ID of the songs that should be included with the playlist.

None

Returns:

Type Description Playlist

An object that holds all the info about the new created playlist.

Source code in src/knuckles/_playlists.py
def create_playlist(\n    self,\n    name: str,\n    comment: str | None = None,\n    public: bool | None = None,\n    song_ids: list[str] | None = None,\n) -> Playlist:\n    \"\"\"Create a new playlist for the authenticated user.\n\n    Args:\n        name: The name of the playlist to be created.\n        comment: A comment to be added to the new created playlist.\n        public: If the song should be public or not.\n        song_ids: A list of ID of the songs that should be included\n            with the playlist.\n\n    Returns:\n        An object that holds all the info about the new created playlist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"createPlaylist\", {\"name\": name, \"songId\": song_ids}\n    )[\"playlist\"]\n\n    new_playlist = Playlist(self.subsonic, **response)\n\n    # Allow to modify comment and public\n    # with a workaround using the updatePlaylist endpoint\n\n    if comment or public:\n        self.update_playlist(new_playlist.id, comment=comment, public=public)\n        new_playlist.comment = comment\n        new_playlist.public = public\n\n    return new_playlist\n
"},{"location":"reference/Playlists/#knuckles._playlists.Playlists.delete_playlist","title":"delete_playlist(playlist_id)","text":"

Delete a playlist.

Parameters:

Name Type Description Default playlist_id str

The ID of the playlist to remove.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_playlists.py
def delete_playlist(self, playlist_id: str) -> \"Subsonic\":\n    \"\"\"Delete a playlist.\n\n    Args:\n        playlist_id: The ID of the playlist to remove.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"deletePlaylist\", {\"id\": playlist_id})\n\n    return self.subsonic\n
"},{"location":"reference/Playlists/#knuckles._playlists.Playlists.get_playlist","title":"get_playlist(playlist_id)","text":"

Get all the info about a playlist available for the authenticated user.

Parameters:

Name Type Description Default playlist_id str

The ID of the playlist to get its info.

required

Returns:

Type Description Playlist

An object that holds all the info about the requested playlist.

Source code in src/knuckles/_playlists.py
def get_playlist(self, playlist_id: str) -> Playlist:\n    \"\"\"Get all the info about a playlist available for the authenticated\n    user.\n\n    Args:\n        playlist_id: The ID of the playlist to get its info.\n\n    Returns:\n        An object that holds all the info about the requested playlist.\n    \"\"\"\n\n    response = self.api.json_request(\"getPlaylist\", {\"id\": playlist_id})[\"playlist\"]\n\n    return Playlist(self.subsonic, **response)\n
"},{"location":"reference/Playlists/#knuckles._playlists.Playlists.get_playlists","title":"get_playlists(username=None)","text":"

Get all the playlists available to the authenticated user.

Parameters:

Name Type Description Default username str | None

The username of another user if is wanted to get the playlists they can access.

None

Returns:

Type Description list[Playlist]

A list that holds all the info about all the playlist that the user can play.

Source code in src/knuckles/_playlists.py
def get_playlists(self, username: str | None = None) -> list[Playlist]:\n    \"\"\"Get all the playlists available to the authenticated user.\n\n    Args:\n        username: The username of another user if is wanted to get the\n            playlists they can access.\n\n    Returns:\n        A list that holds all the info about all the playlist\n            that the user can play.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getPlaylists\",\n        {\"username\": username} if username else {},\n    )[\"playlists\"][\"playlist\"]\n\n    playlists = [Playlist(self.subsonic, **playlist) for playlist in response]\n\n    return playlists\n
"},{"location":"reference/Playlists/#knuckles._playlists.Playlists.update_playlist","title":"update_playlist(playlist_id, name=None, comment=None, public=None, song_ids_to_add=None, song_indexes_to_remove=None)","text":"

Update the info of a playlist.

Parameters:

Name Type Description Default playlist_id str

The ID of the playlist to update its info.

required name str | None

A new name for the playlist.

None comment str | None

A new comment for the playlist.

None public bool | None

Change if the playlist should be public or private.

None song_ids_to_add list[str] | None

A list of IDs of new songs to be added to the playlist.

None song_indexes_to_remove list[int] | None

A list in indexes of songs that should be removed from the playlist.

None

Returns:

Type Description Playlist

An object that holds all the info about the updated playlist.

Source code in src/knuckles/_playlists.py
def update_playlist(\n    self,\n    playlist_id: str,\n    name: str | None = None,\n    comment: str | None = None,\n    public: bool | None = None,\n    song_ids_to_add: list[str] | None = None,\n    song_indexes_to_remove: list[int] | None = None,\n) -> Playlist:\n    \"\"\"Update the info of a playlist.\n\n    Args:\n        playlist_id: The ID of the playlist to update its info.\n        name: A new name for the playlist.\n        comment: A new comment for the playlist.\n        public: Change if the playlist should be public or private.\n        song_ids_to_add: A list of IDs of new songs to be added to the\n            playlist.\n        song_indexes_to_remove: A list in indexes of songs that should\n            be removed from the playlist.\n\n    Returns:\n        An object that holds all the info about the updated playlist.\n    \"\"\"\n\n    self.api.json_request(\n        \"updatePlaylist\",\n        {\n            \"playlistId\": playlist_id,\n            \"name\": name,\n            \"comment\": comment,\n            \"public\": public,\n            \"songIdToAdd\": song_ids_to_add,\n            \"songIndexToRemove\": song_indexes_to_remove,\n        },\n    )\n\n    return Playlist(\n        self.subsonic, id=playlist_id, name=name, comment=comment, public=public\n    )\n
"},{"location":"reference/Podcast/","title":"Podcast","text":""},{"location":"reference/Podcast/#knuckles._podcast.Podcast","title":"Podcast(api, subsonic)","text":"

Class that contains all the methods needed to interact with the podcast endpoints in the Subsonic API.

Source code in src/knuckles/_podcast.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.create_podcast_channel","title":"create_podcast_channel(url)","text":"

Create a new podcast channel

Parameters:

Name Type Description Default url str

The URL of the podcast to add.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_podcast.py
def create_podcast_channel(self, url: str) -> \"Subsonic\":\n    \"\"\"Create a new podcast channel\n\n    Args:\n        url: The URL of the podcast to add.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"createPodcastChannel\", {\"url\": url})\n\n    return self.subsonic\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.delete_podcast_channel","title":"delete_podcast_channel(podcast_channel_id)","text":"

Delete a podcast channel.

Parameters:

Name Type Description Default podcast_channel_id str

The ID of the podcast channel to delete.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_podcast.py
def delete_podcast_channel(self, podcast_channel_id: str) -> \"Subsonic\":\n    \"\"\"Delete a podcast channel.\n\n    Args:\n        podcast_channel_id: The ID of the podcast channel to delete.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"deletePodcastChannel\", {\"id\": podcast_channel_id})\n\n    return self.subsonic\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.delete_podcast_episode","title":"delete_podcast_episode(podcast_episode_id)","text":"

Delete a podcast episode from the server.

Parameters:

Name Type Description Default podcast_episode_id str

The ID of the podcast episode to delete.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_podcast.py
def delete_podcast_episode(self, podcast_episode_id: str) -> \"Subsonic\":\n    \"\"\"Delete a podcast episode from the server.\n\n    Args:\n        podcast_episode_id: The ID of the podcast episode to delete.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"deletePodcastEpisode\", {\"id\": podcast_episode_id})\n\n    return self.subsonic\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.download_podcast_episode","title":"download_podcast_episode(podcast_episode_id)","text":"

Download a podcast episode to the server.

Parameters:

Name Type Description Default podcast_episode_id str

The ID of the podcast episode to download to the server.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_podcast.py
def download_podcast_episode(self, podcast_episode_id: str) -> \"Subsonic\":\n    \"\"\"Download a podcast episode to the server.\n\n    Args:\n        podcast_episode_id: The ID of the podcast episode to download to\n            the server.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"downloadPodcastEpisode\", {\"id\": podcast_episode_id})\n\n    return self.subsonic\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.get_newest_podcast_episodes","title":"get_newest_podcast_episodes(number_max_episodes)","text":"

Get all the info about the newest released podcast episodes.

Parameters:

Name Type Description Default number_max_episodes int

The max number of episodes that the server should return.

required

Returns:

Type Description list[Episode]

A list that holds all the info about all the newest released episodes.

Source code in src/knuckles/_podcast.py
def get_newest_podcast_episodes(self, number_max_episodes: int) -> list[Episode]:\n    \"\"\"Get all the info about the newest released podcast episodes.\n\n    Args:\n        number_max_episodes: The max number of episodes that the server\n            should return.\n\n    Returns:\n        A list that holds all the info about all the newest released\n            episodes.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getNewestPodcasts\", {\"count\": number_max_episodes}\n    )[\"newestPodcasts\"][\"episode\"]\n\n    return [Episode(self.subsonic, **episode) for episode in response]\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.get_podcast_channel","title":"get_podcast_channel(podcast_channel_id, with_episodes=None)","text":"

Get all the info about a podcast channel.

Parameters:

Name Type Description Default podcast_channel_id str

The ID of the podcast channel to get its info.

required with_episodes bool | None

If the server should also return all the info about each episode of the podcast channel.

None

Returns:

Type Description Channel

An object that hold all the info about the requested podcast channel.

Source code in src/knuckles/_podcast.py
def get_podcast_channel(\n    self, podcast_channel_id: str, with_episodes: bool | None = None\n) -> Channel:\n    \"\"\"Get all the info about a podcast channel.\n\n    Args:\n        podcast_channel_id: The ID of the podcast channel to get its info.\n        with_episodes: If the server should also return all the info\n            about each episode of the podcast channel.\n\n    Returns:\n        An object that hold all the info about the requested podcast\n            channel.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getPodcasts\", {\"id\": podcast_channel_id, \"includeEpisodes\": with_episodes}\n    )[\"podcasts\"][0]\n\n    return Channel(self.subsonic, **response)\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.get_podcast_channels","title":"get_podcast_channels(with_episodes=True)","text":"

Get all the info about all the available podcasts channels in the server.

Parameters:

Name Type Description Default with_episodes bool

If the server should also return all the info about each episode of each podcast channel

True

Returns:

Type Description list[Channel]

An list that hold all the info about all the available podcasts channels.

Source code in src/knuckles/_podcast.py
def get_podcast_channels(self, with_episodes: bool = True) -> list[Channel]:\n    \"\"\"Get all the info about all the available podcasts channels in the\n    server.\n\n    Args:\n        with_episodes: If the server should also return all the info\n            about each episode of each podcast channel\n\n    Returns:\n        An list that hold all the info about all the available podcasts\n            channels.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getPodcasts\", {\"includeEpisodes\": with_episodes}\n    )[\"podcasts\"]\n\n    return [Channel(self.subsonic, **channel) for channel in response]\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.get_podcast_episode","title":"get_podcast_episode(episode_id)","text":"

Get all the info about a podcast episode.

Parameters:

Name Type Description Default episode_id str

The ID of the podcast episode to get its info.

required

Returns:

Type Description Episode | None

An object that holds all the info about the requested podcast episode.

Source code in src/knuckles/_podcast.py
def get_podcast_episode(self, episode_id: str) -> Episode | None:\n    \"\"\"Get all the info about a podcast episode.\n\n    Args:\n        episode_id: The ID of the podcast episode to get its info.\n\n    Returns:\n        An object that holds all the info about the requested podcast\n            episode.\n    \"\"\"\n\n    channels = self.get_podcast_channels()\n\n    # Flatten the list of episodes inside the list of channels\n    list_of_episodes = [\n        episode\n        for channel in channels\n        if channel.episodes is not None\n        for episode in channel.episodes\n    ]\n\n    for episode in list_of_episodes:\n        if episode.id == episode_id:\n            return episode\n\n    return None\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.refresh_podcasts","title":"refresh_podcasts()","text":"

Request the server to search for new podcast episodes.

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_podcast.py
def refresh_podcasts(self) -> \"Subsonic\":\n    \"\"\"Request the server to search for new podcast episodes.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"refreshPodcasts\")\n\n    return self.subsonic\n
"},{"location":"reference/Searching/","title":"Searching","text":""},{"location":"reference/Searching/#knuckles._searching.Searching","title":"Searching(api, subsonic)","text":"

Class that contains all the methods needed to interact with the bookmark endpoints in the Subsonic API.

Source code in src/knuckles/_searching.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Searching/#knuckles._searching.Searching.search","title":"search(query='', song_count=None, song_offset=None, album_count=None, album_offset=None, artist_count=None, artist_offset=None, music_folder_id=None)","text":"

Search and find all the songs, albums and artists that whose title match the given query.

Parameters:

Name Type Description Default query str

The query string to be send to the server.

'' song_count int | None

The numbers of songs that the server should return.

None song_offset int | None

The number of songs to offset in the list, useful for pagination.

None album_count int | None

The numbers of albums that the server should return.

None album_offset int | None

The number of album to offset in the list, useful for pagination.

None artist_count int | None

The numbers of artists that the server should return.

None artist_offset int | None

The number of artists to offset in the list, useful for pagination.

None music_folder_id str | None

An ID of a music folder to limit where the songs, albums and artists should come from.

None

Returns:

Type Description SearchResult

An object that contains all the info about the found songs, albums and artists received with the given query.

Source code in src/knuckles/_searching.py
def search(\n    self,\n    query: str = \"\",\n    song_count: int | None = None,\n    song_offset: int | None = None,\n    album_count: int | None = None,\n    album_offset: int | None = None,\n    artist_count: int | None = None,\n    artist_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> SearchResult:\n    \"\"\"Search and find all the songs, albums and artists that\n    whose title match the given query.\n\n    Args:\n        query: The query string to be send to the server.\n        song_count: The numbers of songs that the server\n            should return.\n        song_offset: The number of songs to offset in the list,\n            useful for pagination.\n        album_count: The numbers of albums that the server\n            should return.\n        album_offset: The number of album to offset in the list,\n            useful for pagination.\n        artist_count: The numbers of artists that the server\n            should return.\n        artist_offset: The number of artists to offset in the list,\n            useful for pagination.\n        music_folder_id: An ID of a music folder to limit where the\n            songs, albums and artists should come from.\n\n    Returns:\n        An object that contains all the info about the found songs,\n            albums and artists received with the given query.\n    \"\"\"\n\n    return self._generic_search(\n        query,\n        song_count,\n        song_offset,\n        album_count,\n        album_offset,\n        artist_count,\n        artist_offset,\n    )\n
"},{"location":"reference/Searching/#knuckles._searching.Searching.search_non_id3","title":"search_non_id3(query, song_count=None, song_offset=None, album_count=None, album_offset=None, artist_count=None, artist_offset=None, music_folder_id=None)","text":"

Search and find all the songs, albums and artists that whose title match the given query. Not organized according ID3 tags.

Parameters:

Name Type Description Default query str

The query string to be send to the server.

required song_count int | None

The numbers of songs that the server should return.

None song_offset int | None

The number of songs to offset in the list, useful for pagination.

None album_count int | None

The numbers of albums that the server should return.

None album_offset int | None

The number of album to offset in the list, useful for pagination.

None artist_count int | None

The numbers of artists that the server should return.

None artist_offset int | None

The number of artists to offset in the list, useful for pagination.

None music_folder_id str | None

An ID of a music folder to limit where the songs, albums and artists should come from.

None

Returns:

Type Description SearchResult

An object that contains all the info about the found songs, albums and artists received with the given query.

Source code in src/knuckles/_searching.py
def search_non_id3(\n    self,\n    query: str,\n    song_count: int | None = None,\n    song_offset: int | None = None,\n    album_count: int | None = None,\n    album_offset: int | None = None,\n    artist_count: int | None = None,\n    artist_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> SearchResult:\n    \"\"\"Search and find all the songs, albums and artists that\n    whose title match the given query. Not organized according\n    ID3 tags.\n\n    Args:\n        query: The query string to be send to the server.\n        song_count: The numbers of songs that the server\n            should return.\n        song_offset: The number of songs to offset in the list,\n            useful for pagination.\n        album_count: The numbers of albums that the server\n            should return.\n        album_offset: The number of album to offset in the list,\n            useful for pagination.\n        artist_count: The numbers of artists that the server\n            should return.\n        artist_offset: The number of artists to offset in the list,\n            useful for pagination.\n        music_folder_id: An ID of a music folder to limit where the\n            songs, albums and artists should come from.\n\n    Returns:\n        An object that contains all the info about the found songs,\n            albums and artists received with the given query.\n    \"\"\"\n\n    return self._generic_search(\n        query,\n        song_count,\n        song_offset,\n        album_count,\n        album_offset,\n        artist_count,\n        artist_offset,\n        music_folder_id,\n        False,\n    )\n
"},{"location":"reference/Sharing/","title":"Sharing","text":""},{"location":"reference/Sharing/#knuckles._sharing.Sharing","title":"Sharing(api, subsonic)","text":"

Class that contains all the methods needed to interact with the sharing endpoints in the Subsonic API.

Source code in src/knuckles/_sharing.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Sharing/#knuckles._sharing.Sharing.create_share","title":"create_share(songs_ids, description=None, expires=None)","text":"

Create a new share.

Parameters:

Name Type Description Default songs_ids list[str]

A list that holds the IDs of all the songs that the share can give access to.

required description str | None

A description to be added with the share.

None expires datetime | None

A timestamp that marks when the share should be invalidated.

None

Returns:

Type Description Share

An object that holds all the info about the requested share.

Source code in src/knuckles/_sharing.py
def create_share(\n    self,\n    songs_ids: list[str],\n    description: str | None = None,\n    expires: datetime | None = None,\n) -> Share:\n    \"\"\"Create a new share.\n\n    Args:\n        songs_ids: A list that holds the IDs of all the songs\n            that the share can give access to.\n        description: A description to be added with the share.\n        expires: A timestamp that marks when the share should\n            be invalidated.\n\n    Returns:\n        An object that holds all the info about the requested share.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"createShare\",\n        {\n            \"id\": songs_ids,\n            \"description\": description,\n            \"expires\": expires.timestamp() * 1000 if expires else None,\n        },\n    )[\"shares\"][\"share\"][0]\n\n    return Share(self.subsonic, **response)\n
"},{"location":"reference/Sharing/#knuckles._sharing.Sharing.delete_share","title":"delete_share(share_id)","text":"

Delete a share from the server.

Parameters:

Name Type Description Default share_id str

The ID of the server to delete.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_sharing.py
def delete_share(self, share_id: str) -> \"Subsonic\":\n    \"\"\"Delete a share from the server.\n\n    Args:\n        share_id: The ID of the server to delete.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"deleteShare\", {\"id\": share_id})\n\n    return self.subsonic\n
"},{"location":"reference/Sharing/#knuckles._sharing.Sharing.get_share","title":"get_share(share_id)","text":"

Get all the info about a share.

Parameters:

Name Type Description Default share_id str

The ID of the share to get its info.

required

Returns:

Type Description Share | None

An object that holds all the info about the requested share.

Source code in src/knuckles/_sharing.py
def get_share(self, share_id: str) -> Share | None:\n    \"\"\"Get all the info about a share.\n\n    Args:\n        share_id: The ID of the share to get its info.\n\n    Returns:\n        An object that holds all the info about the requested\n            share.\n    \"\"\"\n\n    shares = self.get_shares()\n\n    for share in shares:\n        if share.id == share_id:\n            return share\n\n    return None\n
"},{"location":"reference/Sharing/#knuckles._sharing.Sharing.get_shares","title":"get_shares()","text":"

Get all the shares manageable by the authenticated user.

Returns:

Type Description list[Share]

A list that holds all the info about all the shares manageable by the user.

Source code in src/knuckles/_sharing.py
def get_shares(self) -> list[Share]:\n    \"\"\"Get all the shares manageable by the authenticated user.\n\n    Returns:\n        A list that holds all the info about all the shares\n            manageable by the user.\n    \"\"\"\n\n    response = self.api.json_request(\"getShares\")[\"shares\"][\"share\"]\n\n    return [Share(self.subsonic, **share) for share in response]\n
"},{"location":"reference/Sharing/#knuckles._sharing.Sharing.update_share","title":"update_share(share_id, new_description=None, new_expires=None)","text":"

Update the info of a share.

Parameters:

Name Type Description Default share_id str

The ID of the share to update.

required new_description str | None

A new description to be added to the share.

None new_expires datetime | None

A new expire timestamp for the share.

None

Returns:

Type Description Share

An object that holds all the new updated info for the share.

Source code in src/knuckles/_sharing.py
def update_share(\n    self,\n    share_id: str,\n    new_description: str | None = None,\n    new_expires: datetime | None = None,\n) -> Share:\n    \"\"\"Update the info of a share.\n\n    Args:\n        share_id: The ID of the share to update.\n        new_description: A new description to be added to the share.\n        new_expires: A new expire timestamp for the share.\n\n    Returns:\n        An object that holds all the new updated info for the share.\n    \"\"\"\n\n    self.api.json_request(\n        \"updateShare\",\n        {\n            \"id\": share_id,\n            \"description\": new_description,\n            \"expires\": new_expires.timestamp() * 1000 if new_expires else None,\n        },\n    )\n\n    updated_share = Share(self.subsonic, share_id, description=new_description)\n\n    # Set it manually as the constructor expects ISO 6801 to convert it to datetime\n    # Instead of a datetime directly\n    updated_share.expires = new_expires\n\n    return updated_share\n
"},{"location":"reference/Subsonic/","title":"Subsonic","text":""},{"location":"reference/Subsonic/#knuckles._subsonic.Subsonic","title":"Subsonic(url, user, password, client, use_https=True, use_token=True, request_method=RequestMethod.POST)","text":"

Object that holds all the other helper objects to interact with the OpenSubsonic REST API.

Inside this object there are helper object that holds all the methods used to access the REST API. The methods are split following the categories listed in the OpenSubsonic REST API Spec.

Attributes:

Name Type Description api

Helper object used to directly access the REST API of the given server.

system

Helper object used to access all system related endpoints.

browsing

Helper object used to access all system related endpoints.

lists

Helper object used to access all lists related endpoints.

searching

Helper object used to access all searching related endpoints.

playlists

Helper object used to access playlists related endpoints.

media_retrieval

Helper object used to access all media retrieval related endpoints.

media_annotation

Helper object used to access all media annotation related endpoints.

sharing

Helper object used to access all sharing related endpoints.

podcast

Helper object used to access all podcast related endpoints.

jukebox

Helper object used to access all jukebox related endpoints.

internet_radio

Helper object used to access all internet radio related endpoints.

chat

Helper object used to access all chat related endpoints.

user_management

Helper object used to access all user management related endpoints.

bookmarks

Helper object used to access all bookmarks related endpoints.

media_library_scanning

Helper object used to access all media library scanning related endpoints.

Parameters:

Name Type Description Default url str

The URL of the Subsonic server to connect to.

required user str

The name of the user to authenticate.

required password str

The password of the user to authenticate.

required client str

A unique name of the client to report to the server.

required use_https bool

If the requests should be use of HTTPS.

True use_token bool

If the authentication should be made using a salted token or in plain text.

True request_method RequestMethod

If the requests should be made using a GET verb or a POST verb.

POST Source code in src/knuckles/_subsonic.py
def __init__(\n    self,\n    url: str,\n    user: str,\n    password: str,\n    client: str,\n    use_https: bool = True,\n    use_token: bool = True,\n    request_method: RequestMethod = RequestMethod.POST,\n) -> None:\n    \"\"\"Construction method of the Subsonic object used to\n    interact with the OpenSubsonic REST API.\n\n    Args:\n        url: The URL of the Subsonic server to connect to.\n        user: The name of the user to authenticate.\n        password: The password of the user to authenticate.\n        client: A unique name of the client to report to the\n            server.\n        use_https: If the requests should be use of HTTPS.\n        use_token: If the authentication should be made\n            using a salted token or in plain text.\n        request_method: If the requests should be made\n            using a GET verb or a POST verb.\n    \"\"\"\n\n    self.api = Api(\n        url, user, password, client, use_https, use_token, request_method\n    )\n    self.system = System(self.api, self)\n    self.browsing = Browsing(self.api, self)\n    self.lists = Lists(self.api, self)\n    self.searching = Searching(self.api, self)\n    self.playlists = Playlists(self.api, self)\n    self.media_retrieval = MediaRetrieval(self.api, self)\n    self.media_annotation = MediaAnnotation(self.api, self)\n    self.sharing = Sharing(self.api, self)\n    self.podcast = Podcast(self.api, self)\n    self.jukebox = JukeboxControl(self.api, self)\n    self.internet_radio = InternetRadio(self.api, self)\n    self.chat = Chat(self.api, self)\n    self.user_management = UserManagement(self.api, self)\n    self.bookmarks = Bookmarks(self.api, self)\n    self.media_library_scanning = MediaLibraryScanning(self.api, self)\n
"},{"location":"reference/System/","title":"System","text":""},{"location":"reference/System/#knuckles._system.System","title":"System(api, subsonic)","text":"

Class that contains all the methods needed to interact with the system endpoints in the Subsonic API.

Source code in src/knuckles/_system.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/System/#knuckles._system.System.check_open_subsonic_extension","title":"check_open_subsonic_extension(extension_name, extension_version)","text":"

Check if a OpenSubonic REST API extension is available on the connected server.

Parameters:

Name Type Description Default extension_name str

The name of the extension to check if its available.

required extension_version int

The version of the extension to check if its available.

required

Returns:

Type Description bool

If the given extension at the given version is available on the connected server or not.

Source code in src/knuckles/_system.py
def check_open_subsonic_extension(\n    self, extension_name: str, extension_version: int\n) -> bool:\n    \"\"\"Check if a OpenSubonic REST API extension is available on the\n    connected server.\n\n    Args:\n        extension_name: The name of the extension to check if its\n            available.\n        extension_version: The version of the extension to check if\n            its available.\n\n    Returns:\n        If the given extension at the given version is available on\n            the connected server or not.\n    \"\"\"\n\n    extensions = self.get_open_subsonic_extensions()\n\n    for extension in extensions:\n        if extension.name != extension_name:\n            continue\n\n        if extension_version in extension.versions:\n            return True\n\n    return False\n
"},{"location":"reference/System/#knuckles._system.System.get_license","title":"get_license()","text":"

Get the current status of the license of the server.

Returns:

Type Description License

An object that contains all the info about the status of the license of the server.

Source code in src/knuckles/_system.py
def get_license(self) -> License:\n    \"\"\"Get the current status of the license of the server.\n\n    Returns:\n        An object that contains all the info about the status\n            of the license of the server.\n    \"\"\"\n\n    response = self.api.json_request(\"getLicense\")[\"license\"]\n\n    return License(self.subsonic, **response)\n
"},{"location":"reference/System/#knuckles._system.System.get_open_subsonic_extensions","title":"get_open_subsonic_extensions()","text":"

Get all the available OpenSubsonic REST API extensions for the connected server.

Returns:

Type Description list[OpenSubsonicExtension]

A list that contains all the info about all the available extensions in the connected server.

Source code in src/knuckles/_system.py
def get_open_subsonic_extensions(self) -> list[OpenSubsonicExtension]:\n    \"\"\"Get all the available OpenSubsonic REST API extensions for the\n    connected server.\n\n    Returns:\n        A list that contains all the info about all the available\n            extensions in the connected server.\n    \"\"\"\n\n    response = self.api.json_request(\"getOpenSubsonicExtensions\")[\n        \"openSubsonicExtensions\"\n    ]\n    return [\n        OpenSubsonicExtension(name, versions) for name, versions in response.items()\n    ]\n
"},{"location":"reference/System/#knuckles._system.System.ping","title":"ping()","text":"

Make a ping to the server.

Returns:

Type Description SubsonicResponse

An object that holds all the info returned by the server.

Source code in src/knuckles/_system.py
def ping(self) -> SubsonicResponse:\n    \"\"\"Make a ping to the server.\n\n    Returns:\n        An object that holds all the info returned by the server.\n    \"\"\"\n\n    response = self.api.json_request(\"ping\")\n\n    return SubsonicResponse(self.subsonic, **response)\n
"},{"location":"reference/User%20Management/","title":"User Management","text":""},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement","title":"UserManagement(api, subsonic)","text":"

Class that contains all the methods needed to interact with the user management endpoints in the Subsonic API.

Source code in src/knuckles/_user_management.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n    self.subsonic = subsonic\n
"},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement.change_password","title":"change_password(username, new_password)","text":"

Change the password of a user.

Parameters:

Name Type Description Default username str

The username of the user to change its password.

required new_password str

The new password for the user.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_user_management.py
def change_password(self, username: str, new_password: str) -> \"Subsonic\":\n    \"\"\"Change the password of a user.\n\n    Args:\n        username: The username of the user to change its password.\n        new_password: The new password for the user.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\n        \"changePassword\", {\"username\": username, \"password\": new_password}\n    )\n\n    return self.subsonic\n
"},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement.create_user","title":"create_user(username, password, email, ldap_authenticated=None, admin_role=None, settings_role=None, stream_role=None, jukebox_role=None, download_role=None, upload_role=None, playlist_role=None, cover_art_role=None, comment_role=None, podcast_role=None, share_role=None, video_conversion_role=None, music_folder_id=None, max_bit_rate=None)","text":"

Create a new user in the server.

Parameters:

Name Type Description Default username str

The username of the user to create.

required password str

The password of the user to create.

required email str

The email of the user to create.

required ldap_authenticated bool | None

If the user is authenticated in a LDAP server.

None admin_role bool | None

If the user should be an administrator.

None settings_role bool | None

If the user is allowed to change its personal settings and password.

None stream_role bool | None

If the user should be allowed to stream songs and videos.

None jukebox_role bool | None

If the user should be able to play songs in the jukebox.

None download_role bool | None

If the user should be able to download files from the server.

None upload_role bool | None

If the user should be allowed to upload files to the server.

None playlist_role bool | None

If the user should be able to create and delete playlists.

None cover_art_role bool | None

If the user should be allowed to change cover art and tags of songs.

None comment_role bool | None

If the user is allowed to create and edit comments and ratings.

None podcast_role bool | None

If the user should be allowed to administrate podcasts.

None share_role bool | None

If the user should be able to create share links.

None video_conversion_role bool | None

If the use should be allowed to start video conversion in the server.

None music_folder_id list[str] | None

A list of IDs where the used should have access to. If no one is specified all of them will be accessible.

None max_bit_rate int | None

The max bitrate that the user should be able to stream.

None

Returns:

Type Description User

An object that holds all the info about the new created user.

Source code in src/knuckles/_user_management.py
def create_user(\n    self,\n    username: str,\n    password: str,\n    email: str,\n    ldap_authenticated: bool | None = None,\n    admin_role: bool | None = None,\n    settings_role: bool | None = None,\n    stream_role: bool | None = None,\n    jukebox_role: bool | None = None,\n    download_role: bool | None = None,\n    upload_role: bool | None = None,\n    playlist_role: bool | None = None,\n    cover_art_role: bool | None = None,\n    comment_role: bool | None = None,\n    podcast_role: bool | None = None,\n    share_role: bool | None = None,\n    video_conversion_role: bool | None = None,\n    music_folder_id: list[str] | None = None,\n    max_bit_rate: int | None = None,\n) -> User:\n    \"\"\"Create a new user in the server.\n\n    Args:\n        username: The username of the user to create.\n        password: The password of the user to create.\n        email: The email of the user to create.\n        ldap_authenticated: If the user is authenticated in a LDAP server.\n        admin_role: If the user should be an administrator.\n        settings_role: If the user is allowed to change its\n            personal settings and password.\n        stream_role: If the user should be allowed to stream songs and\n            videos.\n        jukebox_role: If the user should be able to play songs in the\n            jukebox.\n        download_role: If the user should be able to download files from\n            the server.\n        upload_role: If the user should be allowed to upload files to\n            the server.\n        playlist_role: If the user should be able to create and delete\n            playlists.\n        cover_art_role: If the user should be allowed to change cover\n            art and tags of songs.\n        comment_role: If the user is allowed to create and edit\n            comments and ratings.\n        podcast_role: If the user should be allowed to administrate\n            podcasts.\n        share_role: If the user should be able to create share links.\n        video_conversion_role: If the use should be allowed to\n            start video conversion in the server.\n        music_folder_id: A list of IDs where the used should have access\n            to. If no one is specified all of them will be accessible.\n        max_bit_rate: The max bitrate that the user should be able to\n            stream.\n\n    Returns:\n        An object that holds all the info about the new created user.\n    \"\"\"\n\n    self.api.json_request(\n        \"createUser\",\n        {\n            \"username\": username,\n            \"password\": password,\n            \"email\": email,\n            \"ldapAuthenticated\": ldap_authenticated,\n            \"adminRole\": admin_role,\n            \"settingsRole\": settings_role,\n            \"streamRole\": stream_role,\n            \"jukeboxRole\": jukebox_role,\n            \"downloadRole\": download_role,\n            \"uploadRole\": upload_role,\n            \"playlistRole\": playlist_role,\n            \"coverArtRole\": cover_art_role,\n            \"commentRole\": comment_role,\n            \"podcastRole\": podcast_role,\n            \"shareRole\": share_role,\n            \"videoConversionRole\": video_conversion_role,\n            \"musicFolderId\": music_folder_id,\n            \"maxBitRate\": max_bit_rate,\n        },\n    )\n\n    # Attach the Subsonic object\n    new_user = User(\n        self.subsonic,\n        username,\n        password,\n        email,\n        ldap_authenticated,\n        admin_role,\n        settings_role,\n        stream_role,\n        jukebox_role,\n        download_role,\n        upload_role,\n        playlist_role,\n        cover_art_role,\n        comment_role,\n        podcast_role,\n        share_role,\n        video_conversion_role,\n        music_folder_id,\n        max_bit_rate,\n    )\n\n    return new_user\n
"},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement.delete_user","title":"delete_user(username)","text":"

Delete a user from the server.

Parameters:

Name Type Description Default username str

The username of the user to delete.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in src/knuckles/_user_management.py
def delete_user(self, username: str) -> \"Subsonic\":\n    \"\"\"Delete a user from the server.\n\n    Args:\n        username: The username of the user to delete.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"deleteUser\", {\"username\": username})\n\n    return self.subsonic\n
"},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement.get_user","title":"get_user(username)","text":"

Get all the info about a user.

Parameters:

Name Type Description Default username str

The username of the user to get its info.

required

Returns:

Type Description User

An object that holds all the info about the requested user.

Source code in src/knuckles/_user_management.py
def get_user(self, username: str) -> User:\n    \"\"\"Get all the info about a user.\n\n    Args:\n        username: The username of the user to get its info.\n\n    Returns:\n        An object that holds all the info about the requested user.\n    \"\"\"\n    request = self.api.json_request(\"getUser\", {\"username\": username})[\"user\"]\n\n    return User(\n        self.subsonic,\n        request[\"username\"],\n        request[\"password\"],\n        request[\"email\"],\n        request[\"ldapAuthenticated\"],\n        request[\"adminRole\"],\n        request[\"settingsRole\"],\n        request[\"streamRole\"],\n        request[\"jukeboxRole\"],\n        request[\"downloadRole\"],\n        request[\"uploadRole\"],\n        request[\"playlistRole\"],\n        request[\"coverArtRole\"],\n        request[\"commentRole\"],\n        request[\"podcastRole\"],\n        request[\"shareRole\"],\n        request[\"videoConversionRole\"],\n        request[\"musicFolderId\"],\n        request[\"maxBitRate\"],\n    )\n
"},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement.get_users","title":"get_users()","text":"

Get all the users registered in the server.

Returns:

Type Description list[User]

A list that holds all the info about all the available users in the server.

Source code in src/knuckles/_user_management.py
def get_users(self) -> list[User]:\n    \"\"\"Get all the users registered in the server.\n\n    Returns:\n        A list that holds all the info about all the available\n            users in the server.\n    \"\"\"\n\n    request = self.api.json_request(\"getUsers\")[\"users\"][\"user\"]\n\n    users: list[User] = []\n    for user in request:\n        users.append(\n            User(\n                self.subsonic,\n                user[\"username\"],\n                user[\"password\"],\n                user[\"email\"],\n                user[\"ldapAuthenticated\"],\n                user[\"adminRole\"],\n                user[\"settingsRole\"],\n                user[\"streamRole\"],\n                user[\"jukeboxRole\"],\n                user[\"downloadRole\"],\n                user[\"uploadRole\"],\n                user[\"playlistRole\"],\n                user[\"coverArtRole\"],\n                user[\"commentRole\"],\n                user[\"podcastRole\"],\n                user[\"shareRole\"],\n                user[\"videoConversionRole\"],\n                user[\"musicFolderId\"],\n                user[\"maxBitRate\"],\n            )\n        )\n\n    return users\n
"},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement.update_user","title":"update_user(username, password=None, email=None, ldap_authenticated=None, admin_role=None, settings_role=None, stream_role=None, jukebox_role=None, download_role=None, upload_role=None, playlist_role=None, cover_art_role=None, comment_role=None, podcast_role=None, share_role=None, video_conversion_role=None, music_folder_id=None, max_bit_rate=None)","text":"

Update the info of a user.

Parameters:

Name Type Description Default username str

The username of the user to update.

required password str | None

The password of the user to update.

None email str | None

The email of the user to update.

None ldap_authenticated bool | None

If the user is authenticated in a LDAP server.

None admin_role bool | None

If the user should be an administrator.

None settings_role bool | None

If the user is allowed to change its personal settings and password.

None stream_role bool | None

If the user should be allowed to stream songs and videos.

None jukebox_role bool | None

If the user should be able to play songs in the jukebox.

None download_role bool | None

If the user should be able to download files from the server.

None upload_role bool | None

If the user should be allowed to upload files to the server.

None playlist_role bool | None

If the user should be able to create and delete playlists.

None cover_art_role bool | None

If the user should be allowed to change cover art and tags of songs.

None comment_role bool | None

If the user is allowed to create and edit comments and ratings.

None podcast_role bool | None

If the user should be allowed to administrate podcasts.

None share_role bool | None

If the user should be able to create share links.

None video_conversion_role bool | None

If the use should be allowed to start video conversion in the server.

None music_folder_id list[str] | None

A list of IDs where the used should have access to. If no one is specified all of them will be accessible.

None max_bit_rate int | None

The max bitrate that the user should be able to stream.

None

Returns:

Type Description User

An object that holds all the info about the update user.

Source code in src/knuckles/_user_management.py
def update_user(\n    self,\n    username: str,\n    password: str | None = None,\n    email: str | None = None,\n    ldap_authenticated: bool | None = None,\n    admin_role: bool | None = None,\n    settings_role: bool | None = None,\n    stream_role: bool | None = None,\n    jukebox_role: bool | None = None,\n    download_role: bool | None = None,\n    upload_role: bool | None = None,\n    playlist_role: bool | None = None,\n    cover_art_role: bool | None = None,\n    comment_role: bool | None = None,\n    podcast_role: bool | None = None,\n    share_role: bool | None = None,\n    video_conversion_role: bool | None = None,\n    music_folder_id: list[str] | None = None,\n    max_bit_rate: int | None = None,\n) -> User:\n    \"\"\"Update the info of a user.\n\n    Args:\n        username: The username of the user to update.\n        password: The password of the user to update.\n        email: The email of the user to update.\n        ldap_authenticated: If the user is authenticated in a LDAP server.\n        admin_role: If the user should be an administrator.\n        settings_role: If the user is allowed to change its\n            personal settings and password.\n        stream_role: If the user should be allowed to stream songs and\n            videos.\n        jukebox_role: If the user should be able to play songs in the\n            jukebox.\n        download_role: If the user should be able to download files from\n            the server.\n        upload_role: If the user should be allowed to upload files to\n            the server.\n        playlist_role: If the user should be able to create and delete\n            playlists.\n        cover_art_role: If the user should be allowed to change cover\n            art and tags of songs.\n        comment_role: If the user is allowed to create and edit\n            comments and ratings.\n        podcast_role: If the user should be allowed to administrate\n            podcasts.\n        share_role: If the user should be able to create share links.\n        video_conversion_role: If the use should be allowed to\n            start video conversion in the server.\n        music_folder_id: A list of IDs where the used should have access\n            to. If no one is specified all of them will be accessible.\n        max_bit_rate: The max bitrate that the user should be able to\n            stream.\n\n    Returns:\n        An object that holds all the info about the update user.\n    \"\"\"\n\n    self.api.json_request(\n        \"updateUser\",\n        {\n            \"username\": username,\n            \"password\": password,\n            \"email\": email,\n            \"ldapAuthenticated\": ldap_authenticated,\n            \"adminRole\": admin_role,\n            \"settingsRole\": settings_role,\n            \"streamRole\": stream_role,\n            \"jukeboxRole\": jukebox_role,\n            \"downloadRole\": download_role,\n            \"uploadRole\": upload_role,\n            \"playlistRole\": playlist_role,\n            \"coverArtRole\": cover_art_role,\n            \"commentRole\": comment_role,\n            \"podcastRole\": podcast_role,\n            \"shareRole\": share_role,\n            \"videoConversionRole\": video_conversion_role,\n            \"musicFolderId\": music_folder_id,\n            \"maxBitRate\": max_bit_rate,\n        },\n    )\n\n    updated_user = User(\n        self.subsonic,\n        username,\n        password,\n        email,\n        ldap_authenticated,\n        admin_role,\n        settings_role,\n        stream_role,\n        jukebox_role,\n        download_role,\n        upload_role,\n        playlist_role,\n        cover_art_role,\n        comment_role,\n        podcast_role,\n        share_role,\n        video_conversion_role,\n        music_folder_id,\n        max_bit_rate,\n    )\n\n    return updated_user\n
"},{"location":"reference/summary/","title":"Summary","text":"
  • Reference
    • Api
    • Bookmarks
    • Browsing
    • Chat
    • Internet Radio
    • Jukebox
    • Lists
    • Media Annotation
    • Media Library Scanning
    • Media Retrieval
    • Playlists
    • Podcast
    • Searching
    • Sharing
    • Subsonic
    • System
    • User Management
    • Exceptions
    • Models
      • Album
      • Artist
      • Artist Index
      • Bookmark
      • Chat Message
      • Contributor
      • Cover Art
      • Genre
      • Internet Radio Station
      • Jukebox
      • Lyrics
      • Model
      • Music Directory
      • Music Folder
      • Now Playing Entry
      • Play Queue
      • Playlist
      • Podcast
      • Replay Gain
      • Scan Status
      • Search Result
      • Share
      • Song
      • Starred Content
      • System
      • User
      • Video
"},{"location":"reference/models/Album/","title":"Album","text":""},{"location":"reference/models/Album/#knuckles.models._album.Album","title":"Album(subsonic, id, parent=None, album=None, title=None, name=None, isDir=None, artist=None, artistId=None, coverArt=None, songCount=None, duration=None, playCount=None, created=None, starred=None, year=None, genre=None, played=None, userRating=None, song=None, recordLabels=None, musicBrainzId=None, genres=None, artists=None, displayArtist=None, releaseTypes=None, moods=None, sortName=None, originalReleaseDate=None, releaseDate=None, isCompilation=None, discTitles=None)","text":"

Bases: Model

Object that holds all the info of an album.

Attributes:

Name Type Description id str

The ID of the album.

parent str |\u00a0None

The ID of the parent media of the album.

name str | None

The name of the album.

album str | None

The name of the album (Can differ the name and title attributes, **not documented in the OpenSubsonic Spec).

is_dir bool | None

If the album is a directory.

title str | None

The name of the album (Can differ the name and album attributes, **not documented in the OpenSubsonic Spec).

artist Artist | None

The artist of the album.

cover_art CoverArt

All the info about the cover art of the album.

song_count int | None

The number of songs inside the album.

duration int | None

The total duration of the album in seconds.

play_count int | None

The times the album has been played.

created datetime | None

The timestamp when the album was created.

starred datetime | None

The timestamp when the album was starred if it is.

year int | None

The year when the album was released.

genre str | None

The genre of the album.

played datetime | None

The timestamp when the album was played.

user_rating int | None

The rating from 0 to 5 (inclusive) that the used has given to the album if it is rated.

songs list[Song] | None

The list of songs that the album contains.

info AlbumInfo | None

Extra info about the album.

record_labels list[RecordLabel] | None

List of all the record labels that have licensed the album.

music_brainz_id str | None

The ID of the MusicBrainz database entry of the album.

genres list[ItemGenre] | None

List of all the genres that the album has.

artists list[Artist] | None

List of all the artists involved with the album.

display_artist str\u00a0| None

String that condense all the artists involved with the album.

release_types list[str] | None

The types of album that the album is.

moods list[str] | None

List of all the moods that the album has.

sort_name str | None

The name of the album used for sorting.

original_release_date ReleaseDate | None

The original release date of the album.

release_date ReleaseDate | None

The release date of the album.

is_compilation bool | None

If the album is a compilation or not.

discs list[Disc] | None Source code in src/knuckles/models/_album.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    parent: str | None = None,\n    album: str | None = None,\n    title: str | None = None,\n    name: str | None = None,\n    isDir: bool | None = None,\n    artist: str | None = None,\n    artistId: str | None = None,\n    coverArt: str | None = None,\n    songCount: int | None = None,\n    duration: int | None = None,\n    playCount: int | None = None,\n    created: str | None = None,\n    starred: str | None = None,\n    year: int | None = None,\n    genre: str | None = None,\n    played: str | None = None,\n    userRating: int | None = None,\n    song: list[dict[str, Any]] | None = None,\n    recordLabels: list[dict[str, Any]] | None = None,\n    musicBrainzId: str | None = None,\n    genres: list[dict[str, Any]] | None = None,\n    artists: list[dict[str, Any]] | None = None,\n    displayArtist: str | None = None,\n    releaseTypes: list[str] | None = None,\n    moods: list[str] | None = None,\n    sortName: str | None = None,\n    originalReleaseDate: dict[str, Any] | None = None,\n    releaseDate: dict[str, Any] | None = None,\n    isCompilation: bool | None = None,\n    discTitles: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.parent = parent\n    self.album = album\n    self.name = name\n    self.is_dir = isDir\n    self.title = title\n    self.artist = Artist(self._subsonic, artistId, artist) if artistId else None\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.song_count = songCount\n    self.duration = duration\n    self.play_count = playCount\n    self.created = parser.parse(created) if created else None\n    self.starred = parser.parse(starred) if starred else None\n    self.year = year\n    self.genre = genre\n    self.played = parser.parse(played) if played else None\n    self.user_rating = userRating\n    self.songs = (\n        [song_model_module.Song(self._subsonic, **song_data) for song_data in song]\n        if song\n        else None\n    )\n    self.info: AlbumInfo | None = None\n    self.record_labels = (\n        [\n            RecordLabel(self._subsonic, **record_label)\n            for record_label in recordLabels\n        ]\n        if recordLabels\n        else None\n    )\n    self.music_brainz_id = musicBrainzId\n    self.genres = (\n        [ItemGenre(self._subsonic, **genre) for genre in genres] if genres else None\n    )\n    self.artists = (\n        [Artist(self._subsonic, **artist) for artist in artists]\n        if artists\n        else None\n    )\n    self.display_artist = displayArtist\n    self.release_types = releaseTypes\n    self.moods = moods\n    self.sort_name = sortName\n    self.original_release_date = (\n        ReleaseDate(self._subsonic, **originalReleaseDate)\n        if originalReleaseDate\n        else None\n    )\n    self.release_date = (\n        ReleaseDate(self._subsonic, **releaseDate) if releaseDate else None\n    )\n    self.is_compilation = isCompilation\n    self.discs = (\n        [Disc(self._subsonic, **disc) for disc in discTitles]\n        if discTitles\n        else None\n    )\n
"},{"location":"reference/models/Album/#knuckles.models._album.Album.generate","title":"generate()","text":"

Return a new album 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 Album

A new object with all the updated info.

Source code in src/knuckles/models/_album.py
def generate(self) -> \"Album\":\n    \"\"\"Return a new album object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    new_album = self._subsonic.browsing.get_album(self.id)\n    new_album.get_album_info()\n\n    return new_album\n
"},{"location":"reference/models/Album/#knuckles.models._album.Album.get_album_info","title":"get_album_info()","text":"

Get all the extra info about the album, it's set to the info attribute of the object.

Returns:

Type Description AlbumInfo

The extra info returned by the server.

Source code in src/knuckles/models/_album.py
def get_album_info(self) -> AlbumInfo:\n    \"\"\"Get all the extra info about the album, it's\n    set to the `info` attribute of the object.\n\n    Returns:\n        The extra info returned by the server.\n    \"\"\"\n\n    self.info = self._subsonic.browsing.get_album_info(self.id)\n\n    return self.info\n
"},{"location":"reference/models/Album/#knuckles.models._album.AlbumInfo","title":"AlbumInfo(subsonic, album_id, notes, musicBrainzId, lastFmUrl, smallImageUrl, mediumImageUrl, largeImageUrl)","text":"

Bases: Model

Object that holds all the info about the extra info of an album.

Attributes:

Name Type Description album_id str

The ID of the album where the extra info is from.

notes str

Notes of the album.

music_brainz_id str | None

The music brainz ID of the album.

last_fm_url str | None

The last.fm URL of the album

small_image_user str | None

The URL of the small sized image of the album.

medium_image_user str | None

The URL of the medium sized image of the album.

large_image_user str | None

The URL of the large sized image of the album.

Source code in src/knuckles/models/_album.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    album_id: str,\n    notes: str,\n    musicBrainzId: str | None,\n    lastFmUrl: str | None,\n    smallImageUrl: str | None,\n    mediumImageUrl: str | None,\n    largeImageUrl: str | None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.album_id = album_id\n    self.notes = notes\n    self.music_brainz_id = musicBrainzId\n    self.last_fm_url = lastFmUrl\n    self.small_image_url = smallImageUrl\n    self.medium_image_url = mediumImageUrl\n    self.large_image_url = largeImageUrl\n
"},{"location":"reference/models/Album/#knuckles.models._album.AlbumInfo.generate","title":"generate()","text":"

Return a new album info 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 AlbumInfo

A new object with all the updated info.

Source code in src/knuckles/models/_album.py
def generate(self) -> \"AlbumInfo\":\n    \"\"\"Return a new album info object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    return self._subsonic.browsing.get_album_info(self.album_id)\n
"},{"location":"reference/models/Album/#knuckles.models._album.Disc","title":"Disc(subsonic, disc, title)","text":"

Bases: Model

Object that holds all the info about a disc.

Attributes:

Name Type Description disc_number int

The number of the disc.

title str

The title of the disc.

Source code in src/knuckles/models/_album.py
def __init__(self, subsonic: \"Subsonic\", disc: int, title: str) -> None:\n    super().__init__(subsonic)\n\n    self.disc_number = disc\n    self.title = title\n
"},{"location":"reference/models/Album/#knuckles.models._album.RecordLabel","title":"RecordLabel(subsonic, name)","text":"

Bases: Model

Object that holds all the info about a record label.

Attributes:

Name Type Description name str

The name of the record label.

Source code in src/knuckles/models/_album.py
def __init__(self, subsonic: \"Subsonic\", name: str) -> None:\n    super().__init__(subsonic)\n\n    self.name = name\n
"},{"location":"reference/models/Album/#knuckles.models._album.ReleaseDate","title":"ReleaseDate(subsonic, year, month, day)","text":"

Bases: Model

Object that holds all the info about the release date of a media.

Attributes:

Name Type Description year int

The year when it was released.

month int

The month when it was released.

day int

The day when it was released.

Source code in src/knuckles/models/_album.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    year: int,\n    month: int,\n    day: int,\n) -> None:\n    super().__init__(subsonic)\n\n    self.year = year\n    self.month = month\n    self.day = day\n
"},{"location":"reference/models/Artist%20Index/","title":"Artist Index","text":""},{"location":"reference/models/Artist%20Index/#knuckles.models._artist_index.ArtistIndex","title":"ArtistIndex(subsonic, ignoredArticles, index=None)","text":"

Bases: Model

Object that holds all the info about an artist index.

Attributes:

Name Type Description ignored_articles list[str]

Ignored articles in the index.

index dict[str, list[Artist]] | None

Dictionary that holds the index, where the key is the index letter and the value a list of objects that holds all the info related with the artists in that are in the given index.

Source code in src/knuckles/models/_artist_index.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    ignoredArticles: str,\n    index: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.ignored_articles = ignoredArticles\n\n    self.index: dict[str, list[Artist]] | None\n\n    if index is None:\n        self.index = None\n        return\n\n    self.index = {}\n\n    for entry in index:\n        self.index[entry[\"name\"]] = [\n            Artist(subsonic=self._subsonic, **artist) for artist in entry[\"artist\"]\n        ]\n
"},{"location":"reference/models/Artist/","title":"Artist","text":""},{"location":"reference/models/Artist/#knuckles.models._artist.Artist","title":"Artist(subsonic, id, name=None, coverArt=None, albumCount=None, artistImageUrl=None, starred=None, userRating=None, averageRating=None, album=None, musicBrainzId=None, sortName=None, roles=None)","text":"

Bases: Model

Object that holds all the info of an artist.

Attributes:

Name Type Description id str

The ID of the artist.

name str | None

The name of the artist.

cover_art CoverArt | None

The cover art associated with the artist.

artist_image_url str |\u00a0None

The URL of the image of the artist.

album_count int |\u00a0None

The number of albums created by the artist.

starred datetime | None

The timestamp when the artist was starred if it is.

user_rating int | None

The rating from 0 to 5 (inclusive) that the used has given to the artist if it is rated.

average_rating float | None

The average rating given by all the users.

albums list[Album] | None

A list that holds all the info about all the albums created by the artist.

info ArtistInfo | None

All the extra info about the artist.

music_brainz_id str | None

The ID of the MusicBrainz database entry of the artist.

sort_name str\u00a0| None

The sort name of the artist.

roles list[str] | None

List with all the roles the artist has been in.

Source code in src/knuckles/models/_artist.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    name: str | None = None,\n    coverArt: str | None = None,\n    albumCount: int | None = None,\n    artistImageUrl: str | None = None,\n    starred: str | None = None,\n    userRating: int | None = None,\n    averageRating: float | None = None,\n    album: list[dict[str, Any]] | None = None,\n    musicBrainzId: str | None = None,\n    sortName: str | None = None,\n    roles: list[str] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.artist_image_url = artistImageUrl\n    self.album_count = albumCount\n    self.starred = parser.parse(starred) if starred else None\n    self.user_rating = userRating\n    self.average_rating = averageRating\n    self.albums = (\n        [\n            album_model_module.Album(self._subsonic, **album_data)\n            for album_data in album\n        ]\n        if album\n        else None\n    )\n    self.info: ArtistInfo | None = None\n    self.music_brainz_id = musicBrainzId\n    self.sort_name = sortName\n    self.roles = roles\n
"},{"location":"reference/models/Artist/#knuckles.models._artist.Artist.generate","title":"generate()","text":"

Return a new artist info 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 Artist

A new object with the updated model.

Source code in src/knuckles/models/_artist.py
def generate(self) -> \"Artist\":\n    \"\"\"Return a new artist info with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object itself\n    with immutability, e.g., foo = foo.generate().\n\n    Returns:\n        A new object with the updated model.\n    \"\"\"\n\n    new_artist = self._subsonic.browsing.get_artist(self.id)\n    new_artist.get_artist_info()\n\n    return new_artist\n
"},{"location":"reference/models/Artist/#knuckles.models._artist.Artist.get_artist_info","title":"get_artist_info()","text":"

Get all the extra info about the artist, it's set to the info attribute of the object.

Returns:

Type Description ArtistInfo

The extra info returned by the server.

Source code in src/knuckles/models/_artist.py
def get_artist_info(self) -> ArtistInfo:\n    \"\"\"Get all the extra info about the artist, it's\n    set to the `info` attribute of the object.\n\n    Returns:\n        The extra info returned by the server.\n    \"\"\"\n\n    self.info = self._subsonic.browsing.get_artist_info(self.id)\n\n    return self.info\n
"},{"location":"reference/models/Artist/#knuckles.models._artist.ArtistInfo","title":"ArtistInfo(subsonic, artist_id, biography, musicBrainzId, lastFmUrl, smallImageUrl, mediumImageUrl, largeImageUrl, similarArtist=None)","text":"

Bases: Model

Object that holds all the extra info of an artist.

Attributes:

Name Type Description artist_id str

The ID of the artist.

biography str

The biography of an artist.

music_brainz_id str | None

The ID of the MusicBrainz database entry of the artist.

last_fm_url str | None

The last.fm URL of the artist.

small_image_url str | None

The URL of the small sized image of the artist.

medium_image_url str | None

The URL of the medium sized image of the artist.

large_image_url str | None

The URL of the large sized image of the artist.

similar_artists list[Artist] | None

A list that contains the all the info about similar artists.

Source code in src/knuckles/models/_artist.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    artist_id: str,\n    biography: str,\n    musicBrainzId: str | None,\n    lastFmUrl: str | None,\n    smallImageUrl: str | None,\n    mediumImageUrl: str | None,\n    largeImageUrl: str | None,\n    similarArtist: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.artist_id = artist_id\n    self.biography = biography\n    self.music_brainz_id = musicBrainzId\n    self.last_fm_url = lastFmUrl\n    self.small_image_url = smallImageUrl\n    self.medium_image_url = mediumImageUrl\n    self.large_image_url = largeImageUrl\n    self.similar_artists = (\n        [Artist(self._subsonic, **artist) for artist in similarArtist]\n        if similarArtist\n        else None\n    )\n
"},{"location":"reference/models/Artist/#knuckles.models._artist.ArtistInfo.generate","title":"generate()","text":"

Return a new artist info 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 ArtistInfo

A new object with the updated model.

Source code in src/knuckles/models/_artist.py
def generate(self) -> \"ArtistInfo\":\n    \"\"\"Return a new artist info with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object itself\n    with immutability, e.g., foo = foo.generate().\n\n    Returns:\n        A new object with the updated model.\n    \"\"\"\n\n    return self._subsonic.browsing.get_artist_info(self.artist_id)\n
"},{"location":"reference/models/Bookmark/","title":"Bookmark","text":""},{"location":"reference/models/Bookmark/#knuckles.models._bookmark.Bookmark","title":"Bookmark(subsonic, entry, position, username=None, created=None, changed=None, comment=None)","text":"

Bases: Model

Object that holds all the info about a bookmark.

Attributes:

Name Type Description song Song

All the info about the bookmarked song.

position int

The position in seconds of the playback of the song when it was bookmarked.

user User | None

All the info about the user that created the bookmark.

comment str | None

A comment attached to the bookmark.

created datetime | None

The timestamp when the bookmark was created.

changed datetime | None

The timestamp when the bookmark was updated.

Source code in src/knuckles/models/_bookmark.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    entry: dict[str, Any],\n    position: int,\n    username: str | None = None,\n    created: str | None = None,\n    changed: str | None = None,\n    comment: str | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.song = Song(self._subsonic, **entry)\n    self.position = position\n    self.user = (\n        User(subsonic=self._subsonic, username=username) if username else None\n    )\n    self.comment = comment\n    self.created = parser.parse(created) if created else None\n    self.changed = parser.parse(changed) if changed else None\n
"},{"location":"reference/models/Bookmark/#knuckles.models._bookmark.Bookmark.create","title":"create()","text":"

Create a new bookmark for the authenticated user with the same data of the object where this method is called.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_bookmark.py
def create(self) -> Self:\n    \"\"\"Create a new bookmark for the authenticated user\n    with the same data of the object where this method is\n    called.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.bookmarks.create_bookmark(\n        self.song.id, self.position, self.comment\n    )\n\n    return self\n
"},{"location":"reference/models/Bookmark/#knuckles.models._bookmark.Bookmark.delete","title":"delete()","text":"

Delete the bookmark entry from the server.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_bookmark.py
def delete(self) -> Self:\n    \"\"\"Delete the bookmark entry from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.bookmarks.delete_bookmark(self.song.id)\n\n    return self\n
"},{"location":"reference/models/Bookmark/#knuckles.models._bookmark.Bookmark.generate","title":"generate()","text":"

Return a new album 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 Bookmark

A new object with all the updated info.

Source code in src/knuckles/models/_bookmark.py
def generate(self) -> \"Bookmark\":\n    \"\"\"Return a new album object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    get_bookmark = self._subsonic.bookmarks.get_bookmark(self.song.id)\n\n    if get_bookmark is None:\n        raise ResourceNotFound()\n\n    return get_bookmark\n
"},{"location":"reference/models/Bookmark/#knuckles.models._bookmark.Bookmark.update","title":"update()","text":"

Update the info about the bookmark of this song using the current data of the object.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_bookmark.py
def update(self) -> Self:\n    \"\"\"Update the info about the bookmark of this song using the\n    current data of the object.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.bookmarks.update_bookmark(\n        self.song.id, self.position, self.comment\n    )\n\n    return self\n
"},{"location":"reference/models/Chat%20Message/","title":"Chat Message","text":""},{"location":"reference/models/Chat%20Message/#knuckles.models._chat_message.ChatMessage","title":"ChatMessage(subsonic, username, time, message)","text":"

Bases: Model

Object that holds all the info about a chat message.

Attributes:

Name Type Description user User

The user author of the chat message.

message

The message send by the user.

time datetime

The timestamp when the chat message was send.

Source code in src/knuckles/models/_chat_message.py
def __init__(\n    self, subsonic: \"Subsonic\", username: str, time: int, message: str\n) -> None:\n    super().__init__(subsonic)\n\n    self.user = User(self._subsonic, username)\n    self.message = message\n\n    # Divide by 1000 as the Subsonic API return in milliseconds instead of seconds\n    self.time: datetime = datetime.fromtimestamp(time / 1000)\n
"},{"location":"reference/models/Contributor/","title":"Contributor","text":""},{"location":"reference/models/Contributor/#knuckles.models._contributor.Contributor","title":"Contributor(subsonic, role, artist, subRole=None)","text":"

Bases: Model

Object that holds all the info about a contributor.

Attributes:

Name Type Description role str

The role of the contributor.

artist Artist

All the artist info associated with the contributor.

subrole str | None

The subrole of the contributor.

Source code in src/knuckles/models/_contributor.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    role: str,\n    artist: Artist,\n    subRole: str | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.role = role\n    self.artist = artist\n    self.subrole = subRole\n
"},{"location":"reference/models/Cover%20Art/","title":"Cover Art","text":""},{"location":"reference/models/Cover%20Art/#knuckles.models._cover_art.CoverArt","title":"CoverArt(subsonic, id)","text":"

Bases: Model

Object that holds all the info of a cover art.

Attributes:

Name Type Description id str

The ID of the cover art.

Source code in src/knuckles/models/_cover_art.py
def __init__(self, subsonic: \"Subsonic\", id: str) -> None:\n    super().__init__(subsonic)\n\n    self.id: str = id\n
"},{"location":"reference/models/Genre/","title":"Genre","text":""},{"location":"reference/models/Genre/#knuckles.models._genre.Genre","title":"Genre(subsonic, value, songCount=None, albumCount=None)","text":"

Bases: Model

Object that holds all the info about a genre.

Attributes:

Name Type Description value str

The name of the genre.

song_count int | None

Number of songs tagged with the genre.

album_count int | None

Number of albums tagged with the genre.

:param subsonic: The subsonic object to make all the internal requests with it. :type subsonic: Subsonic :param value: The name of the genre. :type value: str :param songCount: The number of songs with this genre, defaults to None. :type songCount: int | None, optional :param albumCount: The number of albums with this genre, defaults to None. :type albumCount: int | None, optional

Source code in src/knuckles/models/_genre.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    value: str,\n    songCount: int | None = None,\n    albumCount: int | None = None,\n) -> None:\n    \"\"\"Representation of all the data related to a genre in Subsonic.\n\n    :param subsonic: The subsonic object to make all the internal requests with it.\n    :type subsonic: Subsonic\n    :param value: The name of the genre.\n    :type value: str\n    :param songCount: The number of songs with this genre, defaults to None.\n    :type songCount: int | None, optional\n    :param albumCount: The number of albums with this genre, defaults to None.\n    :type albumCount: int | None, optional\n    \"\"\"\n\n    super().__init__(subsonic)\n\n    self.value = value\n    self.song_count = songCount\n    self.album_count = albumCount\n
"},{"location":"reference/models/Genre/#knuckles.models._genre.Genre.generate","title":"generate()","text":"

Return a new genre 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().

:return: A new genre object with all the data updated. :rtype: Genre

Source code in src/knuckles/models/_genre.py
def generate(self) -> \"Genre\":\n    \"\"\"Return a new genre with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object itself\n    with immutability, e.g., foo = foo.generate().\n\n    :return: A new genre object with all the data updated.\n    :rtype: Genre\n    \"\"\"\n    get_genre = self._subsonic.browsing.get_genre(self.value)\n\n    if get_genre is None:\n        raise ResourceNotFound(\n            \"Unable to generate genre as it does not exist in the server\"\n        )\n\n    return get_genre\n
"},{"location":"reference/models/Genre/#knuckles.models._genre.ItemGenre","title":"ItemGenre(subsonic, name)","text":"

Bases: Model

Object that holds all the info about a item genre.

Attributes:

Name Type Description name

The name of the genre.

Source code in src/knuckles/models/_genre.py
def __init__(self, subsonic: \"Subsonic\", name: str) -> None:\n    super().__init__(subsonic)\n\n    self.name = name\n
"},{"location":"reference/models/Internet%20Radio%20Station/","title":"Internet Radio Station","text":""},{"location":"reference/models/Internet%20Radio%20Station/#knuckles.models._internet_radio_station.InternetRadioStation","title":"InternetRadioStation(subsonic, id, name, streamUrl, homepageUrl)","text":"

Bases: Model

Object that holds all the info about a Internet radio station.

Attributes:

Name Type Description id str

The ID of the Internet radio station.

name str

Then name of the Internet radio station.

stream_url str

The URL of the stream of the Internet radio station.

homepage_url str

The URl of the hompage of the Internet radio station.

Source code in src/knuckles/models/_internet_radio_station.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    name: str,\n    streamUrl: str,\n    homepageUrl: str,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n    self.stream_url = streamUrl\n    self.homepage_url = homepageUrl\n
"},{"location":"reference/models/Internet%20Radio%20Station/#knuckles.models._internet_radio_station.InternetRadioStation.create","title":"create()","text":"

Create a new Internet radio station for the authenticated user with the same data of the object where this method is called.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_internet_radio_station.py
def create(self) -> Self:\n    \"\"\"Create a new Internet radio station for the authenticated user\n    with the same data of the object where this method is\n    called.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.internet_radio.create_internet_radio_station(\n        self.stream_url, self.name, self.homepage_url\n    )\n\n    return self\n
"},{"location":"reference/models/Internet%20Radio%20Station/#knuckles.models._internet_radio_station.InternetRadioStation.delete","title":"delete()","text":"

Delete the Internet radio station entry from the server.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_internet_radio_station.py
def delete(self) -> Self:\n    \"\"\"Delete the Internet radio station entry from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.internet_radio.delete_internet_radio_station(self.id)\n\n    return self\n
"},{"location":"reference/models/Internet%20Radio%20Station/#knuckles.models._internet_radio_station.InternetRadioStation.generate","title":"generate()","text":"

Return a new album 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 InternetRadioStation | None

A new object with all the updated info.

Source code in src/knuckles/models/_internet_radio_station.py
def generate(self) -> \"InternetRadioStation | None\":\n    \"\"\"Return a new album object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    get_station = self._subsonic.internet_radio.get_internet_radio_station(self.id)\n\n    if get_station is None:\n        raise ResourceNotFound(\n            (\n                \"Unable to generate internet radio station\"\n                + \"as it does not exist in the server\"\n            )\n        )\n\n    return get_station\n
"},{"location":"reference/models/Internet%20Radio%20Station/#knuckles.models._internet_radio_station.InternetRadioStation.update","title":"update()","text":"

Update the info about the Internet radio station using the current data of the object.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_internet_radio_station.py
def update(self) -> Self:\n    \"\"\"Update the info about the Internet radio station using the\n    current data of the object.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.internet_radio.update_internet_radio_station(\n        self.id, self.stream_url, self.name, self.homepage_url\n    )\n\n    return self\n
"},{"location":"reference/models/Jukebox/","title":"Jukebox","text":""},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox","title":"Jukebox(subsonic, currentIndex, playing, gain, position, entry=None)","text":"

Bases: Model

Object that holds all the info about a jukebox.

Attributes:

Name Type Description current_index int

The index in the playlist of the current playing song in the jukebox.

playing bool

If the jukebox is playing a song or not.

gain float

The gain of the playback of the jukebox.

position int

How many seconds the song has been already player.

playlist list[Song] | None

A list that holds all the info about all the songs that are in the playlist of the jukebox.

Source code in src/knuckles/models/_jukebox.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    currentIndex: int,\n    playing: bool,\n    gain: float,\n    position: int,\n    entry: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.current_index: int = currentIndex\n    self.playing: bool = playing\n    self.gain: float = gain\n    self.position: int = position\n\n    self.playlist: list[Song] | None = None\n    if entry is None:\n        return\n\n    self.playlist = []\n\n    for song in entry:\n        self.playlist.append(Song(subsonic=self._subsonic, **song))\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.add","title":"add(songs_ids)","text":"

Add songs to the playlist of the jukebox.

Parameters:

Name Type Description Default songs_ids list[str]

The IDs of the songs to add.

required

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_jukebox.py
def add(self, songs_ids: list[str]) -> Self:\n    \"\"\"Add songs to the playlist of the jukebox.\n\n    Args:\n        songs_ids: The IDs of the songs to add.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.add(songs_ids)\n\n    songs_to_add = [\n        Song(subsonic=self._subsonic, id=song_id) for song_id in songs_ids\n    ]\n    if self.playlist is not None:\n        self.playlist += songs_to_add\n        return self\n\n    # If the playlist is None then the real value of it is unknown,\n    # so a call the API is necessary to get a correct representation\n    # of the jukebox\n    self.playlist = self.generate().playlist\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.clear","title":"clear()","text":"

Calls the \"jukeboxControl\" endpoint of the API with the action \"clear\".

:return: The object itself to allow method chaining. :rtype: Self

Source code in src/knuckles/models/_jukebox.py
def clear(self) -> Self:\n    \"\"\"Calls the \"jukeboxControl\" endpoint of the API with the action \"clear\".\n\n    :return: The object itself to allow method chaining.\n    :rtype: Self\n    \"\"\"\n\n    self._subsonic.jukebox.clear()\n    self.playlist = []\n\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.generate","title":"generate()","text":"

Return a new jukebox 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 Jukebox

A new object with all the updated info.

Source code in src/knuckles/models/_jukebox.py
def generate(self) -> \"Jukebox\":\n    \"\"\"Return a new jukebox object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    return self._subsonic.jukebox.get()\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.remove","title":"remove(index)","text":"

Remove a song from the playlist of the jukebox.

Parameters:

Name Type Description Default index int

The index of the song in the playlist to remove.

required

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_jukebox.py
def remove(self, index: int) -> Self:\n    \"\"\"Remove a song from the playlist of the jukebox.\n\n    Args:\n        index: The index of the song in the playlist to remove.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.remove(index)\n\n    if self.playlist is not None:\n        del self.playlist[index]\n        return self\n\n    # If the playlist is None the real value of it is unknown,\n    # so a call the API is necessary to get a correct representation of the jukebox\n    self.playlist = self.generate().playlist\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.set","title":"set(songs_ids)","text":"

Set the songs of the playlist of the jukebox.

Parameters:

Name Type Description Default songs_ids list[str]

The IDs of the songs to be set the playlist to.

required

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_jukebox.py
def set(self, songs_ids: list[str]) -> Self:\n    \"\"\"Set the songs of the playlist of the jukebox.\n\n    Args:\n        songs_ids: The IDs of the songs to be set the playlist to.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.set(songs_ids)\n\n    self.playlist = [\n        Song(subsonic=self._subsonic, id=song_id) for song_id in songs_ids\n    ]\n\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.set_gain","title":"set_gain(gain)","text":"

Set the gain of the jukebox.

Parameters:

Name Type Description Default gain float

The new gain of the jukebox.

required

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_jukebox.py
def set_gain(self, gain: float) -> Self:\n    \"\"\"Set the gain of the jukebox.\n\n    Args:\n        gain: The new gain of the jukebox.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.set_gain(gain)\n    self.gain = gain\n\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.shuffle","title":"shuffle()","text":"

Shuffle the playlist of the jukebox.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_jukebox.py
def shuffle(self) -> Self:\n    \"\"\"Shuffle the playlist of the jukebox.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.shuffle()\n\n    # The shuffle is server side so a call to the API is necessary\n    # to get the new order of the playlist\n    self.playlist = self._subsonic.jukebox.get().playlist\n\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.skip","title":"skip(index, offset=0)","text":"

Skips the current playing song of the jukebox to another one.

Parameters:

Name Type Description Default index int

The index of the song to skip to.

required offset float

An offset in seconds where the playback of the song should start at.

0

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_jukebox.py
def skip(self, index: int, offset: float = 0) -> Self:\n    \"\"\"Skips the current playing song of the jukebox to another one.\n\n    Args:\n        index: The index of the song to skip to.\n        offset: An offset in seconds where the playback of the song\n            should start at.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.skip(index, offset)\n\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.start","title":"start()","text":"

Start the playback of the next song in the playlist.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_jukebox.py
def start(self) -> Self:\n    \"\"\"Start the playback of the next song in the playlist.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.start()\n\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.stop","title":"stop()","text":"

Stop the playback of the jukebox.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_jukebox.py
def stop(self) -> Self:\n    \"\"\"Stop the playback of the jukebox.\n\n    Returns:\n        The object itself.\n    \"\"\"\n    self._subsonic.jukebox.stop()\n\n    return self\n
"},{"location":"reference/models/Lyrics/","title":"Lyrics","text":""},{"location":"reference/models/Lyrics/#knuckles.models._lyrics.Lyrics","title":"Lyrics(subsonic, artist, title, value)","text":"

Bases: Model

Object that holds all the info about the lyrics of a song.

Attributes:

Name Type Description artist_name str

The name of the artist of the song.

song_title str

The title of the song.

lyrics str

The lyrics text of the song.

Source code in src/knuckles/models/_lyrics.py
def __init__(\n    self, subsonic: \"Subsonic\", artist: str, title: str, value: str\n) -> None:\n    super().__init__(subsonic)\n\n    self.artist_name = artist\n    self.song_title = title\n    self.lyrics = value\n
"},{"location":"reference/models/Model/","title":"Model","text":""},{"location":"reference/models/Model/#knuckles.models._model.Model","title":"Model(subsonic)","text":"

Generic parent class for all the models. Have an internal attribute to hold a Subsonic object to access the OpenSubsonic REST API.

Source code in src/knuckles/models/_model.py
def __init__(self, subsonic: \"Subsonic\") -> None:\n    self._subsonic = subsonic\n
"},{"location":"reference/models/Music%20Directory/","title":"Music Directory","text":""},{"location":"reference/models/Music%20Directory/#knuckles.models._music_directory.MusicDirectory","title":"MusicDirectory(subsonic, id, name, parent=None, starred=None, userRating=None, averageRating=None, playCount=None, child=None)","text":"

Bases: Model

Object that holds all the info about a music directory.

Attributes:

Name Type Description id str

The ID of the music directory.

name str parent str | None starred datetime | None

The timestamp when the music directory was starred by the authenticated user if it was.

user_rating int

The rating given by the authenticated user if they rated it.

average_rating float | None

The average rating given to the music directory.

play_count int | None

The number of times songs have been played that are in the music directory.

songs list[Song] | None

List that holds all the info about all the songs that are part of the music directory.

Source code in src/knuckles/models/_music_directory.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    name: str,\n    parent: str | None = None,\n    starred: str | None = None,\n    userRating: int | None = None,\n    averageRating: float | None = None,\n    playCount: int | None = None,\n    child: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n    self.parent = parent\n    self.starred = parser.parse(starred) if starred else None\n    self.user_rating = userRating\n    self.average_rating = averageRating\n    self.play_count = playCount\n    self.songs = (\n        [Song(subsonic=self._subsonic, **song) for song in child] if child else None\n    )\n
"},{"location":"reference/models/Music%20Folder/","title":"Music Folder","text":""},{"location":"reference/models/Music%20Folder/#knuckles.models._music_folder.MusicFolder","title":"MusicFolder(subsonic, id, name=None)","text":"

Bases: Model

Object that holds all the info about a music folder

Attributes:

Name Type Description id

The ID of the music folder.

name

The name of the music folder.

Source code in src/knuckles/models/_music_folder.py
def __init__(self, subsonic: \"Subsonic\", id: str, name: str | None = None) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n
"},{"location":"reference/models/Music%20Folder/#knuckles.models._music_folder.MusicFolder.generate","title":"generate()","text":"

Return a new music folder 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 MusicFolder

A new object with all the updated info.

Source code in src/knuckles/models/_music_folder.py
def generate(self) -> \"MusicFolder\":\n    \"\"\"Return a new music folder object with all the data updated from the\n    API, using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    music_folders = self._subsonic.browsing.get_music_folders()\n\n    # Get the first element with the same ID\n    music_folder = next(\n        music_folder for music_folder in music_folders if music_folder.id == self.id\n    )\n\n    return music_folder\n
"},{"location":"reference/models/Now%20Playing%20Entry/","title":"Now Playing Entry","text":""},{"location":"reference/models/Now%20Playing%20Entry/#knuckles.models._now_playing_entry.NowPlayingEntry","title":"NowPlayingEntry(subsonic, username, minutesAgo=None, playerId=None, playerName=None, **song_data)","text":"

Bases: Model

Object that holds all the info about a now playing entry.

Attributes:

Name Type Description user

The user that is currently playing a song.

song Song

All the info about the song that is now playing.

minutes_ago int | None

How many minutes ago the songs started its playback.

player_id int | None

The ID of the played where the song is playing.

player_name song | None

The name of the player where the song is playing.

Source code in src/knuckles/models/_now_playing_entry.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    username: str,\n    minutesAgo: int | None = None,\n    playerId: int | None = None,\n    playerName: str | None = None,\n    **song_data: Any,\n) -> None:\n    super().__init__(subsonic)\n\n    self.user = User(self._subsonic, username)\n    self.minutes_ago = minutesAgo\n    self.player_id = playerId\n    self.player_name = playerName\n    self.song = Song(subsonic=self._subsonic, **song_data)\n
"},{"location":"reference/models/Play%20Queue/","title":"Play Queue","text":""},{"location":"reference/models/Play%20Queue/#knuckles.models._play_queue.PlayQueue","title":"PlayQueue(subsonic, entry, current=None, position=None, username=None, changed=None, changedBy=None)","text":"

Bases: Model

Object that holds al the info about a play queue.

Attributes:

Name Type Description songs list[Song]

All the info about all the songs in the play queue.

current Song |\u00a0None

The current playing song in the play queue.

position int | None

The index of the current playing song in the play queue.

user User | None

The user owner of the play queue.

changed timedate | None

The timestamp when the play queue received any change.

changed_by str |\u00a0None

The name of the client that made the last modification to the play queue.

Source code in src/knuckles/models/_play_queue.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    entry: list[dict[str, Any]],\n    current: str | None = None,\n    position: int | None = None,\n    username: str | None = None,\n    changed: str | None = None,\n    changedBy: str | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.current = Song(self._subsonic, current) if current else None\n    self.position = position\n    self.user = User(self._subsonic, username) if username else None\n    self.changed = parser.parse(changed) if changed else None\n    self.changed_by = changedBy\n    self.songs = [Song(self._subsonic, **song) for song in entry] if entry else None\n
"},{"location":"reference/models/Play%20Queue/#knuckles.models._play_queue.PlayQueue.generate","title":"generate()","text":"

Return a new play queue 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 PlayQueue

A new object with all the updated info.

Source code in src/knuckles/models/_play_queue.py
def generate(self) -> \"PlayQueue\":\n    \"\"\"Return a new play queue object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    get_play_queue = self._subsonic.bookmarks.get_play_queue()\n\n    return get_play_queue\n
"},{"location":"reference/models/Play%20Queue/#knuckles.models._play_queue.PlayQueue.save","title":"save()","text":"

Calls the \"savePlayQueue\" endpoint of the API.

Saves the play queue using the parameters in the object.

:return: description :rtype: Self

Source code in src/knuckles/models/_play_queue.py
def save(self) -> Self:\n    \"\"\"Calls the \"savePlayQueue\" endpoint of the API.\n\n    Saves the play queue using the parameters in the object.\n\n    :return: _description_\n    :rtype: Self\n    \"\"\"\n\n    song_ids: list[str] = [song.id for song in self.songs] if self.songs else []\n\n    self._subsonic.bookmarks.save_play_queue(\n        song_ids, self.current.id if self.current else None, self.position\n    )\n\n    return self\n
"},{"location":"reference/models/Playlist/","title":"Playlist","text":""},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist","title":"Playlist(subsonic, id, name=None, songCount=None, duration=None, created=None, changed=None, comment=None, owner=None, public=None, coverArt=None, allowedUser=None, entry=None)","text":"

Bases: Model

Object that holds all the info about a playlist.

Attributes:

Name Type Description id str

The ID of the playlist.

name str\u00a0| None

The name of the playlist.

song_count int |\u00a0None

The number of songs in the playlist.

duration int | None

The total durations of all the songs in the playlist.

created datetime | None

The timestamp when the playlist was created.

changed datetime | None

The timestamp when the playlist was last edited.

comment str\u00a0|\u00a0None

A comment attach with the playlist.

owner User | None

All the info related with the user creator of the playlist.

public bool |\u00a0None

If the playlist is public or not.

cover_art CoverArt |\u00a0None

All the info related with the cover art of the playlist.

allowed_users list[User] | None

List that holds all the info related with all the users allowed to see the playlist.

songs list[Song] | None

List that holds all the info about all the songs in the playlist.

Source code in src/knuckles/models/_playlist.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    name: str | None = None,\n    songCount: int | None = None,\n    duration: int | None = None,\n    created: str | None = None,\n    changed: str | None = None,\n    comment: str | None = None,\n    owner: str | None = None,\n    public: bool | None = None,\n    coverArt: str | None = None,\n    allowedUser: list[str] | None = None,\n    entry: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n    self.song_count = songCount\n    self.duration = duration\n    self.created = parser.parse(created) if created else None\n    self.changed = parser.parse(changed) if changed else None\n    self.comment = comment\n    self.owner = User(self._subsonic, owner) if owner else None\n    self.public = public\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.allowed_users = (\n        [User(self._subsonic, username) for username in allowedUser]\n        if allowedUser\n        else None\n    )\n    self.songs = [Song(self._subsonic, **song) for song in entry] if entry else None\n
"},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist.add_songs","title":"add_songs(song_ids)","text":"

Add songs to the playlist.

Parameters:

Name Type Description Default song_ids list[str]

The ID of songs to add.

required

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_playlist.py
def add_songs(self, song_ids: list[str]) -> Self:\n    \"\"\"Add songs to the playlist.\n\n    Args:\n        song_ids: The ID of songs to add.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.playlists.update_playlist(self.id, song_ids_to_add=song_ids)\n\n    if not self.songs:\n        self.songs = []\n\n    for id_ in song_ids:\n        self.songs.append(Song(self._subsonic, id_))\n\n    if not self.song_count:\n        self.song_count = 0\n\n    self.song_count += len(song_ids)\n\n    return self\n
"},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist.create","title":"create()","text":"

Create a playlist with the same info of the object.

Returns:

Type Description Playlist

The new created playlist.

Source code in src/knuckles/models/_playlist.py
def create(self) -> \"Playlist\":\n    \"\"\"Create a playlist with the same info of the object.\n\n    Returns:\n        The new created playlist.\n    \"\"\"\n\n    # Create a list of Song IDs if songs is not None\n    songs_ids = [song.id for song in self.songs] if self.songs else None\n\n    new_playlist = self._subsonic.playlists.create_playlist(\n        # Ignore the None type error as the server\n        # should return an Error Code 10 in response\n        self.name,  # type: ignore[arg-type]\n        self.comment,\n        self.public,\n        songs_ids,\n    )\n\n    return new_playlist\n
"},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist.delete","title":"delete()","text":"

Delete the playlist from the server.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_playlist.py
def delete(self) -> Self:\n    \"\"\"Delete the playlist from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.playlists.delete_playlist(self.id)\n\n    return self\n
"},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist.generate","title":"generate()","text":"

Return a new playlist 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 Playlist

A new object with all the updated info.

Source code in src/knuckles/models/_playlist.py
def generate(self) -> \"Playlist\":\n    \"\"\"Return a new playlist object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    return self._subsonic.playlists.get_playlist(self.id)\n
"},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist.remove_songs","title":"remove_songs(songs_indexes)","text":"

Remove songs from the playlist.

Parameters:

Name Type Description Default songs_indexes list[int]

The indexes of the songs to remove.

required

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_playlist.py
def remove_songs(self, songs_indexes: list[int]) -> Self:\n    \"\"\"Remove songs from the playlist.\n\n    Args:\n        songs_indexes: The indexes of the songs to remove.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.playlists.update_playlist(\n        self.id, song_indexes_to_remove=songs_indexes\n    )\n\n    if not self.songs:\n        self.songs = []\n\n    for index in songs_indexes:\n        del self.songs[index]\n\n    if not self.song_count:\n        self.song_count = 0\n\n    self.song_count -= len(songs_indexes)\n\n    return self\n
"},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist.update","title":"update()","text":"

Updates changed info between the model and the server.

Warning

It doesn't change the list of songs in the playlist. For do it use the add_songs and remove_songs methods.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_playlist.py
def update(self) -> Self:\n    \"\"\"Updates changed info between the model and the server.\n\n    Warning:\n        It doesn't change the list of songs in the playlist. For do\n        it use the `add_songs` and `remove_songs` methods.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.playlists.update_playlist(\n        self.id, self.name, self.comment, self.public\n    )\n\n    return self\n
"},{"location":"reference/models/Podcast/","title":"Podcast","text":""},{"location":"reference/models/Podcast/#knuckles.models._podcast.Channel","title":"Channel(subsonic, id, url=None, title=None, description=None, coverArt=None, originalImageUrl=None, status=None, episode=None)","text":"

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] |\u00a0None

List that holds all the info about all the episodes of the channel.

Source code in src/knuckles/models/_podcast.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    url: str | None = None,\n    title: str | None = None,\n    description: str | None = None,\n    coverArt: str | None = None,\n    originalImageUrl: str | None = None,\n    status: str | None = None,\n    episode: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.url = url\n    self.title = title\n    self.description = description\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.original_image_url = originalImageUrl\n    self.status = status\n    self.episodes = (\n        [Episode(self._subsonic, **episode_data) for episode_data in episode]\n        if episode\n        else None\n    )\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Channel.create","title":"create()","text":"

Create a new podcast with the info of the current one.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_podcast.py
def create(self) -> Self:\n    \"\"\"Create a new podcast with the info of the current one.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    # Ignore the None type error as the server\n    # should return an Error Code 10 in response\n    self._subsonic.podcast.create_podcast_channel(\n        self.url  # type: ignore[arg-type]\n    )\n\n    return self\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Channel.delete","title":"delete()","text":"

Delete the podcast from the server.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_podcast.py
def delete(self) -> Self:\n    \"\"\"Delete the podcast from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.podcast.delete_podcast_channel(self.id)\n\n    return self\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Channel.generate","title":"generate()","text":"

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 src/knuckles/models/_podcast.py
def generate(self) -> \"Channel\":\n    \"\"\"Return a new channel object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    return self._subsonic.podcast.get_podcast_channel(self.id)\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Episode","title":"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)","text":"

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 |\u00a0None

The ID of the parent of the episode.

is_dir bool |\u00a0None

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 |\u00a0None

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 src/knuckles/models/_podcast.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    streamId: str | None = None,\n    channelId: str | None = None,\n    title: str | None = None,\n    description: str | None = None,\n    publishDate: str | None = None,\n    status: str | None = None,\n    parent: str | None = None,\n    isDir: bool | None = None,\n    year: int | None = None,\n    genre: str | None = None,\n    coverArt: str | None = None,\n    size: int | None = None,\n    contentType: str | None = None,\n    suffix: str | None = None,\n    duration: int | None = None,\n    bitRate: int | None = None,\n    path: str | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.stream_id = streamId\n    self.channel = Channel(self._subsonic, channelId) if channelId else None\n    self.title = title\n    self.description = description\n    self.publish_date = parser.parse(publishDate) if publishDate else None\n    self.status = status\n    self.parent = parent\n    self.is_dir = isDir\n    self.year = year\n    self.genre = genre\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.size = size\n    self.content_type = contentType\n    self.suffix = suffix\n    self.duration = duration\n    self.bit_rate = bitRate\n    self.path = path\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Episode.delete","title":"delete()","text":"

Delete the episode from the server.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_podcast.py
def delete(self) -> Self:\n    \"\"\"Delete the episode from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.podcast.delete_podcast_episode(self.id)\n\n    return self\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Episode.download","title":"download()","text":"

Request the server to download the episode.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_podcast.py
def download(self) -> Self:\n    \"\"\"Request the server to download the episode.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.podcast.download_podcast_episode(self.id)\n\n    return self\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Episode.generate","title":"generate()","text":"

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.

Source code in src/knuckles/models/_podcast.py
def generate(self) -> \"Episode\":\n    \"\"\"Return a new episode object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    get_episode = self._subsonic.podcast.get_podcast_episode(self.id)\n\n    if get_episode is None:\n        raise ResourceNotFound(\n            \"Unable to generate episode as it does not exist in the server\"\n        )\n\n    return get_episode\n
"},{"location":"reference/models/Replay%20Gain/","title":"Replay Gain","text":""},{"location":"reference/models/Replay%20Gain/#knuckles.models._replay_gain.ReplayGain","title":"ReplayGain(subsonic, trackGain=None, albumGain=None, trackPeak=None, albumPeak=None, baseGain=None, fallbackGain=None)","text":"

Bases: Model

Object that holds all the info about the gain of the playback of a media.

Attributes:

Name Type Description track_gain str\u00a0| None

The track replay gain in dB.

album_gain str\u00a0| None

The album replay gain in dB.

track_peak int | None

The track peak value.

album_peak int | None

The album peak value.

base_gain int | None

The base replay gain in dB.

fallback_gain int | None

Fallback gain in dB used when the desired one is missing.

Source code in src/knuckles/models/_replay_gain.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    trackGain: str | None = None,\n    albumGain: str | None = None,\n    trackPeak: str | None = None,\n    albumPeak: str | None = None,\n    baseGain: str | None = None,\n    fallbackGain: int | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.track_gain = trackGain\n    self.album_gain = albumGain\n    self.track_peak = trackPeak\n    self.album_peak = albumPeak\n    self.base_gain = baseGain\n    self.fallback_gain = fallbackGain\n
"},{"location":"reference/models/Scan%20Status/","title":"Scan Status","text":""},{"location":"reference/models/Scan%20Status/#knuckles.models._scan_status.ScanStatus","title":"ScanStatus(subsonic, scanning, count)","text":"

Bases: Model

Object that holds all the info about a scan status.

Attributes:

Name Type Description scanning bool

If the server is scanning media or not.

count int

The number of media already scanned.

Source code in src/knuckles/models/_scan_status.py
def __init__(self, subsonic: \"Subsonic\", scanning: bool, count: int) -> None:\n    super().__init__(subsonic)\n\n    self.scanning: bool = scanning\n    self.count: int = count\n
"},{"location":"reference/models/Search%20Result/","title":"Search Result","text":""},{"location":"reference/models/Search%20Result/#knuckles.models._search_result.SearchResult","title":"SearchResult(subsonic, songs=None, albums=None, artists=None)","text":"

Bases: Model

Object that holds all the info about a search result.

Attributes:

Name Type Description songs list[Song] | None

List that holds all the info about all the songs returned in the search result.-

albums list[Album] | None

List that holds all the info about all the albums returned in the search result.

artists list[Artist] | None

List that holds all the info about all the artists returned in the search result.

Source code in src/knuckles/models/_search_result.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    songs: list[Song] | None = None,\n    albums: list[Album] | None = None,\n    artists: list[Artist] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.songs = songs\n    self.albums = albums\n    self.artists = artists\n
"},{"location":"reference/models/Share/","title":"Share","text":""},{"location":"reference/models/Share/#knuckles.models._share.Share","title":"Share(subsonic, id, url=None, description=None, username=None, created=None, expires=None, lastVisited=None, visitCount=None, entry=None)","text":"

Bases: Model

Object that holds all the info about a share.

Attributes:

Name Type Description id str

The ID of the share.

url str | None

The URL to access the shared media.

description str | None

The description of the share.

user User | None

All the info related with the user creator of the share.

created datetime | None

The timestamp when the share was created.

expires datetime\u00a0| None

The timestamp when the share will expire.

last_visited datetime | None

The timestamp when the share was last visited.

visit_count int | None

Number of times the share has been visited.

songs list[Song] | None

List that holds all the info about all the songs available to access with the share.

Source code in src/knuckles/models/_share.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    url: str | None = None,\n    description: str | None = None,\n    username: str | None = None,\n    created: str | None = None,\n    expires: str | None = None,\n    lastVisited: str | None = None,\n    visitCount: int | None = None,\n    entry: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.url = url\n    self.description = description\n    self.user = User(self._subsonic, username) if username else None\n    self.created = parser.parse(created) if created else None\n    self.expires = parser.parse(expires) if expires else None\n    self.last_visited = parser.parse(lastVisited) if lastVisited else None\n    self.visit_count = visitCount\n    self.songs = [Song(self._subsonic, **song) for song in entry] if entry else None\n
"},{"location":"reference/models/Share/#knuckles.models._share.Share.create","title":"create()","text":"

Create a new share with the same info of the current one.

Raises:

Type Description ShareInvalidSongList

Raised if the song list contained in the share is empty.

Returns:

Type Description Share

The new created share.

Source code in src/knuckles/models/_share.py
def create(self) -> \"Share\":\n    \"\"\"Create a new share with the same info of the current one.\n\n    Raises:\n        ShareInvalidSongList: Raised if the song list contained in\n            the share is empty.\n\n    Returns:\n        The new created share.\n    \"\"\"\n\n    if self.songs is None or self.songs == []:\n        raise ShareInvalidSongList(\n            (\n                \"A list with at least one song model object in the songs parameter\"\n                + \"is necessary to create a share\"\n            )\n        )\n\n    songs_ids = [song.id for song in self.songs]\n\n    new_share = self._subsonic.sharing.create_share(\n        songs_ids, self.description, self.expires\n    )\n\n    return new_share\n
"},{"location":"reference/models/Share/#knuckles.models._share.Share.delete","title":"delete()","text":"

Delete the share from the server.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_share.py
def delete(self) -> Self:\n    \"\"\"Delete the share from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.sharing.delete_share(self.id)\n\n    return self\n
"},{"location":"reference/models/Share/#knuckles.models._share.Share.generate","title":"generate()","text":"

Return a new share 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 Share | None

A new object with all the updated info.

Source code in src/knuckles/models/_share.py
def generate(self) -> \"Share | None\":\n    \"\"\"Return a new share object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    get_share = self._subsonic.sharing.get_share(self.id)\n\n    if get_share is None:\n        raise ResourceNotFound\n\n    return get_share\n
"},{"location":"reference/models/Share/#knuckles.models._share.Share.update","title":"update()","text":"

Update the info of the share with the one in the model.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_share.py
def update(self) -> Self:\n    \"\"\"Update the info of the share with the one in the model.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.sharing.update_share(self.id, self.description, self.expires)\n\n    return self\n
"},{"location":"reference/models/Song/","title":"Song","text":""},{"location":"reference/models/Song/#knuckles.models._song.Song","title":"Song(subsonic, id, title=None, parent=None, isDir=None, isVideo=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)","text":"

Bases: Model

Object that holds all the info about a song.

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\u00a0| None

The HTTP ContentType of the transcoded file of the song.

transcoded_suffix str\u00a0| 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\u00a0| 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\u00a0| 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\u00a0| 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\u00a0| None

The timestamp when the song was last played.

bpm int | None

The bpm of the song.

comment str |\u00a0None

The comment of the song.

sort_name str\u00a0| None

The sort name of the song.

music_brainz_id str\u00a0| None

The ID of the MusicBrainz entry of the song.

genres list[ItemGenre |\u00a0None

List that holds all the info about all the genres of the song.

artists list[Artist] |\u00a0None

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 |\u00a0None

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\u00a0|\u00a0None

The display name of the composer of the song.

moods list[str] |\u00a0None

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 src/knuckles/models/_song.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    title: str | None = None,\n    parent: str | None = None,\n    isDir: bool | None = None,\n    isVideo: bool | None = None,\n    album: str | None = None,\n    artist: str | None = None,\n    track: int | None = None,\n    year: int | None = None,\n    genre: str | None = None,\n    coverArt: str | None = None,\n    size: int | None = None,\n    contentType: str | None = None,\n    suffix: str | None = None,\n    transcodedContentType: str | None = None,\n    transcodedSuffix: str | None = None,\n    duration: int | None = None,\n    bitRate: int | None = None,\n    path: str | None = None,\n    userRating: int | None = None,\n    averageRating: float | None = None,\n    playCount: int | None = None,\n    discNumber: int | None = None,\n    created: str | None = None,\n    starred: str | None = None,\n    albumId: str | None = None,\n    artistId: str | None = None,\n    type: str | None = None,\n    bookmarkPosition: int | None = None,\n    originalWidth: None = None,\n    originalHeight: None = None,\n    played: str | None = None,\n    bpm: int | None = None,\n    comment: str | None = None,\n    sortName: str | None = None,\n    musicBrainzId: str | None = None,\n    genres: list[dict[str, Any]] | None = None,\n    artists: list[dict[str, Any]] | None = None,\n    displayArtist: str | None = None,\n    albumArtists: list[dict[str, Any]] | None = None,\n    displayAlbumArtist: str | None = None,\n    contributors: list[dict[str, Any]] | None = None,\n    displayComposer: str | None = None,\n    moods: list[str] | None = None,\n    replayGain: dict[str, Any] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id: str = id\n    self.title: str | None = title\n    self.parent: str | None = parent\n    self.track: int | None = track\n    self.year: int | None = year\n    self.genre = Genre(self._subsonic, genre) if genre else None\n    self.size: int | None = size\n    self.content_type: str | None = contentType\n    self.suffix: str | None = suffix\n    self.transcoded_content_type: str | None = transcodedContentType\n    self.transcoded_suffix: str | None = transcodedSuffix\n    self.duration: int | None = duration\n    self.bit_rate: int | None = bitRate\n    self.path: str | None = path\n    self.user_rating: int | None = userRating\n    self.average_rating: float | None = averageRating\n    self.play_count: int | None = playCount\n    self.disc_number: int | None = discNumber\n    self.type: str | None = type\n    self.bookmark_position: int | None = bookmarkPosition\n    self.album = (\n        album_model_module.Album(self._subsonic, albumId, name=album)\n        if albumId\n        else None\n    )\n    self.artist = Artist(self._subsonic, artistId, artist) if artistId else None\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.created = parser.parse(created) if created else None\n    self.starred = parser.parse(starred) if starred else None\n    self.played = parser.parse(played) if played else None\n    self.bpm = bpm\n    self.comment = comment\n    self.sort_name = sortName\n    self.music_brainz_id = musicBrainzId\n    self.genres = (\n        [ItemGenre(self._subsonic, **genre) for genre in genres] if genres else None\n    )\n    self.artists = (\n        [Artist(self._subsonic, **artist) for artist in artists]\n        if artists\n        else None\n    )\n    self.display_artist = displayArtist\n    self.album_artists = (\n        [Artist(self._subsonic, **artist) for artist in albumArtists]\n        if albumArtists\n        else None\n    )\n    self.display_album_artist = displayAlbumArtist\n    self.contributors = (\n        [Contributor(self._subsonic, **contributor) for contributor in contributors]\n        if contributors\n        else None\n    )\n    self.display_composer = displayComposer\n    self.moods = moods\n    self.replay_gain = (\n        ReplayGain(self._subsonic, **replayGain) if replayGain else None\n    )\n
"},{"location":"reference/models/Song/#knuckles.models._song.Song.generate","title":"generate()","text":"

Return a new song 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 Song

A new object with all the updated info.

Source code in src/knuckles/models/_song.py
def generate(self) -> \"Song\":\n    \"\"\"Return a new song object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    return self._subsonic.browsing.get_song(self.id)\n
"},{"location":"reference/models/Song/#knuckles.models._song.Song.remove_rating","title":"remove_rating()","text":"

Remove the rating for the song.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_song.py
def remove_rating(self) -> Self:\n    \"\"\"Remove the rating for the song.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.media_annotation.remove_rating(self.id)\n\n    return self\n
"},{"location":"reference/models/Song/#knuckles.models._song.Song.scrobble","title":"scrobble(time, submission=True)","text":"

Scrobble the song.

Parameters:

Name Type Description Default time datetime

The timestamp when the song was scrobble:

required submission bool

If the scrobble is a request to a submission or it is a now playing entry.

True

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_song.py
def scrobble(self, time: datetime, submission: bool = True) -> Self:\n    \"\"\"Scrobble the song.\n\n    Args:\n        time: The timestamp when the song was scrobble:\n        submission: If the scrobble is a request to a submission or\n            it is a now playing entry.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.media_annotation.scrobble([self.id], [time], submission)\n\n    return self\n
"},{"location":"reference/models/Song/#knuckles.models._song.Song.set_rating","title":"set_rating(rating)","text":"

Set the rating of the song.

Parameters:

Name Type Description Default rating int

The new rating for the song.

required

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_song.py
def set_rating(self, rating: int) -> Self:\n    \"\"\"Set the rating of the song.\n\n    Args:\n        rating: The new rating for the song.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.media_annotation.set_rating(self.id, rating)\n\n    return self\n
"},{"location":"reference/models/Song/#knuckles.models._song.Song.star","title":"star()","text":"

Star the song for the authenticated user.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_song.py
def star(self) -> Self:\n    \"\"\"Star the song for the authenticated user.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.media_annotation.star_song(self.id)\n\n    return self\n
"},{"location":"reference/models/Song/#knuckles.models._song.Song.unstar","title":"unstar()","text":"

Unstar the song for the authenticated user.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_song.py
def unstar(self) -> Self:\n    \"\"\"Unstar the song for the authenticated user.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.media_annotation.unstar_song(self.id)\n\n    return self\n
"},{"location":"reference/models/Starred%20Content/","title":"Starred Content","text":""},{"location":"reference/models/Starred%20Content/#knuckles.models._starred_content.StarredContent","title":"StarredContent(subsonic, song=None, album=None, artist=None)","text":"

Bases: Model

Object that holds all the info about starred content.

Attributes:

Name Type Description songs list[Song] | None

List that holds all the info about all the starred songs.

albums list[Album] | None

List that holds all the info about all the starred albums.

artists list[Artist] |\u00a0None

List that holds all the info about all the starred artists.

Source code in src/knuckles/models/_starred_content.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    song: list[dict[str, Any]] | None = None,\n    album: list[dict[str, Any]] | None = None,\n    artist: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.songs = (\n        [Song(subsonic=self._subsonic, **song) for song in song] if song else None\n    )\n    self.albums = (\n        [Album(subsonic=self._subsonic, **album) for album in album]\n        if album\n        else None\n    )\n    self.artists = (\n        [Artist(subsonic=self._subsonic, **artist) for artist in artist]\n        if artist\n        else None\n    )\n
"},{"location":"reference/models/System/","title":"System","text":""},{"location":"reference/models/System/#knuckles.models._system.License","title":"License(subsonic, valid, email=None, licenseExpires=None, trialExpires=None)","text":"

Bases: Model

Object that holds all the info about the license status of the server.

Attributes:

Name Type Description valid bool

If the license of the server is valid.

email str | None

The email of the authenticated user.

license_expires datetime | None

The timestamp when the license expires.

trial_expires datetime | None

The timestamp when the trial expires if it has not already.

Source code in src/knuckles/models/_system.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    valid: bool,\n    email: str | None = None,\n    licenseExpires: str | None = None,\n    trialExpires: str | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.valid: bool = valid\n    self.email: str | None = email\n\n    self.license_expires: datetime | None\n    if licenseExpires is not None:\n        self.license_expires = parser.parse(licenseExpires)\n    else:\n        self.license_expires = None\n\n    self.trial_expires: datetime | None\n    if trialExpires is not None:\n        self.trial_expires = parser.parse(trialExpires)\n    else:\n        self.trial_expires = None\n
"},{"location":"reference/models/System/#knuckles.models._system.SubsonicResponse","title":"SubsonicResponse(subsonic, status, version, type=None, serverVersion=None, openSubsonic=None)","text":"

Bases: Model

Object that holds all the generic info about a response in a OpenSubsonic REST API call.

Attributes:

Name Type Description status str

The status of the response, can be \"ok\" or \"failed\".

version str

The server supported version of the OpenSubonic REST API.

type str | None

The name of the server reported by itself.

server_version str | None

The server actual version.

open_subsonic bool | None

If the server supports OpenSubsonic REST API extensions.

Source code in src/knuckles/models/_system.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    status: str,\n    version: str,\n    type: str | None = None,\n    serverVersion: str | None = None,\n    openSubsonic: bool | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.status = status\n    self.version = version\n    self.type = type\n    self.server_version = serverVersion\n    self.open_subsonic = openSubsonic\n
"},{"location":"reference/models/User/","title":"User","text":""},{"location":"reference/models/User/#knuckles.models._user.User","title":"User(subsonic, username, password=None, email=None, ldap_authenticated=None, admin_role=None, settings_role=None, stream_role=None, jukebox_role=None, download_role=None, upload_role=None, playlist_role=None, cover_art_role=None, comment_role=None, podcast_role=None, share_role=None, video_conversion_role=None, music_folder_id=None, max_bit_rate=None)","text":"

Bases: Model

Object that holds all the info about a user.

Attributes:

Name Type Description username str

The username of the user.

password str\u00a0| None

The password of the user.

email str | None

The email of the user.

ldap_authenticated bool | None

If the user is has been authenticated using LDAP.

admin_role bool |\u00a0None

If the user has access to admin functionalities.

settings_role bool |\u00a0None

If the user has access to change the settings of the server.

stream_role bool |\u00a0None

If the user has access to stream media.

jukebox_role bool |\u00a0None

If the user has access to control the jukebox.

download_role bool |\u00a0None

If the user has access to download media.

upload_role bool |\u00a0None

If the user has access to upload media.

playlist_role bool |\u00a0None

If the user has access to create, edit and delete playlists.

cover_art_role bool |\u00a0None

If the user has access to manipulate cover arts of media.

comment_role bool |\u00a0None

If the user has access to manipulate comments.

podcast_role bool |\u00a0None

If the user has access to manipulate podcasts.

share_role bool |\u00a0None

If the user has access to create, modify and delete shares.

video_conversion_role bool |\u00a0None

If the user is able to trigger video conversions.

music_folder_id list[str] | None

The IDs of the music folders where the user is able to access content from.

max_bit_rate int | None

The max bit rate the user can stream.

Source code in src/knuckles/models/_user.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    username: str,\n    password: str | None = None,\n    email: str | None = None,\n    ldap_authenticated: bool | None = None,\n    admin_role: bool | None = None,\n    settings_role: bool | None = None,\n    stream_role: bool | None = None,\n    jukebox_role: bool | None = None,\n    download_role: bool | None = None,\n    upload_role: bool | None = None,\n    playlist_role: bool | None = None,\n    cover_art_role: bool | None = None,\n    comment_role: bool | None = None,\n    podcast_role: bool | None = None,\n    share_role: bool | None = None,\n    video_conversion_role: bool | None = None,\n    music_folder_id: list[str] | None = None,\n    max_bit_rate: int | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.username = username\n    self.password = password\n    self.email = email\n    self.ldap_authenticated = ldap_authenticated\n    self.admin_role = admin_role\n    self.settings_role = settings_role\n    self.stream_role = stream_role\n    self.jukebox_role = jukebox_role\n    self.download_role = download_role\n    self.upload_role = upload_role\n    self.playlist_role = playlist_role\n    self.cover_art_role = cover_art_role\n    self.comment_role = comment_role\n    self.podcast_role = podcast_role\n    self.share_role = share_role\n    self.video_conversion_role = video_conversion_role\n    self.music_folder_id = music_folder_id\n    self.max_bit_rate = max_bit_rate\n
"},{"location":"reference/models/User/#knuckles.models._user.User.change_password","title":"change_password(new_password)","text":"

Change the password of the user.

Parameters:

Name Type Description Default new_password str

The new password for the user

required

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_user.py
def change_password(self, new_password: str) -> Self:\n    \"\"\"Change the password of the user.\n\n    Args:\n        new_password: The new password for the user\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.user_management.change_password(self.username, new_password)\n\n    return self\n
"},{"location":"reference/models/User/#knuckles.models._user.User.create","title":"create()","text":"

Create a new user with the attributes of the model.

Raises:

Type Description MissingRequiredProperty

Raised if a required property to create the user is missing.

Returns: The object itself.

Source code in src/knuckles/models/_user.py
def create(self) -> Self:\n    \"\"\"Create a new user with the attributes of the model.\n\n    Raises:\n        MissingRequiredProperty: Raised if a required property to create\n            the user is missing.\n    Returns:\n        The object itself.\n    \"\"\"\n\n    if not self.email:\n        raise MissingRequiredProperty(\n            \"You must provide an email in the email property of the model\"\n        )\n\n    if not self.password:\n        raise MissingRequiredProperty(\n            \"You must provide an password in the password property of the model\"\n        )\n\n    self._subsonic.user_management.create_user(\n        self.username,\n        self.password,\n        self.email,\n        self.ldap_authenticated,\n        self.admin_role,\n        self.settings_role,\n        self.stream_role,\n        self.jukebox_role,\n        self.download_role,\n        self.upload_role,\n        self.playlist_role,\n        self.cover_art_role,\n        self.comment_role,\n        self.podcast_role,\n        self.share_role,\n        self.video_conversion_role,\n        self.music_folder_id,\n        self.max_bit_rate,\n    )\n\n    return self\n
"},{"location":"reference/models/User/#knuckles.models._user.User.delete","title":"delete()","text":"

Delete the user from the server.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_user.py
def delete(self) -> Self:\n    \"\"\"Delete the user from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.user_management.delete_user(self.username)\n\n    return self\n
"},{"location":"reference/models/User/#knuckles.models._user.User.generate","title":"generate()","text":"

Return a new user 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 User

A new object with all the updated info.

Source code in src/knuckles/models/_user.py
def generate(self) -> \"User\":\n    \"\"\"Return a new user object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    return self._subsonic.user_management.get_user(self.username)\n
"},{"location":"reference/models/User/#knuckles.models._user.User.update","title":"update()","text":"

Updates the info about the user in the server with the one in the model.

Returns:

Type Description Self

The object itself.

Source code in src/knuckles/models/_user.py
def update(self) -> Self:\n    \"\"\"Updates the info about the user in the server with\n    the one in the model.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.user_management.update_user(\n        self.username,\n        self.password,\n        self.email,\n        self.ldap_authenticated,\n        self.admin_role,\n        self.settings_role,\n        self.stream_role,\n        self.jukebox_role,\n        self.download_role,\n        self.upload_role,\n        self.playlist_role,\n        self.cover_art_role,\n        self.comment_role,\n        self.podcast_role,\n        self.share_role,\n        self.video_conversion_role,\n        self.music_folder_id,\n        self.max_bit_rate,\n    )\n\n    return self\n
"},{"location":"reference/models/Video/","title":"Video","text":""},{"location":"reference/models/Video/#knuckles.models._video.AudioTrack","title":"AudioTrack(subsonic, id, name=None, languageCode=None)","text":"

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 src/knuckles/models/_video.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    name: str | None = None,\n    languageCode: str | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n    self.language_code = languageCode\n
"},{"location":"reference/models/Video/#knuckles.models._video.Captions","title":"Captions(subsonic, id, name=None)","text":"

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 src/knuckles/models/_video.py
def __init__(self, subsonic: \"Subsonic\", id: str, name: str | None = None) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n
"},{"location":"reference/models/Video/#knuckles.models._video.Video","title":"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)","text":"

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\u00a0| None

The HTTP ContentType of the transcoded file of the song.

transcoded_suffix str\u00a0| 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\u00a0| 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\u00a0| 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\u00a0| 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\u00a0| None

The timestamp when the song was last played.

bpm int | None

The bpm of the song.

comment str |\u00a0None

The comment of the song.

sort_name str\u00a0| None

The sort name of the song.

music_brainz_id str\u00a0| None

The ID of the MusicBrainz entry of the song.

genres list[ItemGenre |\u00a0None

List that holds all the info about all the genres of the song.

artists list[Artist] |\u00a0None

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 |\u00a0None

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\u00a0|\u00a0None

The display name of the composer of the song.

moods list[str] |\u00a0None

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 src/knuckles/models/_video.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    title: str | None = None,\n    parent: str | None = None,\n    album: str | None = None,\n    artist: str | None = None,\n    track: int | None = None,\n    year: int | None = None,\n    genre: str | None = None,\n    coverArt: str | None = None,\n    size: int | None = None,\n    contentType: str | None = None,\n    suffix: str | None = None,\n    transcodedContentType: str | None = None,\n    transcodedSuffix: str | None = None,\n    duration: int | None = None,\n    bitRate: int | None = None,\n    path: str | None = None,\n    userRating: int | None = None,\n    averageRating: float | None = None,\n    playCount: int | None = None,\n    discNumber: int | None = None,\n    created: str | None = None,\n    starred: str | None = None,\n    albumId: str | None = None,\n    artistId: str | None = None,\n    type: str | None = None,\n    bookmarkPosition: int | None = None,\n    originalWidth: None = None,\n    originalHeight: None = None,\n    played: str | None = None,\n    bpm: int | None = None,\n    comment: str | None = None,\n    sortName: str | None = None,\n    musicBrainzId: str | None = None,\n    genres: list[dict[str, Any]] | None = None,\n    artists: list[dict[str, Any]] | None = None,\n    displayArtist: str | None = None,\n    albumArtists: list[dict[str, Any]] | None = None,\n    displayAlbumArtist: str | None = None,\n    contributors: list[dict[str, Any]] | None = None,\n    displayComposer: str | None = None,\n    moods: list[str] | None = None,\n    replayGain: dict[str, Any] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id: str = id\n    self.title: str | None = title\n    self.parent: str | None = parent\n    self.track: int | None = track\n    self.year: int | None = year\n    self.genre = Genre(self._subsonic, genre) if genre else None\n    self.size: int | None = size\n    self.content_type: str | None = contentType\n    self.suffix: str | None = suffix\n    self.transcoded_content_type: str | None = transcodedContentType\n    self.transcoded_suffix: str | None = transcodedSuffix\n    self.duration: int | None = duration\n    self.bit_rate: int | None = bitRate\n    self.path: str | None = path\n    self.user_rating: int | None = userRating\n    self.average_rating: float | None = averageRating\n    self.play_count: int | None = playCount\n    self.disc_number: int | None = discNumber\n    self.type: str | None = type\n    self.bookmark_position: int | None = bookmarkPosition\n    self.album = (\n        album_model_module.Album(self._subsonic, albumId, name=album)\n        if albumId\n        else None\n    )\n    self.artist = Artist(self._subsonic, artistId, artist) if artistId else None\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.created = parser.parse(created) if created else None\n    self.starred = parser.parse(starred) if starred else None\n    self.played = parser.parse(played) if played else None\n    self.bpm = bpm\n    self.comment = comment\n    self.sort_name = sortName\n    self.music_brainz_id = musicBrainzId\n    self.genres = (\n        [ItemGenre(self._subsonic, **genre) for genre in genres] if genres else None\n    )\n    self.artists = (\n        [Artist(self._subsonic, **artist) for artist in artists]\n        if artists\n        else None\n    )\n    self.display_artist = displayArtist\n    self.album_artists = (\n        [Artist(self._subsonic, **artist) for artist in albumArtists]\n        if albumArtists\n        else None\n    )\n    self.display_album_artist = displayAlbumArtist\n    self.contributors = (\n        [Contributor(self._subsonic, **contributor) for contributor in contributors]\n        if contributors\n        else None\n    )\n    self.display_composer = displayComposer\n    self.moods = moods\n    self.replay_gain = (\n        ReplayGain(self._subsonic, **replayGain) if replayGain else None\n    )\n\n    self.info: VideoInfo | None = None\n
"},{"location":"reference/models/Video/#knuckles.models._video.Video.generate","title":"generate()","text":"

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 src/knuckles/models/_video.py
def generate(self) -> \"Video\":\n    \"\"\"Return a new video object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    video = self._subsonic.browsing.get_video(self.id)\n\n    if video is None:\n        raise ResourceNotFound()\n\n    return video\n
"},{"location":"reference/models/Video/#knuckles.models._video.Video.get_video_info","title":"get_video_info()","text":"

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 src/knuckles/models/_video.py
def get_video_info(self) -> VideoInfo:\n    \"\"\"Get all the extra info about the video, it's\n    set to the `info` attribute of the object.\n\n    Returns:\n        The extra info returned by the server.\n    \"\"\"\n\n    self.info = self._subsonic.browsing.get_video_info(self.id)\n\n    return self.info\n
"},{"location":"reference/models/Video/#knuckles.models._video.VideoInfo","title":"VideoInfo(subsonic, video_id, id, captions=None, audioTrack=None, conversion=None)","text":"

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 |\u00a0None

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] |\u00a0None

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.

Source code in src/knuckles/models/_video.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    video_id: str,\n    id: str,\n    captions: dict[str, Any] | None = None,\n    audioTrack: list[dict[str, Any]] | None = None,\n    conversion: dict[str, Any] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.video_id = video_id\n    self.id = id\n    self.captions = (\n        Captions(subsonic=self._subsonic, **captions) if captions else None\n    )\n    self.conversion = (\n        Video(subsonic=self._subsonic, **conversion) if conversion else None\n    )\n\n    self.audio_tracks: dict[str, AudioTrack] | None\n    if not audioTrack:\n        self.audio_track = None\n        return\n\n    self.audio_tracks = {}\n    for track in audioTrack:\n        language_code = track[\"languageCode\"]\n\n        del track[\"languageCode\"]\n        self.audio_tracks[language_code] = AudioTrack(\n            subsonic=self._subsonic, **track\n        )\n
"}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Knuckles","text":"

A OpenSubsonic API wrapper for Python 3.11.0+.

"},{"location":"#compatiblity","title":"Compatiblity","text":"

Knuckles only works with servers compatible with the REST API version 1.4.0 onwards (Subsonic 4.2+). It follows strictly the OpenSubsonic API Spec, it being fully retro-compatible with the original Subsonic API.

"},{"location":"#quickstart","title":"Quickstart","text":"

...

"},{"location":"#acknowledgements","title":"Acknowledgements","text":"

Created with by Jorge \"Kutu\" Dob\u00f3n Blanco.

"},{"location":"reference/Api/","title":"Api","text":""},{"location":"reference/Api/#knuckles._api.Api","title":"Api(url, username, password, client, use_https=True, use_token=True, request_method=RequestMethod.GET)","text":"

Class in charge of managing the access to the REST API of the OpenSubsonic server.

Parameters:

Name Type Description Default url str

The base URL that points to the server, without the /rest/ path.

required username str

The name of the user to login as in the API.

required password str

The password of the user to login as in the API.

required client str

The name of the client to report to the API.

required use_https bool

If HTTPS should be used.

True use_token bool

If the modern token based authentication should be used.

True request_method RequestMethod

If the requests should send the data as GET parameters or POST form data.

GET Source code in .venv/lib/python3.11/site-packages/knuckles/_api.py
def __init__(\n    self,\n    url: str,\n    username: str,\n    password: str,\n    client: str,\n    use_https: bool = True,\n    use_token: bool = True,\n    request_method: RequestMethod = RequestMethod.GET,\n) -> None:\n    \"\"\"Class in charge of managing the access to the REST API of\n    the OpenSubsonic server.\n\n    Args:\n        url: The base URL that points to the server,\n            **without** the `/rest/` path.\n        username: The name of the user to login as in the API.\n        password: The password of the user to login as in the API.\n        client: The name of the client to report to the API.\n        use_https:  If HTTPS should be used.\n        use_token: If the modern token based authentication should be used.\n        request_method: If the requests should send the data as\n            GET parameters or POST form data.\n    \"\"\"\n    pass\n\n    self.username = username\n    self.password = password\n    self.client = client\n    self.use_token = use_token\n    self.request_method = request_method\n\n    # Sanitize url and ensure the correct protocol is used\n    parsed_url: ParseResult = urlparse(url)\n\n    # If the user accidentally specifies a protocol the url goes to netloc instead\n    base_url: str = parsed_url.path if parsed_url.path != \"\" else parsed_url.netloc\n\n    if use_https:\n        self.url = f\"https://{base_url}\"\n    else:\n        self.url = f\"http://{base_url}\"\n
"},{"location":"reference/Api/#knuckles._api.Api.generate_url","title":"generate_url(endpoint, extra_params)","text":"

Using the PreparedRequest object of the Requests request package generates a valid URL for any endpoint with a valid authentication parameter.

Parameters:

Name Type Description Default endpoint str

The endpoint to be appended in the URL, without the leading /rest/.

required extra_params dict[str, Any]

The extra parameters to be added to the URL.

required

Returns:

Type Description str

A valid URL pointing to the desired endpoint and with the requested parameters, including the ones needed for authentication.

Source code in .venv/lib/python3.11/site-packages/knuckles/_api.py
def generate_url(self, endpoint: str, extra_params: dict[str, Any]) -> str:\n    \"\"\"Using the PreparedRequest object of the Requests request package\n    generates a valid URL for any endpoint with\n    a valid authentication parameter.\n\n\n    Args:\n        endpoint: The endpoint to be appended in the URL, **without** the\n            leading `/rest/`.\n        extra_params: The extra parameters to be added to the URL.\n\n    Returns:\n        A valid URL pointing to the desired endpoint and with the\n            requested parameters, including the ones needed\n            for authentication.\n    \"\"\"\n\n    prepared_request = PreparedRequest()\n    prepared_request.prepare_url(\n        f\"{self.url}/rest/{endpoint}\", {**self._generate_params(extra_params)}\n    )\n\n    # Ignore the type error caused by the url parameter of prepared_request\n    # as the prepare_url method always set it to a string.\n    return prepared_request.url  # type: ignore [return-value]\n
"},{"location":"reference/Api/#knuckles._api.Api.json_request","title":"json_request(endpoint, extra_params=None)","text":"

Makes a request to the OpenSubsonic server REST API and returns the data from the subsonic_response property. Should never be used with non-json compatible endpoints.

Parameters:

Name Type Description Default endpoint str

The endpoint to be appended in the URL, without the leading /rest/.

required extra_params dict[str, Any] | None

Extra parameters to the added to the request.

None

Raises:

Type Description code_error

Raise an error if the server reports and issue with the request in the form of a code error, the raised follows the form CodeErrorXX where XX is the raised code error. UnknownCodeError is raised if the error code is not part of the standard.

Returns:

Type Description dict[str, Any]

The data contained in the subsonic_response property.

Source code in .venv/lib/python3.11/site-packages/knuckles/_api.py
def json_request(\n    self, endpoint: str, extra_params: dict[str, Any] | None = None\n) -> dict[str, Any]:\n    \"\"\"Makes a request to the OpenSubsonic server REST API and returns the\n    data from the `subsonic_response` property. Should **never** be used\n    with non-json compatible endpoints.\n\n    Args:\n        endpoint: The endpoint to be appended in the URL, **without** the\n            leading `/rest/`.\n        extra_params: Extra parameters to the added to the request.\n\n    Raises:\n        code_error: Raise an error if the server reports and issue with the\n            request in the form of a code error, the raised follows\n            the form `CodeErrorXX` where `XX` is the raised code error.\n            `UnknownCodeError` is raised if the error code\n            is not part of the standard.\n\n    Returns:\n        The data contained in the `subsonic_response` property.\n    \"\"\"\n\n    response = self.raw_request(endpoint, extra_params)\n\n    json_response: dict[str, Any] = response.json()[\"subsonic-response\"]\n\n    if json_response[\"status\"] == \"failed\":\n        code_error: ERROR_CODE_EXCEPTION = get_error_code_exception(\n            json_response[\"error\"][\"code\"]\n        )\n\n        raise code_error(json_response[\"error\"][\"message\"])\n\n    return json_response\n
"},{"location":"reference/Api/#knuckles._api.Api.raw_request","title":"raw_request(endpoint, extra_params=None)","text":"

Makes a request to the OpenSubsonic server REST API.

Parameters:

Name Type Description Default endpoint str

The endpoint to be appended in the URL, without the leading /rest/.

required extra_params dict[str, Any] | None

Extra parameters to the added to the request.

None

Returns:

Type Description Response

The requests response object of the executed request.

Source code in .venv/lib/python3.11/site-packages/knuckles/_api.py
def raw_request(\n    self, endpoint: str, extra_params: dict[str, Any] | None = None\n) -> Response:\n    \"\"\"Makes a request to the OpenSubsonic server REST API.\n\n    Args:\n        endpoint: The endpoint to be appended in the URL, **without** the\n            leading `/rest/`.\n        extra_params: Extra parameters to the added to the request.\n\n    Returns:\n        The\n            [`requests`](https://docs.python-requests.org/en/latest/index.html)\n            `response` object of the executed request.\n    \"\"\"\n    match self.request_method:\n        case RequestMethod.POST:\n            return requests.post(\n                url=f\"{self.url}/rest/{endpoint}\",\n                data=json.dumps(self._generate_params(extra_params)),\n            )\n\n        case RequestMethod.GET | _:\n            return requests.get(\n                url=f\"{self.url}/rest/{endpoint}\",\n                params=self._generate_params(extra_params),\n            )\n
"},{"location":"reference/Bookmarks/","title":"Bookmarks","text":""},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks","title":"Bookmarks(api, subsonic)","text":"

Class that contains all the methods needed to interact with the bookmark endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n    self.subsonic = subsonic\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.create_bookmark","title":"create_bookmark(song_or_video_id, position, comment=None)","text":"

Creates a new bookmark for the authenticated user.

Parameters:

Name Type Description Default song_or_video_id str

The ID of the song or video to bookmark.

required position int

A position in milliseconds to be indicated with the song or video.

required comment str | None

A comment to be attached with the song or video.

None

Returns:

Type Description Bookmark

An object that contains all the info of the new created bookmark.

Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
def create_bookmark(\n    self, song_or_video_id: str, position: int, comment: str | None = None\n) -> Bookmark:\n    \"\"\"Creates a new bookmark for the authenticated user.\n\n    Args:\n        song_or_video_id: The ID of the song or video to bookmark.\n        position: A position in milliseconds to be indicated with the song\n            or video.\n        comment: A comment to be attached with the song or video.\n\n    Returns:\n        An object that contains all the info of the new created\n            bookmark.\n    \"\"\"\n\n    self.api.json_request(\n        \"createBookmark\",\n        {\"id\": song_or_video_id, \"position\": position, \"comment\": comment},\n    )\n\n    # Fake the song structure given by in the API.\n    return Bookmark(\n        self.subsonic, {\"id\": song_or_video_id}, position=position, comment=comment\n    )\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.delete_bookmark","title":"delete_bookmark(song_or_video_id)","text":"

Deletes a bookmark for the authenticated user.

Parameters:

Name Type Description Default song_or_video_id str

The ID of the song or video to delete its bookmark.

required

Returns: The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
def delete_bookmark(self, song_or_video_id: str) -> \"Subsonic\":\n    \"\"\"Deletes a bookmark for the authenticated user.\n\n    Args:\n        song_or_video_id: The ID of the song or video to delete its\n            bookmark.\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n    self.api.json_request(\"deleteBookmark\", {\"id\": song_or_video_id})\n\n    return self.subsonic\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.get_bookmark","title":"get_bookmark(bookmark_id)","text":"

Get all the info of a bookmark given its ID.

Parameters:

Name Type Description Default bookmark_id str

The id of the bookmark to get.

required

Returns:

Type Description Bookmark | None

A object that contains all the info of the requested bookmark.

Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
def get_bookmark(self, bookmark_id: str) -> Bookmark | None:\n    \"\"\"Get all the info of a bookmark given its ID.\n\n    Args:\n        bookmark_id: The id of the bookmark to get.\n\n    Returns:\n        A object that contains all the info of the requested bookmark.\n    \"\"\"\n\n    bookmarks = self.get_bookmarks()\n\n    for bookmark in bookmarks:\n        if bookmark.song.id == bookmark_id:\n            return bookmark\n\n    return None\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.get_bookmarks","title":"get_bookmarks()","text":"

Get all the bookmarks created by the authenticated user.

Returns:

Type Description list[Bookmark]

A list containing all the bookmarks for the authenticated user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
def get_bookmarks(self) -> list[Bookmark]:\n    \"\"\"Get all the bookmarks created by the authenticated user.\n\n    Returns:\n        A list containing all the bookmarks for the authenticated user.\n    \"\"\"\n\n    response = self.api.json_request(\"getBookmarks\")[\"bookmarks\"][\"bookmark\"]\n\n    return [Bookmark(self.subsonic, **bookmark) for bookmark in response]\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.get_play_queue","title":"get_play_queue()","text":"

Get the play queue of the authenticated user.

Returns:

Type Description PlayQueue

An object that contains all the info of the play queue of the user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
def get_play_queue(self) -> PlayQueue:\n    \"\"\"Get the play queue of the authenticated user.\n\n    Returns:\n        An object that contains all the info of the\n            play queue of the user.\n    \"\"\"\n\n    response = self.api.json_request(\"getPlayQueue\")[\"playQueue\"]\n\n    return PlayQueue(self.subsonic, **response)\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.save_play_queue","title":"save_play_queue(song_ids, current_song_id=None, position=None)","text":"

Saves a new play queue for the authenticated user.

Parameters:

Name Type Description Default song_ids list[str]

A list with all the songs to add to the queue.

required current_song_id str | None

The ID of the current playing song.

None position int | None

A position in milliseconds of where the current song playback it at.

None

Returns:

Type Description PlayQueue

An object that contains all the info of the new saved play queue.

Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
def save_play_queue(\n    self,\n    song_ids: list[str],\n    current_song_id: str | None = None,\n    position: int | None = None,\n) -> PlayQueue:\n    \"\"\"Saves a new play queue for the authenticated user.\n\n    Args:\n        song_ids: A list with all the songs to add to the queue.\n        current_song_id: The ID of the current playing song.\n        position: A position in milliseconds of where the current song\n            playback it at.\n\n    Returns:\n        An object that contains all the info of the new\n            saved play queue.\n    \"\"\"\n\n    self.api.json_request(\n        \"savePlayQueue\",\n        {\"id\": song_ids, \"current\": current_song_id, \"position\": position},\n    )\n\n    # Fake the song structure given by in the API.\n    songs = []\n    for song_id in song_ids:\n        songs.append({\"id\": song_id})\n\n    return PlayQueue(self.subsonic, songs, current_song_id, position)\n
"},{"location":"reference/Bookmarks/#knuckles._bookmarks.Bookmarks.update_bookmark","title":"update_bookmark(song_or_video_id, position, comment=None)","text":"

Updates a bookmark for the authenticated user.

Parameters:

Name Type Description Default song_or_video_id str

The ID of the song or video to update its bookmark.

required position int

A position in milliseconds to be indicated with the song or video.

required comment str | None

A comment to be attached with the song or video.

None

Returns: An object that contains all the info of the new created bookmark.

Source code in .venv/lib/python3.11/site-packages/knuckles/_bookmarks.py
def update_bookmark(\n    self, song_or_video_id: str, position: int, comment: str | None = None\n) -> Bookmark:\n    \"\"\"Updates a bookmark for the authenticated user.\n\n    Args:\n        song_or_video_id: The ID of the song or video to update its\n            bookmark.\n        position: A position in milliseconds to be indicated with the song\n            or video.\n        comment: A comment to be attached with the song or video.\n    Returns:\n        An object that contains all the info of the new created\n            bookmark.\n    \"\"\"\n\n    return self.create_bookmark(song_or_video_id, position, comment)\n
"},{"location":"reference/Browsing/","title":"Browsing","text":""},{"location":"reference/Browsing/#knuckles._browsing.Browsing","title":"Browsing(api, subsonic)","text":"

Class that contains all the methods needed to interact with the browsing endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n    self.subsonic = subsonic\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_album","title":"get_album(album_id)","text":"

Get all the info about an album.

Parameters:

Name Type Description Default album_id str

The ID of the album to get its info.

required

Returns:

Type Description Album

An object that contains all the info about the requested album.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_album(self, album_id: str) -> Album:\n    \"\"\"Get all the info about an album.\n\n    Args:\n        album_id: The ID of the album to get its info.\n\n    Returns:\n        An object that contains all the info about\n            the requested album.\n    \"\"\"\n\n    response = self.api.json_request(\"getAlbum\", {\"id\": album_id})[\"album\"]\n\n    return Album(self.subsonic, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_album_info","title":"get_album_info(album_id)","text":"

Get all the extra info about an album.

Parameters:

Name Type Description Default album_id str

The ID of the album to get its extra info.

required

Returns:

Type Description AlbumInfo

An object that contains all the extra info about the requested album.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_album_info(self, album_id: str) -> AlbumInfo:\n    \"\"\"Get all the extra info about an album.\n\n    Args:\n        album_id: The ID of the album to get its extra info.\n\n    Returns:\n        An object that contains all the extra info about\n            the requested album.\n    \"\"\"\n\n    response = self.api.json_request(\"getAlbumInfo2\", {\"id\": album_id})[\"albumInfo\"]\n\n    return AlbumInfo(self.subsonic, album_id, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_album_info_non_id3","title":"get_album_info_non_id3(album_id)","text":"

Get all the extra info about an album. Not organized according ID3 tags.

Parameters:

Name Type Description Default album_id str

The ID of the album to get its extra info.

required

Returns:

Type Description AlbumInfo

An object that contains all the extra info about the requested album.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_album_info_non_id3(self, album_id: str) -> AlbumInfo:\n    \"\"\"Get all the extra info about an album. Not organized according\n    ID3 tags.\n\n    Args:\n        album_id: The ID of the album to get its extra info.\n\n    Returns:\n        An object that contains all the extra info about\n            the requested album.\n    \"\"\"\n\n    response = self.api.json_request(\"getAlbumInfo\", {\"id\": album_id})[\"albumInfo\"]\n\n    return AlbumInfo(self.subsonic, album_id, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_artist","title":"get_artist(artist_id)","text":"

Get all the info about an artist.

Parameters:

Name Type Description Default artist_id str

The ID of the artist to get its info.

required

Returns:

Type Description Artist

An object that contains all the info about the requested artist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_artist(self, artist_id: str) -> Artist:\n    \"\"\"Get all the info about an artist.\n\n    Args:\n        artist_id: The ID of the artist to get its info.\n\n    Returns:\n        An object that contains all the info about\n            the requested artist.\n    \"\"\"\n\n    response = self.api.json_request(\"getArtist\", {\"id\": artist_id})[\"artist\"]\n\n    return Artist(self.subsonic, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_artist_info","title":"get_artist_info(artist_id, max_similar_artists=None, include_similar_artists_not_present=None)","text":"

Get all the extra info about an artist.

Parameters:

Name Type Description Default artist_id str

The ID of the artist to get its extra info.

required max_similar_artists int | None

The max number of similar artists to return.

None include_similar_artists_not_present bool | None

Include similar artists that are not present in any the media library.

None

Returns:

Type Description ArtistInfo

An object that contains all the extra info about the requested artist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_artist_info(\n    self,\n    artist_id: str,\n    max_similar_artists: int | None = None,\n    include_similar_artists_not_present: bool | None = None,\n) -> ArtistInfo:\n    \"\"\"Get all the extra info about an artist.\n\n    Args:\n        artist_id: The ID of the artist to get its extra info.\n        max_similar_artists: The max number of similar artists to\n            return.\n        include_similar_artists_not_present: Include similar artists\n            that are not present in any the media library.\n\n    Returns:\n        An object that contains all the extra info about\n            the requested artist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getArtistInfo2\",\n        {\n            \"id\": artist_id,\n            \"count\": max_similar_artists,\n            \"includeNotPresent\": include_similar_artists_not_present,\n        },\n    )[\"artistInfo2\"]\n\n    return ArtistInfo(self.subsonic, artist_id, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_artist_info_non_id3","title":"get_artist_info_non_id3(artist_id, max_similar_artists=None, include_similar_artists_not_present=None)","text":"

Get all the extra info about an artist. Not organized according ID3 tags.

Parameters:

Name Type Description Default artist_id str

The ID of the artist to get its extra info.

required max_similar_artists int | None

The max number of similar artists to return.

None include_similar_artists_not_present bool | None

Include similar artists that are not present in any the media library.

None

Returns:

Type Description ArtistInfo

An object that contains all the extra info about the requested artist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_artist_info_non_id3(\n    self,\n    artist_id: str,\n    max_similar_artists: int | None = None,\n    include_similar_artists_not_present: bool | None = None,\n) -> ArtistInfo:\n    \"\"\"Get all the extra info about an artist. Not organized according\n    ID3 tags.\n\n    Args:\n        artist_id: The ID of the artist to get its extra info.\n        max_similar_artists: The max number of similar artists to\n            return.\n        include_similar_artists_not_present: Include similar artists\n            that are not present in any the media library.\n\n    Returns:\n        An object that contains all the extra info about\n            the requested artist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getArtistInfo\",\n        {\n            \"id\": artist_id,\n            \"count\": max_similar_artists,\n            \"includeNotPresent\": include_similar_artists_not_present,\n        },\n    )[\"artistInfo\"]\n\n    return ArtistInfo(self.subsonic, artist_id, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_artists","title":"get_artists(music_folder_id=None)","text":"

Get all the registered artists in the server.

Parameters:

Name Type Description Default music_folder_id str | None

A music folder ID to reduce the scope of the artists to return.

None

Returns:

Type Description list[Artist]

A list with all the info about all the received artists.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_artists(self, music_folder_id: str | None = None) -> list[Artist]:\n    \"\"\"Get all the registered artists in the server.\n\n    Args:\n        music_folder_id: A music folder ID to reduce the scope of the\n            artists to return.\n\n    Returns:\n        A list with all the info about all the received artists.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getArtists\", {\"musicFolderId\": music_folder_id}\n    )[\"artists\"][\"index\"]\n\n    artists: list[Artist] = []\n\n    for index in response:\n        for artist_data in index[\"artist\"]:\n            artist = Artist(self.subsonic, **artist_data)\n            artists.append(artist)\n\n    return artists\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_artists_indexed","title":"get_artists_indexed(music_folder_id, modified_since)","text":"

Get all the registered artist indexed alphabetically.

Parameters:

Name Type Description Default music_folder_id str

A music folder ID to reduce the scope where the artist should be from.

required modified_since int

Time in milliseconds since the artist have changed its collection.

required

Returns:

Type Description ArtistIndex

An object containt all the artist alphabetically indexed.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_artists_indexed(\n    self, music_folder_id: str, modified_since: int\n) -> ArtistIndex:\n    \"\"\"Get all the registered artist indexed alphabetically.\n\n    Args:\n        music_folder_id: A music folder ID to reduce the scope\n            where the artist should be from.\n        modified_since: Time in milliseconds since the artist have changed\n            its collection.\n\n    Returns:\n        An object containt all the artist alphabetically indexed.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getIndexes\",\n        {\"musicFolderId\": music_folder_id, \"ifModifiedSince\": modified_since},\n    )[\"indexes\"]\n\n    return ArtistIndex(subsonic=self.subsonic, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_genre","title":"get_genre(genre_name)","text":"

Get all the info of a genre.

Parameters:

Name Type Description Default genre_name str

The name of the genre to get its info.

required

Returns:

Type Description Genre | None

An object that contains all the info about the requested genre.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_genre(self, genre_name: str) -> Genre | None:\n    \"\"\"Get all the info of a genre.\n\n    Args:\n        genre_name: The name of the genre to get its info.\n\n    Returns:\n        An object that contains all the info\n            about the requested genre.\n    \"\"\"\n\n    genres = self.get_genres()\n\n    for genre in genres:\n        if genre.value == genre_name:\n            return genre\n\n    return None\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_genres","title":"get_genres()","text":"

Get all the available genres in the server.

Returns:

Type Description list[Genre]

A list with all the registered genres in the server.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_genres(self) -> list[Genre]:\n    \"\"\"Get all the available genres in the server.\n\n    Returns:\n        A list with all the registered genres in the server.\n    \"\"\"\n\n    response = self.api.json_request(\"getGenres\")[\"genres\"][\"genre\"]\n\n    return [Genre(self.subsonic, **genre) for genre in response]\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_music_directory","title":"get_music_directory(music_directory_id)","text":"

Get the info of a music directory.

Parameters:

Name Type Description Default music_directory_id str

The ID of the music directory to get its info.

required

Returns:

Type Description MusicDirectory

An object that holds all the info about the requested music directory.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_music_directory(self, music_directory_id: str) -> MusicDirectory:\n    \"\"\"Get the info of a music directory.\n\n    Args:\n        music_directory_id: The ID of the music directory to get its info.\n\n    Returns:\n        An object that holds all the info about the requested music\n            directory.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getMusicDirectory\", {\"id\": music_directory_id}\n    )[\"directory\"]\n\n    return MusicDirectory(subsonic=self.subsonic, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_music_folder","title":"get_music_folder(music_folder_id)","text":"

Get the info of a music folder.

Parameters:

Name Type Description Default music_folder_id str

The ID of the music folder to get.

required

Returns:

Type Description MusicFolder | None

An object that contains all the info about the requested music folder, or None if it wasn't found.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_music_folder(self, music_folder_id: str) -> MusicFolder | None:\n    \"\"\"Get the info of a music folder.\n\n    Args:\n        music_folder_id: The ID of the music folder to get.\n\n    Returns:\n        An object that contains all the info about the\n            requested music folder, or None if it wasn't found.\n    \"\"\"\n\n    music_folders = self.get_music_folders()\n\n    for music_folder in music_folders:\n        if music_folder.id == music_folder_id:\n            return music_folder\n\n    return None\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_music_folders","title":"get_music_folders()","text":"

Get all the top level music folders.

Returns:

Type Description list[MusicFolder]

A list that contains all the info about all the available music folders.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_music_folders(self) -> list[MusicFolder]:\n    \"\"\"Get all the top level music folders.\n\n    Returns:\n        A list that contains all the info about all the available\n            music folders.\n    \"\"\"\n\n    response = self.api.json_request(\"getMusicFolders\")[\"musicFolders\"][\n        \"musicFolder\"\n    ]\n\n    return [MusicFolder(self.subsonic, **music_folder) for music_folder in response]\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_similar_songs","title":"get_similar_songs(song_id, song_count=None)","text":"

Get similar songs to the given one.

Parameters:

Name Type Description Default song_id str

The ID of the song to get similar songs.

required song_count int | None

The number of songs to return.

None

Returns:

Type Description list[Song]

A list that contains all the songs that are similar to the given one.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_similar_songs(\n    self, song_id: str, song_count: int | None = None\n) -> list[Song]:\n    \"\"\"Get similar songs to the given one.\n\n    Args:\n        song_id: The ID of the song to get similar songs.\n        song_count: The number of songs to return.\n\n    Returns:\n        A list that contains all the songs that are similar\n            to the given one.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getSimilarSongs2\", {\"id\": song_id, \"count\": song_count}\n    )[\"similarSongs2\"][\"song\"]\n\n    return [Song(subsonic=self.subsonic, **song) for song in response]\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_similar_songs_non_id3","title":"get_similar_songs_non_id3(song_id, song_count=None)","text":"

Get similar songs to the given one. Not organized according ID3 tags.

Parameters:

Name Type Description Default song_id str

The ID of the song to get similar songs.

required song_count int | None

The number of songs to return.

None

Returns:

Type Description list[Song]

A list that contains all the songs that are similar to the given one.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_similar_songs_non_id3(\n    self, song_id: str, song_count: int | None = None\n) -> list[Song]:\n    \"\"\"Get similar songs to the given one. Not organized according\n    ID3 tags.\n\n    Args:\n        song_id: The ID of the song to get similar songs.\n        song_count: The number of songs to return.\n\n    Returns:\n        A list that contains all the songs that are similar\n            to the given one.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getSimilarSongs\", {\"id\": song_id, \"count\": song_count}\n    )[\"similarSongs\"][\"song\"]\n\n    return [Song(subsonic=self.subsonic, **song) for song in response]\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_song","title":"get_song(song_id)","text":"

Get all the info about a song.

Parameters:

Name Type Description Default song_id str

The ID of the song to get its info.

required

Returns:

Type Description Song

An object that contains all the info about the requested song.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_song(self, song_id: str) -> Song:\n    \"\"\"Get all the info about a song.\n\n    Args:\n        song_id: The ID of the song to get its info.\n\n    Returns:\n        An object that contains all the info\n            about the requested song.\n    \"\"\"\n\n    response = self.api.json_request(\"getSong\", {\"id\": song_id})[\"song\"]\n\n    return Song(self.subsonic, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_top_songs","title":"get_top_songs(artist_name, max_num_of_songs)","text":"

Get the top rated songs in the server.

Parameters:

Name Type Description Default artist_name str

Limit the ranked songs to the ones created by the given artist.

required max_num_of_songs int

The max number of songs to return.

required

Returns:

Type Description list[Song]

A list that contains the top rated songs of the server.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_top_songs(self, artist_name: str, max_num_of_songs: int) -> list[Song]:\n    \"\"\"Get the top rated songs in the server.\n\n    Args:\n        artist_name: Limit the ranked songs to the ones created by the\n            given artist.\n        max_num_of_songs: The max number of songs to return.\n\n    Returns:\n        A list that contains the top rated songs of the server.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getTopSongs\", {\"artist\": artist_name, \"count\": max_num_of_songs}\n    )[\"topSongs\"][\"song\"]\n\n    return [Song(subsonic=self.subsonic, **song) for song in response]\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_video","title":"get_video(video_id)","text":"

Get all the info about a video.

Parameters:

Name Type Description Default video_id str

The ID of the video to get its info.

required

Returns:

Type Description Video | None

An object that contains all the info about the requested video.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_video(self, video_id: str) -> Video | None:\n    \"\"\"Get all the info about a video.\n\n    Args:\n        video_id: The ID of the video to get its info.\n\n    Returns:\n        An object that contains all the info about\n            the requested video.\n    \"\"\"\n\n    videos = self.get_videos()\n\n    for video in videos:\n        if video.id == video_id:\n            return video\n\n    return None\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_video_info","title":"get_video_info(video_id)","text":"

Get all the extra info about a video.

Parameters:

Name Type Description Default video_id str

The ID of the video to get its extra info.

required

Returns:

Type Description VideoInfo

An object that holds all the extra info about the requested video.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_video_info(self, video_id: str) -> VideoInfo:\n    \"\"\"Get all the extra info about a video.\n\n    Args:\n        video_id: The ID of the video to get its extra info.\n\n    Returns:\n        An object that holds all the extra info about\n            the requested video.\n    \"\"\"\n\n    response = self.api.json_request(\"getVideoInfo\", {\"id\": video_id})[\"videoInfo\"]\n\n    return VideoInfo(self.subsonic, video_id=video_id, **response)\n
"},{"location":"reference/Browsing/#knuckles._browsing.Browsing.get_videos","title":"get_videos()","text":"

Get all the registered videos in the server.

Returns:

Type Description list[Video]

A list with all the info about al the videos available in the server.

Source code in .venv/lib/python3.11/site-packages/knuckles/_browsing.py
def get_videos(self) -> list[Video]:\n    \"\"\"Get all the registered videos in the server.\n\n    Returns:\n        A list with all the info about al the videos\n            available in the server.\n    \"\"\"\n\n    response = self.api.json_request(\"getVideos\")[\"videos\"][\"video\"]\n\n    return [Video(self.subsonic, **video) for video in response]\n
"},{"location":"reference/Chat/","title":"Chat","text":""},{"location":"reference/Chat/#knuckles._chat.Chat","title":"Chat(api, subsonic)","text":"

Class that contains all the methods needed to interact with the chat endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_chat.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n    self.subsonic = subsonic\n
"},{"location":"reference/Chat/#knuckles._chat.Chat.add_chat_message","title":"add_chat_message(message)","text":"

Add chat message.

Parameters:

Name Type Description Default message str

The message content to add.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_chat.py
def add_chat_message(self, message: str) -> \"Subsonic\":\n    \"\"\"Add chat message.\n\n    Args:\n        message: The message content to add.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n    self.api.json_request(\"addChatMessage\", {\"message\": message})\n\n    return self.subsonic\n
"},{"location":"reference/Chat/#knuckles._chat.Chat.get_chat_messages","title":"get_chat_messages()","text":"

Get all send chat messages.

Returns:

Type Description list[ChatMessage]

A list with all the messages info.

Source code in .venv/lib/python3.11/site-packages/knuckles/_chat.py
def get_chat_messages(self) -> list[ChatMessage]:\n    \"\"\"Get all send chat messages.\n\n    Returns:\n        A list with all the messages info.\n    \"\"\"\n\n    response: list[dict[str, Any]] = self.api.json_request(\"getChatMessages\")[\n        \"chatMessages\"\n    ][\"chatMessage\"]\n\n    messages = [ChatMessage(self.subsonic, **message) for message in response]\n\n    return messages\n
"},{"location":"reference/Exceptions/","title":"Exceptions","text":""},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode0","title":"ErrorCode0","text":"

Bases: Exception

Raised when the server returns an error code 0, it being a generic error.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode10","title":"ErrorCode10","text":"

Bases: Exception

Raised when the server returns an error code 10, meaning that a parameter for the requested endpoint is missing. Should never be raised because Knuckles takes care for enforcing mandatory parameters, if you have encountered this exception the server may have broke the OpenSubsonic API.

If you suspect that this is an issue caused by Knuckles itself, please report it to upstream.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode20","title":"ErrorCode20","text":"

Bases: Exception

Raised when the server returns an error code 20, meaning that the client has a lower RESP API version than the server. Should never be raised given that Knuckles supports up to the latest Subsonic REST API version.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode30","title":"ErrorCode30","text":"

Bases: Exception

Raised when the server returns an error code 30, meaning that the server has a lower RESP API version than the client.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode40","title":"ErrorCode40","text":"

Bases: Exception

Raised when the server returns an error code 40, meaning that the given user doesn't exists or the password is incorrect.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode41","title":"ErrorCode41","text":"

Bases: Exception

Raised when the server returns an error code 42, meaning that token authentication is not available.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode50","title":"ErrorCode50","text":"

Bases: Exception

Raised when the server returns an error code 50, meaning that the authenticated user is no authorized for the requested action.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode60","title":"ErrorCode60","text":"

Bases: Exception

Raised when the server return an error code 60, meaning that the Subsonic trial period has ended.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ErrorCode70","title":"ErrorCode70","text":"

Bases: Exception

Raised when the server returns an error code 70, meaning that the requested data wasn't found.

"},{"location":"reference/Exceptions/#knuckles.exceptions.InvalidRatingNumber","title":"InvalidRatingNumber","text":"

Bases: ValueError

Raised when input an invalid rating weight in a method of the API.

"},{"location":"reference/Exceptions/#knuckles.exceptions.MissingRequiredProperty","title":"MissingRequiredProperty","text":"

Bases: Exception

Raised when a property required to call a method is missing.

"},{"location":"reference/Exceptions/#knuckles.exceptions.ResourceNotFound","title":"ResourceNotFound(message='Unable to generate the model as it does not exist in the server', *args)","text":"

Bases: Exception

Raised when a resource could not be retrieve to generate a model using a previous one.

Source code in .venv/lib/python3.11/site-packages/knuckles/exceptions.py
def __init__(\n    self,\n    message: str = (\n        \"Unable to generate the model as it does not exist in the server\"\n    ),\n    *args: str,\n) -> None:\n    super().__init__(message, *args)\n
"},{"location":"reference/Exceptions/#knuckles.exceptions.ShareInvalidSongList","title":"ShareInvalidSongList","text":"

Bases: ValueError

Raised when a method in a share is called with an invalid song list.

"},{"location":"reference/Exceptions/#knuckles.exceptions.UnknownErrorCode","title":"UnknownErrorCode","text":"

Bases: Exception

Raised when the server returns an error code that doesn't have a specific core error exception.

"},{"location":"reference/Exceptions/#knuckles.exceptions.get_error_code_exception","title":"get_error_code_exception(error_code)","text":"

Converts a numeric error code to its corresponding error code exception

Parameters:

Name Type Description Default error_code int

The number of the error to get its exception.

required

Returns: The exception of the given error code

Source code in .venv/lib/python3.11/site-packages/knuckles/exceptions.py
def get_error_code_exception(\n    error_code: int,\n) -> ERROR_CODE_EXCEPTION:\n    \"\"\"Converts a numeric error code to its corresponding error code exception\n\n    Args:\n        error_code: The number of the error to get its exception.\n\n    Returns: The exception of the given error code\n    \"\"\"\n    match error_code:\n        case 0:\n            return ErrorCode0\n        case 10:\n            return ErrorCode10\n        case 20:\n            return ErrorCode20\n        case 30:\n            return ErrorCode30\n        case 40:\n            return ErrorCode40\n        case 41:\n            return ErrorCode41\n        case 50:\n            return ErrorCode50\n        case 60:\n            return ErrorCode60\n        case 70:\n            return ErrorCode70\n        case _:\n            return UnknownErrorCode\n
"},{"location":"reference/Internet%20Radio/","title":"Internet Radio","text":""},{"location":"reference/Internet%20Radio/#knuckles._internet_radio.InternetRadio","title":"InternetRadio(api, subsonic)","text":"

Class that contains all the methods needed to interact with the internet radio endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_internet_radio.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Internet%20Radio/#knuckles._internet_radio.InternetRadio.create_internet_radio_station","title":"create_internet_radio_station(stream_url, name, homepage_url=None)","text":"

Create a new internet radio station.

Parameters:

Name Type Description Default stream_url str

The URL of the stream to be added to the internet radio station.

required name str

The name of the new created internet radio station.

required homepage_url str | None

An URL for the homepage of the internet radio station.

None

Returns:

Type Description Subsonic

An object that holds all the data about the new created internet radio station.

Source code in .venv/lib/python3.11/site-packages/knuckles/_internet_radio.py
def create_internet_radio_station(\n    self, stream_url: str, name: str, homepage_url: str | None = None\n) -> \"Subsonic\":\n    \"\"\"Create a new internet radio station.\n\n    Args:\n        stream_url: The URL of the stream to be added to the\n            internet radio station.\n        name: The name of the new created internet radio station.\n        homepage_url: An URL for the homepage of the internet\n            radio station.\n\n    Returns:\n        An object that holds all the data about the new created\n            internet radio station.\n    \"\"\"\n\n    self.api.json_request(\n        \"createInternetRadioStation\",\n        {\"streamUrl\": stream_url, \"name\": name, \"homepageUrl\": homepage_url},\n    )\n\n    return self.subsonic\n
"},{"location":"reference/Internet%20Radio/#knuckles._internet_radio.InternetRadio.delete_internet_radio_station","title":"delete_internet_radio_station(internet_radio_station_id)","text":"

Delete an internet radio station.

Parameters:

Name Type Description Default internet_radio_station_id str

The ID of the internet radio station to delete.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_internet_radio.py
def delete_internet_radio_station(\n    self, internet_radio_station_id: str\n) -> \"Subsonic\":\n    \"\"\"Delete an internet radio station.\n\n    Args:\n        internet_radio_station_id: The ID of the internet radio station\n            to delete.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n    self.api.json_request(\n        \"deleteInternetRadioStation\", {\"id\": internet_radio_station_id}\n    )\n\n    return self.subsonic\n
"},{"location":"reference/Internet%20Radio/#knuckles._internet_radio.InternetRadio.get_internet_radio_station","title":"get_internet_radio_station(internet_radio_station_id)","text":"

Get all the info related with a internet radio station.

Parameters:

Name Type Description Default internet_radio_station_id str

The ID of the internet radio station to get its info.

required

Returns:

Type Description InternetRadioStation | None

An object that contains all the info about the requested internet radio station.

Source code in .venv/lib/python3.11/site-packages/knuckles/_internet_radio.py
def get_internet_radio_station(\n    self, internet_radio_station_id: str\n) -> InternetRadioStation | None:\n    \"\"\"Get all the info related with a internet radio station.\n\n    Args:\n        internet_radio_station_id: The ID of the internet radio station\n            to get its info.\n\n    Returns:\n        An object that contains all the info about the requested\n            internet radio station.\n    \"\"\"\n\n    stations = self.get_internet_radio_stations()\n\n    for station in stations:\n        if station.id == internet_radio_station_id:\n            return station\n\n    return None\n
"},{"location":"reference/Internet%20Radio/#knuckles._internet_radio.InternetRadio.get_internet_radio_stations","title":"get_internet_radio_stations()","text":"

Get all the internet radio stations available in the server.

Returns:

Type Description list[InternetRadioStation]

A list with all the reported internet radio stations.

Source code in .venv/lib/python3.11/site-packages/knuckles/_internet_radio.py
def get_internet_radio_stations(\n    self,\n) -> list[InternetRadioStation]:\n    \"\"\"Get all the internet radio stations available in the server.\n\n    Returns:\n        A list with all the reported internet radio stations.\n    \"\"\"\n\n    response = self.api.json_request(\"getInternetRadioStations\")[\n        \"internetRadioStations\"\n    ][\"internetRadioStation\"]\n\n    return [InternetRadioStation(self.subsonic, **station) for station in response]\n
"},{"location":"reference/Internet%20Radio/#knuckles._internet_radio.InternetRadio.update_internet_radio_station","title":"update_internet_radio_station(internet_radio_station_id, stream_url, name, homepage_url=None)","text":"

Update the data of an internet radio station.

Parameters:

Name Type Description Default internet_radio_station_id str

The ID of the internet radio station to edit its data.

required stream_url str

A new stream URL for the internet radio station.

required name str

a new name for the internet radio station.

required homepage_url str | None

A new homepage URL for the internet radio station.

None

Returns:

Type Description Subsonic

An object that holds all the data about the new updated internet radio station.

Source code in .venv/lib/python3.11/site-packages/knuckles/_internet_radio.py
def update_internet_radio_station(\n    self,\n    internet_radio_station_id: str,\n    stream_url: str,\n    name: str,\n    homepage_url: str | None = None,\n) -> \"Subsonic\":\n    \"\"\"Update the data of an internet radio station.\n\n    Args:\n        internet_radio_station_id: The ID of the internet radio station\n            to edit its data.\n        stream_url: A new stream URL for the internet radio station.\n        name: a new name for the internet radio station.\n        homepage_url: A new homepage URL for the internet radio\n            station.\n\n    Returns:\n        An object that holds all the data about the new updated\n            internet radio station.\n    \"\"\"\n    self.api.json_request(\n        \"updateInternetRadioStation\",\n        {\n            \"id\": internet_radio_station_id,\n            \"streamUrl\": stream_url,\n            \"name\": name,\n            \"homepageUrl\": homepage_url,\n        },\n    )\n\n    return self.subsonic\n
"},{"location":"reference/Jukebox/","title":"Jukebox","text":""},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl","title":"JukeboxControl(api, subsonic)","text":"

Class that contains all the methods needed to interact with the jukebox control endpoint in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.add","title":"add(songs_ids)","text":"

Add songs to the jukebox playlist.

Parameters:

Name Type Description Default songs_ids list[str]

A list of song IDs to add to the jukebox playlist.

required

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
def add(self, songs_ids: list[str]) -> Jukebox:\n    \"\"\"Add songs to the jukebox playlist.\n\n    Args:\n        songs_ids: A list of song IDs to add to the jukebox playlist.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"jukeboxControl\", {\"action\": \"add\", \"id\": songs_ids}\n    )[\"jukeboxStatus\"]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.clear","title":"clear()","text":"

Clear the playlist of the jukebox.

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
def clear(self) -> Jukebox:\n    \"\"\"Clear the playlist of the jukebox.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n    response = self.api.json_request(\"jukeboxControl\", {\"action\": \"clear\"})[\n        \"jukeboxStatus\"\n    ]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.get","title":"get()","text":"

Get all the info related with the current playlist of the jukebox.

Returns:

Type Description Jukebox

An object that holds all the info related with the playlist of the jukebox.

Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
def get(self) -> Jukebox:\n    \"\"\"Get all the info related with the current playlist of\n    the jukebox.\n\n    Returns:\n        An object that holds all the info related with\n            the playlist of the jukebox.\n    \"\"\"\n\n    response = self.api.json_request(\"jukeboxControl\", {\"action\": \"get\"})[\n        \"jukeboxPlaylist\"\n    ]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.remove","title":"remove(index)","text":"

Remove a song from the playlist of the jukebox.

Parameters:

Name Type Description Default index int

The index of the song to remove from the playlist.

required

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
def remove(self, index: int) -> Jukebox:\n    \"\"\"Remove a song from the playlist of the jukebox.\n\n    Args:\n        index: The index of the song to remove from the playlist.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"jukeboxControl\", {\"action\": \"remove\", \"index\": index}\n    )[\"jukeboxStatus\"]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.set","title":"set(songs_ids)","text":"

Set the song playlist for the jukebox.

Parameters:

Name Type Description Default songs_ids list[str]

A list of song IDs to set the jukebox playlist.

required

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
def set(self, songs_ids: list[str]) -> Jukebox:\n    \"\"\"Set the song playlist for the jukebox.\n\n    Args:\n        songs_ids: A list of song IDs to set the jukebox playlist.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"jukeboxControl\", {\"action\": \"set\", \"id\": songs_ids}\n    )[\"jukeboxStatus\"]\n\n    # Preset the song list as this call changes it in a predictable way\n    return Jukebox(\n        self.subsonic, **response, entry=[{\"id\": song_id} for song_id in songs_ids]\n    )\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.set_gain","title":"set_gain(gain)","text":"

Set the gain of the playback of the jukebox.

Parameters:

Name Type Description Default gain float

A number between 0 and 1 (inclusive) to be set as the gain.

required

Raises:

Type Description ValueError

Raised if the given gain is not between 0 and 1.

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
def set_gain(self, gain: float) -> Jukebox:\n    \"\"\"Set the gain of the playback of the jukebox.\n\n    Args:\n        gain: A number between 0 and 1 (inclusive) to be set as the gain.\n\n    Raises:\n        ValueError: Raised if the given gain is not between 0 and 1.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    if not 1 > gain > 0:\n        raise ValueError(\"The gain should be between 0 and 1 (inclusive)\")\n\n    response = self.api.json_request(\n        \"jukeboxControl\", {\"action\": \"setGain\", \"gain\": gain}\n    )[\"jukeboxStatus\"]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.shuffle","title":"shuffle()","text":"

Shuffle all the songs in the playlist of the jukebox.

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
def shuffle(self) -> Jukebox:\n    \"\"\"Shuffle all the songs in the playlist of the jukebox.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\"jukeboxControl\", {\"action\": \"shuffle\"})[\n        \"jukeboxStatus\"\n    ]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.skip","title":"skip(index, offset=0)","text":"

Skip the playback of the current song in the jukebox playlist.

Parameters:

Name Type Description Default index int

The index of the song to skip to.

required offset float

The offset of seconds to start playing the next song.

0

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
def skip(self, index: int, offset: float = 0) -> Jukebox:\n    \"\"\"Skip the playback of the current song in the jukebox playlist.\n\n    Args:\n        index: The index of the song to skip to.\n        offset: The offset of seconds to start playing the next song.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"jukeboxControl\", {\"action\": \"skip\", \"index\": index, \"offset\": offset}\n    )[\"jukeboxStatus\"]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.start","title":"start()","text":"

Start the playback of the current song in the jukebox playlist.

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
def start(self) -> Jukebox:\n    \"\"\"Start the playback of the current song in the jukebox playlist.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\"jukeboxControl\", {\"action\": \"start\"})[\n        \"jukeboxStatus\"\n    ]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.status","title":"status()","text":"

Get all the info related with the current state of the jukebox.

Returns:

Type Description Jukebox

An object that holds all the info related with the scate of the jukebox.

Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
def status(self) -> Jukebox:\n    \"\"\"Get all the info related with the current state of\n    the jukebox.\n\n    Returns:\n        An object that holds all the info related with\n            the scate of the jukebox.\n    \"\"\"\n\n    response = self.api.json_request(\"jukeboxControl\", {\"action\": \"status\"})[\n        \"jukeboxStatus\"\n    ]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Jukebox/#knuckles._jukebox.JukeboxControl.stop","title":"stop()","text":"

Stop the playback of the current song in the jukebox playlist.

Returns:

Type Description Jukebox

An object that contains the updated jukebox status and playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
def stop(self) -> Jukebox:\n    \"\"\"Stop the playback of the current song in the jukebox playlist.\n\n    Returns:\n        An object that contains the updated jukebox status\n            and playlist.\n    \"\"\"\n\n    response = self.api.json_request(\"jukeboxControl\", {\"action\": \"stop\"})[\n        \"jukeboxStatus\"\n    ]\n\n    return Jukebox(self.subsonic, **response)\n
"},{"location":"reference/Lists/","title":"Lists","text":""},{"location":"reference/Lists/#knuckles._lists.Lists","title":"Lists(api, subsonic)","text":"

Class that contains all the methods needed to interact with the lists endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_alphabetical_by_artist","title":"get_album_list_alphabetical_by_artist(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized alphabetically by their artist name. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized alphabetically by their artist name.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_alphabetical_by_artist(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized alphabetically\n    by their artist name. Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized alphabetically by their artist name.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"alphabeticalByArtist\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_alphabetical_by_artist_non_id3","title":"get_album_list_alphabetical_by_artist_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized alphabetically by their artist name. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized alphabetically by their artist name.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_alphabetical_by_artist_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized alphabetically\n    by their artist name. Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized alphabetically by their artist name.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"alphabeticalByArtist\",\n        num_of_albums,\n        album_list_offset,\n        music_folder_id,\n        False,\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_alphabetical_by_name","title":"get_album_list_alphabetical_by_name(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized alphabetically by their names. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized alphabetically by their names.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_alphabetical_by_name(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized alphabetically\n    by their names. Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized alphabetically by their names.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"alphabeticalByName\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_alphabetical_by_name_non_id3","title":"get_album_list_alphabetical_by_name_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized alphabetically by their names. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized alphabetically by their names.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_alphabetical_by_name_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized alphabetically\n    by their names. Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized alphabetically by their names.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"alphabeticalByName\",\n        num_of_albums,\n        album_list_offset,\n        music_folder_id,\n        False,\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_by_genre","title":"get_album_list_by_genre(genre_name, num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get all the albums that are tagged with the given genre. Not organized according ID3 tags.

Parameters:

Name Type Description Default genre_name str

The name of the genre that all the albums must be tagged with.

required num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums that are tagged with the given album.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_by_genre(\n    self,\n    genre_name: str,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get all the albums that are tagged with the given genre. Not organized\n    according ID3 tags.\n\n    Args:\n        genre_name: The name of the genre that all the albums must be tagged\n            with.\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            that are tagged with the given album.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"byGenre\",\n        num_of_albums,\n        album_list_offset,\n        music_folder_id,\n        genre=genre_name,\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_by_genre_non_id3","title":"get_album_list_by_genre_non_id3(genre_name, num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get all the albums that are tagged with the given genre. Not organized according ID3 tags.

Parameters:

Name Type Description Default genre_name str

The name of the genre that all the albums must be tagged with.

required num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums that are tagged with the given album.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_by_genre_non_id3(\n    self,\n    genre_name: str,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get all the albums that are tagged with the given genre.\n    Not organized according ID3 tags.\n\n    Args:\n        genre_name: The name of the genre that all the albums\n            must be tagged with.\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            that are tagged with the given album.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"byGenre\",\n        num_of_albums,\n        album_list_offset,\n        music_folder_id,\n        False,\n        genre=genre_name,\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_by_year","title":"get_album_list_by_year(from_year, to_year, num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get all the album registered by the server that were created between the given year range.

Parameters:

Name Type Description Default from_year int

The minimum year of the range where the albums were created.

required to_year int

The maximum year of the range where the albums were created.

required num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums that where released in the given year range.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_by_year(\n    self,\n    from_year: int,\n    to_year: int,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get all the album registered by the server that were created between\n    the given year range.\n\n    Args:\n        from_year: The minimum year of the range where the albums\n            were created.\n        to_year: The maximum year of the range where the albums\n            were created.\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            that where released in the given year range.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"byYear\",\n        num_of_albums,\n        album_list_offset,\n        music_folder_id,\n        fromYear=from_year,\n        toYear=to_year,\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_by_year_non_id3","title":"get_album_list_by_year_non_id3(from_year, to_year, num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get all the album registered by the server that were created between the given year range.

Parameters:

Name Type Description Default from_year int

The minimum year of the range where the albums were created.

required to_year int

The maximum year of the range where the albums were created.

required num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums that where released in the given year range.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_by_year_non_id3(\n    self,\n    from_year: int,\n    to_year: int,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get all the album registered by the server that were created between\n    the given year range.\n\n    Args:\n        from_year: The minimum year of the range where the albums\n            were created.\n        to_year: The maximum year of the range where the albums\n            were created.\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            that where released in the given year range.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"byYear\",\n        num_of_albums,\n        album_list_offset,\n        music_folder_id,\n        False,\n        fromYear=from_year,\n        toYear=to_year,\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_frequent","title":"get_album_list_frequent(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the most frequent listened to the least. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from the most frequent listened to the least.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_frequent(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the most frequent listened to the least.\n    Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from the most frequent listened to the least.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"frequent\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_frequent_non_id3","title":"get_album_list_frequent_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the most frequent listened to the least. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from the most frequent listened to the least.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_frequent_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the most frequent listened to the least.\n    Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from the most frequent listened to the least.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"frequent\", num_of_albums, album_list_offset, music_folder_id, False\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_highest","title":"get_album_list_highest(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the highest rated to the lowest ones. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

The number of albums to be in the list.

None album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from the highest rated to the lowest ones.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_highest(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the highest rated to the lowest ones. Not organized according ID3 tags.\n\n    Args:\n        num_of_albums: The number of albums to be in the list.\n        album_list_offset: The number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: The ID of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from the highest rated to the lowest ones.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"highest\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_highest_non_id3","title":"get_album_list_highest_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the highest rated to the lowest ones. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

The number of albums to be in the list.

None album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from the highest rated to the lowest ones.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_highest_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the highest rated to the lowest ones. Not organized according ID3 tags.\n\n    Args:\n        num_of_albums: The number of albums to be in the list.\n        album_list_offset: The number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: The ID of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from the highest rated to the lowest ones.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"highest\", num_of_albums, album_list_offset, music_folder_id, False\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_newest","title":"get_album_list_newest(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the newest added to the oldest. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

The number of albums to be in the list.

None album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from newest to oldest.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_newest(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the newest added to the oldest. Not organized according ID3 tags.\n\n    Args:\n        num_of_albums: The number of albums to be in the list.\n        album_list_offset: The number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: The ID of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from newest to oldest.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"newest\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_newest_non_id3","title":"get_album_list_newest_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the newest added to the oldest. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

The number of albums to be in the list.

None album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from newest to oldest.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_newest_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the newest added to the oldest. Not organized according ID3 tags.\n\n    Args:\n        num_of_albums: The number of albums to be in the list.\n        album_list_offset: The number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: The ID of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from newest to oldest.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"newest\", num_of_albums, album_list_offset, music_folder_id, False\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_random","title":"get_album_list_random(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a random list of albums from the server.

Parameters:

Name Type Description Default num_of_albums int | None

The number of albums to be in the list.

None album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about random albums.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_random(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a random list of albums from the server.\n\n    Args:\n        num_of_albums: The number of albums to be in the list.\n        album_list_offset: The number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: The ID of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about random albums.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"random\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_random_non_id3","title":"get_album_list_random_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a random list of albums from the server. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

The number of albums to be in the list.

None album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about random albums.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_random_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a random list of albums from the server. Not organized\n    according ID3 tags.\n\n    Args:\n        num_of_albums: The number of albums to be in the list.\n        album_list_offset: The number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: The ID of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about random albums.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"random\", num_of_albums, album_list_offset, music_folder_id, False\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_recent","title":"get_album_list_recent(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the most recent listened to the least. not organized according id3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from the most recent listened to the least.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_recent(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the most recent listened to the least.\n    not organized according id3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from the most recent listened to the least.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"recent\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_recent_non_id3","title":"get_album_list_recent_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of albums from the server organized from the most recent listened to the least. not organized according id3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums organized from the most recent listened to the least.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_recent_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of albums from the server organized from\n    the most recent listened to the least.\n    not organized according id3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            organized from the most recent listened to the least.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"recent\", num_of_albums, album_list_offset, music_folder_id, False\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_starred","title":"get_album_list_starred(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of the albums that have been starred by the authenticated user. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums starred by the user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_starred(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of the albums that have been starred by\n    the authenticated user. Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            starred by the user.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"starred\", num_of_albums, album_list_offset, music_folder_id\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_album_list_starred_non_id3","title":"get_album_list_starred_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)","text":"

Get a list of the albums that have been starred by the authenticated user. Not organized according ID3 tags.

Parameters:

Name Type Description Default num_of_albums int | None

the number of albums to be in the list.

None album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description list[Album]

A list that contains the info about the albums starred by the user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_starred_non_id3(\n    self,\n    num_of_albums: int | None = None,\n    album_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Album]:\n    \"\"\"Get a list of the albums that have been starred by\n    the authenticated user. Not organized according ID3 tags.\n\n    args:\n        num_of_albums: the number of albums to be in the list.\n        album_list_offset: the number of album to offset in the list,\n            useful for pagination.\n        music_folder_id: the id of a music folder to list where the album\n            are from.\n\n    Returns:\n        A list that contains the info about the albums\n            starred by the user.\n    \"\"\"\n\n    return self._get_album_list_generic(\n        \"starred\", num_of_albums, album_list_offset, music_folder_id, False\n    )\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_now_playing","title":"get_now_playing()","text":"

Get the songs that are currently playing by all the users.

Returns:

Type Description list[NowPlayingEntry]

A list that holds all the info about all the song that are current playing by all the users.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_now_playing(self) -> list[NowPlayingEntry]:\n    \"\"\"Get the songs that are currently playing by all the users.\n\n    Returns:\n        A list that holds all the info about all the\n            song that are current playing by all the users.\n    \"\"\"\n\n    response = self.api.json_request(\"getNowPlaying\")[\"nowPlaying\"][\"entry\"]\n\n    return [NowPlayingEntry(subsonic=self.subsonic, **entry) for entry in response]\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_random_songs","title":"get_random_songs(num_of_songs=None, genre_name=None, from_year=None, to_year=None, music_folder_id=None)","text":"

Get random songs registered in the server.

Parameters:

Name Type Description Default num_of_songs int | None

The number of songs to return.

None genre_name str | None

The genre that the songs must have it tagged on them.

None from_year int | None

The minimum year where the songs were released.

None to_year int | None

The maximum year where the songs were released.

None music_folder_id str | None

An ID of a music folder to limit where the songs should be from.

None

Returns:

Type Description list[Song]

A list that contains all the info about that were randomly selected by the server.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_random_songs(\n    self,\n    num_of_songs: int | None = None,\n    genre_name: str | None = None,\n    from_year: int | None = None,\n    to_year: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Song]:\n    \"\"\"Get random songs registered in the server.\n\n    Args:\n        num_of_songs: The number of songs to return.\n        genre_name: The genre that the songs must\n            have it tagged on them.\n        from_year: The minimum year where the songs\n            were released.\n        to_year: The maximum year where the songs\n            were released.\n        music_folder_id: An ID of a music folder\n            to limit where the songs should be from.\n\n    Returns:\n        A list that contains all the info about\n            that were randomly selected by the server.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getRandomSongs\",\n        {\n            \"size\": num_of_songs,\n            \"genre\": genre_name,\n            \"fromYear\": from_year,\n            \"toYear\": to_year,\n            \"musicFolderId\": music_folder_id,\n        },\n    )[\"randomSongs\"][\"song\"]\n\n    return [Song(subsonic=self.subsonic, **song) for song in response]\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_songs_by_genre","title":"get_songs_by_genre(genre_name, num_of_songs=None, song_list_offset=None, music_folder_id=None)","text":"

Get all the songs tagged with the given genre.

Parameters:

Name Type Description Default genre_name str

The name of the genre that all the songs must be tagged with.

required num_of_songs int | None

The number of songs that the list should have.

None song_list_offset int | None

the number of songs to offset in the list, useful for pagination.

None music_folder_id str | None

An ID of a music folder where all the songs should be from.

None

Returns:

Type Description list[Song]

A list that contains all the info about that are tagged with the given genre.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_songs_by_genre(\n    self,\n    genre_name: str,\n    num_of_songs: int | None = None,\n    song_list_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> list[Song]:\n    \"\"\"Get all the songs tagged with the given genre.\n\n    Args:\n        genre_name: The name of the genre that all the songs\n            must be tagged with.\n        num_of_songs: The number of songs that the list\n            should have.\n        song_list_offset: the number of songs to offset in the list,\n            useful for pagination.\n        music_folder_id: An ID of a music folder where all the songs\n            should be from.\n\n    Returns:\n        A list that contains all the info about\n            that are tagged with the given genre.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getSongsByGenre\",\n        {\n            \"genre\": genre_name,\n            \"count\": num_of_songs,\n            \"offset\": song_list_offset,\n            \"musicFolderId\": music_folder_id,\n        },\n    )[\"songsByGenre\"][\"song\"]\n\n    return [Song(subsonic=self.subsonic, **song) for song in response]\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_starred","title":"get_starred(music_folder_id=None)","text":"

Get all the songs, albums and artists starred by the authenticated user.

Parameters:

Name Type Description Default music_folder_id str | None

An ID of a music folder where all the songs albums, and artists should be from.

None

Returns:

Type Description StarredContent

An object that holds all the info about all the starred songs, albums and artists by the user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_starred(self, music_folder_id: str | None = None) -> StarredContent:\n    \"\"\"Get all the songs, albums and artists starred by the authenticated\n    user.\n\n    Args:\n        music_folder_id: An ID of a music folder where all the songs\n            albums, and artists should be from.\n\n    Returns:\n        An object that holds all the info about all the starred\n            songs, albums and artists by the user.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getStarred2\", {\"musicFolderId\": music_folder_id}\n    )[\"starred2\"]\n\n    return StarredContent(subsonic=self.subsonic, **response)\n
"},{"location":"reference/Lists/#knuckles._lists.Lists.get_starred_non_id3","title":"get_starred_non_id3(music_folder_id=None)","text":"

Get all the songs, albums and artists starred by the authenticated user. Not organized according ID3 tags.

Parameters:

Name Type Description Default music_folder_id str | None

An ID of a music folder where all the songs albums, and artists should be from.

None

Returns:

Type Description StarredContent

An object that holds all the info about all the starred songs, albums and artists by the user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_starred_non_id3(self, music_folder_id: str | None = None) -> StarredContent:\n    \"\"\"Get all the songs, albums and artists starred by the authenticated\n    user. Not organized according ID3 tags.\n\n    Args:\n        music_folder_id: An ID of a music folder where all the songs\n            albums, and artists should be from.\n\n    Returns:\n        An object that holds all the info about all the starred\n            songs, albums and artists by the user.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getStarred\", {\"musicFolderId\": music_folder_id}\n    )[\"starred\"]\n\n    return StarredContent(subsonic=self.subsonic, **response)\n
"},{"location":"reference/Media%20Annotation/","title":"Media Annotation","text":""},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation","title":"MediaAnnotation(api, subsonic)","text":"

Class that contains all the methods needed to interact with the media annotations endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n    self.subsonic = subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.remove_rating","title":"remove_rating(song_id)","text":"

Remove the rating entry of a song.

Parameters:

Name Type Description Default song_id str

The ID of the song which entry should be removed.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
def remove_rating(self, song_id: str) -> \"Subsonic\":\n    \"\"\"Remove the rating entry of a song.\n\n    Args:\n        song_id: The ID of the song which entry should\n            be removed.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"setRating\", {\"id\": song_id, \"rating\": 0})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.scrobble","title":"scrobble(song_id, time, submission=True)","text":"

Scrobble (register) that some song have been locally played or is being played.

Parameters:

Name Type Description Default song_id list[str]

The ID of the song to scrobble.

required time list[datetime]

How many times in second the song has been listened.

required submission bool

If true it will be registered that the song was played, if false the song will be scrobble as now playing.

True

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
def scrobble(\n    self, song_id: list[str], time: list[datetime], submission: bool = True\n) -> \"Subsonic\":\n    \"\"\"Scrobble (register) that some song have been locally played or\n    is being played.\n\n    Args:\n        song_id: The ID of the song to scrobble.\n        time: How many times in second the song has been listened.\n        submission: If true it will be registered that the song **was\n            played**, if false the song will be scrobble as\n            **now playing**.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n    self.api.json_request(\n        \"scrobble\",\n        # Multiply by 1000 because the API uses\n        # milliseconds instead of seconds for UNIX time\n        {\n            \"id\": song_id,\n            \"time\": [int(seconds.timestamp()) * 1000 for seconds in time],\n            \"submission\": submission,\n        },\n    )\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.set_rating","title":"set_rating(song_id, rating)","text":"

The the rating of a song.

Parameters:

Name Type Description Default song_id str

The ID of the song to set its rating.

required rating int

The rating between 1 and 5 (inclusive) to set the rating of the song to.

required

Raises:

Type Description InvalidRatingNumber

Raised when a number that is not between 1 and 5 (inclusive) has been pass in into the rating parameter.

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
def set_rating(self, song_id: str, rating: int) -> \"Subsonic\":\n    \"\"\"The the rating of a song.\n\n    Args:\n        song_id: The ID of the song to set its rating.\n        rating: The rating between 1 and 5 (inclusive) to set\n            the rating of the song to.\n\n    Raises:\n        InvalidRatingNumber: Raised when a number that is not\n            between 1 and 5 (inclusive) has been pass in into\n            the `rating` parameter.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    if rating not in range(1, 6):\n        raise InvalidRatingNumber(\n            (\n                \"Invalid rating number, \"\n                + \"only numbers between 1 and 5 (inclusive) are allowed\"\n            )\n        )\n\n    self.api.json_request(\"setRating\", {\"id\": song_id, \"rating\": rating})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.star_album","title":"star_album(album_id)","text":"

Star an album from the server.

Parameters:

Name Type Description Default album_id str

The ID of the album to star.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
def star_album(self, album_id: str) -> \"Subsonic\":\n    \"\"\"Star an album from the server.\n\n    Args:\n        album_id: The ID of the album to star.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"star\", {\"albumId\": album_id})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.star_artist","title":"star_artist(artist_id)","text":"

Star an artist from the server.

Parameters:

Name Type Description Default artist_id str

The ID of the artist to star.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
def star_artist(self, artist_id: str) -> \"Subsonic\":\n    \"\"\"Star an artist from the server.\n\n    Args:\n        artist_id: The ID of the artist to star.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"star\", {\"artistId\": artist_id})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.star_song","title":"star_song(song_id)","text":"

Star a song from the server.

Parameters:

Name Type Description Default song_id str

The ID of the song to star.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
def star_song(self, song_id: str) -> \"Subsonic\":\n    \"\"\"Star a song from the server.\n\n    Args:\n        song_id: The ID of the song to star.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"star\", {\"id\": song_id})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.unstar_album","title":"unstar_album(album_id)","text":"

Unstar an album from the server.

Parameters:

Name Type Description Default album_id str

The ID of the album to unstar.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
def unstar_album(self, album_id: str) -> \"Subsonic\":\n    \"\"\"Unstar an album from the server.\n\n    Args:\n        album_id: The ID of the album to unstar.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"unstar\", {\"albumId\": album_id})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.unstar_artist","title":"unstar_artist(artist_id)","text":"

Unstar an artist from the server.

Parameters:

Name Type Description Default artist_id str

The ID of the artist to unstar.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
def unstar_artist(self, artist_id: str) -> \"Subsonic\":\n    \"\"\"Unstar an artist from the server.\n\n    Args:\n        artist_id: The ID of the artist to unstar.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"unstar\", {\"artistId\": artist_id})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Annotation/#knuckles._media_annotation.MediaAnnotation.unstar_song","title":"unstar_song(song_id)","text":"

Unstar a song from the server.

Parameters:

Name Type Description Default song_id str

The ID of the song to unstar.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
def unstar_song(self, song_id: str) -> \"Subsonic\":\n    \"\"\"Unstar a song from the server.\n\n    Args:\n        song_id: The ID of the song to unstar.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"unstar\", {\"id\": song_id})\n\n    return self.subsonic\n
"},{"location":"reference/Media%20Library%20Scanning/","title":"Media Library Scanning","text":""},{"location":"reference/Media%20Library%20Scanning/#knuckles._media_library_scanning.MediaLibraryScanning","title":"MediaLibraryScanning(api, subsonic)","text":"

Class that contains all the methods needed to interact with the media library scanning endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_library_scanning.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Media%20Library%20Scanning/#knuckles._media_library_scanning.MediaLibraryScanning.get_scan_status","title":"get_scan_status()","text":"

Get the status of the scanning of the library.

Returns:

Type Description ScanStatus

An object that holds all the info about the current state of the scanning of the library.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_library_scanning.py
def get_scan_status(self) -> ScanStatus:\n    \"\"\"Get the status of the scanning of the library.\n\n    Returns:\n        An object that holds all the info about the\n            current state of the scanning of the library.\n    \"\"\"\n\n    response = self.api.json_request(\"getScanStatus\")[\"scanStatus\"]\n\n    return ScanStatus(self.subsonic, **response)\n
"},{"location":"reference/Media%20Library%20Scanning/#knuckles._media_library_scanning.MediaLibraryScanning.start_scan","title":"start_scan()","text":"

Request to the server to start a scanning of the library.

Returns:

Type Description ScanStatus

An object that holds all the info about the current state of the scanning of the library.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_library_scanning.py
def start_scan(self) -> ScanStatus:\n    \"\"\"Request to the server to start a scanning of the library.\n\n    Returns:\n        An object that holds all the info about the\n            current state of the scanning of the library.\n    \"\"\"\n\n    response = self.api.json_request(\"startScan\")[\"scanStatus\"]\n\n    return ScanStatus(self.subsonic, **response)\n
"},{"location":"reference/Media%20Retrieval/","title":"Media Retrieval","text":""},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval","title":"MediaRetrieval(api, subsonic)","text":"

Class that contains all the methods needed to interact with the media retrieval endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n    self.subsonic = subsonic\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.download","title":"download(song_or_video_id, file_or_directory_path)","text":"

Download a song or video from the server.

Parameters:

Name Type Description Default song_or_video_id str

The ID of the song or video to download.

required file_or_directory_path Path

The path where the downloaded file should be saved. If the given path is a directory then the file will be downloaded inside of it, if its a valid file path it will be downloaded using this exact filename.

required

Returns:

Type Description Path

The path where the song or video was finally saved.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
def download(self, song_or_video_id: str, file_or_directory_path: Path) -> Path:\n    \"\"\"Download a song or video from the server.\n\n    Args:\n        song_or_video_id: The ID of the song or video to download.\n        file_or_directory_path: The path where the downloaded file should\n            be saved. If the given path is a directory then the file will\n            be downloaded inside of it, if its a valid file path it will be\n            downloaded using this exact filename.\n\n    Returns:\n        The path where the song or video was finally saved.\n    \"\"\"\n\n    response = self.api.raw_request(\"download\", {\"id\": song_or_video_id})\n\n    def determinate_filename(file_response: Response) -> str:\n        filename = (\n            file_response.headers[\"Content-Disposition\"]\n            .split(\"filename=\")[1]\n            .strip()\n        )\n\n        # Remove leading quote char\n        if filename[0] == '\"':\n            filename = filename[1:]\n\n        # Remove trailing quote char\n        if filename[-1] == '\"':\n            filename = filename[:-1]\n\n        return filename\n\n    return self._handle_download(\n        response, file_or_directory_path, determinate_filename\n    )\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.get_avatar","title":"get_avatar(username, file_or_directory_path)","text":"

Download the avatar image of a user from the server.

Parameters:

Name Type Description Default username str

The username of the user to get its avatar from.

required file_or_directory_path Path

The path where the downloaded file should be saved. If the given path is a directory then the file will be downloaded inside of it, if its a valid file path it will be downloaded using this exact filename.

required

Returns:

Type Description Path

The path where the avatar image was finally saved.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
def get_avatar(self, username: str, file_or_directory_path: Path) -> Path:\n    \"\"\"Download the avatar image of a user from the server.\n\n    Args:\n        username: The username of the user to get its avatar from.\n        file_or_directory_path: The path where the downloaded file should\n            be saved. If the given path is a directory then the file will\n            be downloaded inside of it, if its a valid file path it will be\n            downloaded using this exact filename.\n\n    Returns:\n        The path where the avatar image was finally saved.\n    \"\"\"\n\n    response = self.api.raw_request(\"getAvatar\", {\"username\": username})\n\n    def determinate_filename(file_response: Response) -> str:\n        file_extension = guess_extension(\n            file_response.headers[\"content-type\"].partition(\";\")[0].strip()\n        )\n\n        return username + file_extension if file_extension else username\n\n    return self._handle_download(\n        response, file_or_directory_path, determinate_filename\n    )\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.get_captions","title":"get_captions(caption_id, file_or_directory_path, subtitles_file_format=SubtitlesFileFormat.VTT)","text":"

Download a video caption file from the server.

Parameters:

Name Type Description Default caption_id str

The ID of the caption to download.

required file_or_directory_path Path

The path where the downloaded file should be saved. If the given path is a directory then the file will be downloaded inside of it, if its a valid file path it will be downloaded using this exact filename.

required subtitles_file_format SubtitlesFileFormat

The format that the subtitle file should have.

VTT

Returns:

Type Description Path

The path where the captions was finally saved.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
def get_captions(\n    self,\n    caption_id: str,\n    file_or_directory_path: Path,\n    subtitles_file_format: SubtitlesFileFormat = SubtitlesFileFormat.VTT,\n) -> Path:\n    \"\"\"Download a video caption file from the server.\n\n    Args:\n        caption_id: The ID of the caption to download.\n        file_or_directory_path: The path where the downloaded file should\n            be saved. If the given path is a directory then the file will\n            be downloaded inside of it, if its a valid file path it will be\n            downloaded using this exact filename.\n        subtitles_file_format: The format that the subtitle file should\n            have.\n\n    Returns:\n        The path where the captions was finally saved.\n    \"\"\"\n\n    # Check if the given file format is a valid one\n    SubtitlesFileFormat(subtitles_file_format.value)\n\n    response = self.api.raw_request(\n        \"getCaptions\",\n        {\"id\": caption_id, \"format\": subtitles_file_format.value},\n    )\n\n    def determinate_filename(file_response: Response) -> str:\n        mime_type = file_response.headers[\"content-type\"].partition(\";\")[0].strip()\n\n        # application/x-subrip is not a valid MIME TYPE so a manual check is needed\n        file_extension: str | None = None\n        if mime_type == \"application/x-subrip\":\n            file_extension = \".srt\"\n        else:\n            file_extension = guess_extension(mime_type)\n\n        return caption_id + file_extension if file_extension else caption_id\n\n    return self._handle_download(\n        response, file_or_directory_path, determinate_filename\n    )\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.get_cover_art","title":"get_cover_art(cover_art_id, file_or_directory_path, size=None)","text":"

Download the cover art from the server.

Parameters:

Name Type Description Default cover_art_id str

The ID of the cover art to download.

required file_or_directory_path Path

The path where the downloaded file should be saved. If the given path is a directory then the file will be downloaded inside of it, if its a valid file path it will be downloaded using this exact filename.

required size int | None

The width in pixels that the image should have, the cover arts are always squares.

None

Returns:

Type Description Path

The path where the captions was finally saved.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
def get_cover_art(\n    self, cover_art_id: str, file_or_directory_path: Path, size: int | None = None\n) -> Path:\n    \"\"\"Download the cover art from the server.\n\n    Args:\n        cover_art_id: The ID of the cover art to download.\n        file_or_directory_path: The path where the downloaded file should\n            be saved. If the given path is a directory then the file will\n            be downloaded inside of it, if its a valid file path it will be\n            downloaded using this exact filename.\n        size: The width in pixels that the image should have,\n            the cover arts are always squares.\n\n    Returns:\n        The path where the captions was finally saved.\n    \"\"\"\n\n    response = self.api.raw_request(\n        \"getCoverArt\", {\"id\": cover_art_id, \"size\": size}\n    )\n\n    def determinate_filename(file_response: Response) -> str:\n        file_extension = guess_extension(\n            file_response.headers[\"content-type\"].partition(\";\")[0].strip()\n        )\n\n        return cover_art_id + file_extension if file_extension else cover_art_id\n\n    return self._handle_download(\n        response, file_or_directory_path, determinate_filename\n    )\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.get_lyrics","title":"get_lyrics(artist_name=None, song_title=None)","text":"

Get the lyrics of a song.

Parameters:

Name Type Description Default artist_name str | None

The name of the artist that made the song to get its lyrics from.

None song_title str | None

The title of the song to get its lyrics from.

None

Returns:

Type Description Lyrics

An object that contains all the info about the requested lyrics.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
def get_lyrics(\n    self, artist_name: str | None = None, song_title: str | None = None\n) -> Lyrics:\n    \"\"\"Get the lyrics of a song.\n\n    Args:\n        artist_name: The name of the artist that made the song to get its\n            lyrics from.\n        song_title: The title of the song to get its lyrics from.\n\n    Returns:\n        An object that contains all the info about the requested\n            lyrics.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getLyrics\", {\"artist\": artist_name, \"title\": song_title}\n    )[\"lyrics\"]\n\n    return Lyrics(subsonic=self.subsonic, **response)\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.hls","title":"hls(song_or_video_id, custom_bitrates=None, audio_track_id=None)","text":"

Get the URL required to stream a song or video with hls.m3u8.

Parameters:

Name Type Description Default song_or_video_id str

The ID of the song or video to stream.

required custom_bitrates list[str] | None

The bitrate that the server should try to limit the stream to. If more that one is specified the server will create a variant playlist, suitable for adaptive bitrate streaming.

None audio_track_id str | None

The ID of an audio track to be added to the stream if video is being streamed.

None

Returns:

Type Description str

An URL with all the needed parameters to start a streaming with hls.m3u8 using a GET request.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
def hls(\n    self,\n    song_or_video_id: str,\n    custom_bitrates: list[str] | None = None,\n    audio_track_id: str | None = None,\n) -> str:\n    \"\"\"Get the URL required to stream a song or video with hls.m3u8.\n\n    Args:\n        song_or_video_id: The ID of the song or video to stream.\n        custom_bitrates: The bitrate that the server should try to\n            limit the stream to. If more that one is specified the\n            server will create a `variant playlist`, suitable for adaptive\n            bitrate streaming.\n        audio_track_id: The ID of an audio track to be added to the stream\n            if video is being streamed.\n\n    Returns:\n        An URL with all the needed parameters to start a streaming\n            with hls.m3u8 using a GET request.\n    \"\"\"\n\n    return self.subsonic.api.generate_url(\n        \"hls.m3u8\",\n        {\n            \"id\": song_or_video_id,\n            \"bitRate\": custom_bitrates,\n            \"audioTrack\": audio_track_id,\n        },\n    )\n
"},{"location":"reference/Media%20Retrieval/#knuckles._media_retrieval.MediaRetrieval.stream","title":"stream(song_or_video_id, max_bitrate_rate=None, stream_format=None, time_offset=None, size=None, estimate_content_length=None, converted=None)","text":"

Get the URL required to stream a song or video.

Parameters:

Name Type Description Default song_or_video_id str

The ID of the song or video to get its steam URL

required max_bitrate_rate int | None

The max bitrate the stream should have.

None stream_format str | None

The format the song or video should be. Warning: The available formats are dependant of the server implementation. The only secure format is \"raw\", which disabled transcoding at all.

None time_offset int | None

An offset where the stream should start. It may not work with video, depending of the server configuration.

None size str | None

The maximum resolution of the streaming in the format WxH, only works with video streaming.

None estimate_content_length bool | None

When set to true the response with have the Content-Length HTTP header set to a estimated duration for the streamed song or video.

None converted bool | None

If set to true the server will try to stream a transcoded version in MP4. Only works with video streaming.

None

Returns:

Type Description str

An URL with all the needed parameters to start a streaming using a GET request.

Source code in .venv/lib/python3.11/site-packages/knuckles/_media_retrieval.py
def stream(\n    self,\n    song_or_video_id: str,\n    max_bitrate_rate: int | None = None,\n    stream_format: str | None = None,\n    time_offset: int | None = None,\n    size: str | None = None,\n    estimate_content_length: bool | None = None,\n    converted: bool | None = None,\n) -> str:\n    \"\"\"Get the URL required to stream a song or video.\n\n    Args:\n        song_or_video_id: The ID of the song or video to get its\n            steam URL\n        max_bitrate_rate: The max bitrate the stream should have.\n        stream_format: The format the song or video should be.\n            **Warning**: The available formats are dependant of the\n            server implementation. The only secure format is \"raw\",\n            which disabled transcoding at all.\n        time_offset: An offset where the stream should start. It may\n            not work with video, depending of the server configuration.\n        size: The maximum resolution of the streaming in the format `WxH`,\n            only works with video streaming.\n        estimate_content_length: When set to true the response with have\n            the `Content-Length` HTTP header set to a estimated duration\n            for the streamed song or video.\n        converted: If set to true the server will try to stream a\n            transcoded version in `MP4`. Only works with video\n            streaming.\n\n    Returns:\n        An URL with all the needed parameters to start a streaming\n            using a GET request.\n    \"\"\"\n\n    return self.subsonic.api.generate_url(\n        \"stream\",\n        {\n            \"id\": song_or_video_id,\n            \"maxBitRate\": max_bitrate_rate,\n            \"format\": stream_format,\n            \"timeOffset\": time_offset,\n            \"size\": size,\n            \"estimateContentLength\": estimate_content_length,\n            \"converted\": converted,\n        },\n    )\n
"},{"location":"reference/Playlists/","title":"Playlists","text":""},{"location":"reference/Playlists/#knuckles._playlists.Playlists","title":"Playlists(api, subsonic)","text":"

Class that contains all the methods needed to interact with the playlists endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_playlists.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Playlists/#knuckles._playlists.Playlists.create_playlist","title":"create_playlist(name, comment=None, public=None, song_ids=None)","text":"

Create a new playlist for the authenticated user.

Parameters:

Name Type Description Default name str

The name of the playlist to be created.

required comment str | None

A comment to be added to the new created playlist.

None public bool | None

If the song should be public or not.

None song_ids list[str] | None

A list of ID of the songs that should be included with the playlist.

None

Returns:

Type Description Playlist

An object that holds all the info about the new created playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_playlists.py
def create_playlist(\n    self,\n    name: str,\n    comment: str | None = None,\n    public: bool | None = None,\n    song_ids: list[str] | None = None,\n) -> Playlist:\n    \"\"\"Create a new playlist for the authenticated user.\n\n    Args:\n        name: The name of the playlist to be created.\n        comment: A comment to be added to the new created playlist.\n        public: If the song should be public or not.\n        song_ids: A list of ID of the songs that should be included\n            with the playlist.\n\n    Returns:\n        An object that holds all the info about the new created playlist.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"createPlaylist\", {\"name\": name, \"songId\": song_ids}\n    )[\"playlist\"]\n\n    new_playlist = Playlist(self.subsonic, **response)\n\n    # Allow to modify comment and public\n    # with a workaround using the updatePlaylist endpoint\n\n    if comment or public:\n        self.update_playlist(new_playlist.id, comment=comment, public=public)\n        new_playlist.comment = comment\n        new_playlist.public = public\n\n    return new_playlist\n
"},{"location":"reference/Playlists/#knuckles._playlists.Playlists.delete_playlist","title":"delete_playlist(playlist_id)","text":"

Delete a playlist.

Parameters:

Name Type Description Default playlist_id str

The ID of the playlist to remove.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_playlists.py
def delete_playlist(self, playlist_id: str) -> \"Subsonic\":\n    \"\"\"Delete a playlist.\n\n    Args:\n        playlist_id: The ID of the playlist to remove.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"deletePlaylist\", {\"id\": playlist_id})\n\n    return self.subsonic\n
"},{"location":"reference/Playlists/#knuckles._playlists.Playlists.get_playlist","title":"get_playlist(playlist_id)","text":"

Get all the info about a playlist available for the authenticated user.

Parameters:

Name Type Description Default playlist_id str

The ID of the playlist to get its info.

required

Returns:

Type Description Playlist

An object that holds all the info about the requested playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_playlists.py
def get_playlist(self, playlist_id: str) -> Playlist:\n    \"\"\"Get all the info about a playlist available for the authenticated\n    user.\n\n    Args:\n        playlist_id: The ID of the playlist to get its info.\n\n    Returns:\n        An object that holds all the info about the requested playlist.\n    \"\"\"\n\n    response = self.api.json_request(\"getPlaylist\", {\"id\": playlist_id})[\"playlist\"]\n\n    return Playlist(self.subsonic, **response)\n
"},{"location":"reference/Playlists/#knuckles._playlists.Playlists.get_playlists","title":"get_playlists(username=None)","text":"

Get all the playlists available to the authenticated user.

Parameters:

Name Type Description Default username str | None

The username of another user if is wanted to get the playlists they can access.

None

Returns:

Type Description list[Playlist]

A list that holds all the info about all the playlist that the user can play.

Source code in .venv/lib/python3.11/site-packages/knuckles/_playlists.py
def get_playlists(self, username: str | None = None) -> list[Playlist]:\n    \"\"\"Get all the playlists available to the authenticated user.\n\n    Args:\n        username: The username of another user if is wanted to get the\n            playlists they can access.\n\n    Returns:\n        A list that holds all the info about all the playlist\n            that the user can play.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getPlaylists\",\n        {\"username\": username} if username else {},\n    )[\"playlists\"][\"playlist\"]\n\n    playlists = [Playlist(self.subsonic, **playlist) for playlist in response]\n\n    return playlists\n
"},{"location":"reference/Playlists/#knuckles._playlists.Playlists.update_playlist","title":"update_playlist(playlist_id, name=None, comment=None, public=None, song_ids_to_add=None, song_indexes_to_remove=None)","text":"

Update the info of a playlist.

Parameters:

Name Type Description Default playlist_id str

The ID of the playlist to update its info.

required name str | None

A new name for the playlist.

None comment str | None

A new comment for the playlist.

None public bool | None

Change if the playlist should be public or private.

None song_ids_to_add list[str] | None

A list of IDs of new songs to be added to the playlist.

None song_indexes_to_remove list[int] | None

A list in indexes of songs that should be removed from the playlist.

None

Returns:

Type Description Playlist

An object that holds all the info about the updated playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/_playlists.py
def update_playlist(\n    self,\n    playlist_id: str,\n    name: str | None = None,\n    comment: str | None = None,\n    public: bool | None = None,\n    song_ids_to_add: list[str] | None = None,\n    song_indexes_to_remove: list[int] | None = None,\n) -> Playlist:\n    \"\"\"Update the info of a playlist.\n\n    Args:\n        playlist_id: The ID of the playlist to update its info.\n        name: A new name for the playlist.\n        comment: A new comment for the playlist.\n        public: Change if the playlist should be public or private.\n        song_ids_to_add: A list of IDs of new songs to be added to the\n            playlist.\n        song_indexes_to_remove: A list in indexes of songs that should\n            be removed from the playlist.\n\n    Returns:\n        An object that holds all the info about the updated playlist.\n    \"\"\"\n\n    self.api.json_request(\n        \"updatePlaylist\",\n        {\n            \"playlistId\": playlist_id,\n            \"name\": name,\n            \"comment\": comment,\n            \"public\": public,\n            \"songIdToAdd\": song_ids_to_add,\n            \"songIndexToRemove\": song_indexes_to_remove,\n        },\n    )\n\n    return Playlist(\n        self.subsonic, id=playlist_id, name=name, comment=comment, public=public\n    )\n
"},{"location":"reference/Podcast/","title":"Podcast","text":""},{"location":"reference/Podcast/#knuckles._podcast.Podcast","title":"Podcast(api, subsonic)","text":"

Class that contains all the methods needed to interact with the podcast endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.create_podcast_channel","title":"create_podcast_channel(url)","text":"

Create a new podcast channel

Parameters:

Name Type Description Default url str

The URL of the podcast to add.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
def create_podcast_channel(self, url: str) -> \"Subsonic\":\n    \"\"\"Create a new podcast channel\n\n    Args:\n        url: The URL of the podcast to add.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"createPodcastChannel\", {\"url\": url})\n\n    return self.subsonic\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.delete_podcast_channel","title":"delete_podcast_channel(podcast_channel_id)","text":"

Delete a podcast channel.

Parameters:

Name Type Description Default podcast_channel_id str

The ID of the podcast channel to delete.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
def delete_podcast_channel(self, podcast_channel_id: str) -> \"Subsonic\":\n    \"\"\"Delete a podcast channel.\n\n    Args:\n        podcast_channel_id: The ID of the podcast channel to delete.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"deletePodcastChannel\", {\"id\": podcast_channel_id})\n\n    return self.subsonic\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.delete_podcast_episode","title":"delete_podcast_episode(podcast_episode_id)","text":"

Delete a podcast episode from the server.

Parameters:

Name Type Description Default podcast_episode_id str

The ID of the podcast episode to delete.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
def delete_podcast_episode(self, podcast_episode_id: str) -> \"Subsonic\":\n    \"\"\"Delete a podcast episode from the server.\n\n    Args:\n        podcast_episode_id: The ID of the podcast episode to delete.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"deletePodcastEpisode\", {\"id\": podcast_episode_id})\n\n    return self.subsonic\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.download_podcast_episode","title":"download_podcast_episode(podcast_episode_id)","text":"

Download a podcast episode to the server.

Parameters:

Name Type Description Default podcast_episode_id str

The ID of the podcast episode to download to the server.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
def download_podcast_episode(self, podcast_episode_id: str) -> \"Subsonic\":\n    \"\"\"Download a podcast episode to the server.\n\n    Args:\n        podcast_episode_id: The ID of the podcast episode to download to\n            the server.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"downloadPodcastEpisode\", {\"id\": podcast_episode_id})\n\n    return self.subsonic\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.get_newest_podcast_episodes","title":"get_newest_podcast_episodes(number_max_episodes)","text":"

Get all the info about the newest released podcast episodes.

Parameters:

Name Type Description Default number_max_episodes int

The max number of episodes that the server should return.

required

Returns:

Type Description list[Episode]

A list that holds all the info about all the newest released episodes.

Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
def get_newest_podcast_episodes(self, number_max_episodes: int) -> list[Episode]:\n    \"\"\"Get all the info about the newest released podcast episodes.\n\n    Args:\n        number_max_episodes: The max number of episodes that the server\n            should return.\n\n    Returns:\n        A list that holds all the info about all the newest released\n            episodes.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getNewestPodcasts\", {\"count\": number_max_episodes}\n    )[\"newestPodcasts\"][\"episode\"]\n\n    return [Episode(self.subsonic, **episode) for episode in response]\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.get_podcast_channel","title":"get_podcast_channel(podcast_channel_id, with_episodes=None)","text":"

Get all the info about a podcast channel.

Parameters:

Name Type Description Default podcast_channel_id str

The ID of the podcast channel to get its info.

required with_episodes bool | None

If the server should also return all the info about each episode of the podcast channel.

None

Returns:

Type Description Channel

An object that hold all the info about the requested podcast channel.

Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
def get_podcast_channel(\n    self, podcast_channel_id: str, with_episodes: bool | None = None\n) -> Channel:\n    \"\"\"Get all the info about a podcast channel.\n\n    Args:\n        podcast_channel_id: The ID of the podcast channel to get its info.\n        with_episodes: If the server should also return all the info\n            about each episode of the podcast channel.\n\n    Returns:\n        An object that hold all the info about the requested podcast\n            channel.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getPodcasts\", {\"id\": podcast_channel_id, \"includeEpisodes\": with_episodes}\n    )[\"podcasts\"][0]\n\n    return Channel(self.subsonic, **response)\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.get_podcast_channels","title":"get_podcast_channels(with_episodes=True)","text":"

Get all the info about all the available podcasts channels in the server.

Parameters:

Name Type Description Default with_episodes bool

If the server should also return all the info about each episode of each podcast channel

True

Returns:

Type Description list[Channel]

An list that hold all the info about all the available podcasts channels.

Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
def get_podcast_channels(self, with_episodes: bool = True) -> list[Channel]:\n    \"\"\"Get all the info about all the available podcasts channels in the\n    server.\n\n    Args:\n        with_episodes: If the server should also return all the info\n            about each episode of each podcast channel\n\n    Returns:\n        An list that hold all the info about all the available podcasts\n            channels.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"getPodcasts\", {\"includeEpisodes\": with_episodes}\n    )[\"podcasts\"]\n\n    return [Channel(self.subsonic, **channel) for channel in response]\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.get_podcast_episode","title":"get_podcast_episode(episode_id)","text":"

Get all the info about a podcast episode.

Parameters:

Name Type Description Default episode_id str

The ID of the podcast episode to get its info.

required

Returns:

Type Description Episode | None

An object that holds all the info about the requested podcast episode.

Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
def get_podcast_episode(self, episode_id: str) -> Episode | None:\n    \"\"\"Get all the info about a podcast episode.\n\n    Args:\n        episode_id: The ID of the podcast episode to get its info.\n\n    Returns:\n        An object that holds all the info about the requested podcast\n            episode.\n    \"\"\"\n\n    channels = self.get_podcast_channels()\n\n    # Flatten the list of episodes inside the list of channels\n    list_of_episodes = [\n        episode\n        for channel in channels\n        if channel.episodes is not None\n        for episode in channel.episodes\n    ]\n\n    for episode in list_of_episodes:\n        if episode.id == episode_id:\n            return episode\n\n    return None\n
"},{"location":"reference/Podcast/#knuckles._podcast.Podcast.refresh_podcasts","title":"refresh_podcasts()","text":"

Request the server to search for new podcast episodes.

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_podcast.py
def refresh_podcasts(self) -> \"Subsonic\":\n    \"\"\"Request the server to search for new podcast episodes.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"refreshPodcasts\")\n\n    return self.subsonic\n
"},{"location":"reference/Searching/","title":"Searching","text":""},{"location":"reference/Searching/#knuckles._searching.Searching","title":"Searching(api, subsonic)","text":"

Class that contains all the methods needed to interact with the bookmark endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_searching.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Searching/#knuckles._searching.Searching.search","title":"search(query='', song_count=None, song_offset=None, album_count=None, album_offset=None, artist_count=None, artist_offset=None, music_folder_id=None)","text":"

Search and find all the songs, albums and artists that whose title match the given query.

Parameters:

Name Type Description Default query str

The query string to be send to the server.

'' song_count int | None

The numbers of songs that the server should return.

None song_offset int | None

The number of songs to offset in the list, useful for pagination.

None album_count int | None

The numbers of albums that the server should return.

None album_offset int | None

The number of album to offset in the list, useful for pagination.

None artist_count int | None

The numbers of artists that the server should return.

None artist_offset int | None

The number of artists to offset in the list, useful for pagination.

None music_folder_id str | None

An ID of a music folder to limit where the songs, albums and artists should come from.

None

Returns:

Type Description SearchResult

An object that contains all the info about the found songs, albums and artists received with the given query.

Source code in .venv/lib/python3.11/site-packages/knuckles/_searching.py
def search(\n    self,\n    query: str = \"\",\n    song_count: int | None = None,\n    song_offset: int | None = None,\n    album_count: int | None = None,\n    album_offset: int | None = None,\n    artist_count: int | None = None,\n    artist_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> SearchResult:\n    \"\"\"Search and find all the songs, albums and artists that\n    whose title match the given query.\n\n    Args:\n        query: The query string to be send to the server.\n        song_count: The numbers of songs that the server\n            should return.\n        song_offset: The number of songs to offset in the list,\n            useful for pagination.\n        album_count: The numbers of albums that the server\n            should return.\n        album_offset: The number of album to offset in the list,\n            useful for pagination.\n        artist_count: The numbers of artists that the server\n            should return.\n        artist_offset: The number of artists to offset in the list,\n            useful for pagination.\n        music_folder_id: An ID of a music folder to limit where the\n            songs, albums and artists should come from.\n\n    Returns:\n        An object that contains all the info about the found songs,\n            albums and artists received with the given query.\n    \"\"\"\n\n    return self._generic_search(\n        query,\n        song_count,\n        song_offset,\n        album_count,\n        album_offset,\n        artist_count,\n        artist_offset,\n    )\n
"},{"location":"reference/Searching/#knuckles._searching.Searching.search_non_id3","title":"search_non_id3(query, song_count=None, song_offset=None, album_count=None, album_offset=None, artist_count=None, artist_offset=None, music_folder_id=None)","text":"

Search and find all the songs, albums and artists that whose title match the given query. Not organized according ID3 tags.

Parameters:

Name Type Description Default query str

The query string to be send to the server.

required song_count int | None

The numbers of songs that the server should return.

None song_offset int | None

The number of songs to offset in the list, useful for pagination.

None album_count int | None

The numbers of albums that the server should return.

None album_offset int | None

The number of album to offset in the list, useful for pagination.

None artist_count int | None

The numbers of artists that the server should return.

None artist_offset int | None

The number of artists to offset in the list, useful for pagination.

None music_folder_id str | None

An ID of a music folder to limit where the songs, albums and artists should come from.

None

Returns:

Type Description SearchResult

An object that contains all the info about the found songs, albums and artists received with the given query.

Source code in .venv/lib/python3.11/site-packages/knuckles/_searching.py
def search_non_id3(\n    self,\n    query: str,\n    song_count: int | None = None,\n    song_offset: int | None = None,\n    album_count: int | None = None,\n    album_offset: int | None = None,\n    artist_count: int | None = None,\n    artist_offset: int | None = None,\n    music_folder_id: str | None = None,\n) -> SearchResult:\n    \"\"\"Search and find all the songs, albums and artists that\n    whose title match the given query. Not organized according\n    ID3 tags.\n\n    Args:\n        query: The query string to be send to the server.\n        song_count: The numbers of songs that the server\n            should return.\n        song_offset: The number of songs to offset in the list,\n            useful for pagination.\n        album_count: The numbers of albums that the server\n            should return.\n        album_offset: The number of album to offset in the list,\n            useful for pagination.\n        artist_count: The numbers of artists that the server\n            should return.\n        artist_offset: The number of artists to offset in the list,\n            useful for pagination.\n        music_folder_id: An ID of a music folder to limit where the\n            songs, albums and artists should come from.\n\n    Returns:\n        An object that contains all the info about the found songs,\n            albums and artists received with the given query.\n    \"\"\"\n\n    return self._generic_search(\n        query,\n        song_count,\n        song_offset,\n        album_count,\n        album_offset,\n        artist_count,\n        artist_offset,\n        music_folder_id,\n        False,\n    )\n
"},{"location":"reference/Sharing/","title":"Sharing","text":""},{"location":"reference/Sharing/#knuckles._sharing.Sharing","title":"Sharing(api, subsonic)","text":"

Class that contains all the methods needed to interact with the sharing endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_sharing.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/Sharing/#knuckles._sharing.Sharing.create_share","title":"create_share(songs_ids, description=None, expires=None)","text":"

Create a new share.

Parameters:

Name Type Description Default songs_ids list[str]

A list that holds the IDs of all the songs that the share can give access to.

required description str | None

A description to be added with the share.

None expires datetime | None

A timestamp that marks when the share should be invalidated.

None

Returns:

Type Description Share

An object that holds all the info about the requested share.

Source code in .venv/lib/python3.11/site-packages/knuckles/_sharing.py
def create_share(\n    self,\n    songs_ids: list[str],\n    description: str | None = None,\n    expires: datetime | None = None,\n) -> Share:\n    \"\"\"Create a new share.\n\n    Args:\n        songs_ids: A list that holds the IDs of all the songs\n            that the share can give access to.\n        description: A description to be added with the share.\n        expires: A timestamp that marks when the share should\n            be invalidated.\n\n    Returns:\n        An object that holds all the info about the requested share.\n    \"\"\"\n\n    response = self.api.json_request(\n        \"createShare\",\n        {\n            \"id\": songs_ids,\n            \"description\": description,\n            \"expires\": expires.timestamp() * 1000 if expires else None,\n        },\n    )[\"shares\"][\"share\"][0]\n\n    return Share(self.subsonic, **response)\n
"},{"location":"reference/Sharing/#knuckles._sharing.Sharing.delete_share","title":"delete_share(share_id)","text":"

Delete a share from the server.

Parameters:

Name Type Description Default share_id str

The ID of the server to delete.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_sharing.py
def delete_share(self, share_id: str) -> \"Subsonic\":\n    \"\"\"Delete a share from the server.\n\n    Args:\n        share_id: The ID of the server to delete.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"deleteShare\", {\"id\": share_id})\n\n    return self.subsonic\n
"},{"location":"reference/Sharing/#knuckles._sharing.Sharing.get_share","title":"get_share(share_id)","text":"

Get all the info about a share.

Parameters:

Name Type Description Default share_id str

The ID of the share to get its info.

required

Returns:

Type Description Share | None

An object that holds all the info about the requested share.

Source code in .venv/lib/python3.11/site-packages/knuckles/_sharing.py
def get_share(self, share_id: str) -> Share | None:\n    \"\"\"Get all the info about a share.\n\n    Args:\n        share_id: The ID of the share to get its info.\n\n    Returns:\n        An object that holds all the info about the requested\n            share.\n    \"\"\"\n\n    shares = self.get_shares()\n\n    for share in shares:\n        if share.id == share_id:\n            return share\n\n    return None\n
"},{"location":"reference/Sharing/#knuckles._sharing.Sharing.get_shares","title":"get_shares()","text":"

Get all the shares manageable by the authenticated user.

Returns:

Type Description list[Share]

A list that holds all the info about all the shares manageable by the user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_sharing.py
def get_shares(self) -> list[Share]:\n    \"\"\"Get all the shares manageable by the authenticated user.\n\n    Returns:\n        A list that holds all the info about all the shares\n            manageable by the user.\n    \"\"\"\n\n    response = self.api.json_request(\"getShares\")[\"shares\"][\"share\"]\n\n    return [Share(self.subsonic, **share) for share in response]\n
"},{"location":"reference/Sharing/#knuckles._sharing.Sharing.update_share","title":"update_share(share_id, new_description=None, new_expires=None)","text":"

Update the info of a share.

Parameters:

Name Type Description Default share_id str

The ID of the share to update.

required new_description str | None

A new description to be added to the share.

None new_expires datetime | None

A new expire timestamp for the share.

None

Returns:

Type Description Share

An object that holds all the new updated info for the share.

Source code in .venv/lib/python3.11/site-packages/knuckles/_sharing.py
def update_share(\n    self,\n    share_id: str,\n    new_description: str | None = None,\n    new_expires: datetime | None = None,\n) -> Share:\n    \"\"\"Update the info of a share.\n\n    Args:\n        share_id: The ID of the share to update.\n        new_description: A new description to be added to the share.\n        new_expires: A new expire timestamp for the share.\n\n    Returns:\n        An object that holds all the new updated info for the share.\n    \"\"\"\n\n    self.api.json_request(\n        \"updateShare\",\n        {\n            \"id\": share_id,\n            \"description\": new_description,\n            \"expires\": new_expires.timestamp() * 1000 if new_expires else None,\n        },\n    )\n\n    updated_share = Share(self.subsonic, share_id, description=new_description)\n\n    # Set it manually as the constructor expects ISO 6801 to convert it to datetime\n    # Instead of a datetime directly\n    updated_share.expires = new_expires\n\n    return updated_share\n
"},{"location":"reference/Subsonic/","title":"Subsonic","text":""},{"location":"reference/Subsonic/#knuckles._subsonic.Subsonic","title":"Subsonic(url, user, password, client, use_https=True, use_token=True, request_method=RequestMethod.POST)","text":"

Object that holds all the other helper objects to interact with the OpenSubsonic REST API.

Inside this object there are helper object that holds all the methods used to access the REST API. The methods are split following the categories listed in the OpenSubsonic REST API Spec.

Attributes:

Name Type Description api

Helper object used to directly access the REST API of the given server.

system

Helper object used to access all system related endpoints.

browsing

Helper object used to access all system related endpoints.

lists

Helper object used to access all lists related endpoints.

searching

Helper object used to access all searching related endpoints.

playlists

Helper object used to access playlists related endpoints.

media_retrieval

Helper object used to access all media retrieval related endpoints.

media_annotation

Helper object used to access all media annotation related endpoints.

sharing

Helper object used to access all sharing related endpoints.

podcast

Helper object used to access all podcast related endpoints.

jukebox

Helper object used to access all jukebox related endpoints.

internet_radio

Helper object used to access all internet radio related endpoints.

chat

Helper object used to access all chat related endpoints.

user_management

Helper object used to access all user management related endpoints.

bookmarks

Helper object used to access all bookmarks related endpoints.

media_library_scanning

Helper object used to access all media library scanning related endpoints.

Parameters:

Name Type Description Default url str

The URL of the Subsonic server to connect to.

required user str

The name of the user to authenticate.

required password str

The password of the user to authenticate.

required client str

A unique name of the client to report to the server.

required use_https bool

If the requests should be use of HTTPS.

True use_token bool

If the authentication should be made using a salted token or in plain text.

True request_method RequestMethod

If the requests should be made using a GET verb or a POST verb.

POST Source code in .venv/lib/python3.11/site-packages/knuckles/_subsonic.py
def __init__(\n    self,\n    url: str,\n    user: str,\n    password: str,\n    client: str,\n    use_https: bool = True,\n    use_token: bool = True,\n    request_method: RequestMethod = RequestMethod.POST,\n) -> None:\n    \"\"\"Construction method of the Subsonic object used to\n    interact with the OpenSubsonic REST API.\n\n    Args:\n        url: The URL of the Subsonic server to connect to.\n        user: The name of the user to authenticate.\n        password: The password of the user to authenticate.\n        client: A unique name of the client to report to the\n            server.\n        use_https: If the requests should be use of HTTPS.\n        use_token: If the authentication should be made\n            using a salted token or in plain text.\n        request_method: If the requests should be made\n            using a GET verb or a POST verb.\n    \"\"\"\n\n    self.api = Api(\n        url, user, password, client, use_https, use_token, request_method\n    )\n    self.system = System(self.api, self)\n    self.browsing = Browsing(self.api, self)\n    self.lists = Lists(self.api, self)\n    self.searching = Searching(self.api, self)\n    self.playlists = Playlists(self.api, self)\n    self.media_retrieval = MediaRetrieval(self.api, self)\n    self.media_annotation = MediaAnnotation(self.api, self)\n    self.sharing = Sharing(self.api, self)\n    self.podcast = Podcast(self.api, self)\n    self.jukebox = JukeboxControl(self.api, self)\n    self.internet_radio = InternetRadio(self.api, self)\n    self.chat = Chat(self.api, self)\n    self.user_management = UserManagement(self.api, self)\n    self.bookmarks = Bookmarks(self.api, self)\n    self.media_library_scanning = MediaLibraryScanning(self.api, self)\n
"},{"location":"reference/System/","title":"System","text":""},{"location":"reference/System/#knuckles._system.System","title":"System(api, subsonic)","text":"

Class that contains all the methods needed to interact with the system endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_system.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n\n    # Only to pass it to the models\n    self.subsonic = subsonic\n
"},{"location":"reference/System/#knuckles._system.System.check_open_subsonic_extension","title":"check_open_subsonic_extension(extension_name, extension_version)","text":"

Check if a OpenSubonic REST API extension is available on the connected server.

Parameters:

Name Type Description Default extension_name str

The name of the extension to check if its available.

required extension_version int

The version of the extension to check if its available.

required

Returns:

Type Description bool

If the given extension at the given version is available on the connected server or not.

Source code in .venv/lib/python3.11/site-packages/knuckles/_system.py
def check_open_subsonic_extension(\n    self, extension_name: str, extension_version: int\n) -> bool:\n    \"\"\"Check if a OpenSubonic REST API extension is available on the\n    connected server.\n\n    Args:\n        extension_name: The name of the extension to check if its\n            available.\n        extension_version: The version of the extension to check if\n            its available.\n\n    Returns:\n        If the given extension at the given version is available on\n            the connected server or not.\n    \"\"\"\n\n    extensions = self.get_open_subsonic_extensions()\n\n    for extension in extensions:\n        if extension.name != extension_name:\n            continue\n\n        if extension_version in extension.versions:\n            return True\n\n    return False\n
"},{"location":"reference/System/#knuckles._system.System.get_license","title":"get_license()","text":"

Get the current status of the license of the server.

Returns:

Type Description License

An object that contains all the info about the status of the license of the server.

Source code in .venv/lib/python3.11/site-packages/knuckles/_system.py
def get_license(self) -> License:\n    \"\"\"Get the current status of the license of the server.\n\n    Returns:\n        An object that contains all the info about the status\n            of the license of the server.\n    \"\"\"\n\n    response = self.api.json_request(\"getLicense\")[\"license\"]\n\n    return License(self.subsonic, **response)\n
"},{"location":"reference/System/#knuckles._system.System.get_open_subsonic_extensions","title":"get_open_subsonic_extensions()","text":"

Get all the available OpenSubsonic REST API extensions for the connected server.

Returns:

Type Description list[OpenSubsonicExtension]

A list that contains all the info about all the available extensions in the connected server.

Source code in .venv/lib/python3.11/site-packages/knuckles/_system.py
def get_open_subsonic_extensions(self) -> list[OpenSubsonicExtension]:\n    \"\"\"Get all the available OpenSubsonic REST API extensions for the\n    connected server.\n\n    Returns:\n        A list that contains all the info about all the available\n            extensions in the connected server.\n    \"\"\"\n\n    response = self.api.json_request(\"getOpenSubsonicExtensions\")[\n        \"openSubsonicExtensions\"\n    ]\n    return [\n        OpenSubsonicExtension(name, versions) for name, versions in response.items()\n    ]\n
"},{"location":"reference/System/#knuckles._system.System.ping","title":"ping()","text":"

Make a ping to the server.

Returns:

Type Description SubsonicResponse

An object that holds all the info returned by the server.

Source code in .venv/lib/python3.11/site-packages/knuckles/_system.py
def ping(self) -> SubsonicResponse:\n    \"\"\"Make a ping to the server.\n\n    Returns:\n        An object that holds all the info returned by the server.\n    \"\"\"\n\n    response = self.api.json_request(\"ping\")\n\n    return SubsonicResponse(self.subsonic, **response)\n
"},{"location":"reference/User%20Management/","title":"User Management","text":""},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement","title":"UserManagement(api, subsonic)","text":"

Class that contains all the methods needed to interact with the user management endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
def __init__(self, api: Api, subsonic: \"Subsonic\") -> None:\n    self.api = api\n    self.subsonic = subsonic\n
"},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement.change_password","title":"change_password(username, new_password)","text":"

Change the password of a user.

Parameters:

Name Type Description Default username str

The username of the user to change its password.

required new_password str

The new password for the user.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
def change_password(self, username: str, new_password: str) -> \"Subsonic\":\n    \"\"\"Change the password of a user.\n\n    Args:\n        username: The username of the user to change its password.\n        new_password: The new password for the user.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\n        \"changePassword\", {\"username\": username, \"password\": new_password}\n    )\n\n    return self.subsonic\n
"},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement.create_user","title":"create_user(username, password, email, ldap_authenticated=None, admin_role=None, settings_role=None, stream_role=None, jukebox_role=None, download_role=None, upload_role=None, playlist_role=None, cover_art_role=None, comment_role=None, podcast_role=None, share_role=None, video_conversion_role=None, music_folder_id=None, max_bit_rate=None)","text":"

Create a new user in the server.

Parameters:

Name Type Description Default username str

The username of the user to create.

required password str

The password of the user to create.

required email str

The email of the user to create.

required ldap_authenticated bool | None

If the user is authenticated in a LDAP server.

None admin_role bool | None

If the user should be an administrator.

None settings_role bool | None

If the user is allowed to change its personal settings and password.

None stream_role bool | None

If the user should be allowed to stream songs and videos.

None jukebox_role bool | None

If the user should be able to play songs in the jukebox.

None download_role bool | None

If the user should be able to download files from the server.

None upload_role bool | None

If the user should be allowed to upload files to the server.

None playlist_role bool | None

If the user should be able to create and delete playlists.

None cover_art_role bool | None

If the user should be allowed to change cover art and tags of songs.

None comment_role bool | None

If the user is allowed to create and edit comments and ratings.

None podcast_role bool | None

If the user should be allowed to administrate podcasts.

None share_role bool | None

If the user should be able to create share links.

None video_conversion_role bool | None

If the use should be allowed to start video conversion in the server.

None music_folder_id list[str] | None

A list of IDs where the used should have access to. If no one is specified all of them will be accessible.

None max_bit_rate int | None

The max bitrate that the user should be able to stream.

None

Returns:

Type Description User

An object that holds all the info about the new created user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
def create_user(\n    self,\n    username: str,\n    password: str,\n    email: str,\n    ldap_authenticated: bool | None = None,\n    admin_role: bool | None = None,\n    settings_role: bool | None = None,\n    stream_role: bool | None = None,\n    jukebox_role: bool | None = None,\n    download_role: bool | None = None,\n    upload_role: bool | None = None,\n    playlist_role: bool | None = None,\n    cover_art_role: bool | None = None,\n    comment_role: bool | None = None,\n    podcast_role: bool | None = None,\n    share_role: bool | None = None,\n    video_conversion_role: bool | None = None,\n    music_folder_id: list[str] | None = None,\n    max_bit_rate: int | None = None,\n) -> User:\n    \"\"\"Create a new user in the server.\n\n    Args:\n        username: The username of the user to create.\n        password: The password of the user to create.\n        email: The email of the user to create.\n        ldap_authenticated: If the user is authenticated in a LDAP server.\n        admin_role: If the user should be an administrator.\n        settings_role: If the user is allowed to change its\n            personal settings and password.\n        stream_role: If the user should be allowed to stream songs and\n            videos.\n        jukebox_role: If the user should be able to play songs in the\n            jukebox.\n        download_role: If the user should be able to download files from\n            the server.\n        upload_role: If the user should be allowed to upload files to\n            the server.\n        playlist_role: If the user should be able to create and delete\n            playlists.\n        cover_art_role: If the user should be allowed to change cover\n            art and tags of songs.\n        comment_role: If the user is allowed to create and edit\n            comments and ratings.\n        podcast_role: If the user should be allowed to administrate\n            podcasts.\n        share_role: If the user should be able to create share links.\n        video_conversion_role: If the use should be allowed to\n            start video conversion in the server.\n        music_folder_id: A list of IDs where the used should have access\n            to. If no one is specified all of them will be accessible.\n        max_bit_rate: The max bitrate that the user should be able to\n            stream.\n\n    Returns:\n        An object that holds all the info about the new created user.\n    \"\"\"\n\n    self.api.json_request(\n        \"createUser\",\n        {\n            \"username\": username,\n            \"password\": password,\n            \"email\": email,\n            \"ldapAuthenticated\": ldap_authenticated,\n            \"adminRole\": admin_role,\n            \"settingsRole\": settings_role,\n            \"streamRole\": stream_role,\n            \"jukeboxRole\": jukebox_role,\n            \"downloadRole\": download_role,\n            \"uploadRole\": upload_role,\n            \"playlistRole\": playlist_role,\n            \"coverArtRole\": cover_art_role,\n            \"commentRole\": comment_role,\n            \"podcastRole\": podcast_role,\n            \"shareRole\": share_role,\n            \"videoConversionRole\": video_conversion_role,\n            \"musicFolderId\": music_folder_id,\n            \"maxBitRate\": max_bit_rate,\n        },\n    )\n\n    # Attach the Subsonic object\n    new_user = User(\n        self.subsonic,\n        username,\n        password,\n        email,\n        ldap_authenticated,\n        admin_role,\n        settings_role,\n        stream_role,\n        jukebox_role,\n        download_role,\n        upload_role,\n        playlist_role,\n        cover_art_role,\n        comment_role,\n        podcast_role,\n        share_role,\n        video_conversion_role,\n        music_folder_id,\n        max_bit_rate,\n    )\n\n    return new_user\n
"},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement.delete_user","title":"delete_user(username)","text":"

Delete a user from the server.

Parameters:

Name Type Description Default username str

The username of the user to delete.

required

Returns:

Type Description Subsonic

The Subsonic object where this method was called to allow method chaining.

Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
def delete_user(self, username: str) -> \"Subsonic\":\n    \"\"\"Delete a user from the server.\n\n    Args:\n        username: The username of the user to delete.\n\n    Returns:\n        The Subsonic object where this method was called to allow\n            method chaining.\n    \"\"\"\n\n    self.api.json_request(\"deleteUser\", {\"username\": username})\n\n    return self.subsonic\n
"},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement.get_user","title":"get_user(username)","text":"

Get all the info about a user.

Parameters:

Name Type Description Default username str

The username of the user to get its info.

required

Returns:

Type Description User

An object that holds all the info about the requested user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
def get_user(self, username: str) -> User:\n    \"\"\"Get all the info about a user.\n\n    Args:\n        username: The username of the user to get its info.\n\n    Returns:\n        An object that holds all the info about the requested user.\n    \"\"\"\n    request = self.api.json_request(\"getUser\", {\"username\": username})[\"user\"]\n\n    return User(\n        self.subsonic,\n        request[\"username\"],\n        request[\"password\"],\n        request[\"email\"],\n        request[\"ldapAuthenticated\"],\n        request[\"adminRole\"],\n        request[\"settingsRole\"],\n        request[\"streamRole\"],\n        request[\"jukeboxRole\"],\n        request[\"downloadRole\"],\n        request[\"uploadRole\"],\n        request[\"playlistRole\"],\n        request[\"coverArtRole\"],\n        request[\"commentRole\"],\n        request[\"podcastRole\"],\n        request[\"shareRole\"],\n        request[\"videoConversionRole\"],\n        request[\"musicFolderId\"],\n        request[\"maxBitRate\"],\n    )\n
"},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement.get_users","title":"get_users()","text":"

Get all the users registered in the server.

Returns:

Type Description list[User]

A list that holds all the info about all the available users in the server.

Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
def get_users(self) -> list[User]:\n    \"\"\"Get all the users registered in the server.\n\n    Returns:\n        A list that holds all the info about all the available\n            users in the server.\n    \"\"\"\n\n    request = self.api.json_request(\"getUsers\")[\"users\"][\"user\"]\n\n    users: list[User] = []\n    for user in request:\n        users.append(\n            User(\n                self.subsonic,\n                user[\"username\"],\n                user[\"password\"],\n                user[\"email\"],\n                user[\"ldapAuthenticated\"],\n                user[\"adminRole\"],\n                user[\"settingsRole\"],\n                user[\"streamRole\"],\n                user[\"jukeboxRole\"],\n                user[\"downloadRole\"],\n                user[\"uploadRole\"],\n                user[\"playlistRole\"],\n                user[\"coverArtRole\"],\n                user[\"commentRole\"],\n                user[\"podcastRole\"],\n                user[\"shareRole\"],\n                user[\"videoConversionRole\"],\n                user[\"musicFolderId\"],\n                user[\"maxBitRate\"],\n            )\n        )\n\n    return users\n
"},{"location":"reference/User%20Management/#knuckles._user_management.UserManagement.update_user","title":"update_user(username, password=None, email=None, ldap_authenticated=None, admin_role=None, settings_role=None, stream_role=None, jukebox_role=None, download_role=None, upload_role=None, playlist_role=None, cover_art_role=None, comment_role=None, podcast_role=None, share_role=None, video_conversion_role=None, music_folder_id=None, max_bit_rate=None)","text":"

Update the info of a user.

Parameters:

Name Type Description Default username str

The username of the user to update.

required password str | None

The password of the user to update.

None email str | None

The email of the user to update.

None ldap_authenticated bool | None

If the user is authenticated in a LDAP server.

None admin_role bool | None

If the user should be an administrator.

None settings_role bool | None

If the user is allowed to change its personal settings and password.

None stream_role bool | None

If the user should be allowed to stream songs and videos.

None jukebox_role bool | None

If the user should be able to play songs in the jukebox.

None download_role bool | None

If the user should be able to download files from the server.

None upload_role bool | None

If the user should be allowed to upload files to the server.

None playlist_role bool | None

If the user should be able to create and delete playlists.

None cover_art_role bool | None

If the user should be allowed to change cover art and tags of songs.

None comment_role bool | None

If the user is allowed to create and edit comments and ratings.

None podcast_role bool | None

If the user should be allowed to administrate podcasts.

None share_role bool | None

If the user should be able to create share links.

None video_conversion_role bool | None

If the use should be allowed to start video conversion in the server.

None music_folder_id list[str] | None

A list of IDs where the used should have access to. If no one is specified all of them will be accessible.

None max_bit_rate int | None

The max bitrate that the user should be able to stream.

None

Returns:

Type Description User

An object that holds all the info about the update user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_user_management.py
def update_user(\n    self,\n    username: str,\n    password: str | None = None,\n    email: str | None = None,\n    ldap_authenticated: bool | None = None,\n    admin_role: bool | None = None,\n    settings_role: bool | None = None,\n    stream_role: bool | None = None,\n    jukebox_role: bool | None = None,\n    download_role: bool | None = None,\n    upload_role: bool | None = None,\n    playlist_role: bool | None = None,\n    cover_art_role: bool | None = None,\n    comment_role: bool | None = None,\n    podcast_role: bool | None = None,\n    share_role: bool | None = None,\n    video_conversion_role: bool | None = None,\n    music_folder_id: list[str] | None = None,\n    max_bit_rate: int | None = None,\n) -> User:\n    \"\"\"Update the info of a user.\n\n    Args:\n        username: The username of the user to update.\n        password: The password of the user to update.\n        email: The email of the user to update.\n        ldap_authenticated: If the user is authenticated in a LDAP server.\n        admin_role: If the user should be an administrator.\n        settings_role: If the user is allowed to change its\n            personal settings and password.\n        stream_role: If the user should be allowed to stream songs and\n            videos.\n        jukebox_role: If the user should be able to play songs in the\n            jukebox.\n        download_role: If the user should be able to download files from\n            the server.\n        upload_role: If the user should be allowed to upload files to\n            the server.\n        playlist_role: If the user should be able to create and delete\n            playlists.\n        cover_art_role: If the user should be allowed to change cover\n            art and tags of songs.\n        comment_role: If the user is allowed to create and edit\n            comments and ratings.\n        podcast_role: If the user should be allowed to administrate\n            podcasts.\n        share_role: If the user should be able to create share links.\n        video_conversion_role: If the use should be allowed to\n            start video conversion in the server.\n        music_folder_id: A list of IDs where the used should have access\n            to. If no one is specified all of them will be accessible.\n        max_bit_rate: The max bitrate that the user should be able to\n            stream.\n\n    Returns:\n        An object that holds all the info about the update user.\n    \"\"\"\n\n    self.api.json_request(\n        \"updateUser\",\n        {\n            \"username\": username,\n            \"password\": password,\n            \"email\": email,\n            \"ldapAuthenticated\": ldap_authenticated,\n            \"adminRole\": admin_role,\n            \"settingsRole\": settings_role,\n            \"streamRole\": stream_role,\n            \"jukeboxRole\": jukebox_role,\n            \"downloadRole\": download_role,\n            \"uploadRole\": upload_role,\n            \"playlistRole\": playlist_role,\n            \"coverArtRole\": cover_art_role,\n            \"commentRole\": comment_role,\n            \"podcastRole\": podcast_role,\n            \"shareRole\": share_role,\n            \"videoConversionRole\": video_conversion_role,\n            \"musicFolderId\": music_folder_id,\n            \"maxBitRate\": max_bit_rate,\n        },\n    )\n\n    updated_user = User(\n        self.subsonic,\n        username,\n        password,\n        email,\n        ldap_authenticated,\n        admin_role,\n        settings_role,\n        stream_role,\n        jukebox_role,\n        download_role,\n        upload_role,\n        playlist_role,\n        cover_art_role,\n        comment_role,\n        podcast_role,\n        share_role,\n        video_conversion_role,\n        music_folder_id,\n        max_bit_rate,\n    )\n\n    return updated_user\n
"},{"location":"reference/summary/","title":"Summary","text":"
  • Reference
    • Api
    • Bookmarks
    • Browsing
    • Chat
    • Internet Radio
    • Jukebox
    • Lists
    • Media Annotation
    • Media Library Scanning
    • Media Retrieval
    • Playlists
    • Podcast
    • Searching
    • Sharing
    • Subsonic
    • System
    • User Management
    • Exceptions
    • Models
      • Album
      • Artist
      • Artist Index
      • Bookmark
      • Chat Message
      • Contributor
      • Cover Art
      • Genre
      • Internet Radio Station
      • Jukebox
      • Lyrics
      • Model
      • Music Directory
      • Music Folder
      • Now Playing Entry
      • Play Queue
      • Playlist
      • Podcast
      • Replay Gain
      • Scan Status
      • Search Result
      • Share
      • Song
      • Starred Content
      • System
      • User
      • Video
"},{"location":"reference/models/Album/","title":"Album","text":""},{"location":"reference/models/Album/#knuckles.models._album.Album","title":"Album(subsonic, id, parent=None, album=None, title=None, name=None, isDir=None, artist=None, artistId=None, coverArt=None, songCount=None, duration=None, playCount=None, created=None, starred=None, year=None, genre=None, played=None, userRating=None, song=None, recordLabels=None, musicBrainzId=None, genres=None, artists=None, displayArtist=None, releaseTypes=None, moods=None, sortName=None, originalReleaseDate=None, releaseDate=None, isCompilation=None, discTitles=None)","text":"

Bases: Model

Object that holds all the info of an album.

Attributes:

Name Type Description id str

The ID of the album.

parent str |\u00a0None

The ID of the parent media of the album.

name str | None

The name of the album.

album str | None

The name of the album (Can differ the name and title attributes, **not documented in the OpenSubsonic Spec).

is_dir bool | None

If the album is a directory.

title str | None

The name of the album (Can differ the name and album attributes, **not documented in the OpenSubsonic Spec).

artist Artist | None

The artist of the album.

cover_art CoverArt

All the info about the cover art of the album.

song_count int | None

The number of songs inside the album.

duration int | None

The total duration of the album in seconds.

play_count int | None

The times the album has been played.

created datetime | None

The timestamp when the album was created.

starred datetime | None

The timestamp when the album was starred if it is.

year int | None

The year when the album was released.

genre str | None

The genre of the album.

played datetime | None

The timestamp when the album was played.

user_rating int | None

The rating from 0 to 5 (inclusive) that the used has given to the album if it is rated.

songs list[Song] | None

The list of songs that the album contains.

info AlbumInfo | None

Extra info about the album.

record_labels list[RecordLabel] | None

List of all the record labels that have licensed the album.

music_brainz_id str | None

The ID of the MusicBrainz database entry of the album.

genres list[ItemGenre] | None

List of all the genres that the album has.

artists list[Artist] | None

List of all the artists involved with the album.

display_artist str\u00a0| None

String that condense all the artists involved with the album.

release_types list[str] | None

The types of album that the album is.

moods list[str] | None

List of all the moods that the album has.

sort_name str | None

The name of the album used for sorting.

original_release_date ReleaseDate | None

The original release date of the album.

release_date ReleaseDate | None

The release date of the album.

is_compilation bool | None

If the album is a compilation or not.

discs list[Disc] | None Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    parent: str | None = None,\n    album: str | None = None,\n    title: str | None = None,\n    name: str | None = None,\n    isDir: bool | None = None,\n    artist: str | None = None,\n    artistId: str | None = None,\n    coverArt: str | None = None,\n    songCount: int | None = None,\n    duration: int | None = None,\n    playCount: int | None = None,\n    created: str | None = None,\n    starred: str | None = None,\n    year: int | None = None,\n    genre: str | None = None,\n    played: str | None = None,\n    userRating: int | None = None,\n    song: list[dict[str, Any]] | None = None,\n    recordLabels: list[dict[str, Any]] | None = None,\n    musicBrainzId: str | None = None,\n    genres: list[dict[str, Any]] | None = None,\n    artists: list[dict[str, Any]] | None = None,\n    displayArtist: str | None = None,\n    releaseTypes: list[str] | None = None,\n    moods: list[str] | None = None,\n    sortName: str | None = None,\n    originalReleaseDate: dict[str, Any] | None = None,\n    releaseDate: dict[str, Any] | None = None,\n    isCompilation: bool | None = None,\n    discTitles: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.parent = parent\n    self.album = album\n    self.name = name\n    self.is_dir = isDir\n    self.title = title\n    self.artist = Artist(self._subsonic, artistId, artist) if artistId else None\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.song_count = songCount\n    self.duration = duration\n    self.play_count = playCount\n    self.created = parser.parse(created) if created else None\n    self.starred = parser.parse(starred) if starred else None\n    self.year = year\n    self.genre = genre\n    self.played = parser.parse(played) if played else None\n    self.user_rating = userRating\n    self.songs = (\n        [song_model_module.Song(self._subsonic, **song_data) for song_data in song]\n        if song\n        else None\n    )\n    self.info: AlbumInfo | None = None\n    self.record_labels = (\n        [\n            RecordLabel(self._subsonic, **record_label)\n            for record_label in recordLabels\n        ]\n        if recordLabels\n        else None\n    )\n    self.music_brainz_id = musicBrainzId\n    self.genres = (\n        [ItemGenre(self._subsonic, **genre) for genre in genres] if genres else None\n    )\n    self.artists = (\n        [Artist(self._subsonic, **artist) for artist in artists]\n        if artists\n        else None\n    )\n    self.display_artist = displayArtist\n    self.release_types = releaseTypes\n    self.moods = moods\n    self.sort_name = sortName\n    self.original_release_date = (\n        ReleaseDate(self._subsonic, **originalReleaseDate)\n        if originalReleaseDate\n        else None\n    )\n    self.release_date = (\n        ReleaseDate(self._subsonic, **releaseDate) if releaseDate else None\n    )\n    self.is_compilation = isCompilation\n    self.discs = (\n        [Disc(self._subsonic, **disc) for disc in discTitles]\n        if discTitles\n        else None\n    )\n
"},{"location":"reference/models/Album/#knuckles.models._album.Album.generate","title":"generate()","text":"

Return a new album 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 Album

A new object with all the updated info.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
def generate(self) -> \"Album\":\n    \"\"\"Return a new album object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    new_album = self._subsonic.browsing.get_album(self.id)\n    new_album.get_album_info()\n\n    return new_album\n
"},{"location":"reference/models/Album/#knuckles.models._album.Album.get_album_info","title":"get_album_info()","text":"

Get all the extra info about the album, it's set to the info attribute of the object.

Returns:

Type Description AlbumInfo

The extra info returned by the server.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
def get_album_info(self) -> AlbumInfo:\n    \"\"\"Get all the extra info about the album, it's\n    set to the `info` attribute of the object.\n\n    Returns:\n        The extra info returned by the server.\n    \"\"\"\n\n    self.info = self._subsonic.browsing.get_album_info(self.id)\n\n    return self.info\n
"},{"location":"reference/models/Album/#knuckles.models._album.AlbumInfo","title":"AlbumInfo(subsonic, album_id, notes, musicBrainzId, lastFmUrl, smallImageUrl, mediumImageUrl, largeImageUrl)","text":"

Bases: Model

Object that holds all the info about the extra info of an album.

Attributes:

Name Type Description album_id str

The ID of the album where the extra info is from.

notes str

Notes of the album.

music_brainz_id str | None

The music brainz ID of the album.

last_fm_url str | None

The last.fm URL of the album

small_image_user str | None

The URL of the small sized image of the album.

medium_image_user str | None

The URL of the medium sized image of the album.

large_image_user str | None

The URL of the large sized image of the album.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    album_id: str,\n    notes: str,\n    musicBrainzId: str | None,\n    lastFmUrl: str | None,\n    smallImageUrl: str | None,\n    mediumImageUrl: str | None,\n    largeImageUrl: str | None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.album_id = album_id\n    self.notes = notes\n    self.music_brainz_id = musicBrainzId\n    self.last_fm_url = lastFmUrl\n    self.small_image_url = smallImageUrl\n    self.medium_image_url = mediumImageUrl\n    self.large_image_url = largeImageUrl\n
"},{"location":"reference/models/Album/#knuckles.models._album.AlbumInfo.generate","title":"generate()","text":"

Return a new album info 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 AlbumInfo

A new object with all the updated info.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
def generate(self) -> \"AlbumInfo\":\n    \"\"\"Return a new album info object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    return self._subsonic.browsing.get_album_info(self.album_id)\n
"},{"location":"reference/models/Album/#knuckles.models._album.Disc","title":"Disc(subsonic, disc, title)","text":"

Bases: Model

Object that holds all the info about a disc.

Attributes:

Name Type Description disc_number int

The number of the disc.

title str

The title of the disc.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
def __init__(self, subsonic: \"Subsonic\", disc: int, title: str) -> None:\n    super().__init__(subsonic)\n\n    self.disc_number = disc\n    self.title = title\n
"},{"location":"reference/models/Album/#knuckles.models._album.RecordLabel","title":"RecordLabel(subsonic, name)","text":"

Bases: Model

Object that holds all the info about a record label.

Attributes:

Name Type Description name str

The name of the record label.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
def __init__(self, subsonic: \"Subsonic\", name: str) -> None:\n    super().__init__(subsonic)\n\n    self.name = name\n
"},{"location":"reference/models/Album/#knuckles.models._album.ReleaseDate","title":"ReleaseDate(subsonic, year, month, day)","text":"

Bases: Model

Object that holds all the info about the release date of a media.

Attributes:

Name Type Description year int

The year when it was released.

month int

The month when it was released.

day int

The day when it was released.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    year: int,\n    month: int,\n    day: int,\n) -> None:\n    super().__init__(subsonic)\n\n    self.year = year\n    self.month = month\n    self.day = day\n
"},{"location":"reference/models/Artist%20Index/","title":"Artist Index","text":""},{"location":"reference/models/Artist%20Index/#knuckles.models._artist_index.ArtistIndex","title":"ArtistIndex(subsonic, ignoredArticles, index=None)","text":"

Bases: Model

Object that holds all the info about an artist index.

Attributes:

Name Type Description ignored_articles list[str]

Ignored articles in the index.

index dict[str, list[Artist]] | None

Dictionary that holds the index, where the key is the index letter and the value a list of objects that holds all the info related with the artists in that are in the given index.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist_index.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    ignoredArticles: str,\n    index: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.ignored_articles = ignoredArticles\n\n    self.index: dict[str, list[Artist]] | None\n\n    if index is None:\n        self.index = None\n        return\n\n    self.index = {}\n\n    for entry in index:\n        self.index[entry[\"name\"]] = [\n            Artist(subsonic=self._subsonic, **artist) for artist in entry[\"artist\"]\n        ]\n
"},{"location":"reference/models/Artist/","title":"Artist","text":""},{"location":"reference/models/Artist/#knuckles.models._artist.Artist","title":"Artist(subsonic, id, name=None, coverArt=None, albumCount=None, artistImageUrl=None, starred=None, userRating=None, averageRating=None, album=None, musicBrainzId=None, sortName=None, roles=None)","text":"

Bases: Model

Object that holds all the info of an artist.

Attributes:

Name Type Description id str

The ID of the artist.

name str | None

The name of the artist.

cover_art CoverArt | None

The cover art associated with the artist.

artist_image_url str |\u00a0None

The URL of the image of the artist.

album_count int |\u00a0None

The number of albums created by the artist.

starred datetime | None

The timestamp when the artist was starred if it is.

user_rating int | None

The rating from 0 to 5 (inclusive) that the used has given to the artist if it is rated.

average_rating float | None

The average rating given by all the users.

albums list[Album] | None

A list that holds all the info about all the albums created by the artist.

info ArtistInfo | None

All the extra info about the artist.

music_brainz_id str | None

The ID of the MusicBrainz database entry of the artist.

sort_name str\u00a0| None

The sort name of the artist.

roles list[str] | None

List with all the roles the artist has been in.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    name: str | None = None,\n    coverArt: str | None = None,\n    albumCount: int | None = None,\n    artistImageUrl: str | None = None,\n    starred: str | None = None,\n    userRating: int | None = None,\n    averageRating: float | None = None,\n    album: list[dict[str, Any]] | None = None,\n    musicBrainzId: str | None = None,\n    sortName: str | None = None,\n    roles: list[str] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.artist_image_url = artistImageUrl\n    self.album_count = albumCount\n    self.starred = parser.parse(starred) if starred else None\n    self.user_rating = userRating\n    self.average_rating = averageRating\n    self.albums = (\n        [\n            album_model_module.Album(self._subsonic, **album_data)\n            for album_data in album\n        ]\n        if album\n        else None\n    )\n    self.info: ArtistInfo | None = None\n    self.music_brainz_id = musicBrainzId\n    self.sort_name = sortName\n    self.roles = roles\n
"},{"location":"reference/models/Artist/#knuckles.models._artist.Artist.generate","title":"generate()","text":"

Return a new artist info 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 Artist

A new object with the updated model.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
def generate(self) -> \"Artist\":\n    \"\"\"Return a new artist info with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object itself\n    with immutability, e.g., foo = foo.generate().\n\n    Returns:\n        A new object with the updated model.\n    \"\"\"\n\n    new_artist = self._subsonic.browsing.get_artist(self.id)\n    new_artist.get_artist_info()\n\n    return new_artist\n
"},{"location":"reference/models/Artist/#knuckles.models._artist.Artist.get_artist_info","title":"get_artist_info()","text":"

Get all the extra info about the artist, it's set to the info attribute of the object.

Returns:

Type Description ArtistInfo

The extra info returned by the server.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
def get_artist_info(self) -> ArtistInfo:\n    \"\"\"Get all the extra info about the artist, it's\n    set to the `info` attribute of the object.\n\n    Returns:\n        The extra info returned by the server.\n    \"\"\"\n\n    self.info = self._subsonic.browsing.get_artist_info(self.id)\n\n    return self.info\n
"},{"location":"reference/models/Artist/#knuckles.models._artist.ArtistInfo","title":"ArtistInfo(subsonic, artist_id, biography, musicBrainzId, lastFmUrl, smallImageUrl, mediumImageUrl, largeImageUrl, similarArtist=None)","text":"

Bases: Model

Object that holds all the extra info of an artist.

Attributes:

Name Type Description artist_id str

The ID of the artist.

biography str

The biography of an artist.

music_brainz_id str | None

The ID of the MusicBrainz database entry of the artist.

last_fm_url str | None

The last.fm URL of the artist.

small_image_url str | None

The URL of the small sized image of the artist.

medium_image_url str | None

The URL of the medium sized image of the artist.

large_image_url str | None

The URL of the large sized image of the artist.

similar_artists list[Artist] | None

A list that contains the all the info about similar artists.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    artist_id: str,\n    biography: str,\n    musicBrainzId: str | None,\n    lastFmUrl: str | None,\n    smallImageUrl: str | None,\n    mediumImageUrl: str | None,\n    largeImageUrl: str | None,\n    similarArtist: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.artist_id = artist_id\n    self.biography = biography\n    self.music_brainz_id = musicBrainzId\n    self.last_fm_url = lastFmUrl\n    self.small_image_url = smallImageUrl\n    self.medium_image_url = mediumImageUrl\n    self.large_image_url = largeImageUrl\n    self.similar_artists = (\n        [Artist(self._subsonic, **artist) for artist in similarArtist]\n        if similarArtist\n        else None\n    )\n
"},{"location":"reference/models/Artist/#knuckles.models._artist.ArtistInfo.generate","title":"generate()","text":"

Return a new artist info 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 ArtistInfo

A new object with the updated model.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
def generate(self) -> \"ArtistInfo\":\n    \"\"\"Return a new artist info with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object itself\n    with immutability, e.g., foo = foo.generate().\n\n    Returns:\n        A new object with the updated model.\n    \"\"\"\n\n    return self._subsonic.browsing.get_artist_info(self.artist_id)\n
"},{"location":"reference/models/Bookmark/","title":"Bookmark","text":""},{"location":"reference/models/Bookmark/#knuckles.models._bookmark.Bookmark","title":"Bookmark(subsonic, entry, position, username=None, created=None, changed=None, comment=None)","text":"

Bases: Model

Object that holds all the info about a bookmark.

Attributes:

Name Type Description song Song

All the info about the bookmarked song.

position int

The position in seconds of the playback of the song when it was bookmarked.

user User | None

All the info about the user that created the bookmark.

comment str | None

A comment attached to the bookmark.

created datetime | None

The timestamp when the bookmark was created.

changed datetime | None

The timestamp when the bookmark was updated.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_bookmark.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    entry: dict[str, Any],\n    position: int,\n    username: str | None = None,\n    created: str | None = None,\n    changed: str | None = None,\n    comment: str | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.song = Song(self._subsonic, **entry)\n    self.position = position\n    self.user = (\n        User(subsonic=self._subsonic, username=username) if username else None\n    )\n    self.comment = comment\n    self.created = parser.parse(created) if created else None\n    self.changed = parser.parse(changed) if changed else None\n
"},{"location":"reference/models/Bookmark/#knuckles.models._bookmark.Bookmark.create","title":"create()","text":"

Create a new bookmark for the authenticated user with the same data of the object where this method is called.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_bookmark.py
def create(self) -> Self:\n    \"\"\"Create a new bookmark for the authenticated user\n    with the same data of the object where this method is\n    called.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.bookmarks.create_bookmark(\n        self.song.id, self.position, self.comment\n    )\n\n    return self\n
"},{"location":"reference/models/Bookmark/#knuckles.models._bookmark.Bookmark.delete","title":"delete()","text":"

Delete the bookmark entry from the server.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_bookmark.py
def delete(self) -> Self:\n    \"\"\"Delete the bookmark entry from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.bookmarks.delete_bookmark(self.song.id)\n\n    return self\n
"},{"location":"reference/models/Bookmark/#knuckles.models._bookmark.Bookmark.generate","title":"generate()","text":"

Return a new album 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 Bookmark

A new object with all the updated info.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_bookmark.py
def generate(self) -> \"Bookmark\":\n    \"\"\"Return a new album object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    get_bookmark = self._subsonic.bookmarks.get_bookmark(self.song.id)\n\n    if get_bookmark is None:\n        raise ResourceNotFound()\n\n    return get_bookmark\n
"},{"location":"reference/models/Bookmark/#knuckles.models._bookmark.Bookmark.update","title":"update()","text":"

Update the info about the bookmark of this song using the current data of the object.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_bookmark.py
def update(self) -> Self:\n    \"\"\"Update the info about the bookmark of this song using the\n    current data of the object.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.bookmarks.update_bookmark(\n        self.song.id, self.position, self.comment\n    )\n\n    return self\n
"},{"location":"reference/models/Chat%20Message/","title":"Chat Message","text":""},{"location":"reference/models/Chat%20Message/#knuckles.models._chat_message.ChatMessage","title":"ChatMessage(subsonic, username, time, message)","text":"

Bases: Model

Object that holds all the info about a chat message.

Attributes:

Name Type Description user User

The user author of the chat message.

message

The message send by the user.

time datetime

The timestamp when the chat message was send.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_chat_message.py
def __init__(\n    self, subsonic: \"Subsonic\", username: str, time: int, message: str\n) -> None:\n    super().__init__(subsonic)\n\n    self.user = User(self._subsonic, username)\n    self.message = message\n\n    # Divide by 1000 as the Subsonic API return in milliseconds instead of seconds\n    self.time: datetime = datetime.fromtimestamp(time / 1000)\n
"},{"location":"reference/models/Contributor/","title":"Contributor","text":""},{"location":"reference/models/Contributor/#knuckles.models._contributor.Contributor","title":"Contributor(subsonic, role, artist, subRole=None)","text":"

Bases: Model

Object that holds all the info about a contributor.

Attributes:

Name Type Description role str

The role of the contributor.

artist Artist

All the artist info associated with the contributor.

subrole str | None

The subrole of the contributor.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_contributor.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    role: str,\n    artist: Artist,\n    subRole: str | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.role = role\n    self.artist = artist\n    self.subrole = subRole\n
"},{"location":"reference/models/Cover%20Art/","title":"Cover Art","text":""},{"location":"reference/models/Cover%20Art/#knuckles.models._cover_art.CoverArt","title":"CoverArt(subsonic, id)","text":"

Bases: Model

Object that holds all the info of a cover art.

Attributes:

Name Type Description id str

The ID of the cover art.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_cover_art.py
def __init__(self, subsonic: \"Subsonic\", id: str) -> None:\n    super().__init__(subsonic)\n\n    self.id: str = id\n
"},{"location":"reference/models/Genre/","title":"Genre","text":""},{"location":"reference/models/Genre/#knuckles.models._genre.Genre","title":"Genre(subsonic, value, songCount=None, albumCount=None)","text":"

Bases: Model

Object that holds all the info about a genre.

Attributes:

Name Type Description value str

The name of the genre.

song_count int | None

Number of songs tagged with the genre.

album_count int | None

Number of albums tagged with the genre.

:param subsonic: The subsonic object to make all the internal requests with it. :type subsonic: Subsonic :param value: The name of the genre. :type value: str :param songCount: The number of songs with this genre, defaults to None. :type songCount: int | None, optional :param albumCount: The number of albums with this genre, defaults to None. :type albumCount: int | None, optional

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_genre.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    value: str,\n    songCount: int | None = None,\n    albumCount: int | None = None,\n) -> None:\n    \"\"\"Representation of all the data related to a genre in Subsonic.\n\n    :param subsonic: The subsonic object to make all the internal requests with it.\n    :type subsonic: Subsonic\n    :param value: The name of the genre.\n    :type value: str\n    :param songCount: The number of songs with this genre, defaults to None.\n    :type songCount: int | None, optional\n    :param albumCount: The number of albums with this genre, defaults to None.\n    :type albumCount: int | None, optional\n    \"\"\"\n\n    super().__init__(subsonic)\n\n    self.value = value\n    self.song_count = songCount\n    self.album_count = albumCount\n
"},{"location":"reference/models/Genre/#knuckles.models._genre.Genre.generate","title":"generate()","text":"

Return a new genre 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().

:return: A new genre object with all the data updated. :rtype: Genre

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_genre.py
def generate(self) -> \"Genre\":\n    \"\"\"Return a new genre with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object itself\n    with immutability, e.g., foo = foo.generate().\n\n    :return: A new genre object with all the data updated.\n    :rtype: Genre\n    \"\"\"\n    get_genre = self._subsonic.browsing.get_genre(self.value)\n\n    if get_genre is None:\n        raise ResourceNotFound(\n            \"Unable to generate genre as it does not exist in the server\"\n        )\n\n    return get_genre\n
"},{"location":"reference/models/Genre/#knuckles.models._genre.ItemGenre","title":"ItemGenre(subsonic, name)","text":"

Bases: Model

Object that holds all the info about a item genre.

Attributes:

Name Type Description name

The name of the genre.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_genre.py
def __init__(self, subsonic: \"Subsonic\", name: str) -> None:\n    super().__init__(subsonic)\n\n    self.name = name\n
"},{"location":"reference/models/Internet%20Radio%20Station/","title":"Internet Radio Station","text":""},{"location":"reference/models/Internet%20Radio%20Station/#knuckles.models._internet_radio_station.InternetRadioStation","title":"InternetRadioStation(subsonic, id, name, streamUrl, homepageUrl)","text":"

Bases: Model

Object that holds all the info about a Internet radio station.

Attributes:

Name Type Description id str

The ID of the Internet radio station.

name str

Then name of the Internet radio station.

stream_url str

The URL of the stream of the Internet radio station.

homepage_url str

The URl of the hompage of the Internet radio station.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_internet_radio_station.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    name: str,\n    streamUrl: str,\n    homepageUrl: str,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n    self.stream_url = streamUrl\n    self.homepage_url = homepageUrl\n
"},{"location":"reference/models/Internet%20Radio%20Station/#knuckles.models._internet_radio_station.InternetRadioStation.create","title":"create()","text":"

Create a new Internet radio station for the authenticated user with the same data of the object where this method is called.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_internet_radio_station.py
def create(self) -> Self:\n    \"\"\"Create a new Internet radio station for the authenticated user\n    with the same data of the object where this method is\n    called.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.internet_radio.create_internet_radio_station(\n        self.stream_url, self.name, self.homepage_url\n    )\n\n    return self\n
"},{"location":"reference/models/Internet%20Radio%20Station/#knuckles.models._internet_radio_station.InternetRadioStation.delete","title":"delete()","text":"

Delete the Internet radio station entry from the server.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_internet_radio_station.py
def delete(self) -> Self:\n    \"\"\"Delete the Internet radio station entry from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.internet_radio.delete_internet_radio_station(self.id)\n\n    return self\n
"},{"location":"reference/models/Internet%20Radio%20Station/#knuckles.models._internet_radio_station.InternetRadioStation.generate","title":"generate()","text":"

Return a new album 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 InternetRadioStation | None

A new object with all the updated info.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_internet_radio_station.py
def generate(self) -> \"InternetRadioStation | None\":\n    \"\"\"Return a new album object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    get_station = self._subsonic.internet_radio.get_internet_radio_station(self.id)\n\n    if get_station is None:\n        raise ResourceNotFound(\n            (\n                \"Unable to generate internet radio station\"\n                + \"as it does not exist in the server\"\n            )\n        )\n\n    return get_station\n
"},{"location":"reference/models/Internet%20Radio%20Station/#knuckles.models._internet_radio_station.InternetRadioStation.update","title":"update()","text":"

Update the info about the Internet radio station using the current data of the object.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_internet_radio_station.py
def update(self) -> Self:\n    \"\"\"Update the info about the Internet radio station using the\n    current data of the object.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.internet_radio.update_internet_radio_station(\n        self.id, self.stream_url, self.name, self.homepage_url\n    )\n\n    return self\n
"},{"location":"reference/models/Jukebox/","title":"Jukebox","text":""},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox","title":"Jukebox(subsonic, currentIndex, playing, gain, position, entry=None)","text":"

Bases: Model

Object that holds all the info about a jukebox.

Attributes:

Name Type Description current_index int

The index in the playlist of the current playing song in the jukebox.

playing bool

If the jukebox is playing a song or not.

gain float

The gain of the playback of the jukebox.

position int

How many seconds the song has been already player.

playlist list[Song] | None

A list that holds all the info about all the songs that are in the playlist of the jukebox.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    currentIndex: int,\n    playing: bool,\n    gain: float,\n    position: int,\n    entry: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.current_index: int = currentIndex\n    self.playing: bool = playing\n    self.gain: float = gain\n    self.position: int = position\n\n    self.playlist: list[Song] | None = None\n    if entry is None:\n        return\n\n    self.playlist = []\n\n    for song in entry:\n        self.playlist.append(Song(subsonic=self._subsonic, **song))\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.add","title":"add(songs_ids)","text":"

Add songs to the playlist of the jukebox.

Parameters:

Name Type Description Default songs_ids list[str]

The IDs of the songs to add.

required

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
def add(self, songs_ids: list[str]) -> Self:\n    \"\"\"Add songs to the playlist of the jukebox.\n\n    Args:\n        songs_ids: The IDs of the songs to add.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.add(songs_ids)\n\n    songs_to_add = [\n        Song(subsonic=self._subsonic, id=song_id) for song_id in songs_ids\n    ]\n    if self.playlist is not None:\n        self.playlist += songs_to_add\n        return self\n\n    # If the playlist is None then the real value of it is unknown,\n    # so a call the API is necessary to get a correct representation\n    # of the jukebox\n    self.playlist = self.generate().playlist\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.clear","title":"clear()","text":"

Calls the \"jukeboxControl\" endpoint of the API with the action \"clear\".

:return: The object itself to allow method chaining. :rtype: Self

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
def clear(self) -> Self:\n    \"\"\"Calls the \"jukeboxControl\" endpoint of the API with the action \"clear\".\n\n    :return: The object itself to allow method chaining.\n    :rtype: Self\n    \"\"\"\n\n    self._subsonic.jukebox.clear()\n    self.playlist = []\n\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.generate","title":"generate()","text":"

Return a new jukebox 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 Jukebox

A new object with all the updated info.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
def generate(self) -> \"Jukebox\":\n    \"\"\"Return a new jukebox object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    return self._subsonic.jukebox.get()\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.remove","title":"remove(index)","text":"

Remove a song from the playlist of the jukebox.

Parameters:

Name Type Description Default index int

The index of the song in the playlist to remove.

required

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
def remove(self, index: int) -> Self:\n    \"\"\"Remove a song from the playlist of the jukebox.\n\n    Args:\n        index: The index of the song in the playlist to remove.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.remove(index)\n\n    if self.playlist is not None:\n        del self.playlist[index]\n        return self\n\n    # If the playlist is None the real value of it is unknown,\n    # so a call the API is necessary to get a correct representation of the jukebox\n    self.playlist = self.generate().playlist\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.set","title":"set(songs_ids)","text":"

Set the songs of the playlist of the jukebox.

Parameters:

Name Type Description Default songs_ids list[str]

The IDs of the songs to be set the playlist to.

required

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
def set(self, songs_ids: list[str]) -> Self:\n    \"\"\"Set the songs of the playlist of the jukebox.\n\n    Args:\n        songs_ids: The IDs of the songs to be set the playlist to.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.set(songs_ids)\n\n    self.playlist = [\n        Song(subsonic=self._subsonic, id=song_id) for song_id in songs_ids\n    ]\n\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.set_gain","title":"set_gain(gain)","text":"

Set the gain of the jukebox.

Parameters:

Name Type Description Default gain float

The new gain of the jukebox.

required

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
def set_gain(self, gain: float) -> Self:\n    \"\"\"Set the gain of the jukebox.\n\n    Args:\n        gain: The new gain of the jukebox.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.set_gain(gain)\n    self.gain = gain\n\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.shuffle","title":"shuffle()","text":"

Shuffle the playlist of the jukebox.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
def shuffle(self) -> Self:\n    \"\"\"Shuffle the playlist of the jukebox.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.shuffle()\n\n    # The shuffle is server side so a call to the API is necessary\n    # to get the new order of the playlist\n    self.playlist = self._subsonic.jukebox.get().playlist\n\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.skip","title":"skip(index, offset=0)","text":"

Skips the current playing song of the jukebox to another one.

Parameters:

Name Type Description Default index int

The index of the song to skip to.

required offset float

An offset in seconds where the playback of the song should start at.

0

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
def skip(self, index: int, offset: float = 0) -> Self:\n    \"\"\"Skips the current playing song of the jukebox to another one.\n\n    Args:\n        index: The index of the song to skip to.\n        offset: An offset in seconds where the playback of the song\n            should start at.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.skip(index, offset)\n\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.start","title":"start()","text":"

Start the playback of the next song in the playlist.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
def start(self) -> Self:\n    \"\"\"Start the playback of the next song in the playlist.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.jukebox.start()\n\n    return self\n
"},{"location":"reference/models/Jukebox/#knuckles.models._jukebox.Jukebox.stop","title":"stop()","text":"

Stop the playback of the jukebox.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_jukebox.py
def stop(self) -> Self:\n    \"\"\"Stop the playback of the jukebox.\n\n    Returns:\n        The object itself.\n    \"\"\"\n    self._subsonic.jukebox.stop()\n\n    return self\n
"},{"location":"reference/models/Lyrics/","title":"Lyrics","text":""},{"location":"reference/models/Lyrics/#knuckles.models._lyrics.Lyrics","title":"Lyrics(subsonic, artist, title, value)","text":"

Bases: Model

Object that holds all the info about the lyrics of a song.

Attributes:

Name Type Description artist_name str

The name of the artist of the song.

song_title str

The title of the song.

lyrics str

The lyrics text of the song.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_lyrics.py
def __init__(\n    self, subsonic: \"Subsonic\", artist: str, title: str, value: str\n) -> None:\n    super().__init__(subsonic)\n\n    self.artist_name = artist\n    self.song_title = title\n    self.lyrics = value\n
"},{"location":"reference/models/Model/","title":"Model","text":""},{"location":"reference/models/Model/#knuckles.models._model.Model","title":"Model(subsonic)","text":"

Generic parent class for all the models. Have an internal attribute to hold a Subsonic object to access the OpenSubsonic REST API.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_model.py
def __init__(self, subsonic: \"Subsonic\") -> None:\n    self._subsonic = subsonic\n
"},{"location":"reference/models/Music%20Directory/","title":"Music Directory","text":""},{"location":"reference/models/Music%20Directory/#knuckles.models._music_directory.MusicDirectory","title":"MusicDirectory(subsonic, id, name, parent=None, starred=None, userRating=None, averageRating=None, playCount=None, child=None)","text":"

Bases: Model

Object that holds all the info about a music directory.

Attributes:

Name Type Description id str

The ID of the music directory.

name str parent str | None starred datetime | None

The timestamp when the music directory was starred by the authenticated user if it was.

user_rating int

The rating given by the authenticated user if they rated it.

average_rating float | None

The average rating given to the music directory.

play_count int | None

The number of times songs have been played that are in the music directory.

songs list[Song] | None

List that holds all the info about all the songs that are part of the music directory.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_music_directory.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    name: str,\n    parent: str | None = None,\n    starred: str | None = None,\n    userRating: int | None = None,\n    averageRating: float | None = None,\n    playCount: int | None = None,\n    child: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n    self.parent = parent\n    self.starred = parser.parse(starred) if starred else None\n    self.user_rating = userRating\n    self.average_rating = averageRating\n    self.play_count = playCount\n    self.songs = (\n        [Song(subsonic=self._subsonic, **song) for song in child] if child else None\n    )\n
"},{"location":"reference/models/Music%20Folder/","title":"Music Folder","text":""},{"location":"reference/models/Music%20Folder/#knuckles.models._music_folder.MusicFolder","title":"MusicFolder(subsonic, id, name=None)","text":"

Bases: Model

Object that holds all the info about a music folder

Attributes:

Name Type Description id

The ID of the music folder.

name

The name of the music folder.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_music_folder.py
def __init__(self, subsonic: \"Subsonic\", id: str, name: str | None = None) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n
"},{"location":"reference/models/Music%20Folder/#knuckles.models._music_folder.MusicFolder.generate","title":"generate()","text":"

Return a new music folder 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 MusicFolder

A new object with all the updated info.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_music_folder.py
def generate(self) -> \"MusicFolder\":\n    \"\"\"Return a new music folder object with all the data updated from the\n    API, using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    music_folders = self._subsonic.browsing.get_music_folders()\n\n    # Get the first element with the same ID\n    music_folder = next(\n        music_folder for music_folder in music_folders if music_folder.id == self.id\n    )\n\n    return music_folder\n
"},{"location":"reference/models/Now%20Playing%20Entry/","title":"Now Playing Entry","text":""},{"location":"reference/models/Now%20Playing%20Entry/#knuckles.models._now_playing_entry.NowPlayingEntry","title":"NowPlayingEntry(subsonic, username, minutesAgo=None, playerId=None, playerName=None, **song_data)","text":"

Bases: Model

Object that holds all the info about a now playing entry.

Attributes:

Name Type Description user

The user that is currently playing a song.

song Song

All the info about the song that is now playing.

minutes_ago int | None

How many minutes ago the songs started its playback.

player_id int | None

The ID of the played where the song is playing.

player_name song | None

The name of the player where the song is playing.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_now_playing_entry.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    username: str,\n    minutesAgo: int | None = None,\n    playerId: int | None = None,\n    playerName: str | None = None,\n    **song_data: Any,\n) -> None:\n    super().__init__(subsonic)\n\n    self.user = User(self._subsonic, username)\n    self.minutes_ago = minutesAgo\n    self.player_id = playerId\n    self.player_name = playerName\n    self.song = Song(subsonic=self._subsonic, **song_data)\n
"},{"location":"reference/models/Play%20Queue/","title":"Play Queue","text":""},{"location":"reference/models/Play%20Queue/#knuckles.models._play_queue.PlayQueue","title":"PlayQueue(subsonic, entry, current=None, position=None, username=None, changed=None, changedBy=None)","text":"

Bases: Model

Object that holds al the info about a play queue.

Attributes:

Name Type Description songs list[Song]

All the info about all the songs in the play queue.

current Song |\u00a0None

The current playing song in the play queue.

position int | None

The index of the current playing song in the play queue.

user User | None

The user owner of the play queue.

changed timedate | None

The timestamp when the play queue received any change.

changed_by str |\u00a0None

The name of the client that made the last modification to the play queue.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_play_queue.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    entry: list[dict[str, Any]],\n    current: str | None = None,\n    position: int | None = None,\n    username: str | None = None,\n    changed: str | None = None,\n    changedBy: str | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.current = Song(self._subsonic, current) if current else None\n    self.position = position\n    self.user = User(self._subsonic, username) if username else None\n    self.changed = parser.parse(changed) if changed else None\n    self.changed_by = changedBy\n    self.songs = [Song(self._subsonic, **song) for song in entry] if entry else None\n
"},{"location":"reference/models/Play%20Queue/#knuckles.models._play_queue.PlayQueue.generate","title":"generate()","text":"

Return a new play queue 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 PlayQueue

A new object with all the updated info.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_play_queue.py
def generate(self) -> \"PlayQueue\":\n    \"\"\"Return a new play queue object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    get_play_queue = self._subsonic.bookmarks.get_play_queue()\n\n    return get_play_queue\n
"},{"location":"reference/models/Play%20Queue/#knuckles.models._play_queue.PlayQueue.save","title":"save()","text":"

Calls the \"savePlayQueue\" endpoint of the API.

Saves the play queue using the parameters in the object.

:return: description :rtype: Self

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_play_queue.py
def save(self) -> Self:\n    \"\"\"Calls the \"savePlayQueue\" endpoint of the API.\n\n    Saves the play queue using the parameters in the object.\n\n    :return: _description_\n    :rtype: Self\n    \"\"\"\n\n    song_ids: list[str] = [song.id for song in self.songs] if self.songs else []\n\n    self._subsonic.bookmarks.save_play_queue(\n        song_ids, self.current.id if self.current else None, self.position\n    )\n\n    return self\n
"},{"location":"reference/models/Playlist/","title":"Playlist","text":""},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist","title":"Playlist(subsonic, id, name=None, songCount=None, duration=None, created=None, changed=None, comment=None, owner=None, public=None, coverArt=None, allowedUser=None, entry=None)","text":"

Bases: Model

Object that holds all the info about a playlist.

Attributes:

Name Type Description id str

The ID of the playlist.

name str\u00a0| None

The name of the playlist.

song_count int |\u00a0None

The number of songs in the playlist.

duration int | None

The total durations of all the songs in the playlist.

created datetime | None

The timestamp when the playlist was created.

changed datetime | None

The timestamp when the playlist was last edited.

comment str\u00a0|\u00a0None

A comment attach with the playlist.

owner User | None

All the info related with the user creator of the playlist.

public bool |\u00a0None

If the playlist is public or not.

cover_art CoverArt |\u00a0None

All the info related with the cover art of the playlist.

allowed_users list[User] | None

List that holds all the info related with all the users allowed to see the playlist.

songs list[Song] | None

List that holds all the info about all the songs in the playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    name: str | None = None,\n    songCount: int | None = None,\n    duration: int | None = None,\n    created: str | None = None,\n    changed: str | None = None,\n    comment: str | None = None,\n    owner: str | None = None,\n    public: bool | None = None,\n    coverArt: str | None = None,\n    allowedUser: list[str] | None = None,\n    entry: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n    self.song_count = songCount\n    self.duration = duration\n    self.created = parser.parse(created) if created else None\n    self.changed = parser.parse(changed) if changed else None\n    self.comment = comment\n    self.owner = User(self._subsonic, owner) if owner else None\n    self.public = public\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.allowed_users = (\n        [User(self._subsonic, username) for username in allowedUser]\n        if allowedUser\n        else None\n    )\n    self.songs = [Song(self._subsonic, **song) for song in entry] if entry else None\n
"},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist.add_songs","title":"add_songs(song_ids)","text":"

Add songs to the playlist.

Parameters:

Name Type Description Default song_ids list[str]

The ID of songs to add.

required

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
def add_songs(self, song_ids: list[str]) -> Self:\n    \"\"\"Add songs to the playlist.\n\n    Args:\n        song_ids: The ID of songs to add.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.playlists.update_playlist(self.id, song_ids_to_add=song_ids)\n\n    if not self.songs:\n        self.songs = []\n\n    for id_ in song_ids:\n        self.songs.append(Song(self._subsonic, id_))\n\n    if not self.song_count:\n        self.song_count = 0\n\n    self.song_count += len(song_ids)\n\n    return self\n
"},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist.create","title":"create()","text":"

Create a playlist with the same info of the object.

Returns:

Type Description Playlist

The new created playlist.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
def create(self) -> \"Playlist\":\n    \"\"\"Create a playlist with the same info of the object.\n\n    Returns:\n        The new created playlist.\n    \"\"\"\n\n    # Create a list of Song IDs if songs is not None\n    songs_ids = [song.id for song in self.songs] if self.songs else None\n\n    new_playlist = self._subsonic.playlists.create_playlist(\n        # Ignore the None type error as the server\n        # should return an Error Code 10 in response\n        self.name,  # type: ignore[arg-type]\n        self.comment,\n        self.public,\n        songs_ids,\n    )\n\n    return new_playlist\n
"},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist.delete","title":"delete()","text":"

Delete the playlist from the server.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
def delete(self) -> Self:\n    \"\"\"Delete the playlist from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.playlists.delete_playlist(self.id)\n\n    return self\n
"},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist.generate","title":"generate()","text":"

Return a new playlist 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 Playlist

A new object with all the updated info.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
def generate(self) -> \"Playlist\":\n    \"\"\"Return a new playlist object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    return self._subsonic.playlists.get_playlist(self.id)\n
"},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist.remove_songs","title":"remove_songs(songs_indexes)","text":"

Remove songs from the playlist.

Parameters:

Name Type Description Default songs_indexes list[int]

The indexes of the songs to remove.

required

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
def remove_songs(self, songs_indexes: list[int]) -> Self:\n    \"\"\"Remove songs from the playlist.\n\n    Args:\n        songs_indexes: The indexes of the songs to remove.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.playlists.update_playlist(\n        self.id, song_indexes_to_remove=songs_indexes\n    )\n\n    if not self.songs:\n        self.songs = []\n\n    for index in songs_indexes:\n        del self.songs[index]\n\n    if not self.song_count:\n        self.song_count = 0\n\n    self.song_count -= len(songs_indexes)\n\n    return self\n
"},{"location":"reference/models/Playlist/#knuckles.models._playlist.Playlist.update","title":"update()","text":"

Updates changed info between the model and the server.

Warning

It doesn't change the list of songs in the playlist. For do it use the add_songs and remove_songs methods.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_playlist.py
def update(self) -> Self:\n    \"\"\"Updates changed info between the model and the server.\n\n    Warning:\n        It doesn't change the list of songs in the playlist. For do\n        it use the `add_songs` and `remove_songs` methods.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.playlists.update_playlist(\n        self.id, self.name, self.comment, self.public\n    )\n\n    return self\n
"},{"location":"reference/models/Podcast/","title":"Podcast","text":""},{"location":"reference/models/Podcast/#knuckles.models._podcast.Channel","title":"Channel(subsonic, id, url=None, title=None, description=None, coverArt=None, originalImageUrl=None, status=None, episode=None)","text":"

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] |\u00a0None

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
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    url: str | None = None,\n    title: str | None = None,\n    description: str | None = None,\n    coverArt: str | None = None,\n    originalImageUrl: str | None = None,\n    status: str | None = None,\n    episode: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.url = url\n    self.title = title\n    self.description = description\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.original_image_url = originalImageUrl\n    self.status = status\n    self.episodes = (\n        [Episode(self._subsonic, **episode_data) for episode_data in episode]\n        if episode\n        else None\n    )\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Channel.create","title":"create()","text":"

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
def create(self) -> Self:\n    \"\"\"Create a new podcast with the info of the current one.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    # Ignore the None type error as the server\n    # should return an Error Code 10 in response\n    self._subsonic.podcast.create_podcast_channel(\n        self.url  # type: ignore[arg-type]\n    )\n\n    return self\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Channel.delete","title":"delete()","text":"

Delete the podcast from the server.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
def delete(self) -> Self:\n    \"\"\"Delete the podcast from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.podcast.delete_podcast_channel(self.id)\n\n    return self\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Channel.generate","title":"generate()","text":"

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
def generate(self) -> \"Channel\":\n    \"\"\"Return a new channel object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    return self._subsonic.podcast.get_podcast_channel(self.id)\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Episode","title":"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)","text":"

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 |\u00a0None

The ID of the parent of the episode.

is_dir bool |\u00a0None

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 |\u00a0None

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
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    streamId: str | None = None,\n    channelId: str | None = None,\n    title: str | None = None,\n    description: str | None = None,\n    publishDate: str | None = None,\n    status: str | None = None,\n    parent: str | None = None,\n    isDir: bool | None = None,\n    year: int | None = None,\n    genre: str | None = None,\n    coverArt: str | None = None,\n    size: int | None = None,\n    contentType: str | None = None,\n    suffix: str | None = None,\n    duration: int | None = None,\n    bitRate: int | None = None,\n    path: str | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.stream_id = streamId\n    self.channel = Channel(self._subsonic, channelId) if channelId else None\n    self.title = title\n    self.description = description\n    self.publish_date = parser.parse(publishDate) if publishDate else None\n    self.status = status\n    self.parent = parent\n    self.is_dir = isDir\n    self.year = year\n    self.genre = genre\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.size = size\n    self.content_type = contentType\n    self.suffix = suffix\n    self.duration = duration\n    self.bit_rate = bitRate\n    self.path = path\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Episode.delete","title":"delete()","text":"

Delete the episode from the server.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
def delete(self) -> Self:\n    \"\"\"Delete the episode from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.podcast.delete_podcast_episode(self.id)\n\n    return self\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Episode.download","title":"download()","text":"

Request the server to download the episode.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
def download(self) -> Self:\n    \"\"\"Request the server to download the episode.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.podcast.download_podcast_episode(self.id)\n\n    return self\n
"},{"location":"reference/models/Podcast/#knuckles.models._podcast.Episode.generate","title":"generate()","text":"

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.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_podcast.py
def generate(self) -> \"Episode\":\n    \"\"\"Return a new episode object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    get_episode = self._subsonic.podcast.get_podcast_episode(self.id)\n\n    if get_episode is None:\n        raise ResourceNotFound(\n            \"Unable to generate episode as it does not exist in the server\"\n        )\n\n    return get_episode\n
"},{"location":"reference/models/Replay%20Gain/","title":"Replay Gain","text":""},{"location":"reference/models/Replay%20Gain/#knuckles.models._replay_gain.ReplayGain","title":"ReplayGain(subsonic, trackGain=None, albumGain=None, trackPeak=None, albumPeak=None, baseGain=None, fallbackGain=None)","text":"

Bases: Model

Object that holds all the info about the gain of the playback of a media.

Attributes:

Name Type Description track_gain str\u00a0| None

The track replay gain in dB.

album_gain str\u00a0| None

The album replay gain in dB.

track_peak int | None

The track peak value.

album_peak int | None

The album peak value.

base_gain int | None

The base replay gain in dB.

fallback_gain int | None

Fallback gain in dB used when the desired one is missing.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_replay_gain.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    trackGain: str | None = None,\n    albumGain: str | None = None,\n    trackPeak: str | None = None,\n    albumPeak: str | None = None,\n    baseGain: str | None = None,\n    fallbackGain: int | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.track_gain = trackGain\n    self.album_gain = albumGain\n    self.track_peak = trackPeak\n    self.album_peak = albumPeak\n    self.base_gain = baseGain\n    self.fallback_gain = fallbackGain\n
"},{"location":"reference/models/Scan%20Status/","title":"Scan Status","text":""},{"location":"reference/models/Scan%20Status/#knuckles.models._scan_status.ScanStatus","title":"ScanStatus(subsonic, scanning, count)","text":"

Bases: Model

Object that holds all the info about a scan status.

Attributes:

Name Type Description scanning bool

If the server is scanning media or not.

count int

The number of media already scanned.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_scan_status.py
def __init__(self, subsonic: \"Subsonic\", scanning: bool, count: int) -> None:\n    super().__init__(subsonic)\n\n    self.scanning: bool = scanning\n    self.count: int = count\n
"},{"location":"reference/models/Search%20Result/","title":"Search Result","text":""},{"location":"reference/models/Search%20Result/#knuckles.models._search_result.SearchResult","title":"SearchResult(subsonic, songs=None, albums=None, artists=None)","text":"

Bases: Model

Object that holds all the info about a search result.

Attributes:

Name Type Description songs list[Song] | None

List that holds all the info about all the songs returned in the search result.-

albums list[Album] | None

List that holds all the info about all the albums returned in the search result.

artists list[Artist] | None

List that holds all the info about all the artists returned in the search result.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_search_result.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    songs: list[Song] | None = None,\n    albums: list[Album] | None = None,\n    artists: list[Artist] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.songs = songs\n    self.albums = albums\n    self.artists = artists\n
"},{"location":"reference/models/Share/","title":"Share","text":""},{"location":"reference/models/Share/#knuckles.models._share.Share","title":"Share(subsonic, id, url=None, description=None, username=None, created=None, expires=None, lastVisited=None, visitCount=None, entry=None)","text":"

Bases: Model

Object that holds all the info about a share.

Attributes:

Name Type Description id str

The ID of the share.

url str | None

The URL to access the shared media.

description str | None

The description of the share.

user User | None

All the info related with the user creator of the share.

created datetime | None

The timestamp when the share was created.

expires datetime\u00a0| None

The timestamp when the share will expire.

last_visited datetime | None

The timestamp when the share was last visited.

visit_count int | None

Number of times the share has been visited.

songs list[Song] | None

List that holds all the info about all the songs available to access with the share.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_share.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    url: str | None = None,\n    description: str | None = None,\n    username: str | None = None,\n    created: str | None = None,\n    expires: str | None = None,\n    lastVisited: str | None = None,\n    visitCount: int | None = None,\n    entry: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.url = url\n    self.description = description\n    self.user = User(self._subsonic, username) if username else None\n    self.created = parser.parse(created) if created else None\n    self.expires = parser.parse(expires) if expires else None\n    self.last_visited = parser.parse(lastVisited) if lastVisited else None\n    self.visit_count = visitCount\n    self.songs = [Song(self._subsonic, **song) for song in entry] if entry else None\n
"},{"location":"reference/models/Share/#knuckles.models._share.Share.create","title":"create()","text":"

Create a new share with the same info of the current one.

Raises:

Type Description ShareInvalidSongList

Raised if the song list contained in the share is empty.

Returns:

Type Description Share

The new created share.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_share.py
def create(self) -> \"Share\":\n    \"\"\"Create a new share with the same info of the current one.\n\n    Raises:\n        ShareInvalidSongList: Raised if the song list contained in\n            the share is empty.\n\n    Returns:\n        The new created share.\n    \"\"\"\n\n    if self.songs is None or self.songs == []:\n        raise ShareInvalidSongList(\n            (\n                \"A list with at least one song model object in the songs parameter\"\n                + \"is necessary to create a share\"\n            )\n        )\n\n    songs_ids = [song.id for song in self.songs]\n\n    new_share = self._subsonic.sharing.create_share(\n        songs_ids, self.description, self.expires\n    )\n\n    return new_share\n
"},{"location":"reference/models/Share/#knuckles.models._share.Share.delete","title":"delete()","text":"

Delete the share from the server.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_share.py
def delete(self) -> Self:\n    \"\"\"Delete the share from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.sharing.delete_share(self.id)\n\n    return self\n
"},{"location":"reference/models/Share/#knuckles.models._share.Share.generate","title":"generate()","text":"

Return a new share 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 Share | None

A new object with all the updated info.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_share.py
def generate(self) -> \"Share | None\":\n    \"\"\"Return a new share object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    get_share = self._subsonic.sharing.get_share(self.id)\n\n    if get_share is None:\n        raise ResourceNotFound\n\n    return get_share\n
"},{"location":"reference/models/Share/#knuckles.models._share.Share.update","title":"update()","text":"

Update the info of the share with the one in the model.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_share.py
def update(self) -> Self:\n    \"\"\"Update the info of the share with the one in the model.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.sharing.update_share(self.id, self.description, self.expires)\n\n    return self\n
"},{"location":"reference/models/Song/","title":"Song","text":""},{"location":"reference/models/Song/#knuckles.models._song.Song","title":"Song(subsonic, id, title=None, parent=None, isDir=None, isVideo=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)","text":"

Bases: Model

Object that holds all the info about a song.

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\u00a0| None

The HTTP ContentType of the transcoded file of the song.

transcoded_suffix str\u00a0| 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\u00a0| 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\u00a0| 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\u00a0| 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\u00a0| None

The timestamp when the song was last played.

bpm int | None

The bpm of the song.

comment str |\u00a0None

The comment of the song.

sort_name str\u00a0| None

The sort name of the song.

music_brainz_id str\u00a0| None

The ID of the MusicBrainz entry of the song.

genres list[ItemGenre |\u00a0None

List that holds all the info about all the genres of the song.

artists list[Artist] |\u00a0None

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 |\u00a0None

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\u00a0|\u00a0None

The display name of the composer of the song.

moods list[str] |\u00a0None

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/_song.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    title: str | None = None,\n    parent: str | None = None,\n    isDir: bool | None = None,\n    isVideo: bool | None = None,\n    album: str | None = None,\n    artist: str | None = None,\n    track: int | None = None,\n    year: int | None = None,\n    genre: str | None = None,\n    coverArt: str | None = None,\n    size: int | None = None,\n    contentType: str | None = None,\n    suffix: str | None = None,\n    transcodedContentType: str | None = None,\n    transcodedSuffix: str | None = None,\n    duration: int | None = None,\n    bitRate: int | None = None,\n    path: str | None = None,\n    userRating: int | None = None,\n    averageRating: float | None = None,\n    playCount: int | None = None,\n    discNumber: int | None = None,\n    created: str | None = None,\n    starred: str | None = None,\n    albumId: str | None = None,\n    artistId: str | None = None,\n    type: str | None = None,\n    bookmarkPosition: int | None = None,\n    originalWidth: None = None,\n    originalHeight: None = None,\n    played: str | None = None,\n    bpm: int | None = None,\n    comment: str | None = None,\n    sortName: str | None = None,\n    musicBrainzId: str | None = None,\n    genres: list[dict[str, Any]] | None = None,\n    artists: list[dict[str, Any]] | None = None,\n    displayArtist: str | None = None,\n    albumArtists: list[dict[str, Any]] | None = None,\n    displayAlbumArtist: str | None = None,\n    contributors: list[dict[str, Any]] | None = None,\n    displayComposer: str | None = None,\n    moods: list[str] | None = None,\n    replayGain: dict[str, Any] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id: str = id\n    self.title: str | None = title\n    self.parent: str | None = parent\n    self.track: int | None = track\n    self.year: int | None = year\n    self.genre = Genre(self._subsonic, genre) if genre else None\n    self.size: int | None = size\n    self.content_type: str | None = contentType\n    self.suffix: str | None = suffix\n    self.transcoded_content_type: str | None = transcodedContentType\n    self.transcoded_suffix: str | None = transcodedSuffix\n    self.duration: int | None = duration\n    self.bit_rate: int | None = bitRate\n    self.path: str | None = path\n    self.user_rating: int | None = userRating\n    self.average_rating: float | None = averageRating\n    self.play_count: int | None = playCount\n    self.disc_number: int | None = discNumber\n    self.type: str | None = type\n    self.bookmark_position: int | None = bookmarkPosition\n    self.album = (\n        album_model_module.Album(self._subsonic, albumId, name=album)\n        if albumId\n        else None\n    )\n    self.artist = Artist(self._subsonic, artistId, artist) if artistId else None\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.created = parser.parse(created) if created else None\n    self.starred = parser.parse(starred) if starred else None\n    self.played = parser.parse(played) if played else None\n    self.bpm = bpm\n    self.comment = comment\n    self.sort_name = sortName\n    self.music_brainz_id = musicBrainzId\n    self.genres = (\n        [ItemGenre(self._subsonic, **genre) for genre in genres] if genres else None\n    )\n    self.artists = (\n        [Artist(self._subsonic, **artist) for artist in artists]\n        if artists\n        else None\n    )\n    self.display_artist = displayArtist\n    self.album_artists = (\n        [Artist(self._subsonic, **artist) for artist in albumArtists]\n        if albumArtists\n        else None\n    )\n    self.display_album_artist = displayAlbumArtist\n    self.contributors = (\n        [Contributor(self._subsonic, **contributor) for contributor in contributors]\n        if contributors\n        else None\n    )\n    self.display_composer = displayComposer\n    self.moods = moods\n    self.replay_gain = (\n        ReplayGain(self._subsonic, **replayGain) if replayGain else None\n    )\n
"},{"location":"reference/models/Song/#knuckles.models._song.Song.generate","title":"generate()","text":"

Return a new song 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 Song

A new object with all the updated info.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_song.py
def generate(self) -> \"Song\":\n    \"\"\"Return a new song object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    return self._subsonic.browsing.get_song(self.id)\n
"},{"location":"reference/models/Song/#knuckles.models._song.Song.remove_rating","title":"remove_rating()","text":"

Remove the rating for the song.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_song.py
def remove_rating(self) -> Self:\n    \"\"\"Remove the rating for the song.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.media_annotation.remove_rating(self.id)\n\n    return self\n
"},{"location":"reference/models/Song/#knuckles.models._song.Song.scrobble","title":"scrobble(time, submission=True)","text":"

Scrobble the song.

Parameters:

Name Type Description Default time datetime

The timestamp when the song was scrobble:

required submission bool

If the scrobble is a request to a submission or it is a now playing entry.

True

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_song.py
def scrobble(self, time: datetime, submission: bool = True) -> Self:\n    \"\"\"Scrobble the song.\n\n    Args:\n        time: The timestamp when the song was scrobble:\n        submission: If the scrobble is a request to a submission or\n            it is a now playing entry.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.media_annotation.scrobble([self.id], [time], submission)\n\n    return self\n
"},{"location":"reference/models/Song/#knuckles.models._song.Song.set_rating","title":"set_rating(rating)","text":"

Set the rating of the song.

Parameters:

Name Type Description Default rating int

The new rating for the song.

required

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_song.py
def set_rating(self, rating: int) -> Self:\n    \"\"\"Set the rating of the song.\n\n    Args:\n        rating: The new rating for the song.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.media_annotation.set_rating(self.id, rating)\n\n    return self\n
"},{"location":"reference/models/Song/#knuckles.models._song.Song.star","title":"star()","text":"

Star the song for the authenticated user.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_song.py
def star(self) -> Self:\n    \"\"\"Star the song for the authenticated user.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.media_annotation.star_song(self.id)\n\n    return self\n
"},{"location":"reference/models/Song/#knuckles.models._song.Song.unstar","title":"unstar()","text":"

Unstar the song for the authenticated user.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_song.py
def unstar(self) -> Self:\n    \"\"\"Unstar the song for the authenticated user.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.media_annotation.unstar_song(self.id)\n\n    return self\n
"},{"location":"reference/models/Starred%20Content/","title":"Starred Content","text":""},{"location":"reference/models/Starred%20Content/#knuckles.models._starred_content.StarredContent","title":"StarredContent(subsonic, song=None, album=None, artist=None)","text":"

Bases: Model

Object that holds all the info about starred content.

Attributes:

Name Type Description songs list[Song] | None

List that holds all the info about all the starred songs.

albums list[Album] | None

List that holds all the info about all the starred albums.

artists list[Artist] |\u00a0None

List that holds all the info about all the starred artists.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_starred_content.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    song: list[dict[str, Any]] | None = None,\n    album: list[dict[str, Any]] | None = None,\n    artist: list[dict[str, Any]] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.songs = (\n        [Song(subsonic=self._subsonic, **song) for song in song] if song else None\n    )\n    self.albums = (\n        [Album(subsonic=self._subsonic, **album) for album in album]\n        if album\n        else None\n    )\n    self.artists = (\n        [Artist(subsonic=self._subsonic, **artist) for artist in artist]\n        if artist\n        else None\n    )\n
"},{"location":"reference/models/System/","title":"System","text":""},{"location":"reference/models/System/#knuckles.models._system.License","title":"License(subsonic, valid, email=None, licenseExpires=None, trialExpires=None)","text":"

Bases: Model

Object that holds all the info about the license status of the server.

Attributes:

Name Type Description valid bool

If the license of the server is valid.

email str | None

The email of the authenticated user.

license_expires datetime | None

The timestamp when the license expires.

trial_expires datetime | None

The timestamp when the trial expires if it has not already.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_system.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    valid: bool,\n    email: str | None = None,\n    licenseExpires: str | None = None,\n    trialExpires: str | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.valid: bool = valid\n    self.email: str | None = email\n\n    self.license_expires: datetime | None\n    if licenseExpires is not None:\n        self.license_expires = parser.parse(licenseExpires)\n    else:\n        self.license_expires = None\n\n    self.trial_expires: datetime | None\n    if trialExpires is not None:\n        self.trial_expires = parser.parse(trialExpires)\n    else:\n        self.trial_expires = None\n
"},{"location":"reference/models/System/#knuckles.models._system.SubsonicResponse","title":"SubsonicResponse(subsonic, status, version, type=None, serverVersion=None, openSubsonic=None)","text":"

Bases: Model

Object that holds all the generic info about a response in a OpenSubsonic REST API call.

Attributes:

Name Type Description status str

The status of the response, can be \"ok\" or \"failed\".

version str

The server supported version of the OpenSubonic REST API.

type str | None

The name of the server reported by itself.

server_version str | None

The server actual version.

open_subsonic bool | None

If the server supports OpenSubsonic REST API extensions.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_system.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    status: str,\n    version: str,\n    type: str | None = None,\n    serverVersion: str | None = None,\n    openSubsonic: bool | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.status = status\n    self.version = version\n    self.type = type\n    self.server_version = serverVersion\n    self.open_subsonic = openSubsonic\n
"},{"location":"reference/models/User/","title":"User","text":""},{"location":"reference/models/User/#knuckles.models._user.User","title":"User(subsonic, username, password=None, email=None, ldap_authenticated=None, admin_role=None, settings_role=None, stream_role=None, jukebox_role=None, download_role=None, upload_role=None, playlist_role=None, cover_art_role=None, comment_role=None, podcast_role=None, share_role=None, video_conversion_role=None, music_folder_id=None, max_bit_rate=None)","text":"

Bases: Model

Object that holds all the info about a user.

Attributes:

Name Type Description username str

The username of the user.

password str\u00a0| None

The password of the user.

email str | None

The email of the user.

ldap_authenticated bool | None

If the user is has been authenticated using LDAP.

admin_role bool |\u00a0None

If the user has access to admin functionalities.

settings_role bool |\u00a0None

If the user has access to change the settings of the server.

stream_role bool |\u00a0None

If the user has access to stream media.

jukebox_role bool |\u00a0None

If the user has access to control the jukebox.

download_role bool |\u00a0None

If the user has access to download media.

upload_role bool |\u00a0None

If the user has access to upload media.

playlist_role bool |\u00a0None

If the user has access to create, edit and delete playlists.

cover_art_role bool |\u00a0None

If the user has access to manipulate cover arts of media.

comment_role bool |\u00a0None

If the user has access to manipulate comments.

podcast_role bool |\u00a0None

If the user has access to manipulate podcasts.

share_role bool |\u00a0None

If the user has access to create, modify and delete shares.

video_conversion_role bool |\u00a0None

If the user is able to trigger video conversions.

music_folder_id list[str] | None

The IDs of the music folders where the user is able to access content from.

max_bit_rate int | None

The max bit rate the user can stream.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_user.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    username: str,\n    password: str | None = None,\n    email: str | None = None,\n    ldap_authenticated: bool | None = None,\n    admin_role: bool | None = None,\n    settings_role: bool | None = None,\n    stream_role: bool | None = None,\n    jukebox_role: bool | None = None,\n    download_role: bool | None = None,\n    upload_role: bool | None = None,\n    playlist_role: bool | None = None,\n    cover_art_role: bool | None = None,\n    comment_role: bool | None = None,\n    podcast_role: bool | None = None,\n    share_role: bool | None = None,\n    video_conversion_role: bool | None = None,\n    music_folder_id: list[str] | None = None,\n    max_bit_rate: int | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.username = username\n    self.password = password\n    self.email = email\n    self.ldap_authenticated = ldap_authenticated\n    self.admin_role = admin_role\n    self.settings_role = settings_role\n    self.stream_role = stream_role\n    self.jukebox_role = jukebox_role\n    self.download_role = download_role\n    self.upload_role = upload_role\n    self.playlist_role = playlist_role\n    self.cover_art_role = cover_art_role\n    self.comment_role = comment_role\n    self.podcast_role = podcast_role\n    self.share_role = share_role\n    self.video_conversion_role = video_conversion_role\n    self.music_folder_id = music_folder_id\n    self.max_bit_rate = max_bit_rate\n
"},{"location":"reference/models/User/#knuckles.models._user.User.change_password","title":"change_password(new_password)","text":"

Change the password of the user.

Parameters:

Name Type Description Default new_password str

The new password for the user

required

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_user.py
def change_password(self, new_password: str) -> Self:\n    \"\"\"Change the password of the user.\n\n    Args:\n        new_password: The new password for the user\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.user_management.change_password(self.username, new_password)\n\n    return self\n
"},{"location":"reference/models/User/#knuckles.models._user.User.create","title":"create()","text":"

Create a new user with the attributes of the model.

Raises:

Type Description MissingRequiredProperty

Raised if a required property to create the user is missing.

Returns: The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_user.py
def create(self) -> Self:\n    \"\"\"Create a new user with the attributes of the model.\n\n    Raises:\n        MissingRequiredProperty: Raised if a required property to create\n            the user is missing.\n    Returns:\n        The object itself.\n    \"\"\"\n\n    if not self.email:\n        raise MissingRequiredProperty(\n            \"You must provide an email in the email property of the model\"\n        )\n\n    if not self.password:\n        raise MissingRequiredProperty(\n            \"You must provide an password in the password property of the model\"\n        )\n\n    self._subsonic.user_management.create_user(\n        self.username,\n        self.password,\n        self.email,\n        self.ldap_authenticated,\n        self.admin_role,\n        self.settings_role,\n        self.stream_role,\n        self.jukebox_role,\n        self.download_role,\n        self.upload_role,\n        self.playlist_role,\n        self.cover_art_role,\n        self.comment_role,\n        self.podcast_role,\n        self.share_role,\n        self.video_conversion_role,\n        self.music_folder_id,\n        self.max_bit_rate,\n    )\n\n    return self\n
"},{"location":"reference/models/User/#knuckles.models._user.User.delete","title":"delete()","text":"

Delete the user from the server.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_user.py
def delete(self) -> Self:\n    \"\"\"Delete the user from the server.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.user_management.delete_user(self.username)\n\n    return self\n
"},{"location":"reference/models/User/#knuckles.models._user.User.generate","title":"generate()","text":"

Return a new user 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 User

A new object with all the updated info.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_user.py
def generate(self) -> \"User\":\n    \"\"\"Return a new user object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    return self._subsonic.user_management.get_user(self.username)\n
"},{"location":"reference/models/User/#knuckles.models._user.User.update","title":"update()","text":"

Updates the info about the user in the server with the one in the model.

Returns:

Type Description Self

The object itself.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_user.py
def update(self) -> Self:\n    \"\"\"Updates the info about the user in the server with\n    the one in the model.\n\n    Returns:\n        The object itself.\n    \"\"\"\n\n    self._subsonic.user_management.update_user(\n        self.username,\n        self.password,\n        self.email,\n        self.ldap_authenticated,\n        self.admin_role,\n        self.settings_role,\n        self.stream_role,\n        self.jukebox_role,\n        self.download_role,\n        self.upload_role,\n        self.playlist_role,\n        self.cover_art_role,\n        self.comment_role,\n        self.podcast_role,\n        self.share_role,\n        self.video_conversion_role,\n        self.music_folder_id,\n        self.max_bit_rate,\n    )\n\n    return self\n
"},{"location":"reference/models/Video/","title":"Video","text":""},{"location":"reference/models/Video/#knuckles.models._video.AudioTrack","title":"AudioTrack(subsonic, id, name=None, languageCode=None)","text":"

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
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    name: str | None = None,\n    languageCode: str | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n    self.language_code = languageCode\n
"},{"location":"reference/models/Video/#knuckles.models._video.Captions","title":"Captions(subsonic, id, name=None)","text":"

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
def __init__(self, subsonic: \"Subsonic\", id: str, name: str | None = None) -> None:\n    super().__init__(subsonic)\n\n    self.id = id\n    self.name = name\n
"},{"location":"reference/models/Video/#knuckles.models._video.Video","title":"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)","text":"

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\u00a0| None

The HTTP ContentType of the transcoded file of the song.

transcoded_suffix str\u00a0| 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\u00a0| 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\u00a0| 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\u00a0| 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\u00a0| None

The timestamp when the song was last played.

bpm int | None

The bpm of the song.

comment str |\u00a0None

The comment of the song.

sort_name str\u00a0| None

The sort name of the song.

music_brainz_id str\u00a0| None

The ID of the MusicBrainz entry of the song.

genres list[ItemGenre |\u00a0None

List that holds all the info about all the genres of the song.

artists list[Artist] |\u00a0None

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 |\u00a0None

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\u00a0|\u00a0None

The display name of the composer of the song.

moods list[str] |\u00a0None

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
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    id: str,\n    title: str | None = None,\n    parent: str | None = None,\n    album: str | None = None,\n    artist: str | None = None,\n    track: int | None = None,\n    year: int | None = None,\n    genre: str | None = None,\n    coverArt: str | None = None,\n    size: int | None = None,\n    contentType: str | None = None,\n    suffix: str | None = None,\n    transcodedContentType: str | None = None,\n    transcodedSuffix: str | None = None,\n    duration: int | None = None,\n    bitRate: int | None = None,\n    path: str | None = None,\n    userRating: int | None = None,\n    averageRating: float | None = None,\n    playCount: int | None = None,\n    discNumber: int | None = None,\n    created: str | None = None,\n    starred: str | None = None,\n    albumId: str | None = None,\n    artistId: str | None = None,\n    type: str | None = None,\n    bookmarkPosition: int | None = None,\n    originalWidth: None = None,\n    originalHeight: None = None,\n    played: str | None = None,\n    bpm: int | None = None,\n    comment: str | None = None,\n    sortName: str | None = None,\n    musicBrainzId: str | None = None,\n    genres: list[dict[str, Any]] | None = None,\n    artists: list[dict[str, Any]] | None = None,\n    displayArtist: str | None = None,\n    albumArtists: list[dict[str, Any]] | None = None,\n    displayAlbumArtist: str | None = None,\n    contributors: list[dict[str, Any]] | None = None,\n    displayComposer: str | None = None,\n    moods: list[str] | None = None,\n    replayGain: dict[str, Any] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.id: str = id\n    self.title: str | None = title\n    self.parent: str | None = parent\n    self.track: int | None = track\n    self.year: int | None = year\n    self.genre = Genre(self._subsonic, genre) if genre else None\n    self.size: int | None = size\n    self.content_type: str | None = contentType\n    self.suffix: str | None = suffix\n    self.transcoded_content_type: str | None = transcodedContentType\n    self.transcoded_suffix: str | None = transcodedSuffix\n    self.duration: int | None = duration\n    self.bit_rate: int | None = bitRate\n    self.path: str | None = path\n    self.user_rating: int | None = userRating\n    self.average_rating: float | None = averageRating\n    self.play_count: int | None = playCount\n    self.disc_number: int | None = discNumber\n    self.type: str | None = type\n    self.bookmark_position: int | None = bookmarkPosition\n    self.album = (\n        album_model_module.Album(self._subsonic, albumId, name=album)\n        if albumId\n        else None\n    )\n    self.artist = Artist(self._subsonic, artistId, artist) if artistId else None\n    self.cover_art = CoverArt(self._subsonic, coverArt) if coverArt else None\n    self.created = parser.parse(created) if created else None\n    self.starred = parser.parse(starred) if starred else None\n    self.played = parser.parse(played) if played else None\n    self.bpm = bpm\n    self.comment = comment\n    self.sort_name = sortName\n    self.music_brainz_id = musicBrainzId\n    self.genres = (\n        [ItemGenre(self._subsonic, **genre) for genre in genres] if genres else None\n    )\n    self.artists = (\n        [Artist(self._subsonic, **artist) for artist in artists]\n        if artists\n        else None\n    )\n    self.display_artist = displayArtist\n    self.album_artists = (\n        [Artist(self._subsonic, **artist) for artist in albumArtists]\n        if albumArtists\n        else None\n    )\n    self.display_album_artist = displayAlbumArtist\n    self.contributors = (\n        [Contributor(self._subsonic, **contributor) for contributor in contributors]\n        if contributors\n        else None\n    )\n    self.display_composer = displayComposer\n    self.moods = moods\n    self.replay_gain = (\n        ReplayGain(self._subsonic, **replayGain) if replayGain else None\n    )\n\n    self.info: VideoInfo | None = None\n
"},{"location":"reference/models/Video/#knuckles.models._video.Video.generate","title":"generate()","text":"

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
def generate(self) -> \"Video\":\n    \"\"\"Return a new video object with all the data updated from the API,\n    using the endpoint that return the most information possible.\n\n    Useful for making copies with updated data or updating the object\n    itself with immutability, e.g., `foo = foo.generate()`.\n\n    Returns:\n        A new object with all the updated info.\n    \"\"\"\n\n    video = self._subsonic.browsing.get_video(self.id)\n\n    if video is None:\n        raise ResourceNotFound()\n\n    return video\n
"},{"location":"reference/models/Video/#knuckles.models._video.Video.get_video_info","title":"get_video_info()","text":"

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
def get_video_info(self) -> VideoInfo:\n    \"\"\"Get all the extra info about the video, it's\n    set to the `info` attribute of the object.\n\n    Returns:\n        The extra info returned by the server.\n    \"\"\"\n\n    self.info = self._subsonic.browsing.get_video_info(self.id)\n\n    return self.info\n
"},{"location":"reference/models/Video/#knuckles.models._video.VideoInfo","title":"VideoInfo(subsonic, video_id, id, captions=None, audioTrack=None, conversion=None)","text":"

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 |\u00a0None

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] |\u00a0None

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.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_video.py
def __init__(\n    self,\n    subsonic: \"Subsonic\",\n    video_id: str,\n    id: str,\n    captions: dict[str, Any] | None = None,\n    audioTrack: list[dict[str, Any]] | None = None,\n    conversion: dict[str, Any] | None = None,\n) -> None:\n    super().__init__(subsonic)\n\n    self.video_id = video_id\n    self.id = id\n    self.captions = (\n        Captions(subsonic=self._subsonic, **captions) if captions else None\n    )\n    self.conversion = (\n        Video(subsonic=self._subsonic, **conversion) if conversion else None\n    )\n\n    self.audio_tracks: dict[str, AudioTrack] | None\n    if not audioTrack:\n        self.audio_track = None\n        return\n\n    self.audio_tracks = {}\n    for track in audioTrack:\n        language_code = track[\"languageCode\"]\n\n        del track[\"languageCode\"]\n        self.audio_tracks[language_code] = AudioTrack(\n            subsonic=self._subsonic, **track\n        )\n
"}]} \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 1a3e39e..6aebc91 100644 Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ