Playlist Cleaner

VLC Extensions

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

2
Score 50.0%
Description:

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.
Last changelog:

5 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.

ironswalt

5 months ago

Great extension, thanks!

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

lukegm

1 year ago

If you want to use this extension on Linux (I'm using Linux Mint 19), then you might need to make this small change.

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

1 year ago

Line 72, after io.open line, I added:
if file~=nil then file:close() end

it seems to work better for me

Report

MiniJack

3 years ago

I cant get the plugin to show up in the View menu on Arch Linux?

Does the plugin support Linux?
If not will it ever?

Report

fragonard

3 years ago

I've downloaded it. I try to double click... no way to open it, says computer. Doesn't recognize this type of file. How do I import it to VLC? My playlist is multiplying entries at an alarming rate!

Report

C

basaquer

3 years ago

You would want to drop the file in your VLC folder, in the subfolder \lua\extensions

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

3 years ago

Thanks very much!

Report

TheAlphaRaptor

5 years ago

2.1.3 crashes every time i try to use the plugin.

Report

C

basaquer

5 years ago

I'm without a laptop right now, but I'm really sorry that's happening for you. I will try to take a look at it when my situation gets sorted out in the next week or so.

Report

JFord

4 years ago

Still crashing. Would be a very useful addon for me if it worked.

Report

direndd

6 years ago

It works fine!
tHANK yOU!

Report

5 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.

12345678910
product-maker Base: 4 x 5.0 Ratings
arnoldwaswaiga
Jun 30 2019
kvilla76
Feb 08 2018
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs ocs-url or ocs-store to install things
Pling
0 Affiliates
Details
license
version
updated Dec 31 2013
added Nov 15 2012
downloads 24h
5
pageviews 24h 26
System Tags addon