From a1e46ff1983768b6f45c355649fd24aef99deb71 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Fri, 28 Mar 2025 20:19:02 -0300 Subject: [PATCH] Updated README --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 925fc6f..fedf3fe 100644 --- a/README.md +++ b/README.md @@ -121,3 +121,36 @@ Subscleaner is licensed under the GNU General Public License v3.0 or later. See This repository is a rewrite of this Github repository: https://github.com/FraMecca/subscleaner. Thanks to [FraMecca](https://github.com/FraMecca/) in Github! + +## Database and Caching + +Subscleaner now uses a SQLite database to track processed files, which significantly improves performance by avoiding redundant processing of unchanged subtitle files. + +### How it works + +1. When Subscleaner processes a subtitle file, it generates an MD5 hash of the file content. +2. This hash is stored in a SQLite database along with the file path. +3. On subsequent runs, Subscleaner checks if the file has already been processed by comparing the current hash with the stored hash. +4. If the file hasn't changed, it's skipped, saving processing time. + +### Database Location + +The SQLite database is stored in the following locations, depending on your operating system: + +- **Linux**: `~/.local/share/subscleaner/subscleaner/subscleaner.db` +- **macOS**: `~/Library/Application Support/subscleaner/subscleaner/subscleaner.db` +- **Windows**: `C:\Users\\AppData\Local\subscleaner\subscleaner\subscleaner.db` + +### Command Line Options + +Two new command line options have been added: + +- `--debug`: Stores the database in the current directory instead of the default location +- `--force`: Processes all files regardless of whether they've been processed before + +Example usage: +```sh +find /your/media/location -name "*.srt" | subscleaner --force +``` + +This feature makes Subscleaner more efficient, especially when running regularly via cron jobs or other scheduled tasks, as it will only process new or modified subtitle files.