My first Plugin - Need some help, please (1 Viewer)

Scrounger

Retired Team Member
  • Premium Supporter
  • January 21, 2009
    1,032
    514
    Stuttgart
    Home Country
    Germany Germany
    Hi,

    i have started to develop my first MP Gui Plugin (vb.net). You can find the Source Code here:
    Clickfinder ProgramGuide Plugin for MediaPortal

    Short plugin describtion:
    The plugin is a ProgramGuide that shows you what broadcast on our televisions at Now, PrimeTime, LateTime and so on. The Data based /sorted on / by the RatingData of the TV Movie Clickfinder Database (my imported EPG Data and the reason why the Plugin is only in German). Idea for this plugin was the smartphone App "TV Spielfilm".

    The last few days i've learned a lot by reading the MP Source Code. Now i started to replace my "manuell Database Access" with the TVDatabase Class.

    My Problem is that i need the "idChannel" from the tvmoviemapping table by the key "stationName", but i don't find the right Syntax.

    At the moment i use a manuell Connection with a sqlquery:
    Code:
    ReadTvServerDB("Select * from tvmoviemapping Inner Join channel on tvmoviemapping.idChannel = channel.idChannel where stationName = '" & _MappingName & "'")

    But that must also work with the TVMovieMapping Class, something like that:
    Code:
    in vb.net:
    
    tvDatabase.tvMovieMapping.RetrieveList(???????)
    
    for i = 0 to tvDatabase.tvMovieMapping.count -1
    idchannel = tvDatabase.tvMovieMapping.idChannel
    next
    
    
    in c#:
    
    tvDatabase.tvMovieMapping.RetrieveList(????);
    
    for (i = 0; i <= tvDatabase.tvMovieMapping.count - 1; i++) {
    	idchannel = tvDatabase.tvMovieMapping.idChannel;
    }

    Can you give me code snippets in c# or vb.net, please.

    Hope you understand my problem, i know my english is not that well ;)
     

    Scrounger

    Retired Team Member
  • Premium Supporter
  • January 21, 2009
    1,032
    514
    Stuttgart
    Home Country
    Germany Germany
    AW: My first Plugin - Need some help, please

    i got a solution. It's not so nice but it works :)

    Code:
    Dim _TVMovieMapping = TvDatabase.TvMovieMapping.ListAll
    
    
      For i = 0 To _TVMovieMapping.Count - 1
    
        If _TVMovieMapping.Item(i).StationName = _MappingName Then
        ......
        End If
    
     Next

    Perhaps someone can tell me how it also works with:

    Code:
    Dim _TVMovieMapping = TvDatabase.TvMovieMapping.RetrieveList(???)
     

    Scrounger

    Retired Team Member
  • Premium Supporter
  • January 21, 2009
    1,032
    514
    Stuttgart
    Home Country
    Germany Germany
    AW: My first Plugin - Need some help, please

    hi, i have a new Problem.

    1. How can i completly new initialize my Plugin (like it is the first load) everytime i enter the Screen / or completly destroy at leaving the screen.
    I have the problem, if i enter my plugin for the first time all functions and GUIControls work fine. But if i close my plugin GUI (go to previous window) and enter my Plugin again , the GuiImages not show any more.

    2. How i can disable the OSD Menu.
    Thought that works over the *.xml file.
    Code:
    <allowoverlay>no</allowoverlay>
    But this doesn't work.
     

    Scrounger

    Retired Team Member
  • Premium Supporter
  • January 21, 2009
    1,032
    514
    Stuttgart
    Home Country
    Germany Germany
    AW: My first Plugin - Need some help, please

    ok most of my Problems are solved.

    Is there a way to Catch the "ESC" Key inside of my Plugin?
     

    Users who are viewing this thread


    Write your reply...
    Top Bottom