[WiP] - Centralised database in My Video, My Pictures and folder settings | Page 4

Discussion in 'Area 51 - Testing Area' started by regeszter, February 6, 2015.

  1. regeszter
    • Premium Supporter

    regeszter Retired Team Member

    Joined:
    October 29, 2005
    Messages:
    5,335
    Likes Received:
    2,863
    Ratings:
    +5,152 / 18
    Home Country:
    Hungary Hungary
    It will work. :)

    https://github.com/MediaPortal/Medi...Databases/Video/Ado/VideoDatabaseADO.cs#L3596


     
    • Thank You! Thank You! x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Edalex
    • Premium Supporter

    Edalex Community Plugin Dev

    Joined:
    January 3, 2008
    Messages:
    2,909
    Likes Received:
    713
    Gender:
    Male
    Location:
    Saratov
    Ratings:
    +1,232 / 9
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    Hmm, strange. i saw plenty of sql and db handling code in FH sources...
     
  4. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    9,027
    Likes Received:
    2,877
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,954 / 30
    Home Country:
    Ukraine Ukraine
    Show System Specs
    Directly to the database, it refers only to the database, mvCentral and serials. And works directly with FH database.
     
  5. regeszter
    • Premium Supporter

    regeszter Retired Team Member

    Joined:
    October 29, 2005
    Messages:
    5,335
    Likes Received:
    2,863
    Ratings:
    +5,152 / 18
    Home Country:
    Hungary Hungary
    Bad news but I can make API for each queries if needs. I had to do the same in My Video plugin because there were some direct sql in the plugin too. :(
     
    • Great Idea! Great Idea! x 1
  6. Edalex
    • Premium Supporter

    Edalex Community Plugin Dev

    Joined:
    January 3, 2008
    Messages:
    2,909
    Likes Received:
    713
    Gender:
    Male
    Location:
    Saratov
    Ratings:
    +1,232 / 9
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    Nope, mptvseries and movpics handling is right - DBSeries.GetAll() and DBMovies smth...
     
  7. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    9,027
    Likes Received:
    2,877
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,954 / 30
    Home Country:
    Ukraine Ukraine
    Show System Specs
    If need be, I altered it. He has more or less stable. And it works in 95% of cases correctly and effectively.
     
    • Thank You! Thank You! x 1
  8. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,650
    Likes Received:
    4,610
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,911 / 0
    Home Country:
    Australia Australia
    Trakt uses the following API calls with no SQL as parameters:
    Code (Text):
    1.  
    2. public static void SetMovieInfoById(int lMovieId, ref IMDBMovie details);
    3. public static void SetMovieWatchedStatus(int iMovieId, bool watched, int percent);
    4. public static int GetFile(string strFilenameAndPath, out int lPathId, out int lMovieId, bool bExact);
    5. public static bool GetmovieWatchedStatus(int iMovieId, out int percent, out int timesWatched);
    6. public static void SetMovieWatchedCount(int movieId, int watchedCount);
    7. public static void SetMovieWatchedStatus(int iMovieId, bool watched, int percent);
    8. public static int GetMovieInfo(string strFilenameAndPath, ref IMDBMovie details);
    9. public static int GetMovieId(string strFilenameAndPath);
    10. public static int GetMovieStopTime(int iFileId);
    11. public static void SetMovieStopTime(int iFileId, int stoptime);
    12. public static void GetMovies(ref ArrayList movies);
    13.  
    There is one public method I use which does take SQL, its only used in the configuration dialog so people can select which movies to restrict by Title or Path. It wouldn't be a big deal if I had to change this as it wont affect the everyday use of the plugin and im sure I can find another way to do what I want.
    Code (Text):
    1.  
    2. public static SQLiteResultSet GetResults(string sql);
    3.  
    The SQL I use is the following:
    Code (Text):
    1.  
    2. SELECT movieinfo.strTitle, path.strPath, files.strFilename
    3. FROM movieInfo
    4. LEFT JOIN files
    5. ON movieInfo.idMovie=files.idMovie
    6. LEFT JOIN path
    7. ON files.idPath=path.idPath
    8. ORDER BY strTitle
    9.  
     
    • Like Like x 3
  9. regeszter
    • Premium Supporter

    regeszter Retired Team Member

    Joined:
    October 29, 2005
    Messages:
    5,335
    Likes Received:
    2,863
    Ratings:
    +5,152 / 18
    Home Country:
    Hungary Hungary
    All should work if I did not make any mistake. ;)

    :)
     
    • Like Like x 2
    • Thank You! Thank You! x 1
  10. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    9,027
    Likes Received:
    2,877
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,954 / 30
    Home Country:
    Ukraine Ukraine
    Show System Specs
    Erorrs in log file :mad:
    MySQL server 192.168.0.100
    Password for root - MediaPortal
     
  11. regeszter
    • Premium Supporter

    regeszter Retired Team Member

    Joined:
    October 29, 2005
    Messages:
    5,335
    Likes Received:
    2,863
    Ratings:
    +5,152 / 18
    Home Country:
    Hungary Hungary
    MediaPortal.Video.Database.SqlServer.VideoDatabaseADO.CreateDb() MySql.Data.MySqlClient.MySqlException (0x80004005): Access denied for user 'root'@'192.168.0.1' (using password: YES)

    Password or mysql rights error.

    You may install a stand alone TvServer to the host which will be installed with right setup. You can uninstall it later.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!