Creating a new plugin - Code for accessing the Music and Video databases (1 Viewer)

kyleh0000

MP Donator
  • Premium Supporter
  • April 28, 2009
    144
    23
    Home Country
    Hi All

    not sure if this is the right place to post this if not please direct me to the corret forums:)

    What im in the process of doing to creating a plugin for Media Portal and i need to be able to access both the Music and Video databases

    im currently writing the plugin in VB .Net however i would be happy with any code example that i can work with.

    If what i understand is correct once im able to connect to the database i can just run SQL commands, I will need to be able to create some new tables and a few other things but my first step is getting access to the database.

    anyway all help is much apreciated :)
     

    kyleh0000

    MP Donator
  • Premium Supporter
  • April 28, 2009
    144
    23
    Home Country
    ok answered my own question, now im not so tired and not distracted by the FA cup here is the connection string i used which is working great:)

    Dim SQLConnect As New SQLite.SQLiteConnection
    Dim sqlcommand As SQLiteCommand
    SQLConnect.ConnectionString = "Data Source=""C:\ProgramData\Team MediaPortal\MediaPortal\database\MusicDatabaseV11.db3"";"
    SQLConnect.Open()
    sqlcommand = SQLConnect.CreateCommand
    SQLcommand.CommandText = "CREATE TABLE foo(id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT, description TEXT, image BLOB);"
    sqlcommand.ExecuteNonQuery()
    sqlcommand.Dispose()
    SQLConnect.Close()
     

    ysmp

    Design Group
  • Team MediaPortal
  • May 17, 2008
    1,863
    744
    Seoul.
    Home Country
    South Korea South Korea
    hi kyle !
    can you give little more info abut the new plugin you work on ... it's conect to music and movies ?
    just curious what the plugin will do ...:)
     

    kyleh0000

    MP Donator
  • Premium Supporter
  • April 28, 2009
    144
    23
    Home Country
    hi kyle !
    can you give little more info abut the new plugin you work on ... it's conect to music and movies ?
    just curious what the plugin will do ...:)

    its actully a 2 parter...

    the first part will implement something like this https://forum.team-mediaportal.com/mediaportal-plugins-47/new-plugin-mp-my-collection-73996/ where any videos files can be clasified into catagories so for example one catagory would be for Docos and another would be for Sports and maybe Music Videos, then when you open My Videos you can have a similar view to that in the new Moving Pictures where can filter by catagory, i was thinking of picking up the above plugin but its almost easier if i just start it again as then I will know exaclty how the code is written:)

    The 2nd part will use these catagories to bring together both Music and Music Videos into one place and turn Media Portal into a full on JukeBox which can be used for a sort of Party mode where users can select and que up music as well as video clips all in the one place.

    im not very far along yet, i have been able to open and edit the database so i can add the tables and feilds needed for the catagories and i have just started work on the config GUI

    I post the plugin when I have something more to show everyone
     

    Users who are viewing this thread

    Top Bottom