Media Companion

Discussion and development board for the program Media Companion.
 
HomeHome  FAQFAQ  SearchSearch  RegisterRegister  Log inLog in  

Share | 
 

 MC Command Line Release v0.1

View previous topic View next topic Go down 
AuthorMessage
billyad2000
Admin
avatar

Posts : 1326
Join date : 2008-09-20

PostSubject: 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.1

Just drop the file into your MC directory and use as above, future builds of MC will have this file included.

_________________
Do you have a problem with Media Companion, before posting a bug then please check you have the very latest version of Media Companion http://billyad2000.darkbb.com/announcements-f1/


Last edited by billyad2000 on Sun May 02, 2010 3:06 pm; edited 1 time in total
Back to top Go down
View user profile http://billyad2000.co.uk
StormyKnight
VIP
VIP


Posts : 556
Join date : 2008-10-08
Location : Australia

PostSubject: 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
Back to top Go down
View user profile
hulk81
Junior Member
Junior Member
avatar

Posts : 20
Join date : 2009-02-24

PostSubject: 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()
Back to top Go down
View user profile
billyad2000
Admin
avatar

Posts : 1326
Join date : 2008-09-20

PostSubject: 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.

_________________
Do you have a problem with Media Companion, before posting a bug then please check you have the very latest version of Media Companion http://billyad2000.darkbb.com/announcements-f1/
Back to top Go down
View user profile http://billyad2000.co.uk
hulk81
Junior Member
Junior Member
avatar

Posts : 20
Join date : 2009-02-24

PostSubject: 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
Back to top Go down
View user profile
angeoand
Junior Member
Junior Member


Posts : 25
Join date : 2011-03-11

PostSubject: 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

Rolling Eyes Rolling Eyes I'm so like your style.I agree to your opinion.Hoping
more your better article!Pearl Ring
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: MC Command Line Release v0.1   

Back to top Go down
 
MC Command Line Release v0.1
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Running Selenium Test cases as JUnit tests using Command Line
» Selenium server command options while starting server.
» TestNG / Ant Help
» Shortcut to run test case with selenium ide
» [HOW TO] Integrate .Net Framework 3.5 in Windows 8 using WinReducer 8 or command line

Permissions in this forum:You cannot reply to topics in this forum
Media Companion :: Media Companion :: Announcements-
Jump to: