Question

I'm making a little app to automate my iPod update. My purpose is sync my iTunes library with my actual one and reencode songs in a lower quality for the iPod.

I use the Interop "iTunesLib" from iTunes.exe and I'm working on C#.

My program works pretty well but I have a big issue with iTunes. If a modal box is opened by iTunes during the process (could be "error while importing song", or just even "a new update is available" at iTunes startup...), then my app is completely stuck and must wait for the user to close the popup.

This is annoying because I expected to run my app at night and the process of reimporting/reencoding takes a while.

Is there any way to either tell iTunes to not pop any message, or to ask it to close an already opened one?

Was it helpful?

Solution 2

Well, after having this question open for more than a year, the correct answers seems to be: I can't

However there are several alternative libraries that might be useful.

OTHER TIPS

Maybe try calling the IiTunes.VisualsEnabled method passing in FALSE.

From the iTunes COM SDK:

HRESULT IiTunes::VisualsEnabled  (  [in] VARIANT_BOOL  shouldEnable   )   

   Set whether visuals should be displayed. 


Parameters:
 shouldEnable  True if visuals should be displayed. 

Return values:
 S_OK  The operation was successful.  
 E_ACCESSDENIED  Visuals cannot be enabled or disabled. For example, this can happen if the iTunes Store is currently being viewed.  
 E_FAIL  An unexpected error occurred.  
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top