
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
Playlist Cleaner is a LUA extension for VLC which checks the active playlist for files that are duplicates, deleted, or otherwise moved; and if so, removes them from the playlist. This prevents you from seeing "VLC file not found" errors. I could not find any addons along these lines for VLC, so I decided to make one myself. This is my first routine in LUA so advice or suggestions for improvement would be appreciated.
7 years ago
V1.0 (11/15/2012) : First release.
V1.1 (11/27/2012) : Noticed script was accidentally removing directories from the playlist, updated it to only remove items when the I/O error code returned is "File/Folder not found."
V1.2 (12/31/2013) : Added support for cleaning out duplicate files in the playlist. Added a simple interface to control what to clean up from the playlist.
7 years ago
V1.0 (11/15/2012) : First release.
V1.1 (11/27/2012) : Noticed script was accidentally removing directories from the playlist, updated it to only remove items when the I/O error code returned is "File/Folder not found."
V1.2 (12/31/2013) : Added support for cleaning out duplicate files in the playlist. Added a simple interface to control what to clean up from the playlist.
manuelusin
7 months ago
Report
ironswalt
1 year ago
I had duplicates in my list that had different encoding in the path so this extension didn't pick them up. Making the following change allowed this extension to pick up those duplicates too:
On line 48:
if fileset[v.path] then
change to:
if fileset[unescape(v.path)] then
and similarly on line 52:
fileset[v.path] = 1
change to
fileset[unescape(v.path)] = 1
Hope this helps other peeps out there :)
Report
manuelusin
7 months ago
Report
lukegm
2 years ago
On line 68:
local pathval = string.gsub(filepath, "file:\/\/\/", "")
change to:
local pathval = string.gsub(filepath, "file://", "")
If you're using linux and the extension isn't visible in "Plugins and extensions" after you've installed it, then you may want to try this change.
To confirm, enable VLC logging then restart VLC. If you have the below error message in your logs, then you probably need to make the change.
"Error loading script /usr/lib/x86_64-linux-gnu/vlc/lua/extensions/155249-playlist.lua: .../x86_64-linux-gnu/vlc/lua/extensions/155249-playlist.lua:68: invalid escape sequence near '\/'"
I hopes this helpful.
Report
brianwhen
2 years ago
if file~=nil then file:close() end
it seems to work better for me
Report
MiniJack
4 years ago
Does the plugin support Linux?
If not will it ever?
Report
fragonard
5 years ago
Report
basaquer
5 years ago
Playlist Cleaner will show up the next time you open "VLC" under the View menu, click on "Cleans orphaned and duplicate tracks from the playlist."
Report
fragonard
5 years ago
Report
TheAlphaRaptor
6 years ago
Report
basaquer
6 years ago
Report
JFord
5 years ago
Report
direndd
7 years ago
tHANK yOU!
Report