Skip to content

Commit

Permalink
Default episodes_as_tracks to false
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-hilden committed Apr 7, 2020
1 parent 6f7f23a commit d8b15da
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tekore/client/api/playlist/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

def process_if_not_specified(post_func: Callable, *arguments) -> Callable:
"""
Decorate a function to process only if any of arguments is not specified.
Decorate a function to process only if any of arguments is falsy.
Parameters
----------
Expand All @@ -32,11 +32,11 @@ async def async_wrapper(self, *args, **kwargs):

@wraps(function)
def wrapper(self, *args, **kwargs):
not_none = [
_get_arg(arg_pos - 1, arg_name, args, kwargs) is not None
falsies = [
bool(_get_arg(arg_pos - 1, arg_name, args, kwargs))
for arg_name, arg_pos in arguments
]
if any(not_none):
if any(falsies):
return function(self, *args, **kwargs)

if self.is_async:
Expand Down Expand Up @@ -123,7 +123,7 @@ def playlist(
playlist_id: str,
fields: str = None,
market: str = None,
episodes_as_tracks: bool = None,
episodes_as_tracks: bool = False,
) -> Union[FullPlaylist, dict]:
"""
Get playlist of a user.
Expand All @@ -142,7 +142,7 @@ def playlist(
If an application token is used and no market is specified,
episodes are considered unavailable and returned as None.
episodes_as_tracks
if True, return episodes as objects with track-like fields
if True, return episodes with track-like fields
Returns
-------
Expand Down Expand Up @@ -211,7 +211,7 @@ def playlist_tracks(
If an application token is used and no market is specified,
episodes are considered unavailable and returned as None.
episodes_as_tracks
if True, return episodes as objects with track-like fields
if True, return episodes with track-like fields
limit
the number of items to return (1..100)
offset
Expand Down

0 comments on commit d8b15da

Please sign in to comment.