Skip to content

Commit eff2d1d

Browse files
committed
Разделитель суффикса для субтитров только пробел.
1 parent 5847603 commit eff2d1d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Subtitles/SubtitleHelpers.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include "SubtitleHelpers.h"
2727
#include "DSUtil/Filehandle.h"
2828

29-
static LPCWSTR separators = L".\\-_";
3029
static LPCWSTR extListVid = L"(avi)|(mkv)|(mp4)|((m2)?ts)";
3130

3231
LPCWSTR Subtitle::GetSubtitleFileExt(SubType type)
@@ -58,7 +57,6 @@ void Subtitle::GetSubFileNames(CString fn, const std::vector<CString>& paths, st
5857
CString orgpath = fn.Left(l);
5958
CString title = fn.Mid(l, l2 - l);
6059
int titleLength = title.GetLength();
61-
//CString filename = title + L".nooneexpectsthespanishinquisition";
6260

6361
if (!fWeb) {
6462
WIN32_FIND_DATA wfd;
@@ -70,7 +68,7 @@ void Subtitle::GetSubFileNames(CString fn, const std::vector<CString>& paths, st
7068
}
7169
extListSub.TrimRight('|');
7270

73-
regExpSub.Format(L"([%s]+.+)?\\.(%s)$", separators, extListSub);
71+
regExpSub.Format(L"(\\..+)?\\.(%s)$", extListSub);
7472
regExpVid.Format(L".+\\.(%s)$", extListVid);
7573

7674
const std::wregex::flag_type reFlags = std::wregex::icase | std::wregex::optimize;

0 commit comments

Comments
 (0)