Ejemplo n.º 1
0
        protected void MonitorDrives()
        {
            while (true)
            {
                foreach (DriveInfo drive in DriveInfo.GetDrives().Where(d => d.DriveType == DriveType.CDRom))
                {
                    if (drive.IsReady)
                    {
                        showPopup(" " + drive.Name + " DVD inserted!");
                        TitleRetriever t = new TitleRetriever(drive.Name);
                        string DVDtitle = t.getMovieName();
                        showPopup(DVDtitle + "\n--Ripping--");
                        Ripper r = new Ripper();
                        string filename = r.rip(drive.Name, DVDtitle);
                        if (filename != "-1")
                        {
                            showPopup("Ripped!\n--Transcoding--");
                            r.transcode(filename, DVDtitle);
                        }
                        else
                            showPopup("Error Ripping! Exiting!");
                        ///////////////////need to add code to copy file to location in settings.conf////////////////////
                        //if (File.Exists(path))
                        //    File.Move(path, newpath);
                        /////////////////////////////////////////////////////////////////////////////////////////////////
                        showPopup("Done!");
                        string rt = "";
                        mciSendStringA("set CDAudio door open", rt, 127, 0);

                    }
                }

            }
        }