piwave 2.1.2__tar.gz → 2.1.3__tar.gz
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-2.1.2 → piwave-2.1.3}/PKG-INFO +5 -2
- {piwave-2.1.2 → piwave-2.1.3}/README.md +4 -1
- {piwave-2.1.2 → piwave-2.1.3}/piwave/piwave.py +2 -11
- {piwave-2.1.2 → piwave-2.1.3}/piwave.egg-info/PKG-INFO +5 -2
- {piwave-2.1.2 → piwave-2.1.3}/setup.cfg +1 -1
- {piwave-2.1.2 → piwave-2.1.3}/LICENSE +0 -0
- {piwave-2.1.2 → piwave-2.1.3}/piwave/__init__.py +0 -0
- {piwave-2.1.2 → piwave-2.1.3}/piwave/__main__.py +0 -0
- {piwave-2.1.2 → piwave-2.1.3}/piwave/backends/__init__.py +0 -0
- {piwave-2.1.2 → piwave-2.1.3}/piwave/backends/base.py +0 -0
- {piwave-2.1.2 → piwave-2.1.3}/piwave/backends/fm_transmitter.py +0 -0
- {piwave-2.1.2 → piwave-2.1.3}/piwave/backends/pi_fm_rds.py +0 -0
- {piwave-2.1.2 → piwave-2.1.3}/piwave/logger.py +0 -0
- {piwave-2.1.2 → piwave-2.1.3}/piwave.egg-info/SOURCES.txt +0 -0
- {piwave-2.1.2 → piwave-2.1.3}/piwave.egg-info/dependency_links.txt +0 -0
- {piwave-2.1.2 → piwave-2.1.3}/piwave.egg-info/requires.txt +0 -0
- {piwave-2.1.2 → piwave-2.1.3}/piwave.egg-info/top_level.txt +0 -0
- {piwave-2.1.2 → piwave-2.1.3}/pyproject.toml +0 -0
- {piwave-2.1.2 → piwave-2.1.3}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: piwave
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3
|
|
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
|
|
@@ -518,8 +518,11 @@ status = pw.get_status()
|
|
|
518
518
|
##### `cleanup()`
|
|
519
519
|
Clean up resources and temporary files.
|
|
520
520
|
|
|
521
|
+
> [!WARNING]
|
|
522
|
+
> Always clean up behind you! Dropped support of auto-cleanup on version > 2.1.2
|
|
523
|
+
|
|
521
524
|
```python
|
|
522
|
-
pw.cleanup()
|
|
525
|
+
pw.cleanup()
|
|
523
526
|
```
|
|
524
527
|
|
|
525
528
|
### Backend Management
|
|
@@ -491,8 +491,11 @@ status = pw.get_status()
|
|
|
491
491
|
##### `cleanup()`
|
|
492
492
|
Clean up resources and temporary files.
|
|
493
493
|
|
|
494
|
+
> [!WARNING]
|
|
495
|
+
> Always clean up behind you! Dropped support of auto-cleanup on version > 2.1.2
|
|
496
|
+
|
|
494
497
|
```python
|
|
495
|
-
pw.cleanup()
|
|
498
|
+
pw.cleanup()
|
|
496
499
|
```
|
|
497
500
|
|
|
498
501
|
### Backend Management
|
|
@@ -90,7 +90,6 @@ class PiWave:
|
|
|
90
90
|
Log.config(silent=silent)
|
|
91
91
|
|
|
92
92
|
self._validate_environment()
|
|
93
|
-
atexit.register(self.cleanup)
|
|
94
93
|
|
|
95
94
|
discover_backends()
|
|
96
95
|
|
|
@@ -465,11 +464,9 @@ class PiWave:
|
|
|
465
464
|
def _stop_current_process(self):
|
|
466
465
|
if self.current_process:
|
|
467
466
|
try:
|
|
468
|
-
Log.info("Stopping current process...")
|
|
469
467
|
os.killpg(os.getpgid(self.current_process.pid), signal.SIGTERM)
|
|
470
468
|
self.current_process.wait(timeout=5)
|
|
471
469
|
except (ProcessLookupError, subprocess.TimeoutExpired):
|
|
472
|
-
Log.warning("Forcing kill of current process")
|
|
473
470
|
try:
|
|
474
471
|
os.killpg(os.getpgid(self.current_process.pid), signal.SIGKILL)
|
|
475
472
|
except ProcessLookupError:
|
|
@@ -505,11 +502,6 @@ class PiWave:
|
|
|
505
502
|
self._log_debug("Playback worker finished")
|
|
506
503
|
|
|
507
504
|
|
|
508
|
-
def _handle_interrupt(self, signum, frame):
|
|
509
|
-
Log.warning("Interrupt received, stopping playback...")
|
|
510
|
-
self.stop()
|
|
511
|
-
os._exit(0)
|
|
512
|
-
|
|
513
505
|
def play(self, source, sample_rate: int = 44100, channels: int = 2, chunk_size: int = 4096, blocking: bool = False):
|
|
514
506
|
"""Play audio from file or live source.
|
|
515
507
|
|
|
@@ -559,7 +551,8 @@ class PiWave:
|
|
|
559
551
|
Example:
|
|
560
552
|
>>> pw.stop()
|
|
561
553
|
"""
|
|
562
|
-
|
|
554
|
+
|
|
555
|
+
if not self.is_playing and not self.is_live_streaming and not self.current_process:
|
|
563
556
|
return
|
|
564
557
|
|
|
565
558
|
Log.warning("Stopping...")
|
|
@@ -825,8 +818,6 @@ class PiWave:
|
|
|
825
818
|
|
|
826
819
|
Log.info("Cleanup completed")
|
|
827
820
|
|
|
828
|
-
def __del__(self):
|
|
829
|
-
self.cleanup()
|
|
830
821
|
|
|
831
822
|
def send(self, file_path: str):
|
|
832
823
|
"""Alias for the play method.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: piwave
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3
|
|
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
|
|
@@ -518,8 +518,11 @@ status = pw.get_status()
|
|
|
518
518
|
##### `cleanup()`
|
|
519
519
|
Clean up resources and temporary files.
|
|
520
520
|
|
|
521
|
+
> [!WARNING]
|
|
522
|
+
> Always clean up behind you! Dropped support of auto-cleanup on version > 2.1.2
|
|
523
|
+
|
|
521
524
|
```python
|
|
522
|
-
pw.cleanup()
|
|
525
|
+
pw.cleanup()
|
|
523
526
|
```
|
|
524
527
|
|
|
525
528
|
### Backend Management
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|