Premise [download] Premise-iTunes importer

Motorola Premise

georgejm

Active Member
File Name: Premise-iTunes importer
File Submitter: John in VA
File Submitted: 12 Dec 2009
File Category: Premise
Author: John in VA
Contact: PM me
Version: 1.0.0

Here it is. A no-frills tool that will import select iTunes playlists into Premise. The tool assumes that both Premise and iTunes share an IDENTICAL music library. I achieve this in my setup by using a media server that serves both Premise and iTunes MP3 files. Premise "Hard drive directory" objects point to the media server via a UNC (e.g. servernamesharename). iTunes has a windows drive mapped to the same share (don't let iTunes import music into the hosting computer's file system).

Enjoy!

Click here to download this file
 
John,

Just gave this a go and it's crashing on me. I tried it on both the server and a laptop. One (server) is running Vista and the laptop is on Windows 7. They are both 64 bit, however.

I will try to cobble together a 32-bit machine as I get time and see if that's it. Following is the error info:

Code:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {D4A3FA5C-A9CD-4944-A928-C82A59C2FE7E} failed due to the following error: 80040154.
   at WindowsApplication1.clsPremiseConnection..ctor(String ServerName, String UserID, String Password)
   at WindowsApplication1.Form1.Button3_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {D4A3FA5C-A9CD-4944-A928-C82A59C2FE7E} failed due to the following error: 80040154.
Sam,

The app is complaining that it wasn't able to call a COM object whose CLSID is {D4A3FA5C-A9CD-4944-A928-C82A59C2FE7E}. A quick look at the registry on my PC shows that this is the signature of the SYSMiniBroker COM object (see the attached image). It is suggesting that SYSMiniBroker is not registered on the PC. I realize this sounds strange because it ought to be automatically registered on a Premise Server.

Start regedit, navigate to \HKEY_CLASSES_ROOT\CLSID\{D4A3FA5C-A9CD-4944-A928-C82A59C2FE7E} and confirm it is present. Then, look at its "InprocServer32" key, and confirm that the Default value points to a valid file path. On my PC (Win XP 32-bit), it points to: "C:\Program Files\Premise\SYS\bin\MiniBroker.dll".
 

Attachments

  • SYSMiniBroker.png
    SYSMiniBroker.png
    23.7 KB · Views: 24
Well that could explain a lot. That key does not exist on my system. Might that be one of the things that goes bad on Vista/Win7 installations? OR 64-bit installs?

Could you export that key/hive from your setup and post it or PM me with it? I'd like to try inserting that to see if it fixes it.
 
The attached ZIP archive contains the SYSMinibroker registry key. You'll probably need to edit the file and change the InprocServer32 file path. On 64-bit systems, it'll be something like "\Program Files (x86)\Premise\..." as opposed to "\Program Files\Premise\...".

FWIW, the app fails for me but for a different and expected reason. It carps about being unable to find a COM object whose CLSID is {DC0C2640-1415-4644-875C-6F4D769839BA} ... that'd be the signature of iTunes which is not installed on my PC.
 

Attachments

  • SYSMiniBroker_KEY.zip
    517 bytes · Views: 19
Thanks 123. That fixed the first problem. It has now changed to:

Code:
System.BadImageFormatException: Retrieving the COM class factory for component with CLSID {D4A3FA5C-A9CD-4944-A928-C82A59C2FE7E} failed due to the following error: 800700c1.
   at WindowsApplication1.clsPremiseConnection..ctor(String ServerName, String UserID, String Password)
   at WindowsApplication1.Form1.Button3_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

From what I've Googled, I think it has to do with 32-bit vs. 64-bit dlls and they way they're compiled? I'm starting to think that going 64-bit was a bad idea. I may try to run Premise in a VM and see if it can talk to all of the hardware. That would keep it clean anyway.
 
Sorry to not get back to you guys sooner. Long week at work.

I suggest you use regsvr32 to register the minibroker.dll file. You might need to go into the WOW64 directory to find it. Don't give up on 64 bit. I've got it working.

Let me adjust some of the compiler options to force the executable to be 32 bit. That might help. I'll post another version.
 
John - I used the new download and had the same issue. I then registered the minibroker.dll and it seems to work.

Although, I imported one playlist (Smart Playlist) and got a bunch of tracks added in the Premise version that were not in the iTunes playlist. Anything I'm missing?

Then I need to figure out the best way to use the centralized music folder for multiple PCs. Anyone done that successfully?
 
I haven't seen what you're describing. The only thing I can think of is that your Premise library has multiple media items with the *exact* same title as a song in the iTunes playlist you are trying to import.

The algorithm the importer uses is pretty simple. It assumes the Premise Media library has the same media the iTunes libarary contains. Once you've selected an iTunes playlist, it grabs the title for each entry in the playlist and attempts to find the same title in the Premise Media Library. If it does, it adds it to a newly created Premise Playlist. If it doesn't, it notes it in the UI. Again, it's pretty no-frills.
 
Thanks John. I have been experimenting quite a bit and forgot that I had changed the iTunes library since I last imported the directory into Premise. I deleted the content provider and re-imported and all is well.

THANK YOU for this little program. Gives us a way to create playlist much more easily. Not to mention being able to bring in Genius playlists.

Now if I could synchronize my laptop, my wife's Mac and the server's iTunes installs/playlists/libraries, etc., it would be perfect.
 
Thanks John. I have been experimenting quite a bit and forgot that I had changed the iTunes library since I last imported the directory into Premise. I deleted the content provider and re-imported and all is well.

THANK YOU for this little program. Gives us a way to create playlist much more easily. Not to mention being able to bring in Genius playlists.

Now if I could synchronize my laptop, my wife's Mac and the server's iTunes installs/playlists/libraries, etc., it would be perfect.

There's a item under the Advanced mentu on iTunes called "Turn on Home Sharing" that looks interesting. You probably can play media stored on another machine running iTunes with that. I've never tried it so I can't comment on what it does or how well it works.

However, my media server presents all of it's content via UPnP (using Twonky media server), and file shares (for Premise and iTunes). Other machines in the house (including two UPnP media players) can get to the content via Windows Media player. My youngest even has a local playlist he created out of his favorite stuff in Dad's music library.
 
Home sharing is interesting and mostly works. But you can't create playlists using the shared stuff as far as I can tell. I would love for anyone on the system to be able to create a playlist that could then be pulled into Premise. Plus it's dicey on moving stuff onto iPods or iPhones.

I have found a couple of programs, SuperSync and TuneRanger that claim to be able to sync multiple installations of iTunes on the same network, including playlists. I am beginning my tests of those now. SuperSync seems to be designed to work with a centralized music folder, so I think that may be the way to go. Anything else I've seen similar want to copy all of the music files back and forth. If this works well, all of the instances of iTunes will be essentially the same.
 
Well I finally got a shared setup with iTunes that works. I was able to setup one Mac and 2 PCs to use the same library file and storage location. The only drawback is that you can't have more than one client open at a time. But the way we need to use, it's just fine.

So now, my wife can rip a CD on her Mac, make a playlist and when I open iTunes I see exactly what she did. I can import the playlist into Premise from either PC. Just not the Mac ;)

So I am pleased.

John - Any way to get Genius Playlists? I tried just importing "Genius Mixes", but it seems to bring in all of them into one playlist.
 
Back
Top