Eisa01 / mpv-scripts

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

Fix some sequences not printing in titles/filenames #52

Open lefth opened 1 year ago

lefth commented 1 year ago

This fixes issue #51: for example "temp\home" is shown as "temp ome".

dyphire commented 1 year ago

I think the better change is:

p = p:gsub("\\", "/")
     :gsub("{", "\\{")
     :gsub("^ ", "\\h")

This will unify the display of path format. And this change also should be applied to the other two scripts: SimpleBookmark.lua, SmartCopyPaste_II.lua.

lefth commented 1 year ago

Done.

Though I don't like changing the path separator, the code is short this way, and that's ideal because writing lua modules or shared functions for recent versions of mpv is tricky.

Eisa01 commented 1 year ago

I believe I have written a function that deals with escape sequences, because there is multiple escape_sequences not dealt with in this PR. I must have forgot to call the existing method on this list.

Eisa01 commented 1 year ago

I will keep this open for reference until changes are made to fix issue #51

Eisa01 commented 1 year ago

Only remaining is to migrate the changes of 2044e4397320943f38960d1b99cf4d0c59808a4b to SimpleHistory, and SmartCopyPaste