Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable loading from global scripts dir #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ A fully-featured port of [SponsorBlock](https://github.com/ajayyy/SponsorBlock)
- Python 3

## Installation
Move `sponsorblock.lua` and `sponsorblock_shared` into your mpv `scripts` folder.
Move `sponsorblock.lua` and `sponsorblock_shared` into your mpv `scripts` folder under a `sponsorblock` directory:
```
mpv/scripts/
├── sponsorblock.lua
└── sponsorblock_shared
├── sponsorblock/
├── main.lua
└── sponsorblock.py
├── sponsorblock.lua
└── sponsorblock_shared
├── main.lua
└── sponsorblock.py
```

The easiest way is to download the [ZIP file](https://github.com/po5/mpv_sponsorblock/archive/refs/heads/master.zip) and unpack it into the correct location.

## Usage
Play a YouTube video, sponsors will be skipped automatically.

Expand Down
1 change: 1 addition & 0 deletions main.lua
2 changes: 1 addition & 1 deletion sponsorblock.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ end
options.local_database = false

local utils = require "mp.utils"
scripts_dir = mp.find_config_file("scripts")
scripts_dir = mp.get_script_directory()

local sponsorblock = utils.join_path(scripts_dir, "sponsorblock_shared/sponsorblock.py")
local uid_path = utils.join_path(scripts_dir, "sponsorblock_shared/sponsorblock.txt")
Expand Down