mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Cleaning up
This commit is contained in:
parent
f5f0a8bb61
commit
e670025514
@ -10,11 +10,11 @@ namespace Kyoo.Controllers
|
||||
{
|
||||
public class ThumbnailsManager : IThumbnailsManager
|
||||
{
|
||||
private readonly IConfiguration config;
|
||||
private readonly IConfiguration _config;
|
||||
|
||||
public ThumbnailsManager(IConfiguration configuration)
|
||||
{
|
||||
config = configuration;
|
||||
_config = configuration;
|
||||
}
|
||||
|
||||
public async Task<Show> Validate(Show show)
|
||||
@ -74,7 +74,7 @@ namespace Kyoo.Controllers
|
||||
return null;
|
||||
foreach (People peop in people)
|
||||
{
|
||||
string root = config.GetValue<string>("peoplePath");
|
||||
string root = _config.GetValue<string>("peoplePath");
|
||||
Directory.CreateDirectory(root);
|
||||
|
||||
string localThumb = root + "/" + peop.Slug + ".jpg";
|
||||
|
@ -11,17 +11,20 @@ using Kyoo.Controllers.TranscoderLink;
|
||||
|
||||
namespace Kyoo.Controllers
|
||||
{
|
||||
public class BadTranscoderException : Exception {}
|
||||
|
||||
public class Transcoder : ITranscoder
|
||||
{
|
||||
private readonly string transmuxPath;
|
||||
private readonly string transcodePath;
|
||||
private readonly string _transmuxPath;
|
||||
private readonly string _transcodePath;
|
||||
|
||||
public Transcoder(IConfiguration config)
|
||||
{
|
||||
transmuxPath = config.GetValue<string>("transmuxTempPath");
|
||||
transcodePath = config.GetValue<string>("transcodeTempPath");
|
||||
_transmuxPath = config.GetValue<string>("transmuxTempPath");
|
||||
_transcodePath = config.GetValue<string>("transcodeTempPath");
|
||||
|
||||
Console.WriteLine("&Api INIT (unmanaged stream size): " + TranscoderAPI.init() + ", Stream size: " + Marshal.SizeOf<Models.Watch.Stream>());
|
||||
if (TranscoderAPI.init() != Marshal.SizeOf<Models.Watch.Stream>())
|
||||
throw new BadTranscoderException();
|
||||
}
|
||||
|
||||
public async Task<Track[]> GetTrackInfo(string path)
|
||||
@ -46,7 +49,7 @@ namespace Kyoo.Controllers
|
||||
|
||||
public async Task<string> Transmux(WatchItem episode)
|
||||
{
|
||||
string folder = Path.Combine(transmuxPath, episode.Link);
|
||||
string folder = Path.Combine(_transmuxPath, episode.Link);
|
||||
string manifest = Path.Combine(folder, episode.Link + ".m3u8");
|
||||
float playableDuration = 0;
|
||||
bool transmuxFailed = false;
|
||||
@ -75,7 +78,7 @@ namespace Kyoo.Controllers
|
||||
|
||||
public async Task<string> Transcode(WatchItem episode)
|
||||
{
|
||||
string folder = Path.Combine(transcodePath, episode.Link);
|
||||
string folder = Path.Combine(_transcodePath, episode.Link);
|
||||
string manifest = Path.Combine(folder, episode.Link + ".m3u8");
|
||||
float playableDuration = 0;
|
||||
bool transmuxFailed = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user