home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
HTPC Projects
Software
Tools and other software
Batch File Archive
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ixdvc" data-source="post: 1070255" data-attributes="member: 92134"><p>I use Ember Media Manager to scrape nfos and fanart for my TV shows. I also like to download clearart and clearlogos directly from fanart.tv to select the ones I like best and save them to the show folders. Then the XBMC clients are able to find them. </p><p>So I wrote a batch file to copy those cleararts and clearlogos to the MePo thumbs folder. The files have to be renamed to the show id which is read from tvshow.nfo in the show folder.</p><p></p><p>Make a backup of your current cleararts and clearlogos from </p><p>[CODE]C:\ProgramData\Team MediaPortal\MediaPortal\thumbs\ClearArt\</p><p>C:\ProgramData\Team MediaPortal\MediaPortal\thumbs\ClearLogo\</p><p>C:\ProgramData\Team MediaPortal\MediaPortal\thumbs\TVSeries\ClearArt\</p><p>C:\ProgramData\Team MediaPortal\MediaPortal\thumbs\TVSeries\ClearLogo\[/CODE]</p><p>as those are overwritten without question.</p><p>[spoiler][CODE]@echo off</p><p>set thumbspath=C:\ProgramData\Team MediaPortal\MediaPortal\thumbs</p><p></p><p>IF exist "%thumbspath%\ClearArt\Series" ( echo %thumbspath%\ClearArt\Series exists ) ELSE ( mkdir "%thumbspath%\ClearArt\Series" && echo %thumbspath%\ClearArt\Series created )</p><p>IF exist "%thumbspath%\ClearLogo\Series" ( echo %thumbspath%\ClearLogo\Series exists ) ELSE ( mkdir "%thumbspath%\ClearLogo\Series" && echo %thumbspath%\ClearLogo\Series created )</p><p>IF exist "%thumbspath%\TVSeries\ClearArt\FullSize" ( echo %thumbspath%\TVSeries\ClearArt\FullSize exists ) ELSE ( mkdir "%thumbspath%\TVSeries\ClearArt\FullSize" && echo %thumbspath%\TVSeries\ClearArt\FullSize created )</p><p>IF exist "%thumbspath%\TVSeries\ClearLogo\FullSize" ( echo %thumbspath%\TVSeries\ClearLogo\FullSize exists ) ELSE ( mkdir "%thumbspath%\TVSeries\ClearLogo\FullSize" && echo %thumbspath%\TVSeries\ClearLogo\FullSize created )</p><p></p><p>set seriesfolder=%~dp0</p><p></p><p>for /D %%G in (*) do (</p><p> pushd %%G</p><p> set series=%%G</p><p> REM if %cd%==%seriesfolder% goto :eof</p><p> call :getid</p><p>)</p><p></p><p>:getid</p><p>FOR /F "tokens=1-2 delims=<>, " %%I in (tvshow.nfo) do (</p><p> REM echo %%I</p><p> if %%I==id (</p><p> set tvshowid=%%J</p><p> goto :copying</p><p> )</p><p>)</p><p></p><p>:copying</p><p>echo ID for %series% is %tvshowid%. Copying images.</p><p>copy "clearart.png" "%thumbspath%\clearart\Series\%tvshowid%.png"</p><p>copy "logo.png" "%thumbspath%\clearlogo\Series\%tvshowid%.png"</p><p>copy "clearart.png" "%thumbspath%\TVSeries\ClearArt\FullSize\%tvshowid%.png"</p><p>copy "logo.png" "%thumbspath%\TVSeries\ClearLogo\FullSize\%tvshowid%.png"</p><p>popd</p><p></p><p>:eof</p><p>cd %~dp0[/CODE][/spoiler]</p><p>And I have another batch file to backup my local fanart (all png and jpg files from the show folder). The backup folder can be set in the second line:</p><p>[spoiler][CODE]@echo off</p><p>set backuppath=C:\fanartbkp</p><p></p><p>IF exist "%backuppath%" ( echo %backuppath% exists ) ELSE ( mkdir "%backuppath%" && echo %backuppath% created )</p><p></p><p>set seriesfolder=%~dp0</p><p></p><p>for /D %%G in (*) do (</p><p> pushd %%G</p><p> set series=%%G</p><p> REM if %cd%==%seriesfolder% goto :eof</p><p> call :copying</p><p>)</p><p></p><p>:copying</p><p>echo Copying images for %series%.</p><p>IF exist "%backuppath%\%series%\" ( echo %backuppath%\%series%\ exists ) ELSE ( mkdir "%backuppath%\%series%\" && echo %backuppath%\%series%\ created )</p><p>copy "*.png" "%backuppath%\%series%\"</p><p>copy "*.jpg" "%backuppath%\%series%\"</p><p>popd</p><p></p><p>:eof</p><p>cd %~dp0[/CODE][/spoiler]</p><p>Both batch files are meant to be run from your base TV show path, it should be like that:</p><p>[CODE]TV Shows</p><p>|----TV Show 1</p><p>| |--clearart.png</p><p>| |--logo.png</p><p>|----TV Show 2</p><p>| |--files</p><p>|----fanart.bat</p><p>|----fanart-backup.bat</p><p>[/CODE]</p><p>And those batch files do not like to be run from UNC paths. So your folder has to be mounted as a network drive at least temporarily.</p></blockquote><p></p>
[QUOTE="ixdvc, post: 1070255, member: 92134"] I use Ember Media Manager to scrape nfos and fanart for my TV shows. I also like to download clearart and clearlogos directly from fanart.tv to select the ones I like best and save them to the show folders. Then the XBMC clients are able to find them. So I wrote a batch file to copy those cleararts and clearlogos to the MePo thumbs folder. The files have to be renamed to the show id which is read from tvshow.nfo in the show folder. Make a backup of your current cleararts and clearlogos from [CODE]C:\ProgramData\Team MediaPortal\MediaPortal\thumbs\ClearArt\ C:\ProgramData\Team MediaPortal\MediaPortal\thumbs\ClearLogo\ C:\ProgramData\Team MediaPortal\MediaPortal\thumbs\TVSeries\ClearArt\ C:\ProgramData\Team MediaPortal\MediaPortal\thumbs\TVSeries\ClearLogo\[/CODE] as those are overwritten without question. [spoiler][CODE]@echo off set thumbspath=C:\ProgramData\Team MediaPortal\MediaPortal\thumbs IF exist "%thumbspath%\ClearArt\Series" ( echo %thumbspath%\ClearArt\Series exists ) ELSE ( mkdir "%thumbspath%\ClearArt\Series" && echo %thumbspath%\ClearArt\Series created ) IF exist "%thumbspath%\ClearLogo\Series" ( echo %thumbspath%\ClearLogo\Series exists ) ELSE ( mkdir "%thumbspath%\ClearLogo\Series" && echo %thumbspath%\ClearLogo\Series created ) IF exist "%thumbspath%\TVSeries\ClearArt\FullSize" ( echo %thumbspath%\TVSeries\ClearArt\FullSize exists ) ELSE ( mkdir "%thumbspath%\TVSeries\ClearArt\FullSize" && echo %thumbspath%\TVSeries\ClearArt\FullSize created ) IF exist "%thumbspath%\TVSeries\ClearLogo\FullSize" ( echo %thumbspath%\TVSeries\ClearLogo\FullSize exists ) ELSE ( mkdir "%thumbspath%\TVSeries\ClearLogo\FullSize" && echo %thumbspath%\TVSeries\ClearLogo\FullSize created ) set seriesfolder=%~dp0 for /D %%G in (*) do ( pushd %%G set series=%%G REM if %cd%==%seriesfolder% goto :eof call :getid ) :getid FOR /F "tokens=1-2 delims=<>, " %%I in (tvshow.nfo) do ( REM echo %%I if %%I==id ( set tvshowid=%%J goto :copying ) ) :copying echo ID for %series% is %tvshowid%. Copying images. copy "clearart.png" "%thumbspath%\clearart\Series\%tvshowid%.png" copy "logo.png" "%thumbspath%\clearlogo\Series\%tvshowid%.png" copy "clearart.png" "%thumbspath%\TVSeries\ClearArt\FullSize\%tvshowid%.png" copy "logo.png" "%thumbspath%\TVSeries\ClearLogo\FullSize\%tvshowid%.png" popd :eof cd %~dp0[/CODE][/spoiler] And I have another batch file to backup my local fanart (all png and jpg files from the show folder). The backup folder can be set in the second line: [spoiler][CODE]@echo off set backuppath=C:\fanartbkp IF exist "%backuppath%" ( echo %backuppath% exists ) ELSE ( mkdir "%backuppath%" && echo %backuppath% created ) set seriesfolder=%~dp0 for /D %%G in (*) do ( pushd %%G set series=%%G REM if %cd%==%seriesfolder% goto :eof call :copying ) :copying echo Copying images for %series%. IF exist "%backuppath%\%series%\" ( echo %backuppath%\%series%\ exists ) ELSE ( mkdir "%backuppath%\%series%\" && echo %backuppath%\%series%\ created ) copy "*.png" "%backuppath%\%series%\" copy "*.jpg" "%backuppath%\%series%\" popd :eof cd %~dp0[/CODE][/spoiler] Both batch files are meant to be run from your base TV show path, it should be like that: [CODE]TV Shows |----TV Show 1 | |--clearart.png | |--logo.png |----TV Show 2 | |--files |----fanart.bat |----fanart-backup.bat [/CODE] And those batch files do not like to be run from UNC paths. So your folder has to be mounted as a network drive at least temporarily. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
HTPC Projects
Software
Tools and other software
Batch File Archive
Contact us
RSS
Top
Bottom