Skip to content

Commit 0a0eae8

Browse files
authored
Updated Vue with fixes from v1.4.4
1 parent 38c57b0 commit 0a0eae8

1 file changed

Lines changed: 14 additions & 21 deletions

File tree

source-Vue.bat

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ Echo %manual_mode% | findstr "1" >nul && (goto ManualQuestion) || (goto Start)
6060

6161
::Step 1
6262
:Start
63+
if %search_mode% LSS 1 (goto Error-IncorrectNum)
64+
if %search_mode% GTR 5 (goto Error-IncorrectNum)
65+
6366
Echo %manual_mode% | findstr "1" >nul && (CLS)
6467
Color %color_code%
6568
Set count=0
@@ -71,14 +74,16 @@ For /f %%f in ('dir "%directory%" /b /s') do set /a count+=1
7174
CLS
7275
Color %color_code%
7376
Echo %timeout% | findstr %timeout_max% >nul && (goto Error-TimedOut) || (Echo Attempt %timeout%/%timeout_max% till Timeout...)
77+
Echo %search_mode% | findstr "1" >nul && (set opp_filter=%file_video% %file_music%)
78+
Echo %search_mode% | findstr "2" >nul && (set opp_filter=%file_image% %file_music%)
79+
Echo %search_mode% | findstr "3" >nul && (set opp_filter=%file_image% %file_video%)
80+
7481
::timeout 1 >nul
7582
Set /a timeout+=1
7683
Set /a randN=%random% %% %count% +1
7784
Set listN=0
7885
For /f "tokens=1* delims=:" %%I in ('dir "%directory%" /b /s^| findstr /n /r . ^| findstr /b "%randN%"') do set filename=%%J
7986

80-
if %search_mode% LSS 1 (goto Error-IncorrectNum)
81-
if %search_mode% GTR 5 (goto Error-IncorrectNum)
8287
Echo %search_mode% | findstr "%search_mode%" >nul && (goto Search_Mode%search_mode%) || (goto Error-IncorrectNum)
8388

8489

@@ -96,10 +101,12 @@ goto Review
96101

97102
::Step 3
98103
:Review
99-
Echo %filename% | findstr /v "%allowed_filter%" >nul && (goto Randomizer)
100-
Echo %filename% | find /v "%file_all%" >nul && (goto Randomizer)
101-
Echo %filename% | findstr /i "%blocked_filter%" >nul && (goto Error-InvalidFile)
104+
Echo %filename% | findstr /i "%blocked_filter%" >nul && (goto Randomizer)
105+
Echo %filename% | findstr /i "%opp_filter%" >nul && (goto Randomizer)
106+
Echo %filename% | findstr /i "%allowed_filter%" >nul && (goto Present) || (goto Randomizer)
107+
Echo %filename% | find /v "%file_all%" >nul && (goto Present) || (goto Randomizer)
102108
::For /f %%A in ("%filename%") do set filesize=%%~zA
109+
:Present
103110
Start "" "%filename%"
104111

105112
::Info Pane
@@ -156,7 +163,8 @@ Color C
156163
Echo ### ERROR ###
157164
Echo Code: 400
158165
Echo.
159-
Echo Search Criteria is not Mode 1-5. CHECK CONFIG.
166+
Echo Search Mode is not Mode 1-5. CHECK CONFIG.
167+
Echo Current: %search_mode%
160168
Echo.
161169
Echo Program will close upon continuing
162170
Pause
@@ -174,18 +182,3 @@ Echo.
174182
Echo Program will close upon continuing
175183
Pause
176184
exit
177-
178-
:Error-InvalidFile
179-
CLS
180-
Color C
181-
Echo ### ERROR ###
182-
Echo Code: 403
183-
Echo.
184-
Echo Location: %filename%
185-
Echo.
186-
Echo File is an invalid type.
187-
Echo Check config for invalid file types.
188-
Echo.
189-
Echo Program will close upon continuing
190-
Pause
191-
exit

0 commit comments

Comments
 (0)