Automatic Movie Scrobbler for Simkl
Project description
🎬 Simkl Scrobbler
A powerful cross-platform automatic scrobbler for Simkl that seamlessly tracks your movie watching progress across multiple media players. Zero configuration required - it just works!
📋 Table of Contents
- Quick Start
- Features
- Supported Media Players
- Installation
- Usage
- Advanced Configuration
- How It Works
- Testing
- Troubleshooting
- License
- Acknowledgments
- Contributing
- Roadmap
⚡ Quick Start
# Install with pip (standard)
pip install simkl-scrobbler
# Initialize the tracker
simkl-scrobbler init
# Start tracking your movies
simkl-scrobbler start
🚀 Features
- Zero Configuration - Works with most media players out of the box
- Cross-Platform - Runs on Windows, macOS, and Linux
- Smart Detection - Intelligent movie recognition using guessit library
- Background Operation (Still Working on it) - Runs silently in the background
- Progress Tracking - Monitors viewing progress across sessions
- Automatic Scrobbling - Marks movies as watched after 80% completion
- Offline Support - Maintains sync backlog when offline
- Resource Efficient - Minimal CPU and memory footprint
- Runtime Detection - Uses actual movie runtime from Simkl API
- Multi-Window Monitoring - Can detect and track movies even in non-active windows
- Enhanced Position Tracking - Monitors actual player position for better completion detection
- Comprehensive Logging - Detailed playback events for debugging and analysis
🎥 Supported Media Players
The following media players are supported across platforms:
Windows
| Media Player | Support Status | Position Detection |
|---|---|---|
| VLC Media Player | ✅ Fully Supported | ✅ (with web interface) |
| MPC-HC/BE | ✅ Fully Supported | ✅ (with web interface) |
| Windows Media Player | ✅ Fully Supported | ⚠️ Title only |
| MPV Player | ✅ Fully Supported | ⚠️ Title only |
| PotPlayer | ✅ Fully Supported | ⚠️ Title only |
| SMPlayer | ✅ Fully Supported | ⚠️ Title only |
| KMPlayer | ✅ Fully Supported | ⚠️ Title only |
| GOM Player | ✅ Fully Supported | ⚠️ Title only |
macOS
| Media Player | Support Status | Position Detection |
|---|---|---|
| VLC Media Player | ✅ Fully Supported | ✅ (with web interface) |
| MPV Player | ✅ Fully Supported | ⚠️ Title only |
| IINA | ✅ Fully Supported | ⚠️ Title only |
| QuickTime Player | ✅ Basic Support | ⚠️ Title only |
| Elmedia Player | ✅ Basic Support | ⚠️ Title only |
| Movist/Movist Pro | ✅ Basic Support | ⚠️ Title only |
Linux
| Media Player | Support Status | Position Detection |
|---|---|---|
| VLC Media Player | ✅ Fully Supported | ✅ (with web interface) |
| MPV Player | ✅ Fully Supported | ⚠️ Title only |
| SMPlayer | ✅ Fully Supported | ⚠️ Title only |
| Totem | ✅ Basic Support | ⚠️ Title only |
| Celluloid | ✅ Basic Support | ⚠️ Title only |
| Kaffeine | ✅ Basic Support | ⚠️ Title only |
| Dragon Player | ✅ Basic Support | ⚠️ Title only |
| Parole | ✅ Basic Support | ⚠️ Title only |
The scrobbler monitors the active/background windows to detect media files currently being played. For VLC with web interface enabled, it can also get precise playback position information across all supported platforms.
📥 Installation
Standard Installation (Recommended)
-
Ensure you have Python 3.7 or higher installed, and
pipis available. Check by runningpython --versionandpip --version. -
Install using pip:
pip install simkl-scrobbler
This will make the
simkl-scrobblercommand available globally. -
Initialize SIMKL Scrobbler:
simkl-scrobbler initFollow the prompts to authorize the application with your Simkl account using the PIN method.
-
Start tracking:
simkl-scrobbler start
Installation with pipx (Alternative)
pipx installs packages into isolated environments.
-
Install pipx:
python -m pip install --user pipx python -m pipx ensurepath
(Restart your terminal after running
ensurepath) -
Install SIMKL Scrobbler with pipx:
pipx install simkl-scrobbler
-
Initialize and start as above.
Installing as a Windows Service (Windows Only)
To have SIMKL Scrobbler start automatically with Windows:
simkl-scrobbler install-service
Follow the on-screen instructions.
Development Installation (Using Poetry)
If you want to contribute or run from the source code:
-
Ensure Python 3.7+ and Poetry are installed.
-
Clone the repository:
git clone https://github.com/kavinthangavel/simkl-scrobbler.git cd simkl-scrobbler
-
Install dependencies using Poetry:
poetry install --with dev
This installs the main package and development dependencies (like
pytest,flake8). -
Run commands using
poetry run:poetry run simkl-scrobbler init poetry run simkl-scrobbler start # To run tests (see Testing section) poetry run python tests/master_test.py --test-mode
🎮 Usage
The tracker runs silently in the background, automatically detecting and tracking movie playback in supported media players. Basic commands:
# Initialize the tracker (first-time setup)
simkl-scrobbler init
# Start tracking in the foreground
simkl-scrobbler start
# Install as a Windows service (Windows only)
simkl-scrobbler install-service
# Show help
simkl-scrobbler --help
Monitoring and Logs
# On Windows:
type simkl_scrobbler.log
# On macOS/Linux:
cat simkl_scrobbler.log
# Check detailed playback events
# On Windows:
type simkl_scrobbler\playback_log.jsonl
# On macOS/Linux:
cat simkl_scrobbler/playback_log.jsonl
⚙️ Advanced Configuration
Key settings in media_tracker.py:
DEFAULT_POLL_INTERVAL = 10 # Player check interval (seconds)
COMPLETION_THRESHOLD = 80 # Mark as watched threshold (percent)
VIDEO_PLAYER_EXECUTABLES = {...} # Platform-specific supported players
Player Web Interface Setup (for position tracking)
For enhanced position tracking with VLC:
VLC Media Player on Windows:
- Go to Tools > Preferences
- Select "All" settings mode (bottom left)
- Navigate to Interface > Main interfaces
- Check "Web" option
- Set a password if desired (leave empty for no password)
- Restart VLC
VLC Media Player on macOS:
- Open VLC > Preferences
- Click "Show All" (bottom left)
- Navigate to Interface > Main Interfaces
- Check "Web" option
- Set a password if desired (leave empty for no password)
- Restart VLC
VLC Media Player on Linux:
- Go to Tools > Preferences
- Click "All" settings (bottom left)
- Navigate to Interface > Main interfaces
- Check "Web" option
- Set a password if desired (leave empty for no password)
- Restart VLC
MPC-HC/BE (Windows only):
- Go to View > Options > Player > Web Interface
- Check "Listen on port:" (default 13579)
🔍 How It Works
graph LR
A[Monitor Windows/Processes] --> B[Detect Player]
B --> C[Extract Filename]
C --> D[Parse with guessit]
D --> E[Match Movie]
E --> F[Track Progress]
F --> G{>80% Complete?}
G -->|Yes| H[Mark Watched]
G -->|No| F
- Window/Process Detection: Uses platform-specific methods to monitor active and background windows/processes
- Title Extraction: Parses window title for filename/movie info
- Smart Parsing: Uses guessit library to intelligently extract movie title and year
- Movie Matching: Queries Simkl API to identify the movie
- Progress Tracking: Monitors playback position directly from player (when available) or estimates based on time
- Auto-marking: Updates Simkl when 80% threshold reached
- Offline Handling: Queues failed updates in backlog for future retry
🔧 Troubleshooting
Common Issues
| Issue | Solution |
|---|---|
| Movie not detected | Ensure media player shows filename in window title |
| No auto-marking | Check log file for API errors |
| Incorrect movie | Include year in filename: "Movie (2023).mp4" |
| Player not detected | Verify player is in supported list for your platform |
| Permission error | Run with appropriate permissions for your platform |
| Movie title parsing failed | Use standard naming: "Movie.Name.2023.mp4" |
| Position tracking not working | Enable web interface in VLC or MPC-HC/BE |
| VLC web interface shows no movie | Restart VLC after enabling web interface |
| Window detection not working on Linux | Install required utilities: xdotool, wmctrl |
| AppleScript error on macOS | Grant necessary permissions in System Preferences > Security & Privacy |
Logs and Debugging
# Check main application log (Windows)
type simkl_scrobbler.log
# macOS/Linux
cat simkl_scrobbler.log
# Check detailed playback events (Windows)
type simkl_scrobbler\playback_log.jsonl
# macOS/Linux
cat simkl_scrobbler/playback_log.jsonl
Diagnostic Commands
If you're having issues, these commands can help diagnose problems:
# Check Python version
python --version
# Verify installed dependencies (using Poetry)
poetry show
# Check network connectivity to Simkl API
# Windows (PowerShell)
Invoke-WebRequest -Uri https://api.simkl.com/ -Method Head
# macOS/Linux
curl -I https://api.simkl.com/
# List running media player processes
# Windows
tasklist | findstr "vlc mpc wmplayer"
# macOS
ps aux | grep -E "VLC|mpv|IINA"
# Linux
ps aux | grep -E "vlc|mpv|totem|celluloid"
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
👏 Acknowledgments
- Simkl for their excellent API
- iamkroot's Trakt Scrobbler for inspiration
- guessit for powerful video filename parsing
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
📝 Roadmap
- Tray or Background Service with Notification
- Add Linux and macOS support
- Add real-time position tracking for supported players
- Implement multi-window monitoring
- Create automated tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simkl_scrobbler-1.2.0.tar.gz.
File metadata
- Download URL: simkl_scrobbler-1.2.0.tar.gz
- Upload date:
- Size: 56.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.3 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f7ea4ae45eb82a7fee70b29377ffa1eb818a97a1e1ff6f76b5c549ca4a6ecca
|
|
| MD5 |
dec59e34b3aa62c576f775d0af2f3161
|
|
| BLAKE2b-256 |
3bcf01867d883ab903322966ca92403cb50a693b2dec474d968629169e61044a
|
File details
Details for the file simkl_scrobbler-1.2.0-py3-none-any.whl.
File metadata
- Download URL: simkl_scrobbler-1.2.0-py3-none-any.whl
- Upload date:
- Size: 63.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.3 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b893c70d4b9ab8dbffa5812c0164970e32f0791f8102dc2199da3028d773065
|
|
| MD5 |
80bdbe7a79b3b09a0f9ed9248fd38f9e
|
|
| BLAKE2b-256 |
1336d21beac32b28e7d5c0815b07a24b252ac98c90179aa01a85b265a9e17110
|