-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from CalPinSW/add-playback-controls
Add playback controls
- Loading branch information
Showing
13 changed files
with
143 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from pydantic import BaseModel | ||
from typing import List, Optional | ||
|
||
|
||
class StartPlaybackRequestPositionOffset(BaseModel): | ||
position: int | ||
|
||
|
||
class StartPlaybackRequestUriOffset(BaseModel): | ||
uri: str | ||
|
||
|
||
class StartPlaybackRequest(BaseModel): | ||
context_uri: Optional[str] = None | ||
uris: Optional[List[str]] = None | ||
offset: Optional[ | ||
StartPlaybackRequestPositionOffset | StartPlaybackRequestUriOffset | ||
] = None | ||
position_ms: Optional[int] = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
from flask import Response, make_response | ||
from flask import Response | ||
|
||
|
||
class ResponseCreator: | ||
def __init__(self): | ||
self.response = make_response() | ||
|
||
def with_cookies(self, cookie_dict: dict): | ||
for key, value in cookie_dict.items(): | ||
self.response.set_cookie(key, value, samesite="None", secure=True) | ||
return self | ||
|
||
def create(self) -> Response: | ||
return self.response | ||
def add_cookies_to_response(response: Response, cookie_dict: dict): | ||
for key, value in cookie_dict.items(): | ||
response.set_cookie(key, value, samesite="None", secure=True) | ||
return response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters