Lazywatch is a CLI tool written in Go designed to streamline watching locally stored video series. It automatically tracks your progress through seasons and episodes, launching the correct file in mpv without manual selection.
It features an interactive configuration mode and automatically detects when a season is finished to advance to the next directory.
- State Persistence: Remembers exactly which episode you watched last using a JSON configuration file.
- Interactive Configuration: Uses keyboard-driven menus to select source directories, series, and starting episodes.
- Smart Filtering: Automatically ignores directories that do not contain video files during selection.
- Auto-Season Advance: When the last episode of a folder is finished, the tool automatically detects the next folder in the directory and begins playing from index 0.
- MPV Integration: seamless integration with the
mpvmedia player.
- Go: Required to compile the application.
- mpv: The media player used to play the files. Ensure
mpvis in your system PATH.
- Clone the repository or download the source code.
- Initialize the module and download dependencies:
go mod init lazywatch
go get github.com/manifoldco/promptui
- Build the binary:
go build -o watch main.go
- (Optional) Move the binary to your PATH for global access:
mv watch /usr/local/bin/lazywatch
Before using the tool, or if you want to switch series, run the configuration mode:
./watch configure
The interactive CLI will guide you through three steps:
- Select Base Directory: Enter the absolute path to the parent folder containing your TV shows (e.g.,
/Users/username/Downloads/LegallyDownloadedSeries). - Select Series: Choose the specific series folder from the list. Only folders containing valid video files will be displayed.
- Select Episode: Choose the episode you want to start watching.
To watch the next episode, simply run:
./watch
The program will:
- Read the current state.
- Launch
mpvwith the next scheduled episode. - Wait for the player to close.
- Increment the episode index in the state file.
If you finish the last episode in a directory, Lazywatch will automatically scan for the subsequent folder (season) and begin playing the first episode of that new season.
The application state is stored in a JSON file located at:
$HOME/.watch_state.json
You can manually edit this file if you need to reset an index or change paths without using the CLI.
The tool currently supports the following video extensions:
- .mkv
- .mp4
- .avi
- .mov
- .webm