Skip to content

caetano-dev/Lazywatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Lazywatch

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.

Features

  • 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 mpv media player.

Prerequisites

  • Go: Required to compile the application.
  • mpv: The media player used to play the files. Ensure mpv is in your system PATH.

Installation

  1. Clone the repository or download the source code.
  2. Initialize the module and download dependencies:
go mod init lazywatch
go get github.com/manifoldco/promptui
  1. Build the binary:
go build -o watch main.go
  1. (Optional) Move the binary to your PATH for global access:
mv watch /usr/local/bin/lazywatch

Usage

Configuration

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:

  1. Select Base Directory: Enter the absolute path to the parent folder containing your TV shows (e.g., /Users/username/Downloads/LegallyDownloadedSeries).
  2. Select Series: Choose the specific series folder from the list. Only folders containing valid video files will be displayed.
  3. Select Episode: Choose the episode you want to start watching.

Watching

To watch the next episode, simply run:

./watch

The program will:

  1. Read the current state.
  2. Launch mpv with the next scheduled episode.
  3. Wait for the player to close.
  4. 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.

Configuration File

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.

Supported Formats

The tool currently supports the following video extensions:

  • .mkv
  • .mp4
  • .avi
  • .mov
  • .webm

About

Keep track of your locally downloaded series' next episode.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages