[WiP] Centralised database in My Video, My Pictures and folder settings (4 Viewers)

hkjensen

MP Donator
  • Premium Supporter
  • June 11, 2007
    165
    65
    Copenhagen
    Home Country
    Denmark Denmark
    Hi

    Strings with singel pling ' is not saved correctly due to the RemoveInvalidChars function
    ' should not be escaped by another single pling

    RemoveInvalidChars should NOT alter strings for mySQL database

    For VideoDataBaseADO:
    public void RemoveInvalidChars(ref string strTxt)
    {
    }
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    Hi

    Strings with singel pling ' is not saved correctly due to the RemoveInvalidChars function
    ' should not be escaped by another single pling

    RemoveInvalidChars should NOT alter strings for mySQL database

    For VideoDataBaseADO:
    public void RemoveInvalidChars(ref string strTxt)
    {
    }

    Can you explain it? Do you have any issue with this?
     

    hkjensen

    MP Donator
  • Premium Supporter
  • June 11, 2007
    165
    65
    Copenhagen
    Home Country
    Denmark Denmark
    Movie with filename "C'est Pas Moi, Je Le Jure! (2008).mkv" get imported and saved as "\C''est Pas Moi, Je Le Jure! (2008)" in table files
    When movie is selected in MP (view: title index) Mp can't find file "C''est Pas Moi, Je Le Jure! (2008).mkv"

    Also for GetMovieTitlesByGenre

    The query should be changed to :
    var query = (from sql in _connection.movieinfoes
    join s3 in _connection.genrelinkmovies on sql.idMovie equals s3.idMovie
    join s4 in _connection.genres on s3.idGenre equals s4.idGenre
    where s4.strGenre == strGenre
    orderby sql.strTitle ascending
    select sql).ToList();

    The all movies with f.ex genre "Horror" get listet and not only movies with only genre "Horror"
    sql.strGenre = "Horror / Sci-Fi" dos not get selected with current query
    where sql.strGenre == strGenre //|| sql.strGenre.Contains(strGenre) //like?
    The Contains(strGenre) could work but using the genrelinkmovies should be faster
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    Movie with filename "C'est Pas Moi, Je Le Jure! (2008).mkv" get imported and saved as "\C''est Pas Moi, Je Le Jure! (2008)" in table files
    When movie is selected in MP (view: title index) Mp can't find file "C''est Pas Moi, Je Le Jure! (2008).mkv"

    Please try this dll.
     

    Attachments

    • Databases.zip
      166.1 KB

    hkjensen

    MP Donator
  • Premium Supporter
  • June 11, 2007
    165
    65
    Copenhagen
    Home Country
    Denmark Denmark
    Movie with filename "C'est Pas Moi, Je Le Jure! (2008).mkv" get imported and saved as "\C''est Pas Moi, Je Le Jure! (2008)" in table files
    When movie is selected in MP (view: title index) Mp can't find file "C''est Pas Moi, Je Le Jure! (2008).mkv"

    Please try this dll.

    Tested dll and i works only for movie filename doublepling2.png
    but not for thumbnail doublepling1.png
     
    Last edited:

    hkjensen

    MP Donator
  • Premium Supporter
  • June 11, 2007
    165
    65
    Copenhagen
    Home Country
    Denmark Denmark
    The all movies with f.ex genre "Horror" get listet and not only movies with only genre "Horror"

    Can you test this too?

    When I select genre='Horror' i only get listed 8 movies on the right
    10-49-02.png
    the list should contain 131 titles (out of 1509), with current select you could end up with a list with no titles.

    Select from my database:
    select count(*) from movieinfo
    where strGenre='Horror'
    count=8

    select count(*) from movieinfo, genre, genrelinkmovie
    where genre.strGenre='Horror' and Genre.idGenre=genrelinkmovie.idGenre and movieinfo.idMovie=genrelinkmovie.idMovie
    count=131
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    The all movies with f.ex genre "Horror" get listet and not only movies with only genre "Horror"

    Can you test this too?

    When I select genre='Horror' i only get listed 8 movies on the right
    View attachment 163393
    the list should contain 131 titles (out of 1509), with current select you could end up with a list with no titles.

    Select from my database:
    select count(*) from movieinfo
    where strGenre='Horror'
    count=8

    select count(*) from movieinfo, genre, genrelinkmovie
    where genre.strGenre='Horror' and Genre.idGenre=genrelinkmovie.idGenre and movieinfo.idMovie=genrelinkmovie.idMovie
    count=131

    Can you send me a backup of the videodatabase for testing?
     

    Users who are viewing this thread

    Top Bottom