Database views - please teach me how (1 Viewer)

emphatic

Design Group
  • Team MediaPortal
  • August 25, 2006
    3,712
    1,171
    Alingsås
    Home Country
    Sweden Sweden
    I'm struggling to add a custom view for my kids, easiest would be to just choose the path to the directory where all of their stuff is placed, but in database views, this isn't possible, is it?

    In Moving Pictures, this is quite easy to do, as I've added a custom genre called "Barn" ("kids" in Swedish) and I just made the custom filter use that as a restriction. Done! My MyVideos database entries are all imported from .nfo files I've created and all the movies for kids has this custom genre. So I should be able to just use this to get what I want, but when I try it, it doesn't work. :(

    What am I missing? I tried to find answers in the Wiki, but I can't even find an explanation to what the different operators do?

    databaseviews.png


    Emph
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    You were close, you need another line after genre with "selection" title (just look how genre view is).

    But, overall what you are looking for is something as Categories in MoPi and you can't do that here because there is no any sql builder implemented for views and current views code is to strongly made from beginning of MP so it's not possible to change that easily, actually it's so freaking hard because there are other things involved (like sorting, share view....) that I'm in doubt that will be ever implemented because complete MyVids should be coded almost from scratch.
     

    emphatic

    Design Group
  • Team MediaPortal
  • August 25, 2006
    3,712
    1,171
    Alingsås
    Home Country
    Sweden Sweden
    • Thread starter
    • Moderator
    • #4
    I'll try that. What do these do, please:

    = - equal?
    > - more than?
    < - less than?
    >= - ?
    <= - ?
    <> - ?
    like - similar to?

    Emph[DOUBLEPOST=1353859726][/DOUBLEPOST]I get "No results found" still. It's really weird, but I guess I'd better use File view only for this plugin.

    Emph
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    Like this (in pics):

    1. Define new genre and add it to movie. Save movie
    ScreenShot003.jpg


    2. Define new view like this
    ScreenShot002.jpg


    3. New view is visible in views menu
    ScreenShot004.jpg



    ScreenShot005.jpg


    ScreenShot006.jpg
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    Also there is another way how you can do that by using user groups (I really think that this should be called Title Groups but now is too late :)) but that's another story how you set up your shares, is there movies for which you want prevent kids access etc...
     

    emphatic

    Design Group
  • Team MediaPortal
  • August 25, 2006
    3,712
    1,171
    Alingsås
    Home Country
    Sweden Sweden
    • Thread starter
    • Moderator
    • #7
    All my movies for kids already have their own genre called "Barn" in addition to other genres, like Comedy, Adventure etc. Are you saying that a filter won't work on a movie with more than one genre?

    Still curious to find out what the stuff in my last post means though. Would be a great addition to the Wiki I'm sure.
    Emph
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    Ofc, you can have more genres (I just used one to be more clear)
    ScreenShot001.jpg


    ScreenShot007.jpg
     
    Last edited:

    emphatic

    Design Group
  • Team MediaPortal
  • August 25, 2006
    3,712
    1,171
    Alingsås
    Home Country
    Sweden Sweden
    • Thread starter
    • Moderator
    • #9
    But... Why do I get zero results if I do this, is "=" the correct Operator in this case:

    Kids.png


    And add a movie genre like this (to an actual movie of course, image is just an example):

    kids2.png


    I shouldn't need to add genres, as they're already in my database (added in MovingPictures, exported to .nfo files, then imported in My Videos.

    Does it matter if I have "Do not use database" checked or not? I think I have tried both (running an import with/without) and it still didn't work. I'll try again if you want me to as I'd love to have this working.

    Thanks a lot for all your help!
    Emph
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    Hah, :) "Do not use database" means -> no video database entries, nfo file can be read in share view, movie info screen will partially work from share view (movie information from nfo file) but nothing else. To use other views than Shareview, movies must be added into database.
     
    Last edited:

    Users who are viewing this thread

    Top Bottom