mirror of https://github.com/Radarr/Radarr
clear existing scene name since it wasn't storing the correct string
This commit is contained in:
parent
c25b92955f
commit
dd835d5503
|
@ -0,0 +1,15 @@
|
|||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Migration(17)]
|
||||
public class reset_scene_names : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
//we were storing new file name as scene name.
|
||||
Execute.Sql(@"UPDATE EpisodeFiles SET SceneName = NULL where SceneName != NULL");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -62,12 +62,12 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
|
|||
episodeFile.Size = _diskProvider.GetFileSize(localEpisode.Path);
|
||||
episodeFile.Quality = localEpisode.Quality;
|
||||
episodeFile.SeasonNumber = localEpisode.SeasonNumber;
|
||||
episodeFile.SceneName = Path.GetFileNameWithoutExtension(localEpisode.Path.CleanFilePath());
|
||||
episodeFile.Episodes = localEpisode.Episodes;
|
||||
|
||||
|
||||
if (newDownload)
|
||||
{
|
||||
episodeFile.SceneName = Path.GetFileNameWithoutExtension(localEpisode.Path.CleanFilePath());
|
||||
episodeFile.Path = _episodeFileUpgrader.UpgradeEpisodeFile(episodeFile, localEpisode);
|
||||
_messageAggregator.PublishEvent(new EpisodeImportedEvent(localEpisode, episodeFile));
|
||||
_messageAggregator.PublishEvent(new EpisodeDownloadedEvent(localEpisode));
|
||||
|
|
|
@ -159,6 +159,7 @@
|
|||
<Compile Include="Datastore\Migration\014_drop_air_date.cs" />
|
||||
<Compile Include="Datastore\Migration\015_add_air_date_as_string.cs" />
|
||||
<Compile Include="Datastore\Migration\016_updated_imported_history_item.cs" />
|
||||
<Compile Include="Datastore\Migration\017_reset_scene_names.cs" />
|
||||
<Compile Include="Datastore\Migration\Framework\MigrationContext.cs" />
|
||||
<Compile Include="Datastore\Migration\Framework\MigrationController.cs" />
|
||||
<Compile Include="Datastore\Migration\Framework\MigrationExtension.cs" />
|
||||
|
|
Loading…
Reference in New Issue