Skip to content

Commit 90d538b

Browse files
authored
Beam -> Remote with less restrictions (#1221)
1 parent 289539c commit 90d538b

37 files changed

+1520
-1326
lines changed

.github/workflows/testing.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
contents: read
156156
strategy:
157157
matrix:
158-
python: ["3.11", "3.12"]
158+
python: ["3.11", "3.12", "3.13"]
159159
env:
160160
DISPLAY: ':99.0'
161161
steps:

NowPlaying.spec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ block_cipher = None
107107

108108
executables = {
109109
'NowPlaying': 'nppyi.py',
110-
#BEAM 'NowPlayingBeam': 'beam.py',
111110
}
112111

113112
for execname, execpy in executables.items():

docs/input/remote.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Remote Services
2+
3+
A common streaming configuration is to have more than one computer
4+
involved, such as one computer working as the DJ machine and one computer
5+
for processing the stream. In some very advanced configurations, there
6+
might even be more than on DJ on different computers swapping back and
7+
forth!
8+
9+
**What's Now Playing** supports a configuration where each setup has
10+
their own app configuration running. One or more installations on
11+
DJ computers send the track information to a central one. That
12+
central one will then perform any additional lookups and send the
13+
output to anything configured such as Twitch.
14+
15+
## Settings
16+
17+
* Server Side
18+
19+
1. You will need to enable the web server
20+
2. Also in webserver, you may optionally set a Secret that is required to be set on any
21+
other **What's Now Playing** installation that talks to it
22+
3. Set the Input to be 'Remote'
23+
4. It is recommended to enable Artist Extras on the Server
24+
25+
* Client Side
26+
27+
1. Go to 'Remote Output'
28+
2. Enable it
29+
3. Set the Server to be either the hostname or IP address of the computer
30+
acting as the server
31+
4. Set the port to be the server's webserver port
32+
5. If the Server has a Secret set, you will need to set that as well
33+
34+
> NOTE: Some content, such as cover art, will not be sent to the remote server.
35+
36+
## Other Settings
37+
38+
It should be noted that there is no protection against multiple Twitch chat bots,
39+
multiple Kick bots, etc. This can result in double posts and other weirdness.
40+
On the client computers, you will want to turn off such services. Here is a
41+
non-complete list of things to check:
42+
43+
* Artist Extras
44+
* Discord
45+
* Kick Chat
46+
* Twitch (Chat and Requests)
47+
48+
Note that Recognition services such as AcoustID support are required to run
49+
on the client computer as they need access to the local file for those systems
50+
that provide access to it.

docs/output/webserver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Webserver
22

3-
**What's Now Playing**has a built-in web server that allows for a wide
3+
**What's Now Playing** has a built-in web server that allows for a wide
44
variety of customization and deployments, including complex ones
55
involving multiple hosts. Treat the files in`templates` as examples; copy them to new
66
names and modify them until you are happy. Change the font, change the

mkdocs.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,22 @@ nav:
8282
- Filters: settings/filter.md
8383
- Quirks: settings/quirks.md
8484
- Input Sources:
85-
- Serato: input/serato.md
86-
- Traktor: input/traktor.md
87-
- Virtual DJ: input/virtualdj.md
8885
- DJ Uced: input/djuced.md
89-
- JRiver: input/jriver.md
9086
- Icecast: input/icecast.md
87+
- JRiver: input/jriver.md
9188
- M3U: input/m3u.md
9289
- MPRIS2: input/mpris2.md
90+
- Remote: input/remote.md
91+
- Serato: input/serato.md
92+
- Traktor: input/traktor.md
93+
- Virtual DJ: input/virtualdj.md
9394
- Windows Media: input/winmedia.md
9495
- Output Destinations:
95-
- Text Output: output/textoutput.md
9696
- Discord: output/discord.md
9797
- Kick Bot: output/kickbot.md
9898
- OBS WebSocket: output/obswebsocket.md
99+
- Remote: input/remote.md
100+
- Text Output: output/textoutput.md
99101
- Twitch Bot: output/twitchbot.md
100102
- Web Server: output/webserver.md
101103
- Recognition:
@@ -104,8 +106,8 @@ nav:
104106
- Artist Extras:
105107
- Overview: extras/index.md
106108
- Discogs: extras/discogs.md
107-
- TheAudioDB: extras/theaudiodb.md
108109
- FanArt.TV: extras/fanarttv.md
110+
- TheAudioDB: extras/theaudiodb.md
109111
- Requests: requests.md
110112
- Help:
111113
- How Do I?: help/howdoi.md

nowplaying/__main__.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ def run_bootstrap(bundledir: str|None = None) -> pathlib.Path: # pragma: no cov
4545
return logpath
4646

4747

48-
def actualmain(beam: bool = False): # pragma: no cover
48+
49+
def actualmain(): # pragma: no cover
4950
''' main entrypoint '''
5051

5152
multiprocessing.freeze_support()
@@ -77,7 +78,7 @@ def actualmain(beam: bool = False): # pragma: no cover
7778
startup_window.update_progress("Starting system tray...")
7879
qapp.processEvents()
7980

80-
tray = nowplaying.systemtray.Tray(beam=beam, startup_window=startup_window) # pylint: disable=unused-variable
81+
tray = nowplaying.systemtray.Tray(startup_window=startup_window) # pylint: disable=unused-variable
8182
icon = QIcon(str(config.iconfile))
8283
qapp.setWindowIcon(icon)
8384

@@ -95,12 +96,7 @@ def actualmain(beam: bool = False): # pragma: no cover
9596

9697
def main(): # pragma: no cover
9798
''' Normal mode '''
98-
actualmain(beam=False)
99-
100-
101-
def beammain(): # pragma: no cover
102-
''' beam mode '''
103-
actualmain(beam=True)
99+
actualmain()
104100

105101

106102
if __name__ == '__main__':

nowplaying/beam/beam.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

nowplaying/beam/docs/beam.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)