Welcome to Media Center Master!
A powerful solution for mastering your digital media library.
Supporting Emby, Kodi/XBMC/OSMC, Plex, Windows Media Center, and more!

Home Download Gallery Wiki Issue Tracker Licensing Forums

   FAQ  •  Search •  Login •  Register     
It is currently August 16th, 2018, 11:27 am

All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 67 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject: Re: Automatically add your media to iTunes
PostPosted: November 11th, 2013, 12:54 am 
Offline
DVD VOB

Joined: November 4th, 2012, 4:15 am
Posts: 97
Hi

This is the section where the script gets the metadata:
elseif theMediaType = "TV Show" then
if objFSO.FileExists(objFSO.GetParentFolderName(theFile) & "\metadata\" & objFSO.GetBaseName(theFile) & ".xml") then
xmlDoc.load(objFSO.GetParentFolderName(theFile) & "\metadata\" & objFSO.GetBaseName(theFile) & ".xml")
theDescription = xmlDoc.GetElementsByTagName("Overview").item(0).text
elseif objFSO.FileExists(objFSO.GetParentFolderName(theFile) & "\" & objFSO.GetBaseName(theFile) & ".nfo") then
xmlDoc.load(objFSO.GetParentFolderName(theFile) & "\" & objFSO.GetBaseName(theFile) & ".nfo")
theDescription = xmlDoc.GetElementsByTagName("plot").item(0).text
end If

else


Essentially the script reads the xml file in the season folder\metadata\ and populates "thedescription" from there.

When the script runs can you see the text in MCM's log window like -
:: "C:\Program Files (x86)\Media Center Master\AtomicParsley.exe" "E:\Series\Downton Abbey\Season 4\Downton Abbey - S04E08 - Episode 8.m4v" --stik "TV Show" --title "Episode 8" --year "2013-11-10" --artist "Downton Abbey" --TVShowName "Downton Abbey" --albumArtist "Downton Abbey" --TVSeasonNum 4 --disk 4 --TVEpisodeNum 8 --tracknum 8 --TVEpisode "Downton Abbey - S04E08 - Episode 8" --album "Downton Abbey, Season 4" --artwork "E:\Series\Downton Abbey\Season 4\folder.jpg" --description "Rosamund comes up with a plan to help Edith deal with her problem, but Violet may be about to see right through it. Isobel is the object of someone's attention, while Mary asks Gillingham for a favour. Rose is frustrated when things do not go her way..." --longdesc "Rosamund comes up with a plan to help Edith deal with her problem, but Violet may be about to see right through it. Isobel is the object of someone's attention, while Mary asks Gillingham for a favour. Rose is frustrated when things do not go her way and Alfred realises too late that he may have made a mistake. Just as Bates and Anna seem to be getting over the worst, some unexpected news shakes her up." --comment "Details added 11/11/2013 by addToiTunes - developed by Darren Blackley." --overWrite


That will show you that the script has picked up the correct details and passed them to atomic parsley to inject them into the file.

A really useful tool to see if the "final" m4v that you have all the info, and the folder.jpg, into the file is http://www.mp3tag.de/en/index.html

I hope this helps.

Regards

MikeP


 Profile  
 Post subject: Re: Automatically add your media to iTunes
PostPosted: November 11th, 2013, 12:20 pm 
Offline
Xvid Movie

Joined: February 19th, 2013, 7:30 pm
Posts: 30
Location: Sechelt, Canada
yes thanks that clears it up a bit. how does MCM tell the script if it is a tv show or movie, becuase it seems like it doesn't even start to detect if its a tv show or movie. And can I edit the script or can you make 2 different ones 1 for TV and One for Movies as I use different encoding rules for tv and movies. every time i try to take out tv or movies part it kills it.
Also is there a way where I can make it pause after each step so I can see where it is crapping out. I would also like to inject the mpaa rating for the movie and show.


 Profile  
 Post subject: Re: Automatically add your media to iTunes
PostPosted: November 12th, 2013, 12:36 am 
Offline
DVD VOB

Joined: November 4th, 2012, 4:15 am
Posts: 97
Hi

Yes - you can have two different scripts for movies and series.

1. Just copy the addToItunes.cmd file to addToItunes_Series.cmd and addToItunes_movies.cmd.
2. Copy the addToItunes.vbs file to addToItunes_Series.vbs and addToItunes_movies.vbs
3. Edit the addToItunes_Series.cmd to call the addToItunes_Series.vbs
4. Edit the addToItunes_movies.cmd to call the addToItunes_movies.vbs
5. In MCM - Settings - Post Processing change the cmd files tha are called to addToItunes_Series.cmd for the series box and addToItunes_movies.cmd for the movie box.
6. Leave the other parameters that are passed on the same (%V %S %T %Y for movies and %V %S %T %AD %ET %SE %EP %SE2 %EP2 for series)

Now all you need to do is edit the respective files to change the "conversion parameters" to suit your needs.

My suggestion is that you leave everything the same in both files and just focus on the "convertfile" routine - changing those parameters to reflect your conversion needs.

To answer your question as to how the Script knows if its a movie for series - and thus knows what to do - look at the part of the script that says -
if LCase(WScript.Arguments(1)) = "episode" then ' check if TV show or Movie and set the media type
theMediaType = "TV Show"
else
theMediaType = "Movie"
end if


What that does is look at the %S parameter that is passed on from MCM - and the %S - tells it if it is a movie or a series. If you look at the settings in MCM you can see what information each parameter contains.

In Terms of debugging - I know of no way of stepping through the script but would love to ! You can try unticking the "hide" in MCM - which may enable you to see the full command line passed onto to the scripter which may help you.

I hope this gets you a little closer :-)

Regards

MikeP


 Profile  
 Post subject: Re: Automatically add your media to iTunes
PostPosted: November 12th, 2013, 6:43 pm 
Offline
Xvid Movie

Joined: February 19th, 2013, 7:30 pm
Posts: 30
Location: Sechelt, Canada
OK I am doing the happy dance. I have had it setup with 2 separate scripts for awhile but could not get the meta data to inject for the life of me. now after messing around ( not sure what I did) but the meta data is working I am sooooo happy. thanks for the help.
can you post the correct procedure to get the scripts to add the mpaa rating to the tv or movie video file. so i can do a copy paste or send me a updated version with this. I am so close thanks agian. oh man I am excited. :)


 Profile  
 Post subject: Re: Automatically add your media to iTunes
PostPosted: November 12th, 2013, 6:48 pm 
Offline
Xvid Movie

Joined: February 19th, 2013, 7:30 pm
Posts: 30
Location: Sechelt, Canada
whats the difference between t.v show post-processing and t.v. Episode post-processing


 Profile  
 Post subject: Re: Automatically add your media to iTunes
PostPosted: November 13th, 2013, 1:10 am 
Offline
Developer/Owner
User avatar

Joined: May 1st, 2009, 10:12 am
Posts: 11544
Location: Meridian, ID, USA
jjlavery wrote:
whats the difference between t.v show post-processing and t.v. Episode post-processing

T.V. show post-processing will occur once the entire show has been fetched and any arguments passed to the post-processing program/script will be relative to the base show.

T.V. episode post-processing will occur for every episode as they are fetched and any arguments passed to the post-processing program/script will be relative to the specific episode.

_________________
Peter Souza IV
stable version 2.18.13818.935 / May 18th, 2018
Media Center Master on Facebook!


 Profile  
 Post subject: Re: Automatically add your media to iTunes
PostPosted: November 13th, 2013, 10:25 am 
Offline
Xvid Movie

Joined: February 19th, 2013, 7:30 pm
Posts: 30
Location: Sechelt, Canada
Can you post the correct procedure to get the scripts to add the mpaa rating to the tv or movie video file. so i can do a copy paste or post an updated version with this. please and thanks


 Profile  
 Post subject: Re: Automatically add your media to iTunes
PostPosted: November 13th, 2013, 12:09 pm 
Offline
DVD VOB

Joined: November 4th, 2012, 4:15 am
Posts: 97
Hi

I did have a very amateurish look and can see where to get the MPAA rating from the movie.xml file (just focusing on movies) but where do you want to "put it" in the m4v file ?

I tried to pop it into ratings but i couldn't see it appear in iTunes.

As far as the series / show is concerned I couldn't see a MPAA in the show.xml file - only in the series xml file - and reading that will require too much FileSystem Object manipulation for an dunce like me.

If you are interested I tried the following:

1. Declare/ Dim the variable theRating
2. For a movie get theRating from "theRating = xmlDoc.GetElementsByTagName("MPAARating").item(0).text"
3. Add the variable into the atomic parsleys command line by
if not theRating = "" then
aCommand = aCommand & " --rating " & Q2 & theRating & Q2
end if


and that should do it. But how to see it in Itunes ?

Thanks

MikeP


 Profile  
 Post subject: Re: Automatically add your media to iTunes
PostPosted: November 13th, 2013, 12:36 pm 
Offline
Xvid Movie

Joined: February 19th, 2013, 7:30 pm
Posts: 30
Location: Sechelt, Canada
ok I will give it a try thanks..
ya for TV it is in the tvshow.nfo file


 Profile  
 Post subject: Re: Automatically add your media to iTunes
PostPosted: January 4th, 2014, 12:47 pm 
Offline
Xvid Movie

Joined: February 19th, 2013, 7:30 pm
Posts: 30
Location: Sechelt, Canada
can someone help me make the addtoitunes.vbs automatically add the content rating to the itunes video file. I gave it a go and I don't really know what I am doing. if someone could do it and then i can copy and paste would be awesome.


 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 67 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group



Copyright © 2009-2018, Media Center Master, Inc. All rights reserved.