malcolm user Posted June 21, 2012 Share Posted June 21, 2012 (edited) I'm using C# NewEPGItem is type IEPGItem NewEPGItem = AddEPG.NewItem(); NewEPGItem.Content = 0; NewEPGItem.Charset = 255; NewEPGItem.Description = icerik; NewEPGItem.Title = icerik; NewEPGItem.Time = DateTime.Parse(zaman + " " + koleksiyons.Groups[5].Value); NewEPGItem.EventID = <<<<// How unique setting eventID ?? There are only the latest epg, epg window problem Edited June 21, 2012 by malcolm user Quote Link to comment
malcolm user Posted June 21, 2012 Author Share Posted June 21, 2012 (edited) I can download a TV web page in tv guide to listview.. but But all Epg Item does not seem epg window only one EPG ıtem seem IEPGItem NewEPGItem, EPGItem; IEPGCollection EPGCollection; IEPGAddBuffer AddEPG; ListView ekle; void yeni_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { ekle = new ListView(); saat = DateTime.Now; DateTime zamaninki = DateTime.Now; taske = yeni.Document.GetElementsByTagName("div")[42].InnerText; AddEPG = DVB.EPGManager.AddEPG(); IEPGCollection atbuna = DVB.EPGManager.Get(1, 16, DateTime.Now, DateTime.Now.AddDays(7)); int yeniSayi = 65000;[b]//I wrote this number by chance[/b] koleksiyons = Regex.Matches(taske, maske); for (int i = 0; i < koleksiyons.Count; i++) { if (koleksiyons[i].Groups[1].Value != "") { zaman = koleksiyons[i].Groups[1].Value; } else { if (DateTime.Parse(zaman + " " + koleksiyons[i].Groups[5].Value) > DateTime.Now) { int k = 1; icerik = koleksiyons[i].Groups[9].Value; NewEPGItem = AddEPG.NewItem(); NewEPGItem.Content = 0; NewEPGItem.Charset = 255; NewEPGItem.Description = icerik; NewEPGItem.Title = icerik; NewEPGItem.Time = DateTime.Parse(zaman + " " + koleksiyons[i].Groups[5].Value); NewEPGItem.EventID = yeniSayi; // [b]I think the problem here stems I can not set unique eventID[/b] NewEPGItem.SetEPGEventID(DVB.CurrentChannel.Tuner.SID, DVB.CurrentChannel.Tuner.TransportStreamID); NewEPGItem.Duration = DateTime.Parse("00:00:00").Add(NewEPGItem.Time - zamaninki); int zarto = ekle.Items.Add(zaman + " " + koleksiyons[i].Groups[5].Value).Index; ekle.Items[zarto].SubItems.Add(icerik); ekle.Items[zarto].SubItems.Add(icerik); zamaninki = DateTime.Parse(zaman + " " + koleksiyons[i].Groups[5].Value); AddEPG.Add(NewEPGItem); AddEPG.Commit(); yeniSayi++;//Plus plus this.Text = yeniSayi.ToString(); } } } AddEPG.Commit(); bunat(ekle, "DENEME"); } Sorry for bad English is Edited June 21, 2012 by malcolm user Quote Link to comment
Lars_MQ Posted June 21, 2012 Share Posted June 21, 2012 The eventID is a Dword (32bit). And it has to be unique for a given epgchannelID (http://en.DVBViewer....Service_API#EPG). So the best way would be a (unix)datetime created of the startdate and time for each entry. You could also use any other 32bit value which represents this, as long as you can reproduce this value for existing entries. Quote Link to comment
malcolm user Posted June 21, 2012 Author Share Posted June 21, 2012 @Lars_MQ Very thank... Now works all seem Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.