|
| MC Command Line Release v0.1 | |
| | Author | Message |
---|
billyad2000 Admin
Posts : 1326 Join date : 2008-09-20
| Subject: MC Command Line Release v0.1 Sun Apr 25, 2010 8:36 pm | |
| I have not been able to get a great deal done this week due to other things, but I have managed to put together this command line utility, hopefully it will be useful for some of you. The app needs to be run from your main Media Companion folder since it needs some of the same libraries to function. Useage -m (search for new movies) -e (search for new episodes) -p (set the profile to use) -h (create a html list) mc_com.exe [-m] [-e] [-p "ProfileName"] [-h "templatename" "outputpath"] examples: mc_com.exe -m Will search for and scrape new movies - default profile mc_com.exe -e Will search for and scrape new episodes - default profile mc_com.exe -m -p "my movies" Will search for and scrape new movies using the "my movies" profile (The quotes (") are not needed unless their is a space in the profile name) mc_com.exe -m -h "basic movie template" "c:\movielist\list.html" Will search for new movies and then output a list using the named template to the named path, again, the template and path only need quotes if their are spaces in the name or path. Download MC command line v0.1Just drop the file into your MC directory and use as above, future builds of MC will have this file included.
Last edited by billyad2000 on Sun May 02, 2010 3:06 pm; edited 1 time in total | |
| | | StormyKnight VIP
Posts : 556 Join date : 2008-10-08 Location : Australia
| Subject: Re: MC Command Line Release v0.1 Mon Apr 26, 2010 6:07 am | |
| Excellent Billy! I've some information that may be of help to other uses regarding the use of batch files with mc_com.exe. The batch file below does the following things... 1. redirects the screen output to a log file (so it can be kept or viewed at a later date) 2. shows the log file upon mc_com finishing 3. adds the date & time that mc_com was initiated to the log file. - Code:
-
echo %date% > com_log.txt echo %time% >> com_log.txt mc_com.exe -m -e >> com_log.txt notepad com_log.txt Note that on each run of the batch file it erases the old log file & starts again so the previous log history is lost. If you do not want that behavior, change the '>' in the first line to a double i.e. '>>' (this means append to the txt file) This will also mean that the latest entry to the log file will be at the end of it! Cheers | |
| | | hulk81 Junior Member
Posts : 20 Join date : 2009-02-24
| Subject: Re: MC Command Line Release v0.1 Tue Apr 27, 2010 9:15 pm | |
| Hi Billy,
I've started getting this error
C:\Users\me\Media_Companion>mc_com.exe -m -e **************************************************** Loading Config
Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Andy\Media Companion gen2\Settings\moviecache.xml'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detec tEncodingFromByteOrderMarks, Int32 bufferSize) at System.IO.StreamReader..ctor(String path) at ConsoleApplication1.Module1.loadmoviecache() at ConsoleApplication1.Module1.Main() | |
| | | billyad2000 Admin
Posts : 1326 Join date : 2008-09-20
| Subject: Re: MC Command Line Release v0.1 Wed Apr 28, 2010 1:13 am | |
| - hulk81 wrote:
- Hi Billy,
I've started getting this error
C:\Users\me\Media_Companion>mc_com.exe -m -e **************************************************** Loading Config
Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Andy\Media Companion gen2\Settings\moviecache.xml'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detec tEncodingFromByteOrderMarks, Int32 bufferSize) at System.IO.StreamReader..ctor(String path) at ConsoleApplication1.Module1.loadmoviecache() at ConsoleApplication1.Module1.Main() The command line prog needs access to the same 'moviecache.xml' file as media companion, for some reason yours is missing. Using the rebuild option within the main MC program will create the file. If it is the case that you are using the command line program to add movies before MC has created the file then this would also raise the same problem, tbh I never considered this posibility when I wrote it, I'll add some checks and error handling for the next build. | |
| | | hulk81 Junior Member
Posts : 20 Join date : 2009-02-24
| Subject: Re: MC Command Line Release v0.1 Thu Apr 29, 2010 9:05 pm | |
| - billyad2000 wrote:
- hulk81 wrote:
- Hi Billy,
I've started getting this error
C:\Users\me\Media_Companion>mc_com.exe -m -e **************************************************** Loading Config
Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Andy\Media Companion gen2\Settings\moviecache.xml'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detec tEncodingFromByteOrderMarks, Int32 bufferSize) at System.IO.StreamReader..ctor(String path) at ConsoleApplication1.Module1.loadmoviecache() at ConsoleApplication1.Module1.Main() The command line prog needs access to the same 'moviecache.xml' file as media companion, for some reason yours is missing. Using the rebuild option within the main MC program will create the file.
If it is the case that you are using the command line program to add movies before MC has created the file then this would also raise the same problem, tbh I never considered this posibility when I wrote it, I'll add some checks and error handling for the next build. That solved the problem...thanks | |
| | | angeoand Junior Member
Posts : 25 Join date : 2011-03-11
| Subject: ust for fun,what style of wedding dress do you think Kate Middleton will where for her wedding? Sun May 15, 2011 8:47 am | |
| I'm so like your style.I agree to your opinion.Hoping more your better article! Pearl Ring | |
| | | Sponsored content
| Subject: Re: MC Command Line Release v0.1 | |
| |
| | | | MC Command Line Release v0.1 | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| |