Skip to content

Commit 6d69b38

Browse files
committed
Initial release (v1.0.0)
0 parents  commit 6d69b38

33 files changed

+7566
-0
lines changed

.env.example

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# YouTube API Configuration
2+
# Get API keys from: https://console.cloud.google.com/apis/credentials
3+
# Create multiple keys for better quota management (10,000 units/day per key)
4+
YOUTUBE_API_KEYS=API_KEY_1,API_KEY_2,API_KEY_3
5+
6+
# Country code for region blocking checks
7+
# Use ISO 3166-1 alpha-2 country codes (US, CA, GB, etc.)
8+
YOUTUBE_COUNTRY_CODE=US
9+
10+
# Rate limiting (seconds between API calls)
11+
# Lower = faster, but may hit rate limits
12+
# Higher = slower, but safer
13+
YT_SLEEP_SEC=0.15
14+
15+
# HTTP request timeout (seconds)
16+
YT_REQUEST_TIMEOUT=30
17+
18+
# Maximum retry attempts for failed requests
19+
YT_MAX_RETRIES=3
20+
21+
# Exponential backoff base delay (seconds)
22+
YT_BACKOFF_BASE_SEC=1.0
23+
24+
# Cache TTL (seconds)
25+
# How long to trust cached playlist state before refreshing
26+
# Default: 21600 (6 hours)
27+
CACHE_TTL_SECONDS=21600
28+
29+
# Logging configuration (optional)
30+
LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR
31+
LOG_FORMAT=json # json or text
32+
33+
# Development settings (optional)
34+
# DEVELOPMENT_MODE=true
35+
# DRY_RUN_DEFAULT=true
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug or issue with Playlistarr
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
A clear and concise description of what the bug is.
11+
12+
## Steps to Reproduce
13+
Steps to reproduce the behavior:
14+
1. Run command '...'
15+
2. With configuration '...'
16+
3. See error
17+
18+
## Expected Behavior
19+
What you expected to happen.
20+
21+
## Actual Behavior
22+
What actually happened.
23+
24+
## Error Output
25+
```
26+
Paste the full error message here (with credentials redacted)
27+
```
28+
29+
## Environment
30+
- **OS**: [e.g., Windows 11, macOS 14, Ubuntu 22.04]
31+
- **Python Version**: [e.g., 3.10.5]
32+
- **Install Method**: [pip, venv, conda, etc.]
33+
- **Script**: [e.g., discover_music_videos.py, youtube_playlist_sync.py]
34+
35+
## Configuration
36+
```python
37+
# Relevant config settings (with API keys redacted)
38+
MIN_DURATION_SEC = 120
39+
MAX_DURATION_SEC = 450
40+
# etc.
41+
```
42+
43+
## Command Used
44+
```bash
45+
# Full command that triggered the bug
46+
python discover_music_videos.py artists.csv --log-level DEBUG
47+
```
48+
49+
## Logs
50+
```
51+
Paste relevant log output here (with credentials redacted)
52+
```
53+
54+
## Artist/Video Details (if applicable)
55+
- **Artist Name**: [e.g., "Taylor Swift"]
56+
- **Video ID**: [e.g., "dQw4w9WgXcQ"]
57+
- **Playlist ID**: [e.g., "PLxxxxxxxxxxxxxx"]
58+
59+
## Additional Context
60+
- Does this happen consistently or intermittently?
61+
- Did this work in a previous version?
62+
- Any recent configuration changes?
63+
- Screenshots (if UI-related)
64+
65+
## Attempted Solutions
66+
What have you already tried to fix this?
67+
68+
## Checklist
69+
- [ ] I've checked existing issues for duplicates
70+
- [ ] I've included the full error message
71+
- [ ] I've redacted all credentials from logs
72+
- [ ] I've tested with the latest version
73+
- [ ] I've included relevant configuration details
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Feature Description
10+
A clear and concise description of the feature you'd like.
11+
12+
## Problem It Solves
13+
Describe the problem this feature would solve or the use case it addresses.
14+
15+
## Proposed Solution
16+
How would you like this feature to work?
17+
18+
## Alternative Solutions
19+
What alternatives have you considered?
20+
21+
## Example Usage
22+
```python
23+
# Show how the feature would be used
24+
python discover_music_videos.py --your-new-flag
25+
```
26+
27+
## Benefits
28+
- Who would benefit from this feature?
29+
- How would it improve the project?
30+
31+
## Implementation Ideas
32+
Any technical suggestions for implementation? (Optional)
33+
34+
## Additional Context
35+
Add any other context, screenshots, or examples about the feature request.
36+
37+
## Checklist
38+
- [ ] I've checked existing issues for duplicates
39+
- [ ] I've considered alternative approaches
40+
- [ ] This aligns with the project's goals

.github/workflows/ci.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
lint:
11+
name: Lint and Format Check
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.10'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install black flake8 mypy
26+
pip install -r requirements.txt
27+
28+
- name: Check formatting with black
29+
run: black --check *.py
30+
31+
- name: Lint with flake8
32+
run: |
33+
# Stop on syntax errors or undefined names
34+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35+
# Exit with warning for other issues
36+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics
37+
38+
- name: Type check with mypy
39+
run: mypy *.py --ignore-missing-imports
40+
continue-on-error: true
41+
42+
security:
43+
name: Security Check
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- uses: actions/checkout@v3
48+
49+
- name: Check for exposed secrets
50+
run: |
51+
if grep -rE "AIzaSy[A-Za-z0-9_-]{33}" . --exclude-dir=.git; then
52+
echo "Found exposed API key!"
53+
exit 1
54+
fi
55+
echo "No exposed secrets found"
56+
57+
docs:
58+
name: Documentation Check
59+
runs-on: ubuntu-latest
60+
61+
steps:
62+
- uses: actions/checkout@v3
63+
64+
- name: Check required files
65+
run: |
66+
test -f README.md || (echo "Missing README.md" && exit 1)
67+
test -f LICENSE || (echo "Missing LICENSE" && exit 1)
68+
test -f CONTRIBUTING.md || (echo "Missing CONTRIBUTING.md" && exit 1)
69+
test -f CHANGELOG.md || (echo "Missing CHANGELOG.md" && exit 1)
70+
test -f requirements.txt || (echo "Missing requirements.txt" && exit 1)
71+
test -f .gitignore || (echo "Missing .gitignore" && exit 1)
72+
echo "All required files present"
73+
74+
- name: Check .gitignore entries
75+
run: |
76+
grep -q "auth/" .gitignore || (echo ".gitignore missing auth/" && exit 1)
77+
grep -q "cache/" .gitignore || (echo ".gitignore missing cache/" && exit 1)
78+
grep -q "out/" .gitignore || (echo ".gitignore missing out/" && exit 1)
79+
grep -q ".env" .gitignore || (echo ".gitignore missing .env" && exit 1)
80+
echo ".gitignore looks good"

0 commit comments

Comments
 (0)