WTV file renaming, moving and Comm skipping
Home › Forums › Windows Media Center › WTV file renaming, moving and Comm skipping
- This topic has 12 replies, 3 voices, and was last updated 12 years, 9 months ago by Muddytoy.
-
AuthorPosts
-
March 12, 2012 at 8:43 pm #26571
For about 2 years I have been playing with windows media center and found all of the cool tools and add-ons. That’s not to say that I have been able to use them as effectively as others. My latest endeavor has me using two HTPC’s and the attached powershell script moving the renamed WTV files to my WHS. After doing this. I noticed that the automatic file/directory watching no longer works for commercial skipping. Since I was able to force showanalyzer to run through its GUI (by doing a “folder scan”), I thought I could use a command line script or batch file and schedule it to run. So I found the thread :
http://www.missingremote.com/forums/how-do-i-schedule-showanalyzer-process-directory
which also lead me to:
http://www.missingremote.com/forums/show-analyzer-nightly-task#comment-41235
The simple methods in the former didn’t work for me (Stopping and starting the services didn’t trigger the analyzer to scan). I was hoping to avoid looking at complex batch files (though I have learned much from Andy). I thought the second post would be a help. It too has some complex batch file programming.
Since I already have my PS script for moving the renamed files, does anyone have some suggestions for appending my script to force showanalyzer to process the new shows after they are moved? .. and I just remembered that since the script runs from the server, it cannot also run SA (SA doesn’t run on WHS). So I need a stand alone script that would run from one of my two HTPC’s that scan the new files on the server.
Other info that one may want to know:
The PS script is a scheduled task on my server that runs every night. It moves files from two HTPCs into a shared/common folder on the server.
The shows are renamed and place in their respective sub-folders.
Ultimately, I want to convert from WTV to MP4 (using MCEBuddy, because it is simpler than DVRMSToolbox). As most of what I have read the perfect automatic comm skip is more difficult than finding the Holy Grail.
Thanks for reading my blather.
March 12, 2012 at 9:30 pm #32275mikinhoSo if I read your post properly you want the below. Is that correct?
A– Your script to run on your WHS that moves files to from your HTPC.
B– After step A finishes have SA launched on your HTPC pointing at your WHS share?
If that is correct I have two suggestions:
1- Don’t run your initial script to move files from your WHS. Have it run on HTPC. That could be step #1 of your Scheduled Task and step #2 could be either Andy’s or my script.
2- Keep it as is and use my script on your HTPC but pointing at your WHS share. You can add a step to your Scheduled Task from step A that triggers a Scheduled Task on your HTPC (there is a command line for it: SCHTASKS /Run /S HTPC /U <user> /P <password> /I /TN “Run ShowAnalyzer”)
If either of sound right to you I can modify my script to let you specify a path rather than use the default “Recorded TV” path
March 13, 2012 at 3:43 pm #32276MuddytoyMichael,
Thank you for such a prompt reply. I think you understand my intent well enough. I appreciate the suggestions and offer to edit your own script.
When I get some more time, I will delve into your script and/or Andy’s. Since my rename and move script is working fine, all I need to do is schedule a task on the HTPC to force SA to run. It should be simple, I just need to glean info from how you and others have attacked the task (always more than one way to skin the proverbial cat on the computer).
Thanks again.
March 14, 2012 at 4:39 am #32277MuddytoyThis thing is not letting me re-post.. flagging me as spam and then saying too many repeated posts…
What I need is a stand alone script that will run from the HTPC and scan the folder on the server along with the subfolders. I could not tell if your original script would scan subfolders. from this code:
FOR %%I IN (*.wtv) DO IF NOT EXIST “%%~nI.xml” IF NOT EXIST “%%~nI.log” (
ECHO %%~nI>>%~n0.log
“%__ProgamFiles%Dragon GlobalShowAnalyzerSuiteShowAnalyzer.exe” “%%~fI”
)
I don’t mind hard coding the server path as long as each shows sub folder is scanned. (Screen shot attached). You will also notice that the xml files are on the server in their own folder. these locations work for watching and auto-skipping, just not auto scanning.
Thanks again.
March 14, 2012 at 5:15 am #32278mikinhoYou won’t get marked as spam anymore.
I’ll attached an updated script for you. Simple change to do subfolders (FOR /R %%I…)
The screenshot didn’t get through though. Can you post and I’ll add to the script for you or leave as variables so you can adjust.
March 15, 2012 at 2:44 am #32279Muddytoyhere’s the Screen shot
March 15, 2012 at 2:55 am #32280babgvant[quote=Muddytoy]
After doing this. I noticed that the automatic file/directory watching no longer works for commercial skipping. [/quote]
What about it doesn’t work?
Recent versions of the DTB FW will examine files in watch directories for missing commercial span definitions (edl or xml depending on config). If they are missing it will queue up the files for processing. I know of at least one user who does something similar to what you’re attempting that stops the FW service before moving files then starts it again afterwards.
March 15, 2012 at 4:32 pm #32281Muddytoy[quote=babgvant]
[quote=Muddytoy]
After doing this. I noticed that the automatic file/directory watching no longer works for commercial skipping. [/quote]
What about it doesn’t work?
Recent versions of the DTB FW will examine files in watch directories for missing commercial span definitions (edl or xml depending on config). If they are missing it will queue up the files for processing. I know of at least one user who does something similar to what you’re attempting that stops the FW service before moving files then starts it again afterwards.
[/quote]
Andy,
Thanks for jumping in on this. If I understand you, my simplest way is to stop the FW service at 1 AM, move the files at 2 AM, and then restart the FW service at 3 AM and all should be well.
I feel like such a noob for having to ask (but I am at work and don’t have time now to search), but how do you schedule a task to start then stop a service? I assume it can be done from withing the task scheduler?
Thank you much.
March 15, 2012 at 4:56 pm #32282babgvantIncorporate the service start/stop in your script.
“net stop dtbfwservice”
copy files
“net start dtbfwservice”
March 16, 2012 at 3:47 am #32289Muddytoy[quote=babgvant]
Incorporate the service start/stop in your script.
“net stop dtbfwservice”
copy files
“net start dtbfwservice”
[/quote]
Andy,
Thanks for the command line. I will have to write a separate script to start and stop, my move script actually runs from the server and pulls from two separate HTPC’s. That’s not a problem. What is another issue is that the FW service is not running under windows services. It IS listed, set to automatically run, but not actually running… very odd. I will do a reinstall later to see if that clears up.
I took some time to poke around and found the WTV-Renamer script from one of the posts listed above. After my head stopped spinning, I was able to see that it doesn’t use the “Toub.dll” to extract show and episode names for comparison. If you look at my renaming script you will see that I am using Steve’s DLL to extract the names and dates for the new file names. Am I working with stone tools while everyone else has iron? Since I can’t figure out how WTV-Renamer is extracting the info, (for now) I will keep using what works.
Most of that is a side note. I will follow up after the reinstall and testing to see if I’m good to go.
My hat’s off to you guys for being so helpful and well versed in this stuff.
March 16, 2012 at 1:26 pm #32291babgvantOnce you get to a certain point with building Goldberg machines switching over to DTB profiles/actions is usually the most effective way to get things done. There’s very little that it can’t do, but as you note the learning curve can be a bit prohibitive.
If you outline all of the steps in your workflow concisely I can help create a profile for you.
March 16, 2012 at 4:09 pm #32295Muddytoy[quote=babgvant]
Once you get to a certain point with building Goldberg machines switching over to DTB profiles/actions is usually the most effective way to get things done. There’s very little that it can’t do, but as you note the learning curve can be a bit prohibitive.
If you outline all of the steps in your workflow concisely I can help create a profile for you.
[/quote]
LMAO.. I had to Google “Goldberg Machines”. Wiki says:
A Rube Goldberg machine, contraption, invention, device, or apparatus is a deliberately over-engineered or overdone machine that performs a very simple task in a very complex fashion, usually including a chain reaction. The expression is named after American cartoonist and inventor Rube Goldberg (1883-1970)
Sad that he dies the same year I was born… Anyway. I’ll followup soon.
March 16, 2012 at 8:20 pm #32298MuddytoyReinstall of toolbox and SA did not reset the programs to default settings. I do not know what I changed that is killing the auto file watching. Stopping and restarting the services is still not forcing SA to search the watched folder. I think I need to run a variation of Michael’s script. Will try to work on it over the weekend.
I’m almost ready to set up a bot to DL my favorite shows, but that is a whole other can of worms.
-
AuthorPosts
- You must be logged in to reply to this topic.