piwave 2.1.7__py3-none-any.whl → 2.1.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- piwave/backends/base.py +3 -3
- piwave/piwave.py +8 -8
- {piwave-2.1.7.dist-info → piwave-2.1.9.dist-info}/METADATA +2 -2
- {piwave-2.1.7.dist-info → piwave-2.1.9.dist-info}/RECORD +7 -7
- {piwave-2.1.7.dist-info → piwave-2.1.9.dist-info}/WHEEL +0 -0
- {piwave-2.1.7.dist-info → piwave-2.1.9.dist-info}/licenses/LICENSE +0 -0
- {piwave-2.1.7.dist-info → piwave-2.1.9.dist-info}/top_level.txt +0 -0
piwave/backends/base.py
CHANGED
|
@@ -232,9 +232,9 @@ class Backend(ABC):
|
|
|
232
232
|
cmd = self.build_command(wav_file, loop)
|
|
233
233
|
self.current_process = subprocess.Popen(
|
|
234
234
|
cmd,
|
|
235
|
-
stdout=subprocess.
|
|
236
|
-
stderr=subprocess.
|
|
237
|
-
|
|
235
|
+
stdout=subprocess.DEVNULL,
|
|
236
|
+
stderr=subprocess.DEVNULL,
|
|
237
|
+
stdin=subprocess.DEVNULL
|
|
238
238
|
)
|
|
239
239
|
return self.current_process
|
|
240
240
|
|
piwave/piwave.py
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
# Licensed under GPLv3.0, main GitHub repository at https://github.com/douxxtech/piwave/
|
|
3
3
|
# piwave/piwave.py : main entry
|
|
4
4
|
|
|
5
|
+
import atexit
|
|
5
6
|
import os
|
|
6
7
|
import subprocess
|
|
7
|
-
import signal
|
|
8
8
|
import threading
|
|
9
|
-
import time
|
|
10
9
|
|
|
11
10
|
import tempfile
|
|
12
11
|
import shutil
|
|
@@ -88,6 +87,7 @@ class PiWave:
|
|
|
88
87
|
Log.config(silent=silent)
|
|
89
88
|
|
|
90
89
|
self._validate_environment()
|
|
90
|
+
atexit.register(self._stop_curproc)
|
|
91
91
|
|
|
92
92
|
discover_backends()
|
|
93
93
|
|
|
@@ -288,7 +288,8 @@ class PiWave:
|
|
|
288
288
|
rds_info = f" (PS: {self.ps})" if self.backend.supports_rds and self.ps else ""
|
|
289
289
|
Log.broadcast(f"Playing {wav_file} ({loop_status}) at {self.frequency}MHz{rds_info}")
|
|
290
290
|
|
|
291
|
-
self.
|
|
291
|
+
self.backend.play_file(wav_file, self.loop)
|
|
292
|
+
self.current_process = self.backend.current_process
|
|
292
293
|
|
|
293
294
|
if self.on_track_change:
|
|
294
295
|
self.on_track_change(wav_file)
|
|
@@ -301,7 +302,7 @@ class PiWave:
|
|
|
301
302
|
self._stop_curproc()
|
|
302
303
|
return False
|
|
303
304
|
|
|
304
|
-
if self.current_process.poll() is not None:
|
|
305
|
+
if self.backend.current_process.poll() is not None:
|
|
305
306
|
Log.error("Process ended unexpectedly while looping")
|
|
306
307
|
return False
|
|
307
308
|
|
|
@@ -311,7 +312,7 @@ class PiWave:
|
|
|
311
312
|
if self.stop_event.wait(timeout=0.1):
|
|
312
313
|
self._stop_curproc()
|
|
313
314
|
return False
|
|
314
|
-
if not self.loop and self.current_process.poll() is not None:
|
|
315
|
+
if not self.loop and self.backend.current_process.poll() is not None:
|
|
315
316
|
break
|
|
316
317
|
return True
|
|
317
318
|
|
|
@@ -373,9 +374,8 @@ class PiWave:
|
|
|
373
374
|
self.current_process = subprocess.Popen(
|
|
374
375
|
cmd,
|
|
375
376
|
stdin=subprocess.PIPE,
|
|
376
|
-
stdout=subprocess.
|
|
377
|
-
stderr=subprocess.
|
|
378
|
-
preexec_fn=os.setpgrp()
|
|
377
|
+
stdout=subprocess.DEVNULL,
|
|
378
|
+
stderr=subprocess.DEVNULL
|
|
379
379
|
)
|
|
380
380
|
except Exception as e:
|
|
381
381
|
Log.error(f"Failed to start live stream: {e}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: piwave
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.9
|
|
4
4
|
Summary: A python module to broadcast radio waves with your Raspberry Pi.
|
|
5
5
|
Home-page: https://github.com/douxxtech/piwave
|
|
6
6
|
Author: Douxx
|
|
@@ -18,7 +18,7 @@ Classifier: Operating System :: POSIX :: Linux
|
|
|
18
18
|
Requires-Python: >=3.7
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
|
-
Requires-Dist: dlogger==1.0.
|
|
21
|
+
Requires-Dist: dlogger==1.0.4
|
|
22
22
|
Provides-Extra: dev
|
|
23
23
|
Requires-Dist: pytest>=6.0; extra == "dev"
|
|
24
24
|
Requires-Dist: pytest-cov>=2.0; extra == "dev"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
piwave/__init__.py,sha256=jz2r-qclltKTxJjlGnqhAwIlUgjvRTR31f4hjTHP5NA,230
|
|
2
2
|
piwave/__main__.py,sha256=-Z3RI7TiicE5UwWc4dZaHX82-MpwVXWkfMZXOC457_Q,4089
|
|
3
3
|
piwave/logger.py,sha256=ipWzdNcEYob0xjXP8bbTq9enA3nryU-GKzAOKayRqlg,1149
|
|
4
|
-
piwave/piwave.py,sha256=
|
|
4
|
+
piwave/piwave.py,sha256=6ns1VmQ8hZFwrI_8HTLwvSD_CwMCzzUWGqms0u1MKeQ,32293
|
|
5
5
|
piwave/backends/__init__.py,sha256=DUbdyYf2V2XcDB05vmFWEkuJ292YTNiNJjzh1raJ5Cg,3756
|
|
6
|
-
piwave/backends/base.py,sha256=
|
|
6
|
+
piwave/backends/base.py,sha256=PJNXEEXZ8wgc343SO5FJ1oGOop--Y-7t01PUWSa5GuE,7818
|
|
7
7
|
piwave/backends/fm_transmitter.py,sha256=Wzsoyi5hqLLZF5eNPmZ7WFvP27OMs2ywJlwrJVut-8w,1403
|
|
8
8
|
piwave/backends/pi_fm_rds.py,sha256=VjcbFeje8LHVr4cBjlL36IcvA3WRfI1hHSGG2ui8Pb0,1467
|
|
9
|
-
piwave-2.1.
|
|
10
|
-
piwave-2.1.
|
|
11
|
-
piwave-2.1.
|
|
12
|
-
piwave-2.1.
|
|
13
|
-
piwave-2.1.
|
|
9
|
+
piwave-2.1.9.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
|
10
|
+
piwave-2.1.9.dist-info/METADATA,sha256=0iHcdTApVbFqDrlJ4wurc-1d8O25T4R2ZzdiQxJz2jQ,20890
|
|
11
|
+
piwave-2.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
+
piwave-2.1.9.dist-info/top_level.txt,sha256=xUbZ7Rk6OymSdDxmb9bfO8N-avJ9VYxP41GnXfwKYi8,7
|
|
13
|
+
piwave-2.1.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|