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 December 18th, 2017, 12:37 pm

All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 67 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next
Author Message
 Post subject: Automatically add your media to iTunes  [SOLVED]
PostPosted: November 24th, 2012, 6:50 am 
Offline
Community Support
User avatar

Joined: May 9th, 2009, 8:40 pm
Posts: 94
Location: Perth, Western Australia
This guide is provided to help you setup your Media Center Master to automatically inject metadata in your media and add your Movie and TV Shows to iTunes (and if required automatically convert them to iTunes compatible format).

Below you will find a new script I have developed that will do the following;
1. Check if the media is iTunes compatible - m4v or mp4 and if not will convert it to m4v and rename the original media file to title.bak.
2. Inject metadata found in the same folder as the media file - movie.xml, title.nfo - if movie and the title.xml or title.nfo are looked for if tv episode. Additionally if folder.jpg is available, this will also be injected. So when completed the following metadata is added - Title, Cover, the Year of release (for movies) or the air date (for tv episodes), Short & Long Description/Synopsis, and for TV Episodes, you will also have the season number and episode number.
3. Add the new compatible (metadata embedded) file to iTunes.

Ok now for the good stuff - setting it all up. You will need the following free tools;
1. HandbrakeCLI for windows - http://handbrake.fr/downloads2.php (to convert to m4v)
2. AtomicParsley for Windows - https://bitbucket.org/jonhedgerows/atomicparsley/downloads (to inject the metadata directly)
3. AddToiTunes.vbs & AddToiTunes.cmd - https://docs.google.com/open?id=0B3Vplp587xeic1h1SjVJeUNrWGM

Save all files - AddToiTunes.vbs, AddToiTunes.cmd, HandbrakeCLI.exe & AtomicParsley.exe to the MCM folder (C:\Program Files (x86)\Media Center Master - for x64 or C:\Program Files\Media Center Master for x86)

If you are running x86, then you will need to update the AddToiTunes.vbs file. Open the file and search for;
Code:
' change this to suit where the tools are installed
toolsPath = "C:\Program Files (x86)\Media Center Master\"
and replace with
Code:
' change this to suit where the tools are installed
toolsPath = "C:\Program Files\Media Center Master\"

Once you have these 3 files, you will need to configure MCM to use them. Open MCM and configure the post-processing configuration as seen in the image below.
To make life easier you can copy and past the details from here:
Code:
Enable movie post-processing
C:\Program Files (x86)\Media Center Master\addToItunes.cmd
%V %S %T %Y
Code:
Enable TV episode post-processing
C:\Program Files (x86)\Media Center Master\addToItunes.cmd
%V %S %T %AD %ET %SE %EP %SE2 %EP2

Attachment:
mcmpostprocessingcfg.jpg
mcmpostprocessingcfg.jpg [ 97.77 KiB | Viewed 5924 times ]


Ok MCM will now automatically process all new media with this post-processing script and add you media to itunes.

Now if you are like me you will want to have a single copy of your media library right? right! Did you know iTunes by default will import all media into the iTunes media folder - thus duplicating your media. If you want to use links to your library location rather than importing (duplicating) the media then simple turn off the "Copy files to iTunes Media folder when adding to library" option in iTunes - see image below.
Image
That's it! your done. Enjoy your media library now also available in iTunes :D

Tip!: If you want to add media that you already have in your library, simply selection a title and right click and select "Run post-processing"Image
I have tested this script with over 300 files successfully, however there still may be some bugs that need to be addressed. Please report any issues in this thread.

Enjoy!

_________________
Cheers,
Darren


 Profile  
 Post subject: Re: [Guide] Automatically add your media to iTunes
PostPosted: January 3rd, 2013, 5:34 am 
Offline
DVD VOB

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

Thanks for a fantastic script - it really works well.

However as you can see from the "log" extract posted below sometimes the parameters passed are incorrect.

I have tried to highlight them in the extract in bold - where the file (7-05 The Twist in the Twister 1.m4v) is not matched by the passed parameters ("The Prisoner in the Pipe" 7 7 07 07).

As you can see the ("The Prisoner in the Pipe" 7 7 07 07) is then passed for every file.

Is there any further information I can help with ?

Regards

MikeP


thetvdb.com "The Prisoner in the Pipe"
MCM: Post-processing running:
"C:\Program Files (x86)\Media Center Master\addToItunes.cmd" "C:\Users\MIKEP\Music\iTunes\iTunes Media\TV Shows\Bones\Season 7\7-05 The Twist in the Twister 1.m4v" episode "Bones" "2012-04-02" "The Prisoner in the Pipe" 7 7 07 07
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

MCM: Post-processing finished!
thetvdb.com Fetching data for season 7, episode 7
thetvdb.com "The Prisoner in the Pipe"
MCM: Post-processing running:
"C:\Program Files (x86)\Media Center Master\addToItunes.cmd" "C:\Users\MIKEP\Music\iTunes\iTunes Media\TV Shows\Bones\Season 7\7-06 The Crack in the Code 1.m4v" episode "Bones" "2012-04-02" "The Prisoner in the Pipe" 7 7 07 07
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

MCM: Post-processing finished!
thetvdb.com Fetching data for season 7, episode 7
thetvdb.com "The Prisoner in the Pipe"
MCM: Post-processing running:
"C:\Program Files (x86)\Media Center Master\addToItunes.cmd" "C:\Users\MIKEP\Music\iTunes\iTunes Media\TV Shows\Bones\Season 7\7-12 The Suit on the Set 1.m4v" episode "Bones" "2012-04-02" "The Prisoner in the Pipe" 7 7 07 07
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

MCM: Post-processing finished!
thetvdb.com Fetching data for season 7, episode 7
thetvdb.com "The Prisoner in the Pipe"
MCM: Post-processing running:
"C:\Program Files (x86)\Media Center Master\addToItunes.cmd" "C:\Users\MIKEP\Music\iTunes\iTunes Media\TV Shows\Bones\Season 7\7-13 The Past in the Present 1.m4v" episode "Bones" "2012-04-02" "The Prisoner in the Pipe" 7 7 07 07
Microsoft (R) Windows Script Host Version 5.8


 Profile  
 Post subject: Re: [Guide] Automatically add your media to iTunes
PostPosted: January 3rd, 2013, 6:43 am 
Offline
Community Support
User avatar

Joined: May 9th, 2009, 8:40 pm
Posts: 94
Location: Perth, Western Australia
Hi mike

If you can give me a URL for the file in question so I can download it I can test and see what I can do to sort this issue out.

_________________
Cheers,
Darren


 Profile  
 Post subject: Re: [Guide] Automatically add your media to iTunes
PostPosted: January 3rd, 2013, 6:47 am 
Offline
Community Support
User avatar

Joined: May 9th, 2009, 8:40 pm
Posts: 94
Location: Perth, Western Australia
Mike

Also is this the only episode you are having issues with or are you having issues with others?

_________________
Cheers,
Darren


 Profile  
 Post subject: Re: [Guide] Automatically add your media to iTunes
PostPosted: January 3rd, 2013, 6:55 am 
Offline
DVD VOB

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

Its "loads" of the episodes :-(
Attachment:
03-01-2013 02-56-17 PM.jpg
03-01-2013 02-56-17 PM.jpg [ 167.34 KiB | Viewed 8963 times ]

This is a screen shot of the directory after being processed - and you can see that all the episodes are "named" the same .

MikeP


 Profile  
 Post subject: Re: [Guide] Automatically add your media to iTunes
PostPosted: January 3rd, 2013, 6:58 am 
Offline
DVD VOB

Joined: November 4th, 2012, 4:15 am
Posts: 97
Attachment:
03-01-2013 02-59-31 PM.jpg
03-01-2013 02-59-31 PM.jpg [ 260.32 KiB | Viewed 8962 times ]

A screen shot of the "input" directory on the right hand side and the final destination on the left hand side.


 Profile  
 Post subject: Re: [Guide] Automatically add your media to iTunes
PostPosted: January 3rd, 2013, 7:02 am 
Offline
Community Support
User avatar

Joined: May 9th, 2009, 8:40 pm
Posts: 94
Location: Perth, Western Australia
Ah, I think i can see what the problem "may be" I have the following naming conventions;

Movie: T T (Y)
TV: T T
TV Episode: N - SXXEYY -T

This is what i have tested with. So i will have to have a look at the script and see what i happening regarding your naming convention.

Below is an example of the output MCM runs when using the above naming convention.

"C:\Program Files (x86)\Media Center Master\addToItunes.cmd" "\\DBNAS02\Volume_1\Kids\TV Series\Deadly 60\Season 2\Deadly 60 - S02E16 - Romania.m4v" episode "Deadly 60" "" "Romania" 2 16 02 16

_________________
Cheers,
Darren


 Profile  
 Post subject: Re: [Guide] Automatically add your media to iTunes
PostPosted: January 3rd, 2013, 7:07 am 
Offline
Community Support
User avatar

Joined: May 9th, 2009, 8:40 pm
Posts: 94
Location: Perth, Western Australia
Please double check your variables on in the MCM settings screen for post processing is the same as in the first post as the rest of the details are being output correctly to the script, it is the season and episode numbers that MCM is sending the script that is the problem based on the information in your first post.

_________________
Cheers,
Darren


 Profile  
 Post subject: Re: [Guide] Automatically add your media to iTunes
PostPosted: January 3rd, 2013, 7:19 am 
Offline
DVD VOB

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

I have checked and my settings are correct - and It DOES work for some episodes and titles.

I have made a "movie" to show you in real time what happens and am also attaching the log file.

Look At http://mikeandmorag.co.za/MCM/MCM_Itune ... tunes.html

Does that help ?


Regards

MikeP

Attachment:
Activity log for 2013-01-03.log [13.85 KiB]
Downloaded 249 times


 Profile  
 Post subject: Re: [Guide] Automatically add your media to iTunes
PostPosted: January 3rd, 2013, 7:32 am 
Offline
Community Support
User avatar

Joined: May 9th, 2009, 8:40 pm
Posts: 94
Location: Perth, Western Australia
Ok I can see what is happening - MCM is not getting the information from the metadata provider such as in the case of bones s01e02 and then it is not feeding the correct information to the script because MCM doesn't have the information to feed to the script. The script relies on MCM to feed the correct command line to the script and MCM relies on the metadata provider, in this case thetvdb.com for that information. I have had this happen to myself from time to time - lately with Tron Uprising because the episode details are out of sequence on thetvdb from what they are actually being detailed by other guides and the airing order and episode numbers.

There is nothing i can really do to assist you here as it is not a bug with the script nor MCM as far as i can see from your movie. If the metadata is correct for the episode, then MCM will ready that information and then pass it to the script no problems. All your setting are correct.

It strange because i have just had a look at the thetvdb.com entries for bones and they are all there and correct. So at this minute i am at a loss as to why MCM is having issues getting the metadata from thetvdb.com.

Let me give this some more thought and investigation.

_________________
Cheers,
Darren


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

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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


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



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