mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-16 04:30:24 +01:00
Some minor code cleanups
This commit is contained in:
parent
016590529f
commit
670a53258e
@@ -46,7 +46,7 @@ namespace MediaBrowser.Controller.Resolvers.Movies
|
||||
|
||||
private void SetProviderIdFromPath(Movie item)
|
||||
{
|
||||
string srch = "[tmdbid=";
|
||||
const string srch = "[tmdbid=";
|
||||
int index = item.Path.IndexOf(srch, System.StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
if (index != -1)
|
||||
|
||||
@@ -48,8 +48,8 @@ namespace MediaBrowser.Controller.Resolvers.TV
|
||||
|
||||
private void SetProviderIdFromPath(Series item)
|
||||
{
|
||||
string srch = "[tvdbid=";
|
||||
int index = item.Path.IndexOf(srch, System.StringComparison.OrdinalIgnoreCase);
|
||||
const string srch = "[tvdbid=";
|
||||
int index = item.Path.IndexOf(srch, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
if (index != -1)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace MediaBrowser.Controller.Resolvers.TV
|
||||
/// <summary>
|
||||
/// A season folder must contain one of these somewhere in the name
|
||||
/// </summary>
|
||||
private static string[] SeasonFolderNames = new string[] {
|
||||
private static readonly string[] SeasonFolderNames = new string[] {
|
||||
"season",
|
||||
"sæson",
|
||||
"temporada",
|
||||
@@ -118,14 +118,12 @@ namespace MediaBrowser.Controller.Resolvers.TV
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
nonSeriesFolders++;
|
||||
|
||||
if (nonSeriesFolders >= 3)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
nonSeriesFolders++;
|
||||
|
||||
if (nonSeriesFolders >= 3)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace MediaBrowser.Controller.Resolvers
|
||||
{
|
||||
VideoType type = Path.GetExtension(args.Path).EndsWith("iso", System.StringComparison.OrdinalIgnoreCase) ? VideoType.Iso : VideoType.VideoFile;
|
||||
|
||||
return new T()
|
||||
return new T
|
||||
{
|
||||
VideoType = type,
|
||||
Path = args.Path
|
||||
@@ -77,15 +77,15 @@ namespace MediaBrowser.Controller.Resolvers
|
||||
{
|
||||
if (folder.IndexOf("video_ts", System.StringComparison.OrdinalIgnoreCase) != -1)
|
||||
{
|
||||
return new T()
|
||||
return new T
|
||||
{
|
||||
VideoType = VideoType.DVD,
|
||||
VideoType = VideoType.Dvd,
|
||||
Path = Path.GetDirectoryName(folder)
|
||||
};
|
||||
}
|
||||
if (folder.IndexOf("bdmv", System.StringComparison.OrdinalIgnoreCase) != -1)
|
||||
{
|
||||
return new T()
|
||||
return new T
|
||||
{
|
||||
VideoType = VideoType.BluRay,
|
||||
Path = Path.GetDirectoryName(folder)
|
||||
|
||||
Reference in New Issue
Block a user