mirror of https://github.com/Radarr/Radarr
Added movie studio to movie details page (#262)
* modified Movie model * db migration * ui template modification
This commit is contained in:
parent
75bb2533a3
commit
30d2b41fbb
|
@ -35,6 +35,7 @@ namespace NzbDrone.Api.Movie
|
|||
public int Year { get; set; }
|
||||
public bool HasFile { get; set; }
|
||||
public string YouTubeTrailerId { get; set; }
|
||||
public string Studio { get; set; }
|
||||
|
||||
//View & Edit
|
||||
public string Path { get; set; }
|
||||
|
@ -146,7 +147,8 @@ namespace NzbDrone.Api.Movie
|
|||
AlternativeTitles = model.AlternativeTitles,
|
||||
Ratings = model.Ratings,
|
||||
MovieFile = movieFile,
|
||||
YouTubeTrailerId = model.YouTubeTrailerId
|
||||
YouTubeTrailerId = model.YouTubeTrailerId,
|
||||
Studio = model.Studio
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -194,7 +196,8 @@ namespace NzbDrone.Api.Movie
|
|||
AddOptions = resource.AddOptions,
|
||||
AlternativeTitles = resource.AlternativeTitles,
|
||||
Ratings = resource.Ratings,
|
||||
YouTubeTrailerId = resource.YouTubeTrailerId
|
||||
YouTubeTrailerId = resource.YouTubeTrailerId,
|
||||
Studio = resource.Studio
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
using System.Data;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Migration(120)]
|
||||
public class add_studio : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Alter.Table("Movies").AddColumn("Studio").AsString().Nullable();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -162,6 +162,11 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
|||
}
|
||||
}
|
||||
|
||||
if (resource.production_companies != null && resource.production_companies.Count() > 0)
|
||||
{
|
||||
movie.Studio = resource.production_companies[0].name;
|
||||
}
|
||||
|
||||
return movie;
|
||||
}
|
||||
|
||||
|
|
|
@ -183,6 +183,7 @@
|
|||
<Compile Include="Datastore\Migration\002_remove_tvrage_imdb_unique_constraint.cs" />
|
||||
<Compile Include="Datastore\Migration\003_remove_clean_title_from_scene_mapping.cs" />
|
||||
<Compile Include="Datastore\Migration\004_updated_history.cs" />
|
||||
<Compile Include="Datastore\Migration\120_add_studio_to_table.cs" />
|
||||
<Compile Include="Datastore\Migration\119_add_youtube_trailer_id_table .cs" />
|
||||
<Compile Include="Datastore\Migration\118_update_movie_slug.cs" />
|
||||
<Compile Include="Datastore\Migration\117_update_movie_file.cs" />
|
||||
|
|
|
@ -49,6 +49,7 @@ namespace NzbDrone.Core.Tv
|
|||
public int MovieFileId { get; set; }
|
||||
public List<string> AlternativeTitles { get; set; }
|
||||
public string YouTubeTrailerId{ get; set; }
|
||||
public string Studio { get; set; }
|
||||
|
||||
public bool HasFile => MovieFileId > 0;
|
||||
|
||||
|
|
|
@ -85,6 +85,7 @@ namespace NzbDrone.Core.Tv
|
|||
movie.Year = movieInfo.Year;
|
||||
movie.PhysicalRelease = movieInfo.PhysicalRelease;
|
||||
movie.YouTubeTrailerId = movieInfo.YouTubeTrailerId;
|
||||
movie.Studio = movieInfo.Studio;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
<span class="label label-info">{{network}}</span>
|
||||
{{/if}}
|
||||
|
||||
{{#if studio}}
|
||||
<span class="label label-info">{{studio}}</span>
|
||||
{{/if}}
|
||||
<span class="label label-info">{{runtime}} minutes</span>
|
||||
<span class="label label-info">{{path}}</span>
|
||||
|
||||
|
|
Loading…
Reference in New Issue