-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi Player Support #2164
Draft
Groovylein
wants to merge
127
commits into
MiczFlor:future3/develop
Choose a base branch
from
Groovylein:future3/multi-player
base: future3/develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,070
−98
Draft
Multi Player Support #2164
Changes from all commits
Commits
Show all changes
127 commits
Select commit
Hold shift + click to select a range
c3549eb
Asking user for spotify
Groovylein 5aaa2d1
activate spotify installation
Groovylein 059566d
Merge branch 'future3/develop' into future3/spotify
Groovylein 7992662
Enable spotify installation
Groovylein 6b89ddf
Introduce default spotify folder
Groovylein 1890016
Added information for installation
Groovylein 32d53af
Setup librespot-java in Docker for development
pabera 00d1ea5
Added docker for spotify development
Groovylein a19382b
Improve Docker file
pabera 98cb97d
Ignore spotify config.toml file to avoid accidental credential commit
pabera d1536de
Create default config.toml file
pabera efb3590
Ignore spotify config.toml file to avoid accidental credential commit
Groovylein 01ff28d
Delete docker.spotify.config.toml
Groovylein 83001f7
Merge branch 'MiczFlor:future3/spotify' into future3/spotify
Groovylein e365417
Merge pull request #1680 from pabera/future3/spotify
Groovylein 19ebc60
First implementation of spotify functions: play, stop, pause, prev, n…
Groovylein 271c634
Merge branch 'future3/spotify' into future3/spotify
Groovylein 92135e9
Merge pull request #1 from MiczFlor/future3/spotify
Groovylein 6646f9a
Removed SpotLock
Groovylein 6e0a3f8
Cleanup and device_info implementation
Groovylein 5c1b84d
Playlist and volume implemented
Groovylein c74ead5
Added HTTP Error handling for spotify requests
Groovylein cbd59de
Catch other exception for spotify api
Groovylein 81143cb
Added headers for requests calls
Groovylein 93fc3a9
Refactored http error handling
Groovylein 98da122
Delete json_example.json
Groovylein 1c505b5
Spotify websocket initialization
Groovylein f3eeb6e
Merge branch 'future3/develop' into future3/spotify
Groovylein 1b4b540
Bugfixing: import, paths, asyncio
Groovylein 998ed06
Bugfixing: URL paths
Groovylein ade2023
Bugfixing: wait until connection to spotify api possible
Groovylein 2b4e666
Bugfixing: Handle device_info right
Groovylein 29cc50a
Docker adjustments
Groovylein d4ddadc
Adjustment in Websocket loop
Groovylein e1c25a7
Use JRE instead of JDE
pabera 2d8ca15
Outsource http and ws client into own class (ws non functional!)
pabera a955afb
Use websocket-client and make http-client useful
pabera 5aef09f
Reformating code
Groovylein 6b3b6fc
Enhance spotify websocket to publish player status
Groovylein 9928012
Fixing bugs in Contributing.md
pabera cbe4749
Abstract implementation of Player Factory
pabera e12a53b
Update factory naming
pabera 5bf3b40
Fix builder init
pabera d0f64f4
Introduce PlayerStatus class and WS client for Spotify
pabera f7d5dff
Show Title, Album, CoverArt in webapp, prepare controls
pabera a75b0d2
Introduce Player Counter on React side
pabera df89357
Initial proposal for new player API with multi-backend handling
6e64466
Flake8 fixes
Groovylein 5847dad
Flake8 fixes #2
Groovylein 244a0cf
Reworked multi-backend proposal + AsyncIO MPD stub
04fc9fc
Merge pull request #1751 from ChisSoc: AsyncIO MPD player backend
2bf8fbc
Implement folder and album playback
de9cbb7
Clean up
90b54c4
Merge pull request #1759 from ChisSoc/future3/newplayer
Groovylein 665a53f
Disable autoplay
Groovylein 8db761f
First attempt Spotify Backend
Groovylein 55d721a
Flake 8 corrections
Groovylein 5412b59
Read mpd host config from jukebox.yaml
pabera ece4c2b
[Webapp] Interim MPD player adjustment to new player backend
pabera d47087e
Fix album decoding from URI
fbe43a0
Merge pull request #1767 from ChisSoc/future3/newplayer
c094839
Disable autoplay
Groovylein ecf11dc
First attempt Spotify Backend
Groovylein 839f1ff
Flake 8 corrections
Groovylein c94d5db
Merge branch 'MiczFlor-future3/spotify' into future3/spotify
Groovylein 5e3bc6d
Simplified internal Spotify URI
Groovylein a118f70
bugfixing connection loss of Spotify websocket
Groovylein d0832c9
Merge pull request #1761 from Groovylein/future3/spotify
Groovylein 4d3c46c
Merge branch 'future3/develop' into future3/spotify
Groovylein 731c9a9
Bugfixing: player.ctrl.list_backends show only keys
Groovylein 23a0f82
Bugfixing: spotify player
Groovylein bd8af97
prepare Docker dor spotipy
Groovylein aa8443d
first attempt
Groovylein 9d059b4
First successful attempt with cached data
Groovylein 6ec73e2
Cleanup spotify player
Groovylein c7a3eab
Removed spotify code from playern
Groovylein 20d7284
fist player content core
Groovylein 6b54f47
populate content manager
Groovylein ef92b71
get_location for content, mpd fixes
Groovylein 1547a42
Merge branch 'future3/develop' into future3/multi-player
Groovylein c8bc8c0
cleanup old player
Groovylein d0e851f
Update docker env
Groovylein fd04413
update from upstream
Groovylein aaa935a
update from upstream
Groovylein b910210
further update from upstream
Groovylein 86e734e
correct flake8
Groovylein 36bfd79
Fix docker; delete copy-paste-error
Groovylein b8fd417
Syntax error
Groovylein 9006d6f
Added inheritance class for players
Groovylein 5784f8d
Added missing functions for webapp
Groovylein 3b4f448
first attempt for get_folder_content
Groovylein efbe969
Merge branch 'future3/develop' into future3/multi-player
Groovylein e85b294
Bring back spotify backend
Groovylein 7a0d170
remove unnecessary files
Groovylein 257d177
fix auth error during pip install in docker
Groovylein 90cc33b
Docker bugfixing
Groovylein d43c6fe
implement Spotipy authentication via bottle
Groovylein e3ea953
Docker container for spotifyd with pulseaudio; Still problems
Groovylein e0faa44
Installation of spotifyd
Groovylein 3d7195d
correct path of spotifyd config
Groovylein 0deda1e
corrected relative path in jukebox yaml
Groovylein 9a506f0
prepare for client_id, client_secret
Groovylein af3b281
extract player config into new file
Groovylein 3e0c94a
make use of the new player.yaml
Groovylein 8d65be3
create first basic documentation how to obtain client_id/client_secret
Groovylein bb24d8a
enhance installation method with client_id and client_secret
Groovylein f34815d
Adjust CI to handle spotify installation
Groovylein d24e16a
bugfixing spotifyd daemon
Groovylein 190aaf7
Review changes
Groovylein 2eccf39
Review changes #2
Groovylein 633449e
Merge branch 'future3/develop' into future3/multi-player
Groovylein 3510085
flake 8 fixes
Groovylein 3aedd9c
reverted all spotify code; focus on multi-player
Groovylein 8cb99d1
added missing functions to ABC
Groovylein afcafd1
cleanup old player calls for better development
Groovylein 8be8ade
introduce necessary methods from abstract class
Groovylein e5ae214
enable read from new yaml file player.yaml
Groovylein 3edfa67
display folder content in webapp
Groovylein c8f809b
enable playing from folder view
Groovylein fcf2ced
Make library available on webapp
Groovylein d38dc0c
Publish playerstatus, so that buttons work on the player
Groovylein d880d46
Merge branch 'future3/develop' into future3/multi-player
Groovylein ba72a18
Revert some changes
Groovylein 8169592
transfer coverart_cache_manager
Groovylein b4ff177
<UNDER CONSTRUCTION> Status publishing via multitimer
Groovylein 83692f1
<UNDER CONSTRUCTION> Correct status call in webapp
Groovylein 42c15f4
Merge branch 'future3/develop' into future3/multi-player
Groovylein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,17 @@ | ||
# IMPORTANT: | ||
# Always use relative path from settingsfile `../../`, but do not use relative paths with `~/`. | ||
# Sole (!) exception is in playermpd.mpd_conf | ||
players: | ||
content: | ||
audiofile: /../../shared/audiofolders/audiofiles.yaml | ||
playermpd: | ||
host: localhost | ||
status_file: ../../shared/settings/music_player_status.json | ||
second_swipe_action: | ||
# Note: Does not follow the RPC alias convention (yet) | ||
# Must be one of: 'toggle', 'play', 'skip', 'rewind', 'replay', 'none' | ||
alias: toggle | ||
library: | ||
update_on_startup: true | ||
check_user_rights: true | ||
mpd_conf: ~/.config/mpd/mpd.conf |
This file was deleted.
Oops, something went wrong.
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,96 @@ | ||
from abc import ABC, abstractmethod | ||
|
||
|
||
class BackendPlayer(ABC): | ||
""" | ||
Abstract Class to inherit, so that you can build a proper new Player | ||
""" | ||
|
||
@abstractmethod | ||
def next(self): | ||
pass | ||
|
||
@abstractmethod | ||
def prev(self): | ||
pass | ||
|
||
@abstractmethod | ||
def play(self): | ||
pass | ||
|
||
@abstractmethod | ||
def play_single(self, uri): | ||
pass | ||
|
||
@abstractmethod | ||
def play_album(self, albumartist, album): | ||
pass | ||
|
||
@abstractmethod | ||
def play_folder(self, folder: str, recursive: bool): | ||
""" | ||
Playback a music folder. | ||
|
||
:param folder: Folder path relative to music library path | ||
:param recursive: Add folder recursively | ||
""" | ||
pass | ||
|
||
@abstractmethod | ||
def toggle(self): | ||
pass | ||
|
||
@abstractmethod | ||
def shuffle(self): | ||
pass | ||
|
||
@abstractmethod | ||
def pause(self): | ||
pass | ||
|
||
@abstractmethod | ||
def stop(self): | ||
pass | ||
|
||
@abstractmethod | ||
def get_queue(self): | ||
pass | ||
|
||
@abstractmethod | ||
def repeat(self): | ||
pass | ||
|
||
@abstractmethod | ||
def seek(self): | ||
pass | ||
|
||
@abstractmethod | ||
def get_albums(self): | ||
pass | ||
|
||
@abstractmethod | ||
def get_single_coverart(self, song_url): | ||
pass | ||
|
||
@abstractmethod | ||
def get_album_coverart(self): | ||
pass | ||
|
||
@abstractmethod | ||
def list_dirs(self): | ||
pass | ||
|
||
@abstractmethod | ||
def get_song_by_url(self, song_url): | ||
pass | ||
|
||
@abstractmethod | ||
def get_folder_content(self, folder): | ||
""" | ||
Get the folder content as content list with meta-information. Depth is always 1. | ||
|
||
Call repeatedly to descend in hierarchy | ||
|
||
:param folder: Folder path relative to music library path | ||
""" | ||
pass |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may be a case where implementing an
Abstract base class
could be appropriate:https://stackoverflow.com/a/3571946
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the recommendation.
I am not that experienced in Abstract classes. Feel free to create a PR :)