mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-08 18:54:22 -04:00
Solving bugs.
This commit is contained in:
parent
ab630b9b84
commit
c852d0c3b9
@ -25,8 +25,11 @@ extern "C" struct Stream
|
|||||||
{
|
{
|
||||||
if(title != NULL)
|
if(title != NULL)
|
||||||
this->title= _strdup(title);
|
this->title= _strdup(title);
|
||||||
if(languageCode != NULL)
|
|
||||||
|
if (languageCode != NULL)
|
||||||
language = _strdup(languageCode);
|
language = _strdup(languageCode);
|
||||||
|
else
|
||||||
|
language = _strdup("und");
|
||||||
|
|
||||||
if (codec != NULL)
|
if (codec != NULL)
|
||||||
this->codec = _strdup(codec);
|
this->codec = _strdup(codec);
|
||||||
|
@ -226,9 +226,11 @@ Stream *ExtractSubtitles(const char *path, const char *outPath, int *streamCount
|
|||||||
{
|
{
|
||||||
*subtitleCount += 1;
|
*subtitleCount += 1;
|
||||||
|
|
||||||
|
AVDictionaryEntry *languagePtr = av_dict_get(inputStream->metadata, "language", NULL, 0);
|
||||||
|
|
||||||
//Get metadata for file name
|
//Get metadata for file name
|
||||||
streams[i] = Stream(NULL, //title
|
streams[i] = Stream(NULL, //title
|
||||||
av_dict_get(inputStream->metadata, "language", NULL, 0)->value, //language
|
languagePtr ? languagePtr->value : NULL, //language
|
||||||
avcodec_get_name(inputCodecpar->codec_id), //format
|
avcodec_get_name(inputCodecpar->codec_id), //format
|
||||||
inputStream->disposition & AV_DISPOSITION_DEFAULT, //isDefault
|
inputStream->disposition & AV_DISPOSITION_DEFAULT, //isDefault
|
||||||
inputStream->disposition & AV_DISPOSITION_FORCED); //isForced
|
inputStream->disposition & AV_DISPOSITION_FORCED); //isForced
|
||||||
|
@ -68,7 +68,7 @@ namespace Kyoo.InternalAPI.ThumbnailsManager
|
|||||||
Directory.CreateDirectory(root);
|
Directory.CreateDirectory(root);
|
||||||
|
|
||||||
string localThumb = root + "/" + people[i].slug + ".jpg";
|
string localThumb = root + "/" + people[i].slug + ".jpg";
|
||||||
if (!File.Exists(localThumb))
|
if (people[i].imgPrimary != null && !File.Exists(localThumb))
|
||||||
{
|
{
|
||||||
using (WebClient client = new WebClient())
|
using (WebClient client = new WebClient())
|
||||||
{
|
{
|
||||||
@ -85,7 +85,7 @@ namespace Kyoo.InternalAPI.ThumbnailsManager
|
|||||||
{
|
{
|
||||||
//string localThumb = Path.ChangeExtension(episode.Path, "jpg");
|
//string localThumb = Path.ChangeExtension(episode.Path, "jpg");
|
||||||
string localThumb = episode.Path.Replace(Path.GetExtension(episode.Path), "-thumb.jpg");
|
string localThumb = episode.Path.Replace(Path.GetExtension(episode.Path), "-thumb.jpg");
|
||||||
if (!File.Exists(localThumb))
|
if (episode.ImgPrimary != null && !File.Exists(localThumb))
|
||||||
{
|
{
|
||||||
using (WebClient client = new WebClient())
|
using (WebClient client = new WebClient())
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
using Microsoft.AspNetCore;
|
using Microsoft.AspNetCore;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace Kyoo
|
namespace Kyoo
|
||||||
{
|
{
|
||||||
@ -15,11 +13,6 @@ namespace Kyoo
|
|||||||
|
|
||||||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||||
WebHost.CreateDefaultBuilder(args)
|
WebHost.CreateDefaultBuilder(args)
|
||||||
.ConfigureAppConfiguration((hostingContext, config) =>
|
|
||||||
{
|
|
||||||
config.SetBasePath(Directory.GetCurrentDirectory());
|
|
||||||
config.AddJsonFile("config.json", false, true);
|
|
||||||
})
|
|
||||||
.UseStartup<Startup>();
|
.UseStartup<Startup>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -1,9 +1,21 @@
|
|||||||
{
|
{
|
||||||
|
"server.urls": "http://0.0.0.0",
|
||||||
"https_port": 44300,
|
"https_port": 44300,
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Warning"
|
"Default": "Warning"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*"
|
"AllowedHosts": "*",
|
||||||
|
|
||||||
|
"databasePath": "C://Projects/database.db",
|
||||||
|
"tempPath": "C:\\\\Projects\\temp",
|
||||||
|
"peoplePath": "D:\\\\Videos\\People",
|
||||||
|
"plugins": "C:\\Projects\\Kyoo\\Debug",
|
||||||
|
"providerPlugins": "C://Projects/Plugins/Providers",
|
||||||
|
"libraryPaths": [
|
||||||
|
"\\\\sdg\\video\\Anime"
|
||||||
|
],
|
||||||
|
"regex": ".*\\\\(?<ShowTitle>.+?) S(?<Season>\\d+)E(?<Episode>\\d+)",
|
||||||
|
"absoluteRegex": ".*\\\\(?<ShowTitle>.+?) (?<AbsoluteNumber>\\d+)"
|
||||||
}
|
}
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"databasePath": "C://Projects/database.db",
|
|
||||||
"tempPath": "C:\\\\Projects\\temp",
|
|
||||||
"peoplePath": "D:\\\\Videos\\People",
|
|
||||||
"plugins": "C:\\Projects\\Kyoo\\Debug",
|
|
||||||
"providerPlugins": "C://Projects/Plugins/Providers",
|
|
||||||
"libraryPaths": [
|
|
||||||
"\\\\sdg\\video\\Anime"
|
|
||||||
],
|
|
||||||
"regex": ".*\\\\(?<ShowTitle>.+?) S(?<Season>\\d+)E(?<Episode>\\d+)",
|
|
||||||
"absoluteRegex": ".*\\\\(?<ShowTitle>.+?) (?<AbsoluteNumber>\\d+)"
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user