Eisa01 / mpv-scripts

This repository contain scripts I have made for mpv media player...
BSD 2-Clause "Simplified" License
505 stars 35 forks source link

SmartCopyPaste_II Error If Filename Contains Apostrophe. #117

Open AziRizvi opened 7 months ago

AziRizvi commented 7 months ago

If the filename contains an apostrophe > ' You will get an error in the console if you try to copy using Ctrl+C and nothing will be copied to the clipboard, in the console it will give an error first and then say copied to the clipboard but the clipboard output will be empty.

Example Filename:[OZC-Live]Kamen Rider Build BD Box E21 'The Unstoppable Hazard' [1080p][v2].mkv

Console Error Log:

mpv_sej1YBQxsk

SmartCopyPaste_II Version : 3.2.1 MPV Version: v0.37.0-25-gdea512ea (Shinchiro's Build https://github.com/shinchiro/mpv-winbuild-cmake/releases/tag/20231127)

I've also been able to reproduce this issue on my main MPV build with the same SmartCopyPaste Version. MPV Version: 035.0-486-g0bfafd24

I've also discovered something interesting, if you put two apostrophes together instead of one, it will copy fine without error in the console but will omit an apostrophe from the final copied output.

Actual Filename: [OZC-Live]Kamen Rider Build BD Box E21 ''The Unstoppable Hazard'' [1080p][v2].mp4

What SmartCopyPaste_II copied using Ctrl+C : R:\[OZC-Live]Kamen Rider Build BD Box E21 'The Unstoppable Hazard' [1080p][v2].mp4&time=1.0427083333333

As you can see in the above example, it copied the name and time but it omitted one apostrophe from the name.