From 7c76f3e579545172e0b0932d3cfb92c63a810bef Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Fri, 11 Feb 2022 10:22:24 +0100 Subject: [PATCH 01/10] Documentation: Create Files for Auto-generation --- docs/setting_up/setting_up.md | 6 ++++++ docs/setting_up/toc.yml | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 docs/setting_up/setting_up.md create mode 100644 docs/setting_up/toc.yml diff --git a/docs/setting_up/setting_up.md b/docs/setting_up/setting_up.md new file mode 100644 index 00000000..ba60d132 --- /dev/null +++ b/docs/setting_up/setting_up.md @@ -0,0 +1,6 @@ +--- +uid: setting_up +title: Setting Up +--- + +# Installing \ No newline at end of file diff --git a/docs/setting_up/toc.yml b/docs/setting_up/toc.yml new file mode 100644 index 00000000..70e816df --- /dev/null +++ b/docs/setting_up/toc.yml @@ -0,0 +1,2 @@ +- name: Setting Up + href: setting_up.md \ No newline at end of file From 6782ca71db50b4ea2a3226ce956b6c296ba76f89 Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Fri, 11 Feb 2022 10:29:42 +0100 Subject: [PATCH 02/10] Documentation: Setting-up: Introduction text --- docs/setting_up/setting_up.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/setting_up/setting_up.md b/docs/setting_up/setting_up.md index ba60d132..7637c633 100644 --- a/docs/setting_up/setting_up.md +++ b/docs/setting_up/setting_up.md @@ -3,4 +3,12 @@ uid: setting_up title: Setting Up --- -# Installing \ No newline at end of file +# Welcome to Kyoo + +Hi, and welcome to Kyoo, you are about to embark on this wonderful journey that is media management & streaming + +To setup Kyoo, you need to make sure you installed it, then we'll configure some settings, maybe rearrange your files. This shouldn't take long if you are used to manage JSON files, and regex. + +## Settings.json + +## Using a Container \ No newline at end of file From a94ddfb408159c88fcc35159aa78dc8f844b4e6d Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Fri, 11 Feb 2022 10:54:23 +0100 Subject: [PATCH 03/10] Documentation: Setting-up: Settings.json: 'Basics' section --- docs/setting_up/setting_up.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/setting_up/setting_up.md b/docs/setting_up/setting_up.md index 7637c633..9739eea2 100644 --- a/docs/setting_up/setting_up.md +++ b/docs/setting_up/setting_up.md @@ -11,4 +11,37 @@ To setup Kyoo, you need to make sure you installed it, then we'll configure some ## Settings.json +If you installed Kyoo on Linux/macOS, their should be a ```/var/lib/Kyoo``` directory +If you are on a Windows, it should be ```C:\ProgramData``` + +Inside this folder, we'll find (almost) everything we need. The most important file is ```settings.json``` + +At first, it'll look like [this](https://github.com/AnonymusRaccoon/Kyoo/blob/master/src/Kyoo.Host.Generic/settings.json) + +We are going to take a look at the fields you might want to change to tailor Kyoo to your configuration: + +- ```basics``` + - ```url```: The port on which Kyoo will be exposed + - ```publicUrl```: The full URL for Kyoo. **Warning** The port must match with ```url``` + For the 3 following fields, the path are relative to the directory ```settings.json``` is in + - ```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 ;) + ## Using a Container \ No newline at end of file From 3c4a2932a2d24e5d40cdfc56cb0b79767b7b8b2d Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Fri, 11 Feb 2022 11:07:31 +0100 Subject: [PATCH 04/10] Documentation: Setting-up: Settings.json: 'database' & 'tasks' section --- docs/setting_up/setting_up.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/setting_up/setting_up.md b/docs/setting_up/setting_up.md index 9739eea2..aac30f9c 100644 --- a/docs/setting_up/setting_up.md +++ b/docs/setting_up/setting_up.md @@ -44,4 +44,14 @@ We are going to take a look at the fields you might want to change to tailor Kyo **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 + +- ```tasks``` + - ```scheduled```: An object with keys being the name of an automation task, with a value being the interval between each task of the same type. + - The available keys can be found at ```publicUrl/api/tasks``` (as 'slug') + - The values must be formatted like ```HH:MM:SS`` + **For Example** in the default configuration, a file scan task will be executed every 24 hours + - ```parallels```: The number (as a string) of tasks that can be run at the same time. To avoid conflicts, we recommend leaving the value at ```1``` + ## Using a Container \ No newline at end of file From 10716bcbabb194d105a768e08c54462bf676fe78 Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Fri, 11 Feb 2022 11:12:05 +0100 Subject: [PATCH 05/10] Documentation: Setting-up: Settings.json: 'tvdb' & 'the-moviedb' section --- docs/setting_up/setting_up.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/setting_up/setting_up.md b/docs/setting_up/setting_up.md index aac30f9c..884a8146 100644 --- a/docs/setting_up/setting_up.md +++ b/docs/setting_up/setting_up.md @@ -9,7 +9,7 @@ Hi, and welcome to Kyoo, you are about to embark on this wonderful journey that To setup Kyoo, you need to make sure you installed it, then we'll configure some settings, maybe rearrange your files. This shouldn't take long if you are used to manage JSON files, and regex. -## Settings.json +## settings.json If you installed Kyoo on Linux/macOS, their should be a ```/var/lib/Kyoo``` directory If you are on a Windows, it should be ```C:\ProgramData``` @@ -48,10 +48,16 @@ We are going to take a look at the fields you might want to change to tailor Kyo - ```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 - ```tasks``` + - ```parallels```: The number (as a string) of tasks that can be run at the same time. To avoid conflicts, we recommend leaving the value at ```1``` - ```scheduled```: An object with keys being the name of an automation task, with a value being the interval between each task of the same type. - The available keys can be found at ```publicUrl/api/tasks``` (as 'slug') - The values must be formatted like ```HH:MM:SS`` **For Example** in the default configuration, a file scan task will be executed every 24 hours - - ```parallels```: The number (as a string) of tasks that can be run at the same time. To avoid conflicts, we recommend leaving the value at ```1``` + +- ```tvdb``` + - ```apikey```: The API key that will be used to interact with the TVDB's API. See [there](https://thetvdb.com/api-information) to get one + +- ```the-moviedb``` + - ```apikey```: The API key that will be used to interact with TMDB's API. See [there](https://developers.themoviedb.org/3/getting-started/introduction) to get one ## Using a Container \ No newline at end of file From 30cd0dc898517a339bf4d3866c7c26e4147e00cf Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Fri, 11 Feb 2022 11:23:49 +0100 Subject: [PATCH 06/10] Documentation: Setting-up: Settings.json: 'media' section --- docs/setting_up/setting_up.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/setting_up/setting_up.md b/docs/setting_up/setting_up.md index 884a8146..bac883e4 100644 --- a/docs/setting_up/setting_up.md +++ b/docs/setting_up/setting_up.md @@ -54,6 +54,19 @@ We are going to take a look at the fields you might want to change to tailor Kyo - The values must be formatted like ```HH:MM:SS`` **For Example** in the default configuration, a file scan task will be executed every 24 hours +- ```media``` + - ```regex```: An array of String to match files using Regex (PHP). The Regex must have the following groups: + - ```Collection```: The name of the collection. For example, you can move all the movie from a same saga in one directory, the collection's name will be the directory's. If the movie is at the root of the library, no collection will be created. + - ```Show```: the name of the show/movie + - ```StartYear``` (optional): the start year for a TV Series, or Year for a movie, used to get the correct metadata in provider + - ```Season``` (for TV Series): An integer being the number of the season + - ```Episode``` (for TV Series): An integer being the number of the episode in the season + - ```Absolute``` (optional if the two groups above are in the regex): The absolute number of the episode (from episode 1x01, ignoring seasons) + - ```subtitleRegex```: Same as ```regex```, but to find Subtitles files. + - ```Language```: A String from 1 to 3 characters long defining the language of the subtitles + - ```Default```: If present, will set the subtitle as default track + - ```Forced```: If present, will set the subtitles as forced track + - ```tvdb``` - ```apikey```: The API key that will be used to interact with the TVDB's API. See [there](https://thetvdb.com/api-information) to get one From 4513ff0f52c070c200419323d25dcbb7844b0435 Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Fri, 11 Feb 2022 11:33:52 +0100 Subject: [PATCH 07/10] Documentation: Setting-up: 'Using a container' documentation --- docs/setting_up/setting_up.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/setting_up/setting_up.md b/docs/setting_up/setting_up.md index bac883e4..50cc3c44 100644 --- a/docs/setting_up/setting_up.md +++ b/docs/setting_up/setting_up.md @@ -73,4 +73,13 @@ We are going to take a look at the fields you might want to change to tailor Kyo - ```the-moviedb``` - ```apikey```: The API key that will be used to interact with TMDB's API. See [there](https://developers.themoviedb.org/3/getting-started/introduction) to get one -## Using a Container \ No newline at end of file +## Using a Container + +If you use Kyoo from a container, we recommand using the docker-compose file from [here](https://github.com/AnonymusRaccoon/Kyoo) and doing the following actions before launching the container: + +- If you use Postgres, configure the fields ```DATABASE__CONFIGURATIONS_*``` +- If you use SQLite, set the ```DATABASE__ENABLED``` to ```sqlite``` +- Set the ```*APIKEY``` values +- Map the folder ```/var/lib/kyoo``` to a directory on your host, so you can access files easily, and it'll be persistent +- Map the folder ```/video``` to the media directory +- If you use Postgres, map ```/var/lib/postgresql/data``` to the host's Postgres server data folder From a4b4f473d8f96922f15067e385bfddd69ebbb729 Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Fri, 11 Feb 2022 11:50:58 +0100 Subject: [PATCH 08/10] Documentation: Setting-up: 'Configue Libraries' Section --- docs/setting_up/setting_up.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/setting_up/setting_up.md b/docs/setting_up/setting_up.md index 50cc3c44..8742ddf8 100644 --- a/docs/setting_up/setting_up.md +++ b/docs/setting_up/setting_up.md @@ -83,3 +83,34 @@ If you use Kyoo from a container, we recommand using the docker-compose file fro - Map the folder ```/var/lib/kyoo``` to a directory on your host, so you can access files easily, and it'll be persistent - Map the folder ```/video``` to the media directory - If you use Postgres, map ```/var/lib/postgresql/data``` to the host's Postgres server data folder + +## Configuring Libraries + +You are now ready to launch Kyoo for the first time! +But before being able to see your favorite shows & movies, we need to configure the libraries: With Kyoo, you can separate your shows into libraries, for example to split TV Series from Movies, Anime from Live-Action Series, Concerts from Documentaries. + +First, you must open the server. To do so, execute the Kyoo.Host.Console binary found in the install directory. +If everything looks normal, no error message will appear, just log messages. + +Then, we are going to interact with Kyoo's API. To create a library, you must do the following request for each library you want to make: + +- POST Request +- At ```publicUrl/api/libraries``` (```publicUrl``` is in ```settings.json```) +- Content-Type: ```application/json``` +- Body: + + ```json + { + "name": "$KYOO_LIBRARY_NAME", // The name of the Library + "slug": "$KYOO_LIBRARY_SLUG", // The unique identifier of the Library, can be $KYOO_LIBRARY_NAME if it's unique + "paths": ["$KYOO_LIBRARY_PATH"], // Path of directories to scan for shows in library + "providers": [ + {"slug": "the-moviedb"}, // Remove if you don't want to use this provider + {"slug": "the-tvdb"} // Remove if you don't want to use this provider + ] + } + ``` + +Now that you created your libraries, you can do a simple GET request to ```publicUrl/api/task/scan``` to scan for videos in all the libraries. + +Once the scan is over, ```Task finished: Scan Libraries``` will be displayed! You are now ready to use Kyoo! From 349d1ea3cb5ab59cb16c7827981ac18d6f6d84b5 Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Fri, 11 Feb 2022 11:57:26 +0100 Subject: [PATCH 09/10] Documentation: Setting-up: Fix file hierarchy for auto doc generation --- README.md | 1 + docs/setting_up/toc.yml | 2 -- docs/{setting_up => start}/setting_up.md | 0 docs/start/toc.yml | 2 ++ 4 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 docs/setting_up/toc.yml rename docs/{setting_up => start}/setting_up.md (100%) diff --git a/README.md b/README.md index ee43956a..9c1b965a 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Feel free to open issues or pull requests, all contribution are welcomed. ## Getting started - [Installation](https://docs.kyoo.moe/start/install.html) +- [Setting Up](https://docs.kyoo.moe/start/setting_up.html) - [Api Documentation](https://demo.kyoo.moe/redoc) - [Documentation (work in progress)](https://docs.kyoo.moe) - [Contributing](./CONTRIBUTING.md) diff --git a/docs/setting_up/toc.yml b/docs/setting_up/toc.yml deleted file mode 100644 index 70e816df..00000000 --- a/docs/setting_up/toc.yml +++ /dev/null @@ -1,2 +0,0 @@ -- name: Setting Up - href: setting_up.md \ No newline at end of file diff --git a/docs/setting_up/setting_up.md b/docs/start/setting_up.md similarity index 100% rename from docs/setting_up/setting_up.md rename to docs/start/setting_up.md diff --git a/docs/start/toc.yml b/docs/start/toc.yml index 542805b5..1bf61165 100644 --- a/docs/start/toc.yml +++ b/docs/start/toc.yml @@ -1,2 +1,4 @@ - name: Install href: install.md +- name: Setting Up + href: setting_up.md \ No newline at end of file From b3e990463416367fcc3ca4788651464bc49a9d7e Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Fri, 11 Feb 2022 14:02:20 +0100 Subject: [PATCH 10/10] Documentation: Setting-up: Some fixes & details --- docs/start/setting_up.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/start/setting_up.md b/docs/start/setting_up.md index 8742ddf8..6a0b82ce 100644 --- a/docs/start/setting_up.md +++ b/docs/start/setting_up.md @@ -12,7 +12,7 @@ To setup Kyoo, you need to make sure you installed it, then we'll configure some ## settings.json If you installed Kyoo on Linux/macOS, their should be a ```/var/lib/Kyoo``` directory -If you are on a Windows, it should be ```C:\ProgramData``` +If you are on a Windows, it should be ```C:\ProgramData\Kyoo``` Inside this folder, we'll find (almost) everything we need. The most important file is ```settings.json``` @@ -22,7 +22,7 @@ We are going to take a look at the fields you might want to change to tailor Kyo - ```basics``` - ```url```: The port on which Kyoo will be exposed - - ```publicUrl```: The full URL for Kyoo. **Warning** The port must match with ```url``` + - ```publicUrl```: The full URL for Kyoo. For the 3 following fields, the path are relative to the directory ```settings.json``` is in - ```pluginsPath```: The directory where the plugins are stored - ```transmuxPath```: The directory where the transmux-ed video are stored (used as a cache) @@ -45,17 +45,17 @@ We are going to take a look at the fields you might want to change to tailor Kyo **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 + - ```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 - ```tasks``` - - ```parallels```: The number (as a string) of tasks that can be run at the same time. To avoid conflicts, we recommend leaving the value at ```1``` + - ```parallels```: The number of tasks that can be run at the same time. If the values is not ```1```, the behavior is not implemented. - ```scheduled```: An object with keys being the name of an automation task, with a value being the interval between each task of the same type. - The available keys can be found at ```publicUrl/api/tasks``` (as 'slug') - The values must be formatted like ```HH:MM:SS`` **For Example** in the default configuration, a file scan task will be executed every 24 hours - ```media``` - - ```regex```: An array of String to match files using Regex (PHP). The Regex must have the following groups: + - ```regex```: An array of String to match files using Regex. The Regex must have the following groups: - ```Collection```: The name of the collection. For example, you can move all the movie from a same saga in one directory, the collection's name will be the directory's. If the movie is at the root of the library, no collection will be created. - ```Show```: the name of the show/movie - ```StartYear``` (optional): the start year for a TV Series, or Year for a movie, used to get the correct metadata in provider @@ -75,7 +75,7 @@ We are going to take a look at the fields you might want to change to tailor Kyo ## Using a Container -If you use Kyoo from a container, we recommand using the docker-compose file from [here](https://github.com/AnonymusRaccoon/Kyoo) and doing the following actions before launching the container: +If you use Kyoo from a container, we recommend using the docker-compose file from [here](https://github.com/AnonymusRaccoon/Kyoo) and doing the following actions before launching the container: - If you use Postgres, configure the fields ```DATABASE__CONFIGURATIONS_*``` - If you use SQLite, set the ```DATABASE__ENABLED``` to ```sqlite``` @@ -84,6 +84,8 @@ If you use Kyoo from a container, we recommand using the docker-compose file fro - Map the folder ```/video``` to the media directory - If you use Postgres, map ```/var/lib/postgresql/data``` to the host's Postgres server data folder +If you don't have a previous Kyoo configuration, we recommend using Postgres. + ## Configuring Libraries You are now ready to launch Kyoo for the first time! @@ -103,7 +105,7 @@ Then, we are going to interact with Kyoo's API. To create a library, you must do { "name": "$KYOO_LIBRARY_NAME", // The name of the Library "slug": "$KYOO_LIBRARY_SLUG", // The unique identifier of the Library, can be $KYOO_LIBRARY_NAME if it's unique - "paths": ["$KYOO_LIBRARY_PATH"], // Path of directories to scan for shows in library + "paths": ["$KYOO_LIBRARY_PATH"], // Paths of directories to scan for shows in library "providers": [ {"slug": "the-moviedb"}, // Remove if you don't want to use this provider {"slug": "the-tvdb"} // Remove if you don't want to use this provider