diff --git a/docs/start/setting_up.md b/docs/start/setting_up.md index 1feb6b8a..656bd460 100644 --- a/docs/start/setting_up.md +++ b/docs/start/setting_up.md @@ -27,22 +27,6 @@ We are going to take a look at the fields you might want to change to tailor Kyo - ```pluginsPath```: The directory where the plugins are stored - ```transmuxPath```: The directory where the transmux-ed video are stored (used as a cache) - ```transcodePath```: The directory where the transcoded video are stored (used as a cache) - - ```metadataInShow```: A boolean telling if the Movie/Show metadata (posters, extracted subtitles, Chapters) will be stored in the same directory as the video, in an ```Extra``` directory, or in the ```metadataPath```. - For example, if ```metadataInShow``` is true, your file tree wil look something like this: - - ```bash - /my-movies - | - -- My First Movie/ - | - -- My First Movie.mp4 - -- Extra/ - | - -- poster.jpe - -- etc... - ``` - - **Warning** Therefore, if your shows are not in individual folders, it is recommended to set ```metadataInShow``` to ```false```. If you don't, all the shows will share the same metadata we are sure you don't want that ;) - ```database``` - ```enabled```: Which database to use. Either ```sqlite``` (by default) or ```postgres```. SQLite is easier to use & manage if you don't have an SQL server on your machine. However, if you have a large amount of videos, we recommend using Postgres, which is more powerful to manage large databases diff --git a/src/Kyoo.Abstractions/Models/Font.cs b/src/Kyoo.Abstractions/Models/Font.cs index bd2d676f..eafb3bdd 100644 --- a/src/Kyoo.Abstractions/Models/Font.cs +++ b/src/Kyoo.Abstractions/Models/Font.cs @@ -61,7 +61,7 @@ namespace Kyoo.Abstractions.Models Slug = Utility.ToSlug(PathIO.GetFileNameWithoutExtension(path)); Path = path; File = PathIO.GetFileName(path); - Format = PathIO.GetExtension(path); + Format = PathIO.GetExtension(path).Replace(".", string.Empty); } } } diff --git a/src/Kyoo.Abstractions/Models/WatchItem.cs b/src/Kyoo.Abstractions/Models/WatchItem.cs index bedd5df5..7c7afc3b 100644 --- a/src/Kyoo.Abstractions/Models/WatchItem.cs +++ b/src/Kyoo.Abstractions/Models/WatchItem.cs @@ -200,7 +200,7 @@ namespace Kyoo.Abstractions.Models ReleaseDate = ep.ReleaseDate, Path = ep.Path, Images = ep.Show.Images, - Container = PathIO.GetExtension(ep.Path)![1..], + Container = PathIO.GetExtension(ep.Path).Replace(".", string.Empty), Video = ep.Tracks.FirstOrDefault(x => x.Type == StreamType.Video), Audios = ep.Tracks.Where(x => x.Type == StreamType.Audio).ToArray(), Subtitles = ep.Tracks.Where(x => x.Type == StreamType.Subtitle).ToArray(), diff --git a/src/Kyoo.Core/Controllers/Transcoder.cs b/src/Kyoo.Core/Controllers/Transcoder.cs index d577ec58..dd159608 100644 --- a/src/Kyoo.Core/Controllers/Transcoder.cs +++ b/src/Kyoo.Core/Controllers/Transcoder.cs @@ -221,10 +221,10 @@ namespace Kyoo.Core.Controllers { string path = _files.Combine(await _files.GetExtraDirectory(episode), "Attachments"); string font = (await _files.ListFiles(path)) - .FirstOrDefault(x => Utility.ToSlug(Path.GetFileName(x)) == slug); + .FirstOrDefault(x => Utility.ToSlug(Path.GetFileNameWithoutExtension(x)) == slug); if (font == null) return null; - return new Font(path); + return new Font(font); } /// diff --git a/src/Kyoo.Core/Models/Options/BasicOptions.cs b/src/Kyoo.Core/Models/Options/BasicOptions.cs index 2fa00249..18633b4a 100644 --- a/src/Kyoo.Core/Models/Options/BasicOptions.cs +++ b/src/Kyoo.Core/Models/Options/BasicOptions.cs @@ -17,7 +17,6 @@ // along with Kyoo. If not, see . using System; -using Kyoo.Abstractions.Models; namespace Kyoo.Core.Models.Options { @@ -57,19 +56,7 @@ namespace Kyoo.Core.Models.Options public string TranscodePath { get; set; } = "cached/transcode"; /// - /// true if the metadata of a show/season/episode should be stored in the same directory as video files, - /// false to save them in a kyoo specific directory. - /// - /// - /// Some file systems might discard this option to store them somewhere else. - /// For example, readonly file systems will probably store them in a kyoo specific directory. - /// - public bool MetadataInShow { get; set; } = true; - - /// - /// The path for metadata if they are not stored near show (see ). - /// Some resources can't be stored near a show and they are stored in this directory - /// (like ). + /// The path where metadata is stored. /// public string MetadataPath { get; set; } = "metadata/"; }