mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 18:42:42 +01:00
Use Movie Name-TmdbId for slug, update toUrlSlug (#629)
This commit is contained in:
parent
8feb3fee98
commit
96741570c5
@ -133,7 +133,7 @@ public Movie GetMovieInfo(int TmdbId, Profile profile = null)
|
||||
movie.Year = movie.InCinemas.Value.Year;
|
||||
}
|
||||
|
||||
movie.TitleSlug += "-" + movie.Year.ToString();
|
||||
movie.TitleSlug += "-" + movie.TmdbId.ToString();
|
||||
|
||||
movie.Images.Add(_configService.GetCoverForURL(resource.poster_path, MediaCoverTypes.Poster));//TODO: Update to load image specs from tmdb page!
|
||||
movie.Images.Add(_configService.GetCoverForURL(resource.backdrop_path, MediaCoverTypes.Banner));
|
||||
@ -391,7 +391,7 @@ private Movie MapMovie(MovieResult result)
|
||||
imdbMovie.Year = DateTime.Parse(result.release_date).Year;
|
||||
}
|
||||
|
||||
imdbMovie.TitleSlug += "-" + imdbMovie.Year;
|
||||
imdbMovie.TitleSlug += "-" + imdbMovie.TmdbId;
|
||||
|
||||
imdbMovie.Images = new List<MediaCover.MediaCover>();
|
||||
imdbMovie.Overview = result.overview;
|
||||
@ -577,7 +577,7 @@ public static string ToUrlSlug(string value)
|
||||
value = value.ToLowerInvariant();
|
||||
|
||||
//Remove all accents
|
||||
var bytes = Encoding.GetEncoding("Cyrillic").GetBytes(value);
|
||||
var bytes = Encoding.GetEncoding("ISO-8859-8").GetBytes(value);
|
||||
value = Encoding.ASCII.GetString(bytes);
|
||||
|
||||
//Replace spaces
|
||||
|
Loading…
Reference in New Issue
Block a user