MPExtended / WifiRemote

Remote access plugin for MediaPortal
GNU General Public License v3.0
4 stars 5 forks source link

MusicDatabase query syntax error for artists or albums with quote in name #3

Closed Shukuyen closed 10 years ago

Shukuyen commented 10 years ago

Reported by Martin Kucera on google code

  1. Start MediaPortal client
  2. Connect to MediaPortal client using aMPdroid
  3. Access the Artists view in the Music section of aMPdroid
  4. View the albums of an artist which contains quote in name
  5. Try playing any of the albums of the selected artist in MediaPortal (PlayOnPc action)

Playback should start, but it doesn't. Error is generated in MP log (see below).

Here is the log entry:

[2013-10-12 18:02:59,832] [Error ] [12 ] [ERROR] - SQLiteClient: MusicDatabaseV12.db3 cmd:sqlite3_prepare16vm=null err:ERROR detailed:near "s": syntax error query:select * from tracks where strAlbumArtist like '%Blackmore's Night%' AND strAlbum LIKE '%Shadow of the Moon%' order by iTrack ASC
 [2013-10-12 18:02:59,882] [Error ] [12 ] [ERROR] - musicdatabase exception errQLiteClient: MusicDatabaseV12.db3 cmd:sqlite3_prepare16vm=null err:ERROR detailed:near "s": syntax error query:select * from tracks where strAlbumArtist like '%Blackmore's Night%' AND strAlbum LIKE '%Shadow of the Moon%' order by iTrack ASC stack: v SQLite.NET.SQLiteClient.ThrowError(String statement, String sqlQuery, SqliteError err)
 v SQLite.NET.SQLiteClient.Execute(String query)
 v MediaPortal.Music.Database.MusicDatabase.DirectExecute(String aSQL)
 v MediaPortal.Music.Database.MusicDatabase.GetSongsByFilter(String aSQL, List`1& aSongs, String filter)

The same issue was already solved in MP core in past in this thread: http://forum.team-mediaportal.com/threads/apostrophe-in-artist-name.33306/#post-220082

Shukuyen commented 10 years ago

Closed with 433f2bf87fc7b4263a010afeaf1baa3e014bf0cc

oxan commented 10 years ago

FYI: If you add "closes #3" to a commit message, GitHub automatically closes the issue when you push the commit ;)

Shukuyen commented 10 years ago

I know, just forgot about it when comitting. But thanks, you never stop learning :)