Command Line to reload database
#1
I just started playing with the command line options and I was wondering if there is a way to reload the database? I can update no problem and download what I need no problem, but I NEED to do a database reload.
Reply
#2
or better yet if that's not possible, could I manually delete the movie database file, trigger an update via cmd line and have it regenerate a new database file?
Reply
#3
(2014-09-07, 08:51)Fail$tyle420 Wrote: or better yet if that's not possible, could I manually delete the movie database file, trigger an update via cmd line and have it regenerate a new database file?
I will look into this after I'm home from work and report back here Smile
Reply
#4
I actually figured it out last night, but thank you Cocotus! Install Directory\settings\MyVideos2.emm Deleting the file wipes the database, allowing me to do a fresh scan. I will post my batch commands and process later to show a truely automated system of bringing new media with all of the artwork associated into kodi.
Reply
#5
Glad that you figured a way out - so you needed a way to delete the current movie database? May I ask why? Is it because there were outdated entrys in there?
Reply
#6
Well actually, what I'm doing is using 2 computers to setup my collection. Computer A is my HTPC and computer B is my downloading/converting/prepping computer.
Computer B does all of my nfo/artwork grabbing and then moves the files over the lan to computer A. Basically, I set it up this way because the wife likes to enjoy watching movies, not enjoy watching me play with kodi. So, computer B takes my downloaded/converted folder full of movies and processes them via filebot, ember and tinymediamanager from command line.

I've tested numerous "problematic" movie titles to scrape nfo/artwork using all 3 programs and so far the program that gives me the least wrong movie scrapes is filebot (actually tinymediamanager, but because it defaults to nothing when multiple titles are found that makes it the worst in my scenario).

Filebot:
1. Rename movie and folder to "Movie Title (Movie Year)"
2. Download .nfo file and .srt subtitle
(I hate the way filebot saves .nfo, very unfriendly towards editing, although it has all the pertinent information)

Tinymediamanager:
1. Scrape new nfo
2. Scrape ALL artwork
(Scraping the nfo saves it in a more standard, editable way and gives me extra info that filebot doesn't retrieve.)

Embermediamanager:
1. Scrape HD versions of clearart and clearlogo if available.

Filebot then moves the processed movies into a "complete" folder and copies the log file into this "complete" folder for me.

So, back to the "problematic" scraping of movies.....if I were to scrape these "problematic" movies with ember, it will give me the wrong movie. If I scrape with tiny, it will give me the wrong movie or it will default to nothing, as it needs user input to choose the correct movie(usually with remakes). When I scrape with filebot, I would say a good 95% of the movies are correct. So if filebot scrapes the correct nfo, then ember and tiny can use that nfo to grab the correct movie and download all appropriate artwork. This has worked everytime with the exception of 1 movie so far, thus the reason for copying the log file of filebot so I can double check that it did scrape the correct movie. With that 1 movie, I can manually run tiny and ember media managers to get the correct info.


(2014-09-09, 20:20)Cocotus Wrote: Glad that you figured a way out - so you needed a way to delete the current movie database? May I ask why? Is it because there were outdated entrys in there?

Now that I have all the info and associated artwork I can move these files to computer A (HTPC with Kodi). After I move those files off of computer B, they still stay in my database files for ember and tiny. When I go to scrape new movies by command line it downloads all new medias' files, but ALSO downloads what was already in my database, even though I moved the movies off of the computer. I needed a way to use command line to reload database or just delete the database at the end of scraping everything so I don't end up redownloading artwork, nfo etc etc etc. I realise that I'm using 3 programs to basically do the same thing, but because of my OCD, everything has to be "perfect" and uniform.

Here is my AutoMC.cmd file:

Code:
filebot -script fn:amc --output "C:/Users/Aylanora/Desktop/WIP" --log-file amc.log --action move -non-strict "C:/Users/Aylanora/Videos" --def subtitles=en --def artwork=y --def clean=y --def unsorted=y
filebot -script fn:replace --def "e=.eng.srt" "r=.srt" "C:/Users/Aylanora/Desktop/WIP/Movies"
cd "C:\Users\Aylanora\AppData\Roaming\tinyMediaManager\"
tinyMediaManagerCMD.exe -update -ScrapeNew
cd "C:\Program Files (x86)\Ember Media Manager BETA"
"ember media manager.exe" -fullauto -all -nowindow
del /S /Q "C:\Users\Aylanora\AppData\Roaming\tinyMediaManager\tmm.odb"
del /S /Q "C:\Program Files (x86)\Ember Media Manager BETA\Settings\MyVideos2.emm"
MOVE "C:\Users\Aylanora\AppData\Roaming\FileBot\logs\amc.log" "C:\Users\Aylanora\Desktop\WIP\Movies\log.log"
Reply
#7
Very nice! Thanks for posting! I might actually copy that setup and give filebot a try, looks promising! One question: How does movie matching of filebot work? Is it trying to read IMDB from a nfo file? Just wondering Smile
Reply
#8
it scrapes imdb or tmdb, I believe it's tmdb, but not sure. PM me and we can talk if you have questions. Once I have my entire routine I'll share it. To be honest, even if you don't use filebot to scrape and only use it to rename, it works absolute wonders for renaming tv shows! Renamed an entire collection of about 1,900 episodes and it did not miss a single one!

In all fairness I haven't used ember's renamer yet though Sad
Reply
#9
Update:
I realized on a few of the movies that I scraped automatically using these scripts weren't downloading things using ember. I opened ember to change my source as I was messing around with the scripts and I noticed that the sources was missing....thus the reason why these items weren't downloading. *EDIT* The sources was deleted when deleting the database, tinymediamanager didn't delete sources when deleting their database, so I assumed the same was for ember....obviously wrong *EDIT* I had just assumed nobody uploaded anything yet on fanart.tv. So, I created a new source with NO movies in it, went to the install\settings\ folder and made a copy of the MyVideos2.emm file. Now I just copy that file in right before doing a scan with ember and it works, detects the source folder and downloaded everything I need. LOL, such a pain in the ass

Code:
copy "C:\Users\Aylanora\Desktop\WIP\Tweaks\MyVideos2.emm" "C:\Program Files (x86)\Ember Media Manager BETA\Settings\MyVideos2.emm"

So, here is my updated automc.bat
Code:
filebot -script fn:amc --output "C:/Users/Aylanora/Desktop/Complete" --log-file amc.log --action move -non-strict "C:/Users/Aylanora/downloads" --def subtitles=en --def artwork=y --def clean=y --def unsorted=y
filebot -script fn:replace --def "e=.eng.srt" "r=.srt" "C:/Users/Aylanora/Desktop/Complete/Movies"
del /S /Q "C:\Users\Aylanora\AppData\Roaming\tinyMediaManager\tmm.odb"
del /S /Q "C:\Program Files (x86)\Ember Media Manager BETA\Settings\MyVideos2.emm"
copy "C:\Users\Aylanora\Desktop\WIP\Tweaks\MyVideos2.emm" "C:\Program Files (x86)\Ember Media Manager BETA\Settings\MyVideos2.emm"
cd "C:\Users\Aylanora\AppData\Roaming\tinyMediaManager\"
tinyMediaManagerCMD.exe -update -ScrapeNew
cd "C:\Program Files (x86)\Ember Media Manager BETA"
"ember media manager.exe" -fullauto -all -nowindow
del /S /Q "C:\Users\Aylanora\AppData\Roaming\tinyMediaManager\tmm.odb"
del /S /Q "C:\Program Files (x86)\Ember Media Manager BETA\Settings\MyVideos2.emm"
MOVE "C:\Users\Aylanora\AppData\Roaming\FileBot\logs\amc.log" "C:\Users\Aylanora\Desktop\Complete\Movies\log.log"
cd "C:\Users\Aylanora\Desktop\Complete\Movies\"
del /S /Q *folder.jpg
Reply



Logout Mark Read Team Forum Stats Members Help
Command Line to reload database0
This forum uses Lukasz Tkacz MyBB addons.