-
Notifications
You must be signed in to change notification settings - Fork 1
/
filebot_movies_tvshows.bat
58 lines (42 loc) · 1.24 KB
/
filebot_movies_tvshows.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@echo off
rem get subtitles for movies and tvshows
rem set variables
set moviepath=
set tvshowpath=
set fb_path=C:\Program Files\FileBot\filebot.exe
set cwd=%CD%
set video_type_list=avi,mkv,mp4,wmv,mpg,vob
rem description
echo ..FileBot Movie and TV Show Scanner...
rem move to the movie folder
rem echo Changing to ..[%moviepath%]
cd %moviepath%
rem begin loop
for /D %%i in (*) do (
rem get subtitles
echo ..[%%i]
"%fb_path%" -get-subtitles "%moviepath%\%%i" --q "%%i" --lang en --output srt --encoding utf8 -non-strict >nul 2>&1
"%fb_path%" -script fn:artwork.tmdb "%moviepath%\%%i" >nul 2>&1
)
rem end loop
echo.
rem move to the tvshows folder
echo Changing to ..[%tvshowpath%]
cd %tvshowpath%
rem begin loop of videotypes
FOR /D %%A IN (%video_type_list%) DO (
rem check for different video types
rem echo Scanning for ..[%%A]
rem begin loop for files of x-type
For /R %tvshowpath% %%B IN (*.%%A) do (
echo %%~nxB
"%fb_path%" -get-subtitles "%%B" --q "%%~nxB" --lang en --output srt --encoding utf8 -non-strict >nul 2>&1
"%fb_path%" -script fn:artwork.tmdb "%%B" >nul 2>&1
)
rem echo .
rem end loop for files of x-type
)
rem end loop of videotypes
rem end of file change back
rem echo Returning to ..[%cwd%]
cd %cwd%