updated to the current pikotools api from branch api2021
This commit is contained in:
@@ -331,7 +331,7 @@ void CorrectUrlOnlyAllowedChar(std::wstring & url)
|
||||
{
|
||||
CorrectUrlDots(url);
|
||||
CorrectUrlChars(url);
|
||||
PT::ToLower(url);
|
||||
PT::to_lower_emplace(url);
|
||||
Trim(url, '_');
|
||||
|
||||
if( url.empty() || url == L"." )
|
||||
@@ -1219,31 +1219,31 @@ int SelectFileType(const wchar_t * file_name)
|
||||
|
||||
// as an image we're using only those types which can be rendered
|
||||
// by a web browser
|
||||
if( PT::EqualNoCase(ext, L"jpg") ||
|
||||
PT::EqualNoCase(ext, L"jpeg") ||
|
||||
PT::EqualNoCase(ext, L"jpe") ||
|
||||
PT::EqualNoCase(ext, L"pic") ||
|
||||
PT::EqualNoCase(ext, L"tga") ||
|
||||
PT::EqualNoCase(ext, L"gif") ||
|
||||
PT::EqualNoCase(ext, L"bmp") ||
|
||||
PT::EqualNoCase(ext, L"png") )
|
||||
if( PT::is_equal_nc(ext, L"jpg") ||
|
||||
PT::is_equal_nc(ext, L"jpeg") ||
|
||||
PT::is_equal_nc(ext, L"jpe") ||
|
||||
PT::is_equal_nc(ext, L"pic") ||
|
||||
PT::is_equal_nc(ext, L"tga") ||
|
||||
PT::is_equal_nc(ext, L"gif") ||
|
||||
PT::is_equal_nc(ext, L"bmp") ||
|
||||
PT::is_equal_nc(ext, L"png") )
|
||||
return WINIX_ITEM_FILETYPE_IMAGE;
|
||||
|
||||
if( PT::EqualNoCase(ext, L"pdf") ||
|
||||
PT::EqualNoCase(ext, L"doc") ||
|
||||
PT::EqualNoCase(ext, L"xls") ||
|
||||
PT::EqualNoCase(ext, L"txt") ||
|
||||
PT::EqualNoCase(ext, L"ods") ||
|
||||
PT::EqualNoCase(ext, L"odt") )
|
||||
if( PT::is_equal_nc(ext, L"pdf") ||
|
||||
PT::is_equal_nc(ext, L"doc") ||
|
||||
PT::is_equal_nc(ext, L"xls") ||
|
||||
PT::is_equal_nc(ext, L"txt") ||
|
||||
PT::is_equal_nc(ext, L"ods") ||
|
||||
PT::is_equal_nc(ext, L"odt") )
|
||||
return WINIX_ITEM_FILETYPE_DOCUMENT;
|
||||
|
||||
if( PT::EqualNoCase(ext, L"avi") ||
|
||||
PT::EqualNoCase(ext, L"mp4") ||
|
||||
PT::EqualNoCase(ext, L"flv") ||
|
||||
PT::EqualNoCase(ext, L"mpg") ||
|
||||
PT::EqualNoCase(ext, L"mpeg") ||
|
||||
PT::EqualNoCase(ext, L"mkv") ||
|
||||
PT::EqualNoCase(ext, L"wmv") )
|
||||
if( PT::is_equal_nc(ext, L"avi") ||
|
||||
PT::is_equal_nc(ext, L"mp4") ||
|
||||
PT::is_equal_nc(ext, L"flv") ||
|
||||
PT::is_equal_nc(ext, L"mpg") ||
|
||||
PT::is_equal_nc(ext, L"mpeg") ||
|
||||
PT::is_equal_nc(ext, L"mkv") ||
|
||||
PT::is_equal_nc(ext, L"wmv") )
|
||||
return WINIX_ITEM_FILETYPE_VIDEO;
|
||||
|
||||
return WINIX_ITEM_FILETYPE_UNKNOWN;
|
||||
|
Reference in New Issue
Block a user