Add systemd user service and enhance offline robustness
This commit is contained in:
28
GEMINI.md
28
GEMINI.md
@@ -30,17 +30,39 @@ You also need the `Winamp Web Interface` plugin installed and running in Winamp,
|
||||
|
||||
### Running the Bridge
|
||||
|
||||
To start the bridge, run:
|
||||
### Manual Run
|
||||
|
||||
To start the bridge manually, run:
|
||||
|
||||
```bash
|
||||
python3 winamp_mpris.py
|
||||
```
|
||||
|
||||
The bridge will publish itself on D-Bus as `org.mpris.MediaPlayer2.winamp`.
|
||||
### Running as a systemd User Service
|
||||
|
||||
A systemd service file is provided to allow the bridge to run automatically in the background.
|
||||
|
||||
1. **Install the service file**:
|
||||
```bash
|
||||
mkdir -p ~/.config/systemd/user/
|
||||
cp winamp-mpris.service ~/.config/systemd/user/
|
||||
```
|
||||
2. **Reload systemd and enable the service**:
|
||||
```bash
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now winamp-mpris.service
|
||||
```
|
||||
3. **Check the status**:
|
||||
```bash
|
||||
systemctl --user status winamp-mpris.service
|
||||
```
|
||||
|
||||
The bridge will publish itself on D-Bus as `org.mpris.MediaPlayer2.winamp`. It gracefully handles Winamp being offline, automatically reconnecting when the web interface becomes available.
|
||||
|
||||
## Key Files
|
||||
|
||||
- **`winamp_mpris.py`**: The main, active script. Includes optimizations for Plasma 6 property change detection and correct D-Bus signal emission.
|
||||
- **`winamp_mpris.py`**: The main bridge script. Includes optimizations for Plasma 6 property change detection, live position tracking, and robust error handling.
|
||||
- **`winamp-mpris.service`**: Systemd user service unit file.
|
||||
- **`winamp_mpris_old.py`**: A previous iteration of the bridge.
|
||||
- **`sample_Winamp Web Interface.html`**: A sample of the HTML returned by the Winamp Web Interface, used for reference in parsing logic.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user