updated README
This commit is contained in:
parent
61d45301da
commit
35ff6c5dcc
85
README.md
85
README.md
@ -26,79 +26,110 @@ The downloaded track is organized into your Lidarr media folder or a YouTube sub
|
|||||||
- Python 3.6+
|
- Python 3.6+
|
||||||
- `requests`
|
- `requests`
|
||||||
|
|
||||||
You can install the required Python packages using:
|
Install Python dependencies:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install requests
|
pip install requests
|
||||||
```
|
```
|
||||||
📼 External Tools
|
|
||||||
|
|
||||||
yt-dlp: YouTube downloader for audio/video.
|
### 📼 External Tools
|
||||||
|
|
||||||
|
- `yt-dlp`: YouTube downloader for audio/video.
|
||||||
|
|
||||||
Install via pip (recommended):
|
Install via pip (recommended):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install -U yt-dlp
|
pip install -U yt-dlp
|
||||||
```
|
```
|
||||||
Or install system-wide:
|
|
||||||
|
Or install system-wide (Debian/Ubuntu):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt install yt-dlp # On Debian/Ubuntu
|
sudo apt install yt-dlp
|
||||||
```
|
```
|
||||||
⚙️ Configuration
|
|
||||||
|
|
||||||
Lidarr Setup
|
---
|
||||||
Ensure Lidarr is running and accessible (e.g., http://localhost:8686).
|
|
||||||
Create or retrieve your API key from Lidarr's settings.
|
|
||||||
|
|
||||||
Environment Variable Set your API key in the terminal session:
|
## ⚙️ Configuration
|
||||||
```
|
|
||||||
|
### Lidarr Setup
|
||||||
|
|
||||||
|
- Ensure Lidarr is running and accessible (e.g., [http://localhost:8686](http://localhost:8686)).
|
||||||
|
- Create or retrieve your API key from Lidarr's settings.
|
||||||
|
|
||||||
|
Set your API key in the terminal session:
|
||||||
|
|
||||||
|
```bash
|
||||||
export LIDARR_API_KEY="your-lidarr-api-key"
|
export LIDARR_API_KEY="your-lidarr-api-key"
|
||||||
```
|
```
|
||||||
|
|
||||||
Or run inline:
|
Or run inline:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
LIDARR_API_KEY="your-lidarr-api-key" ./musicfetch "Artist - Track"
|
LIDARR_API_KEY="your-lidarr-api-key" ./musicfetch "Artist - Track"
|
||||||
```
|
```
|
||||||
🧑💻 Usage
|
|
||||||
🔉 Download by Search Term
|
---
|
||||||
|
|
||||||
|
## 🧑💻 Usage
|
||||||
|
|
||||||
|
### 🔉 Download by Search Term
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./musicfetch "Artist - Track"
|
./musicfetch "Artist - Track"
|
||||||
```
|
```
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./musicfetch "ODESZA - Bloom"
|
./musicfetch "ODESZA - Bloom"
|
||||||
```
|
```
|
||||||
|
|
||||||
If Lidarr finds the artist and album, it will trigger a download in Lidarr. If not, the song will be downloaded via yt-dlp using a YouTube search.
|
If Lidarr finds the artist and album, it will trigger a download in Lidarr. If not, the song will be downloaded via yt-dlp using a YouTube search.
|
||||||
📺 Download by URL
|
|
||||||
|
### 📺 Download by URL
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./musicfetch "https://www.youtube.com/watch?v=xxxxxxxxxxx"
|
./musicfetch "https://www.youtube.com/watch?v=xxxxxxxxxxx"
|
||||||
```
|
```
|
||||||
|
|
||||||
The script extracts metadata from the video and organizes the file under the artist's folder.
|
The script extracts metadata from the video and organizes the file under the artist's folder.
|
||||||
📁 Output Structure
|
|
||||||
|
### 📁 Output Structure
|
||||||
|
|
||||||
Music is saved in:
|
Music is saved in:
|
||||||
```
|
|
||||||
|
```text
|
||||||
/base_dir/
|
/base_dir/
|
||||||
├── Artist Name/
|
├── Artist Name/
|
||||||
│ ├── Album Name/ (if found via Lidarr)
|
│ ├── Album Name/ (if found via Lidarr)
|
||||||
│ └── youtube/ (if fallback used)
|
│ └── youtube/ (if fallback used)
|
||||||
```
|
```
|
||||||
❓ Troubleshooting
|
|
||||||
|
|
||||||
No results from Lidarr -
|
---
|
||||||
Check to make sure your Lidarr installation is reachable and the artist exists or can be found in Lidarr's metadata sources.
|
|
||||||
|
|
||||||
yt-dlp errors -
|
## ❓ Troubleshooting
|
||||||
Try updating it:
|
|
||||||
|
|
||||||
|
- **No results from Lidarr:**
|
||||||
|
- Check to make sure your Lidarr installation is reachable and the artist exists or can be found in Lidarr's metadata sources.
|
||||||
|
- **yt-dlp errors:**
|
||||||
|
- Try updating it:
|
||||||
|
|
||||||
|
```bash
|
||||||
yt-dlp -U
|
yt-dlp -U
|
||||||
|
```
|
||||||
|
|
||||||
Permission denied or file not found?
|
- **Permission denied or file not found?**
|
||||||
Ensure /media/music exists and is writable.
|
- Ensure `/media/music` exists and is writable.
|
||||||
|
|
||||||
🛠️ Contributing
|
---
|
||||||
|
|
||||||
PRs are welcome, I only ask that you make the changes easy to follow. This script is designed to act as middleware, and not a replacement or plugin for Lidarr. The changes must also be compatible with Bash-based workflows.
|
## 🛠️ Contributing
|
||||||
|
|
||||||
|
PRs are welcome! Please make your changes easy to follow. This script is designed to act as middleware, not a replacement or plugin for Lidarr. Changes must also be compatible with Bash-based workflows.
|
||||||
|
|
||||||
📜 License
|
---
|
||||||
|
|
||||||
|
## 📜 License
|
||||||
|
|
||||||
MIT – Use it freely and improve it as you wish!
|
MIT – Use it freely and improve it as you wish!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user