howto:vlc-playlist-from-file
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howto:vlc-playlist-from-file [2022/09/06 01:18] – Wulf Rajek | howto:vlc-playlist-from-file [2023/05/29 11:55] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 15: | Line 15: | ||
====== Associate VLC to webm videos ====== | ====== Associate VLC to webm videos ====== | ||
- | Gnome uses two lists (located | + | Gnome uses two lists to register applications to file types located |
+ | * / | ||
+ | * / | ||
+ | * ~/ | ||
< | < | ||
#manually | #manually | ||
sudo vi / | sudo vi / | ||
sudo vi / | sudo vi / | ||
+ | vi ~/ | ||
+ | |||
#or via sed: | #or via sed: | ||
sudo sed -i ' | sudo sed -i ' | ||
- | sudo sed -i ' | ||
sudo sed -i ' | sudo sed -i ' | ||
+ | sudo sed -i ' | ||
+ | sed -i ' | ||
+ | sed -i ' | ||
</ | </ | ||
Line 56: | Line 63: | ||
note: source from github adjusted to sort numbers as Versions like nemo file manager does. | note: source from github adjusted to sort numbers as Versions like nemo file manager does. | ||
- | < | + | < |
#!/bin/bash | #!/bin/bash | ||
+ | shopt -s nocaseglob | ||
shopt -s extglob | shopt -s extglob | ||
- | extensions=' | + | extensions=' |
# kill other instances of vlc to keep playlist clean (one-instance mode) | # kill other instances of vlc to keep playlist clean (one-instance mode) | ||
Line 76: | Line 84: | ||
# count files with matching extension, and get position of filename in current directory | # count files with matching extension, and get position of filename in current directory | ||
- | n=$(ls " | + | n=$(ls " |
- | pos=$(ls " | + | pos=$(ls " |
# if the filename does not have one of the extension above, launch vlc with provided filename | # if the filename does not have one of the extension above, launch vlc with provided filename | ||
Line 86: | Line 94: | ||
# change positions in playlist such as the first element is the opened file | # change positions in playlist such as the first element is the opened file | ||
- | ls " | + | ls " |
- | ls " | + | ls " |
# launch playlist | # launch playlist | ||
- | IFS=$' | + | IFS=$' |
</ | </ | ||
Line 113: | Line 121: | ||
powershell -File %USERPROFILE%\vlc.ps1 %1 | powershell -File %USERPROFILE%\vlc.ps1 %1 | ||
</ | </ | ||
- | < | + | < |
Param([string]$filename) | Param([string]$filename) | ||
Line 156: | Line 164: | ||
When you start VLC you get a new menu item: View > Move currently playing file into wastebasket. | When you start VLC you get a new menu item: View > Move currently playing file into wastebasket. | ||
- | < | + | < |
--[[ | --[[ | ||
INSTALLATION (create directories if they do not exist): | INSTALLATION (create directories if they do not exist): | ||
Line 194: | Line 202: | ||
-- create waste directory if it doesn' | -- create waste directory if it doesn' | ||
if(not directory_exists(wdir)) then | if(not directory_exists(wdir)) then | ||
- | -- spaces in dir name solved with single quote, but single quotes | + | -- escaping |
- | os.execute(" | + | os.execute(" |
wdir = dirname(filename) .. wdir | wdir = dirname(filename) .. wdir | ||
end | end | ||
Line 307: | Line 315: | ||
https:// | https:// | ||
- | < | + | < |
--[[ | --[[ | ||
Copyright 2015-2019 surrim | Copyright 2015-2019 surrim |
howto/vlc-playlist-from-file.1662423491.txt.gz · Last modified: 2023/05/29 11:53 (external edit)