MP2 - V2.4.1 Adding Extra Features to the Database... (1 Viewer)

groovybaby

Portal Pro
December 3, 2017
73
4
124
Home Country
Great Britain (UK) Great Britain (UK)
Hi, I've been using MP2 for a couple of years now.
And I was wondering how easy would it be (for me) to add extra features to the MP2 database?
The extra features would have to be accessible by the user, from the onscreen menus.

This page says MP2 is using the: SQLiteDatabase plugin, which is using SQLite.
link

So how would I go about adding extra features to it?

Many thanks.
 

ge2301

Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,727
    3,498
    Stuttgart
    Home Country
    Germany Germany
    Hi, I've been using MP2 for a couple of years now.
    And I was wondering how easy would it be (for me) to add extra features to the MP2 database?
    The extra features would have to be accessible by the user, from the onscreen menus.

    This page says MP2 is using the: SQLiteDatabase plugin, which is using SQLite.
    link

    So how would I go about adding extra features to it?

    Many thanks.
    What kind of feature do you want to add? Adding things to the DB manually is easy, but it's not like "MP2, please show value X of item Y".
    Besides the DB the importer, models, skin files and probably more needs to be modied. Additionally the DB would be not compatible with other MP2 versions any more.

    To summarize: We would never do that, if there wouldn't be a very good reason for it. We had 2 times DB updates and several developers worked on it for months ;)
     

    groovybaby

    Portal Pro
    December 3, 2017
    73
    4
    124
    Home Country
    Great Britain (UK) Great Britain (UK)
    What kind of feature do you want to add? Adding things to the DB manually is easy, but it's not like "MP2, please show value X of item Y".
    Besides the DB the importer, models, skin files and probably more needs to be modied. Additionally the DB would be not compatible with other MP2 versions any more.

    To summarize: We would never do that, if there wouldn't be a very good reason for it. We had 2 times DB updates and several developers worked on it for months ;)
    Perhaps I have misunderstood?
    I thought that anyone could add extra features by creating plugins?
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,727
    3,498
    Stuttgart
    Home Country
    Germany Germany
    Perhaps I have misunderstood?
    I thought that anyone could add extra features by creating plugins?
    Of course you can create plugins :) I tried just to make you aware of below:
    • It's more complicated as you might think. If you have deeper C# skills, then you might do it. We will not be able to support here much.
    • DB changes would be incompatible with other MP2 versions:
      • We can not merge it into our code, even if it works
      • You might be not able to use future releases with your changed DB (depends on changes)
    Result: do not change the DB or have an own one for plugin.
     

    groovybaby

    Portal Pro
    December 3, 2017
    73
    4
    124
    Home Country
    Great Britain (UK) Great Britain (UK)
    Of course you can create plugins :) I tried just to make you aware of below:
    • .....
    • DB changes would be incompatible with other MP2 versions:
      • We can not merge it into our code, even if it works
      • You might be not able to use future releases with your changed DB (depends on changes)
    Result: do not change the DB or have an own one for plugin.

    Thanks for the reply.
    So now I'm even more confused!
    If that is the case, then how can anyone (who is not part of the original design team)
    create useful plugins that they and others can use?
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,727
    3,498
    Stuttgart
    Home Country
    Germany Germany
    If that is the case, then how can anyone (who is not part of the original design team)
    create useful plugins that they and others can use?
    A plugin has on first sight nothing todo with a DB. WebRadio is e.g. a plugin, it does not write anything into the MP2 DB. I think there is not even one plugin writing something into our DB.

    If you tell us, what you plan to achieve, it might be easier to investigate.
     

    groovybaby

    Portal Pro
    December 3, 2017
    73
    4
    124
    Home Country
    Great Britain (UK) Great Britain (UK)
    A plugin has on first sight nothing todo with a DB. WebRadio is e.g. a plugin, it does not write anything into the MP2 DB. I think there is not even one plugin writing something into our DB.

    If you tell us, what you plan to achieve, it might be easier to investigate.

    Many thanks for your replies.

    There are several features I would like to add, but possible the easiest would be this.
    Because of all the repeats...
    Currently: I have to write down the programs I have recorded.
    And then later, note if I have: a: watched them, and deleted them, or (b) watched them, and saved them.
    This list also helps as an aide-memoire, so if I want to find a particular program, I can look it up on that list.

    But it would be useful to have a DB that does this instead.
    So when I select a program to record, the DB would first be checked to see if it had been recorded before, if not, then I could continue with the setting, but if I had recorded it before, then I could decline to record it.

    Also, if the program is already on my 'paper list', then I could add (that info) info the DB, so that it will be there, if I try to record it again sometime later.

    From what you have said it seems that I would need to create a plugin that has its own database.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,727
    3,498
    Stuttgart
    Home Country
    Germany Germany
    Ok, now it’s more clear what you plan to do. I think it’s more complicated as you might expect, but with skills everything is possible :)
    I think a part of you idea is a “conflict management” and already covered by our activity.
    Below items are planned and partly in progress by our developer @henso. He is very busy now, but maybe there is a chance to support him. What kind of coding skills and experiences do you have?

    1. Separate TV and Radio in the client
    2. Rule/search based schedules (TvWishList/WMC Smart recordings)
      1. Add creation of new rules
      2. Edit existing rules
      3. Show conflicts for rules and resolve them
      4. Show programs recorded by rule
      5. Create schedule based on rules everyday at specified time
      6. Add fall backs for getting series info from program title/description through regular expressions
      7. Series schedule management that includes Media Library episodes
    3. Schedule handling updates
      1. Edit existing schedules
      2. Show conflicts for schedules and resolve them
      3. Show programs recorded by schedule
      4. Check for program changes everyday at specified time and update schedules if needed
      5. Series schedule management that includes Media Library episodes (global setting)
     

    groovybaby

    Portal Pro
    December 3, 2017
    73
    4
    124
    Home Country
    Great Britain (UK) Great Britain (UK)
    Ok, now it’s more clear what you plan to do. I think it’s more complicated as you might expect, but with skills everything is possible :)
    I think a part of you idea is a “conflict management” and already covered by our activity.
    Below items are planned and partly in progress by our developer @henso. He is very busy now, but maybe there is a chance to support him. What kind of coding skills and experiences do you have?
    Thanks for you above info.
    My coding so far is limited mainly to: html, php, MySQL, JS, coldfusion + V basic, V basic net
    And I don't have any experience working with a team.

    Writing code to work with someone else's code (like MP2) is probably very different from writing code for one's own small projects, but it may help if I could see the type of coding currently used in MP2, with some guide notes as to how MP2 operates + examples and info on how a plugin connects and interacts with MP2.
    + any other relevant info?
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,727
    3,498
    Stuttgart
    Home Country
    Germany Germany
    I think it’s quite challenging to write a plugin w/o C# skills. I’m not able to write a plugin. If I were you I’d start with something simple, e.g. taking a rather easy plugin, analyzing it, creating a copy of it with a new guid-ID and taking out all the unneeded parts and finally adding features step by step.
    the weather or news plugins could be something. Maybe @Brownard or @morpheus_xx have a better approach or link to a tutorial.
     

    Users who are viewing this thread

    Top Bottom