Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.

Commit

Permalink
Run javbus through code formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
imaginary-upside committed Dec 8, 2019
1 parent a6da4c8 commit cb8e7a7
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions JellyfinJav/Providers/JavBus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public static async Task<IEnumerable<JavBusResult>> GetResults(IHttpClient httpC
{
logger.LogInformation($"Jav Search movies {name} exceptions. {e.Message}");
return new JavBusResult[0];
} else
}
else
{
return await GetResults(httpClient, logger, name, true);
}
Expand Down Expand Up @@ -113,16 +114,18 @@ public static MetadataResult<Movie> GetMovieFromResult(JavBusResult result)
{
OriginalTitle = $"{result.Code} {string.Join(" ", result.Genres)}",
Name = result.Name,
ProviderIds = new Dictionary<string, string> {{"JavBus", result.Code}},
ProviderIds = new Dictionary<string, string> { { "JavBus", result.Code } },
Genres = result.Genres.ToArray(),
PremiereDate = result.ReleaseDate,
ProductionYear = result.ReleaseDate.Year
},
People = new List<PersonInfo> (from actress in result.Actresses select new PersonInfo {
Name = actress.Name,
Type = "JAV Actress",
ImageUrl = actress.ImageUrl
})
People = new List<PersonInfo>(from actress in result.Actresses
select new PersonInfo
{
Name = actress.Name,
Type = "JAV Actress",
ImageUrl = actress.ImageUrl
})
};
}
}
Expand Down Expand Up @@ -218,7 +221,7 @@ public Task<HttpResponseInfo> GetImageResponse(string url, CancellationToken can
}
}

public class JavBusMetadataProvider : IRemoteMetadataProvider<Movie, MovieInfo>
public class JavBusMetadataProvider : IRemoteMetadataProvider<Movie, MovieInfo>, IHasOrder
{
private readonly IHttpClient httpClient;
private readonly ILogger logger;
Expand Down Expand Up @@ -266,7 +269,7 @@ public async Task<MetadataResult<Movie>> GetMetadata(MovieInfo info, Cancellatio
}


public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(MovieInfo searchInfo,
public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(MovieInfo searchInfo,
CancellationToken cancellationToken)
{
var code = searchInfo.GetProviderId(JavBus.Name);
Expand All @@ -287,7 +290,7 @@ public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(MovieInfo se
SearchProviderName = "JavBus",
Name = e.Name,
ImageUrl = e.ImageUrl,
ProviderIds = new Dictionary<string, string> {{"JavBus", e.Code}},
ProviderIds = new Dictionary<string, string> { { "JavBus", e.Code } },
PremiereDate = e.ReleaseDate,
ProductionYear = e.ReleaseDate.Year
};
Expand Down

0 comments on commit cb8e7a7

Please sign in to comment.