diff --git a/src/NzbDrone.Core/Datastore/Migration/115_update_movie_sorttitle.cs b/src/NzbDrone.Core/Datastore/Migration/115_update_movie_sorttitle.cs
new file mode 100644
index 000000000..593665455
--- /dev/null
+++ b/src/NzbDrone.Core/Datastore/Migration/115_update_movie_sorttitle.cs
@@ -0,0 +1,45 @@
+using System.Data;
+using FluentMigrator;
+using NzbDrone.Core.Datastore.Migration.Framework;
+
+namespace NzbDrone.Core.Datastore.Migration
+{
+ [Migration(115)]
+ public class update_movie_sorttitle : NzbDroneMigrationBase
+ {
+ protected override void MainDbUpgrade()
+ {
+ // Create.Column("SortTitle").OnTable("Series").AsString().Nullable();
+ Execute.WithConnection(SetSortTitles);
+ }
+
+ private void SetSortTitles(IDbConnection conn, IDbTransaction tran)
+ {
+ using (IDbCommand getSeriesCmd = conn.CreateCommand())
+ {
+ getSeriesCmd.Transaction = tran;
+ getSeriesCmd.CommandText = @"SELECT Id, Title FROM Movies";
+ using (IDataReader seriesReader = getSeriesCmd.ExecuteReader())
+ {
+ while (seriesReader.Read())
+ {
+ var id = seriesReader.GetInt32(0);
+ var title = seriesReader.GetString(1);
+
+ var sortTitle = Parser.Parser.NormalizeTitle(title).ToLower();
+
+ using (IDbCommand updateCmd = conn.CreateCommand())
+ {
+ updateCmd.Transaction = tran;
+ updateCmd.CommandText = "UPDATE Movies SET SortTitle = ? WHERE Id = ?";
+ updateCmd.AddParameter(sortTitle);
+ updateCmd.AddParameter(id);
+
+ updateCmd.ExecuteNonQuery();
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs
index 4eb97e1ab..2d8248638 100644
--- a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs
+++ b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs
@@ -327,7 +327,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
imdbMovie.TmdbId = result.id;
try
{
- imdbMovie.SortTitle = result.title;
+ imdbMovie.SortTitle = Parser.Parser.NormalizeTitle(result.title);
imdbMovie.Title = result.title;
string titleSlug = result.title;
imdbMovie.TitleSlug = titleSlug.ToLower().Replace(" ", "-");
diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj
index 3ea6a0a76..cd482bd90 100644
--- a/src/NzbDrone.Core/NzbDrone.Core.csproj
+++ b/src/NzbDrone.Core/NzbDrone.Core.csproj
@@ -183,6 +183,7 @@
+
diff --git a/src/UI/Movies/MoviesCollection.js b/src/UI/Movies/MoviesCollection.js
index 44957debd..bc97e360d 100644
--- a/src/UI/Movies/MoviesCollection.js
+++ b/src/UI/Movies/MoviesCollection.js
@@ -15,10 +15,10 @@ var Collection = PageableCollection.extend({
tableName : 'movie',
state : {
- sortKey : 'title',
+ sortKey : 'sortTitle',
order : 1,
pageSize : 100000,
- secondarySortKey : 'title',
+ secondarySortKey : 'sortTitle',
secondarySortOrder : -1
},
@@ -73,7 +73,7 @@ var Collection = PageableCollection.extend({
sortMappings : {
title : {
- sortKey : 'title'
+ sortKey : 'sortTitle'
},
nextAiring : {