private DvMediaItem CreateItemFromGenericAudioFile(FileInfo file)
        {
            string mime, mediaClass;
            MimeTypes.ExtensionToMimeType(file.Extension, out mime, out mediaClass);

            string protInfo = new System.Text.StringBuilder().AppendFormat("http-get:*:{0}:*", mime).ToString();
            string title = Path.GetFileNameWithoutExtension(file.Name);
            string creator = file.Directory.Name;

            MediaBuilder.audioItem info = new MediaBuilder.audioItem(title);
            info.creator = creator;
            DvMediaItem newMedia = DvMediaBuilder.CreateItem(info);

            //DvMediaResource res = DvResourceBuilder.CreateResource_HttpGet(file,false);
            ResourceBuilder.VideoItem resInfo = new ResourceBuilder.VideoItem();
            resInfo.contentUri = DvMediaResource.AUTOMAPFILE + file.FullName;
            resInfo.protocolInfo = new ProtocolInfoString(protInfo);
            resInfo.size = new _ULong((ulong)file.Length);
            DvMediaResource res = DvResourceBuilder.CreateResource(resInfo, true);
            res.Tag = file;

            newMedia.AddResource(res);

            return newMedia;
        }
        // For files with filenames that have the format: "creator - title"
        private DvMediaItem CreateAudioItemFromFormatedNameFile(FileInfo file)
        {
            string mime, mediaClass;
            MimeTypes.ExtensionToMimeType(file.Extension, out mime, out mediaClass);

            string protInfo = new System.Text.StringBuilder().AppendFormat("http-get:*:{0}:*", mime).ToString();
            string ct = Path.GetFileNameWithoutExtension(file.Name);

            DText DT = new DText();
            DT.ATTRMARK = "-";
            DT[0] = ct;

            string title;
            string creator;
            if (DT.DCOUNT() == 1)
            {
                creator = "";
                title = DT[1].Trim();
            }
            else
            {
                creator = DT[1].Trim();
                title = DT[2].Trim();
            }

            MediaBuilder.audioItem info = new MediaBuilder.audioItem(title);
            info.creator = creator;
            DvMediaItem newMedia = DvMediaBuilder.CreateItem(info);

            //DvMediaResource res = DvResourceBuilder.CreateResource_HttpGet(file,false);
            ResourceBuilder.VideoItem resInfo = new ResourceBuilder.VideoItem();
            resInfo.contentUri = DvMediaResource.AUTOMAPFILE + file.FullName;
            resInfo.protocolInfo = new ProtocolInfoString(protInfo);
            resInfo.size = new _ULong((ulong)file.Length);
            DvMediaResource res = DvResourceBuilder.CreateResource(resInfo, true);
            res.Tag = file;
            newMedia.AddResource(res);

            return newMedia;
        }