Jump to content
Sign in to follow this  
malcolm user

How do I set unique eventID

Recommended Posts

malcolm user

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 by malcolm user

Share this post


Link to post
malcolm user

527666_4289407080263_1584746853_n.jpg

 

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 :blush:

Edited by malcolm user

Share this post


Link to post
Lars_MQ

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.

Share this post


Link to post
malcolm user

@Lars_MQ

 

Very thank...

 

Now works all seem :D

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...