Commit 8401381b authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Media: Store filename as a case insensitive string

The filename stored in the media is only a shortcut when it comes to
sort things, so it's fine to use it in a case insensitive way, as
opposed to the mrl stored in the File table
parent b5f7e1ed
......@@ -477,7 +477,7 @@ std::string Media::sortRequest( const QueryParameters* params )
desc = !desc; // Make decreasing order default for play count sorting
break;
case SortingCriteria::Filename:
req += "m.filename COLLATE NOCASE";
req += "m.filename";
break;
case SortingCriteria::LastModificationDate:
req += "f.last_modification_date";
......
......@@ -13,7 +13,7 @@
"thumbnail_id INTEGER,"
"thumbnail_generated BOOLEAN NOT NULL DEFAULT 0,"
"title TEXT COLLATE NOCASE,"
"filename TEXT,"
"filename TEXT COLLATE NOCASE,"
"is_favorite BOOLEAN NOT NULL DEFAULT 0,"
"is_present BOOLEAN NOT NULL DEFAULT 1,"
"nb_playlists UNSIGNED INTEGER NOT NULL DEFAULT 0,"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment