Fratopolis 63 Posted January 22, 2018 Posted January 22, 2018 (edited) Ok, this has been asked numerous times I know but cannot seem to make it work. I want to make my scans faster and I am finally ready to move each movie into it's own folder instead of one big folder. I have all my metadata not stored with the movies but its own folder. When I tested it I ran this which creates a folder name exactly like each file name without the ext then moves all files with the same name into the new folders for %i in (*) do mkdir "%~ni" for %i in (*) do move "%i" "%~ni" Problem is I had to undo this because all my watched status went away. Is it possible to do this or do I just need to start all over at which point I will just leave it as is. Edited January 22, 2018 by Fratopolis
Fratopolis 63 Posted January 22, 2018 Author Posted January 22, 2018 Starting to think I'm gonna have to start over. Sounds like a next month problem lol
kanipek 230 Posted January 22, 2018 Posted January 22, 2018 Did you look at your existing metadata? Do the files still match name wise? I have never stored metadata separately from the media - so this is just an idea there might be something in the metadata pointing to the old file name(s)/location(s). If that works out to be the case then you will need to change that info in the metadata files - nfo or otherwise If you are storing artwork paths in the metadata file those will need to be modified to reflect the new location(s) You can do this with a decent editor notepad++, UltraEdit or similar. Or you can start from scratch... 1
Fratopolis 63 Posted January 23, 2018 Author Posted January 23, 2018 Too many files to go through. I need to start over and put the atrwork and everything into the media folders once I'm done. Ughhhhh. Thanks for the help though.
Bert 49 Posted January 23, 2018 Posted January 23, 2018 Couldn't you do a backup and then run your script and restore from backup?
PenkethBoy 2068 Posted January 23, 2018 Posted January 23, 2018 I just tried this with a test directory and it does maintain the watched status if you move the movies into subdirectories i ensured Emby had the movies in question in the movie library manually set their watched status shut down emby (probably not necessary) and moved the movies into sub folder named with the movie name ran up emby - did a library scan and the films re appeared in the movie library with their watched status set to watched IIRC Emby tracks the movie TVMovieDB id rather than the "name" for the watched status Did you run a library scan after you moved your movies? Also FWIW this is the commands i use - put them into a bat file and run it in your movie folder REM Loop on likely video formats FOR %%m in (*.mkv *.mp4) do ( REM Make directory for movie based on name mkdir "%%~nm" REM Move All files to relavent sub directory move "%%~nm"*.* "%%~nm" REM Rename -poster.jpg to poster.jpg rename "%%~nm"\*-poster.jpg poster.jpg REM Rename -landscape.jpg to landscape.jpg rename "%%~nm"\*-landscape.jpg landscape.jpg REM Rename -logo.jpg to logo.jpg rename "%%~nm"\*-logo.jpg logo.jpg REM Rename -fanart.jpg to fanart.jpg rename "%%~nm"\*-fanart.jpg fanart.jpg ) echo Finished! Note you need %% inside bat files rather than just % when at the command line
Fratopolis 63 Posted January 23, 2018 Author Posted January 23, 2018 Did you library scan go faster once the movies were not all in one directory?
PenkethBoy 2068 Posted January 24, 2018 Posted January 24, 2018 i moved all my movies to separate folders many months ago so dont have direct comparison - more an organisation thing - several updates in scan speed by Luke since anyway also an absolute time is only relevant to the size of your library having said that i have two servers looking at the same media (one a copy) ones on a QNAP Nas with a Celeron - ~70 seconds ones on a i7 (4790s - slightly slower than your Win10) 2012r2 ~ 30 seconds those times are for ~275 movies and 3600 TV episodes plus music,music videos, lots of podcasts etc(actually all in the same folder but set as home video which has different metadata rules) and they are consistent between one scan and the next. Before you do all you media i would do a test with say a 100 movies in a test library and see what it does to you times pre and post - might be better to do it with a test server if you want to set one up Good Luck
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now