mp3 is enabled
細 (1版) |
(mp3 is enabled) |
||
10行目: | 10行目: | ||
-- Remove any recognized extension | -- Remove any recognized extension | ||
local e = string.lower(string.gsub(f,"^.*%.([^%.]*)$","%1")) | local e = string.lower(string.gsub(f,"^.*%.([^%.]*)$","%1")) | ||
local map = {svg=1, png=1, jpg=1, jpeg=1, gif=1, tif=1, tiff=1, xcf=1, mid=1, ogg=1, ogv=1, djvu=1, oga=1, flac=1, wav=1, webm=1, pdf=1} | local map = {svg=1, png=1, jpg=1, jpeg=1, gif=1, tif=1, tiff=1, xcf=1, mid=1, ogg=1, ogv=1, djvu=1, oga=1, flac=1, wav=1, webm=1, pdf=1, mp3=1} | ||
if map[e] | if map[e] | ||
then n = string.gsub(f,"^(.*)%.[^%.]*$","%1") | then n = string.gsub(f,"^(.*)%.[^%.]*$","%1") | ||
29行目: | 29行目: | ||
-- Keep, replace with, or add "svg" extension | -- Keep, replace with, or add "svg" extension | ||
local e = string.lower(string.gsub(f,"^.*%.([^%.]*)$","%1")) | local e = string.lower(string.gsub(f,"^.*%.([^%.]*)$","%1")) | ||
local map = {png=1, jpg=1, jpeg=1, gif=1, tif=1, tiff=1, xcf=1, mid=1, ogg=1, ogv=1, djvu=1, oga=1, flac=1, wav=1, webm=1, pdf=1} | local map = {png=1, jpg=1, jpeg=1, gif=1, tif=1, tiff=1, xcf=1, mid=1, ogg=1, ogv=1, djvu=1, oga=1, flac=1, wav=1, webm=1, pdf=1, mp3=1} | ||
if e=="svg" | if e=="svg" | ||
then n = f | then n = f |