@@ -86,7 +86,7 @@ class AudioTrack:
86
86
The track's uploader.
87
87
duration: :class:`int`
88
88
The duration of the track, in milliseconds.
89
- stream : :class:`bool`
89
+ is_stream : :class:`bool`
90
90
Whether the track is a live-stream.
91
91
title: :class:`str`
92
92
The title of the track.
@@ -110,7 +110,7 @@ class AudioTrack:
110
110
extra: Dict[str, Any]
111
111
Any extra properties given to this AudioTrack will be stored here.
112
112
"""
113
- __slots__ = ('raw' , 'track' , 'identifier' , 'is_seekable' , 'author' , 'duration' , 'stream ' , 'title' , 'uri' ,
113
+ __slots__ = ('raw' , 'track' , 'identifier' , 'is_seekable' , 'author' , 'duration' , 'is_stream ' , 'title' , 'uri' ,
114
114
'artwork_url' , 'isrc' , 'position' , 'source_name' , 'plugin_info' , 'user_data' , 'extra' )
115
115
116
116
def __init__ (self , data : dict , requester : int = 0 , ** extra ):
@@ -127,7 +127,7 @@ def __init__(self, data: dict, requester: int = 0, **extra):
127
127
self .is_seekable : bool = info ['isSeekable' ]
128
128
self .author : str = info ['author' ]
129
129
self .duration : int = info ['length' ]
130
- self .stream : bool = info ['isStream' ]
130
+ self .is_stream : bool = info ['isStream' ]
131
131
self .title : str = info ['title' ]
132
132
self .uri : str = info ['uri' ]
133
133
self .artwork_url : Optional [str ] = info .get ('artworkUrl' )
@@ -150,6 +150,17 @@ def __getitem__(self, name):
150
150
def from_dict (cls , mapping : dict ):
151
151
return cls (mapping )
152
152
153
+ @property
154
+ def stream (self ) -> bool :
155
+ """
156
+ Property indicating whether this track is a stream.
157
+
158
+ .. deprecated:: 5.3.0
159
+ To be consistent with attribute naming, this property has been deprecated
160
+ in favour of ``is_stream``.
161
+ """
162
+ return self .is_stream
163
+
153
164
@property
154
165
def requester (self ) -> int :
155
166
return self .extra ['requester' ]
0 commit comments