Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Media insert notification

If you have a question or need help, this is the place to be.
Post Reply
knilch
Posts: 7
Joined: Sat Aug 22, 2009 8:36 am

Media insert notification

Post by knilch »

Hi,

building a media PC seems to be really complicated if more than one program should be used... At the moment I'm trying hard to "link" DVBViewer and TotalMedia Theatre using EventGhost in the way, that DVBViewer graph is stopped and TMT is launched automatically when the user inserts a DVD or BD. My problem now is that TMT is launched WHENEVER a disc is inserted into the drive no matter whether it's a data disc, audio cd (TMT can't play this...) or DVD/BD. Therefore I would need a functionality to distinguish between different types of media inserted. Is there an option in EventGhost to achieve this (plugin recognizes media inserted and returns for example media.inserted.DVD)?

Regards
Knilch
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Media insert notification

Post by jonib »

The Windows AutoPlay should be able to run different programs based on the type of disc, maybe you can disable autoplay for TMT and configure AutoPlay to run different EventGhost events with the -event commandline.

I haven't done this so I don't know if it would work, just an idea.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
knilch
Posts: 7
Joined: Sat Aug 22, 2009 8:36 am

Re: Media insert notification

Post by knilch »

The problem is that with a running Dvbviewer Windows autoplay is never launched although a message is created and usable in Eventghost. But the message only says that media was inserted or removed and does not say which kind of media...
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Media insert notification

Post by jonib »

knilch wrote:The problem is that with a running Dvbviewer Windows autoplay is never launched although a message is created and usable in Eventghost. But the message only says that media was inserted or removed and does not say which kind of media...
Hopefully someone knows a way, I'm researching how to detect disk type to maybe do a plugin but I'm having trouble finding information.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
knilch
Posts: 7
Joined: Sat Aug 22, 2009 8:36 am

Re: Media insert notification

Post by knilch »

Assuming that a new media is inserted a plugin could at first use GetDriveType and when it detects a CD/DVD tries to read the structure. If this is successfull it could look for AUDIO_TS and VIDEO_TS folder, if found then => DVD. If file structure is not readable but type is CD/DVD then => AudioCd. And if a BMVD folder is found then => Blu Ray. Of course this is not very elegant but could work. Sadly I only hve SOME experience in Delphi, but can't do any coulding using Python...
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Media insert notification

Post by jonib »

knilch wrote:Of course this is not very elegant but could work.
I would prefer the elegant way, but if that fails, anything goes. :lol:
Sadly I only hve SOME experience in Delphi, but can't do any coulding using Python...
I had(have) basically no experience in Python before I started to work on my XBMCRepeat plugin, and mostly worked with Pascal/Delphi before, and I was surprised how easy it was to start working with Python at least when having some examples to look at.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
knilch
Posts: 7
Joined: Sat Aug 22, 2009 8:36 am

Re: Media insert notification

Post by knilch »

So you will look into the elegant way? Because my wife is putting me under pressure getting HTPC to work and I can't work under pressure :lol:
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Media insert notification

Post by jonib »

knilch wrote:So you will look into the elegant way?
Yes, but I can't guarantee when or if I make a plugin, so if you find another solution don't wait for me.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Post Reply