1743 Commits

Author SHA1 Message Date
650f4866d0 Better absolute handling animelist 2024-06-10 13:34:57 +02:00
ad35c95e25 Start anime-list handling 2024-06-10 13:34:57 +02:00
7ffc392492 Fix tvdb absolute searching 2024-06-10 13:34:57 +02:00
renovate[bot]
71b5a04027 chore(deps): update dependency @biomejs/biome to v1.8.0 (#531)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-09 16:08:02 +02:00
Scott Merchant
053b8dbef0 Add lint:fix script to auto-apply linting fixes (#529) 2024-06-09 15:54:35 +02:00
Weblate (bot)
622f49c5ad Translated using Weblate (Chinese (Simplified)) (#527)
Currently translated at 100.0% (200 of 200 strings)

Translation: Kyoo/Kyoo
Translate-URL: https://hosted.weblate.org/projects/kyoo/kyoo/zh_Hans/

Co-authored-by: tardlk <x54058@outlook.com>
2024-06-06 17:39:24 +02:00
renovate[bot]
e47df32173 chore(deps): update dependency serilog to v4 (#526)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-06 12:49:28 +02:00
9ed662c8c8 Filter out special season on tmdb absolute ordering (#524) 2024-06-03 22:17:24 +00:00
renovate[bot]
3088a8fc88 chore(deps): update dotnet monorepo to v8.0.6 (#522)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-03 21:56:03 +00:00
25fc182bad Use my fork of guessit (#523) 2024-06-03 21:52:34 +00:00
d744235141 Fix tmdb search popularity filter (#521) 2024-05-31 18:06:18 +02:00
Weblate (bot)
b28df77237 Translations update from Hosted Weblate (#520)
Currently translated at 100.0% (200 of 200 strings)

Translation: Kyoo/Kyoo
Translate-URL: https://hosted.weblate.org/projects/kyoo/kyoo/tr/

Co-authored-by: PUFF1N <me@puffin.icu>
2024-05-30 10:28:08 +02:00
6e9a4a7ec4 Translations update from Hosted Weblate (#519) 2024-05-28 23:18:20 +02:00
er2de2
78c2916286 Translated using Weblate (Polish)
Currently translated at 80.9% (161 of 199 strings)

Translation: Kyoo/Kyoo
Translate-URL: https://hosted.weblate.org/projects/kyoo/kyoo/pl/
2024-05-28 23:16:44 +02:00
PUFF1N
9ec74446a1 Translated using Weblate (Turkish)
Currently translated at 100.0% (199 of 199 strings)

Translation: Kyoo/Kyoo
Translate-URL: https://hosted.weblate.org/projects/kyoo/kyoo/tr/
2024-05-28 23:16:43 +02:00
cdfe1d0c94 Translate tabbar items (#518) 2024-05-28 23:16:36 +02:00
af66b31e35 Translate tabbar items 2024-05-28 22:49:43 +02:00
c203fa8eea Fix react version mismatch that broke tsserver 2024-05-28 22:49:24 +02:00
45fb4f0db2 Add media notifications on android & fix skeleton slowness (#517) 2024-05-28 00:51:58 +02:00
4c4421f243 Fix types 2024-05-28 00:26:26 +02:00
a87c6d1a09 Fix more info link in home page 2024-05-28 00:08:20 +02:00
cb96e87ad7 Add service in android manifest for notifications 2024-05-28 00:08:20 +02:00
13309bce20 Merge gradient into main skeleton element 2024-05-28 00:08:20 +02:00
26a3c2c984 Rework skeleton to use reanimated instead of moti 2024-05-28 00:08:20 +02:00
6458f419aa Upgrade npm packages 2024-05-28 00:08:20 +02:00
c08134bf08 wip: Add android permissions 2024-05-28 00:08:20 +02:00
2ee71f8d8f Add no password login error message 2024-05-28 00:08:20 +02:00
ef0260f3f5 Create setup pages when no admin account or video exists (#516) 2024-05-26 19:03:36 +02:00
21e1fa6376 Format code 2024-05-26 18:39:38 +02:00
e015882834 Redirect to / when setup is done in ssr mode 2024-05-26 18:36:34 +02:00
a9a74ddc14 Redirect to home page when setup is finished 2024-05-26 18:33:06 +02:00
defa902184 Redirect to /setup when navigating away 2024-05-26 18:33:06 +02:00
cc3f6f611e Center logo in navbar 2024-05-26 18:33:06 +02:00
d178b78e86 Check setup step and redirect to /setup if needed 2024-05-26 18:33:06 +02:00
cdf482ac4a Cleanup setup page layout 2024-05-26 18:33:06 +02:00
97e3257aee Add setup page componant 2024-05-26 18:33:06 +02:00
db2204258a Add setup step in /info 2024-05-26 18:33:06 +02:00
Weblate (bot)
c35e41aebe Translations update from Hosted Weblate (#515)
Currently translated at 100.0% (197 of 197 strings)

Translation: Kyoo/Kyoo
Translate-URL: https://hosted.weblate.org/projects/kyoo/kyoo/tr/

Co-authored-by: PUFF1N <me@puffin.icu>
2024-05-25 20:35:15 +00:00
654cc3b2a0 Add play permission in the required permissions of the player (#514) 2024-05-25 19:09:38 +00:00
361fedd9bb Split image backround and gradient image background (#513) 2024-05-25 03:04:27 +02:00
4cc36f4690 Migrate from next image to img 2024-05-25 02:49:26 +02:00
95086777af Split image backround and gradient image background 2024-05-25 01:20:29 +02:00
Weblate (bot)
cc50444384 Translations update from Hosted Weblate (#509)
* Added translation using Weblate (Italian)

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (173 of 173 strings)

Translation: Kyoo/Kyoo
Translate-URL: https://hosted.weblate.org/projects/kyoo/kyoo/zh_Hans/

---------

Co-authored-by: Matteo Pizzuti <matteo.pizzuti98@gmail.com>
Co-authored-by: tardlk <x54058@outlook.com>
2024-05-23 15:43:18 +02:00
cad81b70b6 Persit selected language & i18n fixes (#510) 2024-05-23 15:29:10 +02:00
6336074544 Translate genres 2024-05-23 15:03:12 +02:00
75a05296f7 Fix types 2024-05-23 14:56:24 +02:00
12742162ff Improve system language handling in settings 2024-05-23 14:47:39 +02:00
61e25f8b95 Fix settings wrapping on small screens 2024-05-23 14:47:39 +02:00
ad80fd3bde Persit selected language 2024-05-23 14:47:39 +02:00
261c97f97b Fix i18n double init on web 2024-05-23 14:47:39 +02:00
f005f2022c Disable returnEmptyString 2024-05-23 14:47:39 +02:00
27b0c753bb Fix srt selection when switching mode (#508) 2024-05-20 23:03:30 +00:00
Weblate (bot)
aec23ae749 Translations update from Hosted Weblate (#507)
Currently translated at 100.0% (172 of 172 strings)

Translation: Kyoo/Kyoo
Translate-URL: https://hosted.weblate.org/projects/kyoo/kyoo/uk/

Co-authored-by: Mavis <angelmilnight@gmail.com>
2024-05-21 00:46:34 +02:00
a37ace7d46 Split skeleton and normal state in all lists (#506) 2024-05-20 23:12:33 +02:00
5393f1bf97 Fix item type calculation in lists 2024-05-20 22:46:14 +02:00
7b45b205a5 Fix border radius 2024-05-20 22:32:23 +02:00
bb14d9944a Format code 2024-05-20 22:26:33 +02:00
f3fb96504a Split loaders for user list 2024-05-20 22:18:18 +02:00
2a1b805a7f Split loaders for recommanded items 2024-05-20 22:18:18 +02:00
393c58b10a Split loaders for most items on the main page 2024-05-20 22:18:18 +02:00
2756397898 Split loaders in the episode list 2024-05-20 22:18:18 +02:00
444de0af26 Split loaders in the browse page 2024-05-20 22:18:18 +02:00
9f8b2da76e Rework loader in infinite lists 2024-05-20 22:18:18 +02:00
9061b2e8d9 Fix video miss-cut because of start offset (#505) 2024-05-19 23:41:00 +00:00
c8cc2fc057 Manually fix translations and update node packages (#502) 2024-05-20 00:36:03 +02:00
ed200907a5 Format code 2024-05-20 00:11:55 +02:00
5049ad25b5 Fix react native video new props 2024-05-20 00:11:55 +02:00
f0b5b55b13 Use mozilla language list instead of intl 2024-05-20 00:11:55 +02:00
9048927c89 Fix api path slash cleanup 2024-05-20 00:11:55 +02:00
da13535e3e Dedup react types usage 2024-05-20 00:11:55 +02:00
150a9dbd53 Cleanup type errors 2024-05-20 00:11:55 +02:00
0124275d8c Cleanup duplicated slash handling 2024-05-20 00:11:55 +02:00
e0935d7faa Fix accounts infinite rerender loop 2024-05-20 00:11:55 +02:00
a937e445de Format code 2024-05-20 00:11:55 +02:00
513f10c629 Remove empty string in translations for fallback 2024-05-20 00:11:55 +02:00
b453fb180c Fix translations type safety 2024-05-20 00:11:55 +02:00
7adb1cd504 Manually specify translations 2024-05-20 00:11:55 +02:00
ec60dccb7b Update node packages 2024-05-20 00:11:55 +02:00
a711f74063 Add resource backend 2024-05-20 00:11:55 +02:00
renovate[bot]
55ba86bd5f Update dotnet monorepo to v8.0.5 (#504)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-19 21:49:32 +02:00
renovate[bot]
76fc857457 Update dotnet monorepo to v8.0.5 (#501)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-19 17:10:36 +02:00
renovate[bot]
4ac66686a0 Update dependency Npgsql.EntityFrameworkCore.PostgreSQL to v8.0.4 (#500)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-19 17:03:44 +02:00
26394ecb7f Fix traefik restart policy 2024-05-19 16:55:15 +02:00
b2b09c58db Fix tmdb absolute fill for the last episode (#499) 2024-05-15 22:49:01 +00:00
299b3e2328 Use image selection logic for trailers (#497) 2024-05-14 22:28:13 +00:00
c249816808 Basic tvdb provider (#494) 2024-05-15 00:13:46 +02:00
3ce8a49282 Fix original language missing on series tvdb 2024-05-15 00:11:37 +02:00
e02912119b Fix missing seasons and episodes translations 2024-05-15 00:11:37 +02:00
47f364840b Fix season get errors (and use artwork instead of artworkS because tvdb) 2024-05-15 00:11:37 +02:00
13e7d87134 Fix start/end air compute when no episodes exists in season 2024-05-15 00:11:37 +02:00
d0a7d5766e Fix season artwork fetch on tvdb 2024-05-15 00:11:37 +02:00
6af791ca72 Fix original language serie fetch 2024-05-15 00:11:37 +02:00
95a2766aee Add original language data fetching for episodes and series 2024-05-15 00:11:37 +02:00
fee6faceaa Handle tvdb translations missing errors 2024-05-15 00:11:37 +02:00
7577d757f8 Tvdb season access cleanup 2024-05-15 00:11:37 +02:00
8c6b99e31b Normalize tvdb language codes 2024-05-15 00:11:37 +02:00
497ba48f1b Cleanup tvdb 2024-05-15 00:11:37 +02:00
d08a86a724 Add tvdb api keys config 2024-05-15 00:11:37 +02:00
5f61f4d3a3 Add tvdb search 2024-05-15 00:11:37 +02:00
a29cfc0123 Add seasons to tvdb 2024-05-15 00:11:37 +02:00
c96a544021 Use new absoluteNumber value from tvdb 2024-05-15 00:11:37 +02:00
3d2e837022 Add tvdb show aliases 2024-05-15 00:11:37 +02:00
740703a845 Add tvdb show translations 2024-05-15 00:11:37 +02:00
dde38381e2 Add tvdb show identify 2024-05-15 00:11:37 +02:00
a6b6067b0b Add tvdb episode identify 2024-05-15 00:11:37 +02:00
1c483fa14f wip: Add tvdb as a provider 2024-05-15 00:11:37 +02:00
465562b563 Handle missing translations in scanner (#493) 2024-05-15 00:10:10 +02:00
a44b66caa9 Fix empty ignore pattern (#496) 2024-05-14 21:06:59 +00:00
Arthur Jamet
b6e0b5b328 Transcoder: Prevent Chapters Parsing from failiing when no chapters (#495) 2024-05-14 09:15:38 +02:00
9919f69720 Fix images chain 2024-05-14 03:02:29 +02:00
a346800724 Fix runtime issue 2024-05-14 02:36:37 +02:00
b228fbb35c Add stopgap mesure for collections missing translations 2024-05-14 02:18:59 +02:00
f8c6602604 Handle missing translations for episodes or seasons 2024-05-14 02:18:59 +02:00
ca7dd81452 Handle missing translations for series 2024-05-14 02:18:58 +02:00
710e3cf10b Handle missing translations for movies 2024-05-14 02:18:12 +02:00
c8402780f3 Translations update from Hosted Weblate (#483) 2024-05-13 23:53:21 +02:00
f1e1fe3e34 Format translations 2024-05-13 23:51:21 +02:00
Bartosz Feński
4488ee3a6f Translated using Weblate (Polish)
Currently translated at 15.1% (26 of 172 strings)

Translation: Kyoo/Kyoo
Translate-URL: https://hosted.weblate.org/projects/kyoo/kyoo/pl/
2024-05-13 23:13:50 +02:00
elcattivo66
83ede9328e Translated using Weblate (German)
Currently translated at 100.0% (172 of 172 strings)

Translation: Kyoo/Kyoo
Translate-URL: https://hosted.weblate.org/projects/kyoo/kyoo/de/
2024-05-13 23:13:49 +02:00
tardlk
06525a78e0 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (172 of 172 strings)

Translation: Kyoo/Kyoo
Translate-URL: https://hosted.weblate.org/projects/kyoo/kyoo/zh_Hans/
2024-05-13 23:13:48 +02:00
Bartosz Feński
fbd47b8ea6 Added translation using Weblate (Polish) 2024-05-13 23:13:48 +02:00
elcattivo66
b93cf56607 Added translation using Weblate (German) 2024-05-13 23:13:47 +02:00
Mavis
366d71d869 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (172 of 172 strings)

Translation: Kyoo/Kyoo
Translate-URL: https://hosted.weblate.org/projects/kyoo/kyoo/uk/
2024-05-13 23:13:47 +02:00
f4895f8e59 Deleted translation using Weblate (German) 2024-05-13 23:13:46 +02:00
Mavis
67c4bdc09c Added translation using Weblate (German) 2024-05-13 23:13:46 +02:00
Mavis
2db7ca822a Added translation using Weblate (Ukrainian) 2024-05-13 23:13:45 +02:00
b532bb31d1 Transcoder: Prevent error caused by buggy chapters parsing by mediainfo (#485) 2024-05-13 23:13:36 +02:00
Arthur Jamet
324afc8022 Transcoder: Make Chapter parsing simpler 2024-05-13 21:44:24 +02:00
Arthur Jamet
8a2343e76b Transcoder: Fix missing last chapter 2024-05-13 21:44:24 +02:00
Arthur Jamet
9222b2e2d3 Transcoder: More sturdy fix for faulty chapter parsing 2024-05-13 21:44:24 +02:00
Arthur Jamet
be0bd81107 Transcoder: Prevent error caused by buggy chapters parsing by mediainfo 2024-05-13 21:44:24 +02:00
a978e99e8a Add more logs to the scanner (and fix ignore pattern for the monitor) (#492) 2024-05-13 17:46:33 +00:00
afa57df5c2 Revert "Poc anilist provider" (#490) 2024-05-12 22:50:31 +02:00
2472df4a3a Poc anilist provider (#489) 2024-05-12 22:50:14 +02:00
fa7229f6f9 Make anilist poc work 2024-05-12 22:49:10 +02:00
fb0af0855c Add placeholder seasons for anilist 2024-05-12 22:44:20 +02:00
833775fede Fix matcher serialization when translations are missing 2024-05-12 22:44:20 +02:00
e1169d1d26 Fix anilist to use it as a provider 2024-05-12 22:44:20 +02:00
a0a5788683 Handle movies 2024-05-12 22:44:20 +02:00
516af3ee9b Handle genres, studio, tags for shows 2024-05-12 22:44:20 +02:00
8c1bb7cc1e Start an anilist provider 2024-05-12 22:44:20 +02:00
fe38cd65b8 Include tmdb api keys by default (#488) 2024-05-12 19:32:14 +00:00
d5d15eaea6 Prevent afk users from preventing transcode cleanup (#487) 2024-05-12 16:37:40 +00:00
bbe88382e5 Check if the browser can play codecs before trying to direct play (#486) 2024-05-12 18:13:28 +02:00
83b1c6b398 Add eac3 to list of supported codecs 2024-05-12 17:47:21 +02:00
cd46050c94 Format code 2024-05-12 17:30:16 +02:00
0b4f40190d Add chrome workarround to allow mkv pristine playback 2024-05-12 17:21:01 +02:00
7e10a9162c Fix outdated qualites menu when hls instance changes 2024-05-12 16:58:16 +02:00
5de584d6e3 Move canPlay to method instead of ref function 2024-05-12 16:53:29 +02:00
764fff7677 Move biome config to root for lsp 2024-05-12 16:51:41 +02:00
69a2821477 wip: CanPlay check 2024-05-12 02:54:42 +02:00
55f55db030 Reset hls when leaving play page 2024-05-12 02:53:20 +02:00
7e95370ce0 Add whole file mimetype in /info 2024-05-12 02:51:33 +02:00
30e2a5c867 Migrate from perttier/eslint to biome (#484) 2024-05-10 17:52:33 +02:00
14f2f8cb8c Sort imports 2024-05-10 17:23:06 +02:00
491150c261 Use type imports 2024-05-10 17:19:41 +02:00
b0f9be17de Format code 2024-05-10 15:53:07 +02:00
bd71be580d Update code to fix biome errors 2024-05-10 15:53:07 +02:00
871aaa032d Migrate from perttier/eslint to biome 2024-05-10 15:53:07 +02:00
1572bd26c5 Add weblate on readme 2024-05-09 23:16:01 +02:00
6c880b0909 Fix auto refresh dates calculation (#479) 2024-05-06 20:20:38 +02:00
9a81da0154 Fix seasons refresh 2024-05-06 20:06:52 +02:00
629acf4855 Use builtin cmp.Or instead of custom one 2024-05-06 18:00:37 +02:00
5364359788 Fix auto refresh date calculation 2024-05-06 18:00:37 +02:00
PUFF1N
c7521b4af0 Added Turkish translations (#478) 2024-05-06 13:30:40 +00:00
9de087a92e Sort episodes groups in tmdb absolute response (#471) 2024-05-06 12:36:44 +02:00
6b37ee8100 Update README.md 2024-05-03 16:33:58 +02:00
8e9aff9a25 Update README.md 2024-05-03 16:33:27 +02:00
2303baf15b Inprove search result sorting, fix manual rescan (#470) 2024-05-03 12:17:57 +02:00
4130601856 Move rescan requests to the scanner service (instead of the matcher) 2024-05-03 12:12:48 +02:00
b07f164ace Fix weird absolute filling 2024-05-03 12:12:48 +02:00
3725ed89db Sort by vote count and use case insensitive match for perfect matches 2024-05-03 12:12:48 +02:00
bc75576e4b Fix manual scan not removing deleted videos 2024-05-03 12:12:48 +02:00
9d00aa6d2f Add rescan button on admin interface (#462) 2024-05-02 01:50:11 +02:00
13ade4dc44 Clear permissions errors on login 2024-05-02 01:35:21 +02:00
f7c4e49426 Format code 2024-05-02 01:27:57 +02:00
efd2ac179d Add rescan button on admin interface 2024-05-02 01:24:03 +02:00
3521d577c1 Add rescan capabilities 2024-05-02 01:24:03 +02:00
21414d6c2f Make the scanner's consumer also a publisher 2024-05-02 01:24:03 +02:00
c1ed16b871 Add an api to publish a rescan request 2024-05-02 01:24:03 +02:00
d63ad87971 Cleanup swagger groups definitions of search apis 2024-05-02 01:24:03 +02:00
6925c6b225 Clean issues about removed items on scanner startup 2024-05-02 01:24:03 +02:00
57842ea31c Add gte and lte as valid filters 2024-05-02 01:24:03 +02:00
6076e3af87 Fix season selector query 2024-05-02 01:24:03 +02:00
e9c5e5e627 Fix token refresh resseting the player (#461) 2024-05-01 22:24:51 +00:00
997cc054d4 Fix release action to use major.minor instead of vMajor.minor.patch 2024-05-01 21:27:23 +02:00
renovate[bot]
b45069137c chore(deps): update dependency csharpier to v0.28.2 (#460)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-01 20:45:48 +02:00
4602f4ee65 Fix themoviedb weird absolute 2024-05-01 19:20:53 +02:00
36f6cd5631 Cleanup watchlist openapi doc 2024-05-01 19:20:36 +02:00
c52d818a1d Fix scanning with partial absolute groups on tmdb (#459) 2024-05-01 18:55:42 +02:00
c07d5ca5b9 Fix TitleNumberFixupRule to prevent over extending or bugging on duplicated multi episodes values 2024-05-01 18:53:44 +02:00
8303df35cc Fix SeasonYear rule 2024-05-01 18:53:44 +02:00
0d5957c3f8 Fix scanning with partial absolute groups on tmdb 2024-05-01 18:53:44 +02:00
21841604a3 Fix movie refresh 2024-05-01 18:53:44 +02:00
cd18ec1747 Fix titles join in path (#457) 2024-04-30 19:36:54 +02:00
d617d8c32a Format code 2024-04-30 19:34:56 +02:00
4c31e8cd70 Fix episode title promotion rule when episode was already defined 2024-04-30 19:34:39 +02:00
e0923807c6 Fix titles join in path 2024-04-30 19:34:39 +02:00
f67a7b4fd4 Clean file of .. or ./ before checking Abs. (#456) 2024-04-30 19:04:21 +02:00
8ee280de87 Clean file of .. or ./ before checking Abs. 2024-04-30 13:36:08 +02:00
316e5dd208 Fix release workflow 2024-04-30 00:42:33 +02:00
e1f1106c8d Add authmethod config value for oidc providers (#453) 2024-04-29 22:22:25 +00:00
5f20d9102f Prevent double / in path 2024-04-29 22:27:45 +02:00
3665070b97 Use stable images ids to prevent duplicated (#452) 2024-04-29 22:26:28 +02:00
renovate[bot]
af79670292 chore(deps): update traefik docker tag to v3 (#451)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-29 21:53:05 +02:00
a8eb1c52b6 Use stable images ids to prevent duplicated 2024-04-29 21:52:16 +02:00
7824a78e85 Cleanup image redownload 2024-04-29 21:52:04 +02:00
a8b25b9ef6 Migrate from nginx to traefik (#450) 2024-04-29 19:42:08 +02:00
111e8f7943 Update robot ci 2024-04-29 17:49:17 +02:00
0489ae6917 Remove nginx 2024-04-29 14:18:37 +02:00
cc1cff8033 Add traefik route logs 2024-04-29 14:15:22 +02:00
8ada5c9da2 Add traefik 2024-04-29 14:15:22 +02:00
2e122d9cd7 Switch default docker compose to ghcr 2024-04-29 02:22:35 +02:00
7daa10ef8d Fix folder renaming (#449) 2024-04-29 02:21:40 +02:00
8308bce42d Format code 2024-04-29 02:17:57 +02:00
9e089b21ed Add delete route that allow recursive delete for directories 2024-04-29 02:14:43 +02:00
fccc5b6ad9 Scan directory on directory creation (used on directory rename) 2024-04-29 02:14:43 +02:00
d9d7fd5000 Fix path/title join 2024-04-29 01:42:48 +02:00
Antoine
08bb1ccbf2 scanner: supports tmdb episode groups with multiple groups (#447) 2024-04-28 20:31:30 +02:00
Antoine
f431e7930d scanner: quote path when deleting issues (#446) 2024-04-28 18:16:35 +02:00
8b1524c155 Better handle titles list (#445) 2024-04-28 13:04:50 +02:00
9445b71c5c Create a proper handling of titles as list 2024-04-28 13:01:34 +02:00
cd7bde944e Move season dedup rule to rule.py 2024-04-28 13:01:34 +02:00
67cbf674b1 Add optional advanced flag to guess.py for debugging 2024-04-28 13:01:34 +02:00
283ba04f5e Refresh login error on token change, not only on id change (#444) 2024-04-28 01:11:42 +00:00
cbe4fbf082 Add release ci (#443) 2024-04-28 00:19:54 +00:00
53d483f34d Use edge tag on master's docker file 2024-04-28 02:07:31 +02:00
04d4b7ab1d Type check guessit results, fix #440 (#442) 2024-04-28 01:59:47 +02:00
b30c83751d Use the first title if multiples titles are present 2024-04-28 01:57:05 +02:00
4ffc112196 Type check guessit results 2024-04-28 01:50:38 +02:00
edf482de03 Move transcoder api to /video with path b64 encoded to prevent db hit (#441) 2024-04-28 01:37:12 +02:00
ba7931e205 Cleanup error when levels are missing 2024-04-28 01:21:06 +02:00
6eb21b7ca3 Fix thumbnails api 2024-04-28 01:11:31 +02:00
5a4575a93d Version transcoder cache 2024-04-28 01:02:33 +02:00
2eecb5174c Remove x-route header and use a env var instead 2024-04-28 00:32:02 +02:00
da0f415ecf Rework transcoder routes to use b64 path and check for file existance 2024-04-28 00:31:29 +02:00
59e1832c3e Move transcoder api to /video with path b64 encoded to prevent db hit 2024-04-28 00:28:18 +02:00
f871f4e1bf Fix tripple/more touches to seek (#436) 2024-04-25 12:26:58 +00:00
a2a58422a0 Rewrite autosync to use msgspec and aio-pika (#435) 2024-04-23 21:55:13 +00:00
580109666f Support svg images from external websites (#434) 2024-04-23 21:09:43 +00:00
2641a36352 Add auto refresh of items (#433) 2024-04-23 22:32:19 +02:00
733817216f Add refresh listener on the scanner 2024-04-23 22:29:20 +02:00
9ee35534bd Add a private route to get items to auto refresh 2024-04-23 22:29:20 +02:00
58f0f3d74b Auto generate jwt secret (#432) 2024-04-23 18:35:25 +02:00
7c3f4d3c20 Add migration and generate auth secret 2024-04-23 18:32:19 +02:00
e898f49402 Use dotnet ef configuration provider for secrets 2024-04-23 17:13:59 +02:00
9b486c0c55 Add server options in database 2024-04-23 13:47:44 +02:00
92ec734276 Remove rabbit port from docker compose files 2024-04-23 00:58:35 +02:00
d51ffa6848 Fix recommended typo (#431) 2024-04-22 23:57:29 +02:00
7d354249d4 Add metadata refresh (#430) 2024-04-22 23:55:15 +02:00
7c79c37d8c Format code 2024-04-22 23:24:38 +02:00
b2c30ee059 Add metadata refresh button on show/movie details page 2024-04-22 22:54:17 +02:00
12aa73376a Add refresh routes for seasons/shows/collections/movies 2024-04-22 22:08:03 +02:00
525da02fce Add episode refresh button on the front 2024-04-22 21:47:58 +02:00
2273e99074 Add refresh route 2024-04-22 21:47:42 +02:00
526ac1b8ab Compute next refresh date automatically for all resources 2024-04-22 16:56:48 +02:00
5c6bcee763 Auto calculate next refresh dates for episodes 2024-04-22 16:56:48 +02:00
274d2987d2 Prevent AddedDate edits 2024-04-22 16:56:48 +02:00
4688868f04 Fix season and episode slugs on update 2024-04-22 16:56:48 +02:00
5a6da7441f Add missing show/season ids on episode/season refresh 2024-04-22 16:56:48 +02:00
renovate[bot]
3e5007de75 Update dependency csharpier to v0.28.1 (#429)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-22 07:51:30 +02:00
41130cab1c Rework images storing (#428) 2024-04-21 21:57:19 +02:00
996209d205 Format code 2024-04-21 21:27:58 +02:00
9e38c3f333 Chunk images redownload to prevent http timeouts 2024-04-21 21:23:24 +02:00
aca7c815a0 Use /api directly in the redirect response.
Should use proxy rewrites
2024-04-21 20:59:55 +02:00
d5d0a6bda9 Fix thumbnails api 2024-04-21 19:43:32 +02:00
1e73998aa9 Make scanner use new /paths route 2024-04-21 19:43:32 +02:00
c4b42c9961 Auto download missing images on startup 2024-04-21 19:43:32 +02:00
00cd94d624 Fix repository's relations handling 2024-04-21 19:43:32 +02:00
e846a1cc18 Remove dead code 2024-04-21 19:43:32 +02:00
d36a20ce5e Move different year duplication prevention logic to the API 2024-04-21 19:43:32 +02:00
8b256e4c60 Remove image hash caching since it does not work for blurhash 2024-04-21 19:43:32 +02:00
e9b29dd814 Add image creation code in Validate() of resources 2024-04-21 19:43:32 +02:00
b904f25d33 Remove image move code 2024-04-21 19:43:32 +02:00
d872e66f7d Fix metadat volume in docker compose 2024-04-21 19:43:32 +02:00
ac3b593b8b Add ignore permissions errors on watchfile 2024-04-21 19:43:32 +02:00
bfbc66cdc0 Add env var for rabbitmq port 2024-04-21 19:43:32 +02:00
c576babde8 Migrate images 2024-04-21 19:43:32 +02:00
f15b92aae1 Floor seconds instead of rounding in the player UI 2024-04-21 19:43:32 +02:00
fb4424fb6b Restore custom out path needed for csharp lsp to work 2024-04-21 19:43:31 +02:00
d46e6eda64 Rework thumbnail manager to use images id 2024-04-21 19:43:28 +02:00
e1c04bef51 Use json for images instead of multiples columns 2024-04-21 02:32:17 +02:00
5b4dc1e9b0 Rename local repository to GenericRepository 2024-04-21 02:32:17 +02:00
1d553daeaf Cleanup ef repositories 2024-04-21 02:32:17 +02:00
69e8340c95 Take images url from api 2024-04-21 02:32:17 +02:00
dc5fd8f5a3 Fix put 2024-04-21 02:32:17 +02:00
8a816b587f Add refresh message handler 2024-04-21 02:32:17 +02:00
d34d87957e Use msgspec for messages deserialization 2024-04-21 02:32:17 +02:00
renovate[bot]
76a1b5c38f fix(deps): update module github.com/labstack/echo/v4 to v4.12.0 (#427)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-21 01:54:53 +02:00
c2a519923a Use env var for transcoder url (#426) 2024-04-20 11:19:22 +00:00
dependabot[bot]
c46385d467 Bump golang.org/x/net from 0.19.0 to 0.23.0 in /transcoder (#425)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.19.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.19.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 15:06:28 +02:00
tardlk
2e568abc45 Add Simplified Chinese translation (#423)
* Add files via upload
* Add zh to the list of available languages

---------

Co-authored-by: Zoe Roux <zoe.roux@zoriya.dev>
2024-04-16 17:53:18 +02:00
9163cef0f0 Add identify apis for provider (#419) 2024-04-16 01:41:25 +02:00
ec88da2434 Format code 2024-04-16 01:29:04 +02:00
9255695af2 Fix provider circular ref and xem id lookup 2024-04-16 01:27:44 +02:00
0c66363920 Use array syntax for cmds instead of bash style 2024-04-16 01:27:44 +02:00
c4cd4ead44 fixup! Add next refresh date migration 2024-04-16 01:27:44 +02:00
e39337f8f1 Use env variable for migration bundle instead of dockerfile entrypoint 2024-04-16 01:27:44 +02:00
7140d308fd Add next refresh date migration 2024-04-16 01:27:44 +02:00
5a9b846f7c Add next update date in db 2024-04-16 01:27:44 +02:00
c1ecdad916 Rework thexem as a provider 2024-04-16 01:27:44 +02:00
8392c6ad47 Update tmdb to use identify methods 2024-04-16 01:27:44 +02:00
dcda8c9072 Add identify apis for provider 2024-04-16 01:27:44 +02:00
renovate[bot]
097cbe6cf5 chore(deps): update skiasharp monorepo to v2.88.8 (#418)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 21:29:40 +00:00
renovate[bot]
f08ea4b8dd chore(deps): update dependency dapper to v2.1.44 (#417)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 16:02:01 +02:00
renovate[bot]
f1899aef55 chore(deps): update dotnet monorepo to v8.0.4 (#416)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-14 22:19:59 +02:00
renovate[bot]
0e685de325 chore(deps): update dependency csharpier to v0.28.0 (#415)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-13 12:43:44 +02:00
renovate[bot]
98c02176a4 chore(deps): update dependency dapper to v2.1.42 (#413)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-12 17:05:35 +02:00
1252016fff Make prod docker-compose the default (#411) 2024-04-10 00:27:37 +02:00
9c1908ecea Update installing instructions to use released docker-compose 2024-04-10 00:16:40 +02:00
cff4553108 Make prod docker-compose the default and move the old default to .build 2024-04-10 00:16:40 +02:00
81557741b2 Split fs scanner into scanner and matcher components (#410) 2024-04-10 00:11:54 +02:00
18b56724bb Format code 2024-04-10 00:11:42 +02:00
0f3f33a9e6 Add matcher to docker-compose files 2024-04-09 23:58:48 +02:00
d0901c7267 Fix issues creation 2024-04-09 23:58:48 +02:00
a085650a2e Add missing genres on the front 2024-04-09 23:58:48 +02:00
e4403cc17c Fix matcher/scanner issues 2024-04-09 23:58:48 +02:00
8d8e984669 Cleanup scanner logger 2024-04-09 23:58:48 +02:00
27dfb71838 Rename scanner modules 2024-04-09 23:58:48 +02:00
3bb0565f18 Use os.walk instead of Path.rglob to fix #409 2024-04-09 23:58:48 +02:00
8da6085df0 Process 20 messages at the same time 2024-04-09 23:58:48 +02:00
52380bcb29 Update scan method 2024-04-09 23:58:48 +02:00
a18fa7ebad Finish client/scanner split 2024-04-09 23:58:48 +02:00
e284f771df Split fs scaning and metadata matching 2024-04-09 23:58:48 +02:00
00c41fb704 Update nuget packages (#408) 2024-04-09 14:35:38 +02:00
Devin Buhl
9b3d8a390d chore: switch to softprops/action-gh-release (#407)
Signed-off-by: Devin Buhl <devin@buhl.casa>
2024-04-09 14:27:01 +02:00
686239ac7d Update packages 2024-04-09 14:18:11 +02:00
762b8047da Remove explicit source link (see #401) 2024-04-09 14:15:52 +02:00
renovate[bot]
57246cade1 chore(deps): update expo/expo-github-action action to v8 (#402)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-09 14:06:04 +02:00
Devin Buhl
3fa0cd04d1 chore(renovate): pin postgres version using the right package pattern (#406) 2024-04-09 13:46:58 +02:00
Devin Buhl
c078d7a82e chore: pin meilisearch and postgres versions (#405) 2024-04-09 13:42:15 +02:00
Devin Buhl
0ce7e74614 chore: disable rate-limiting on renovate PR creation (#397)
By default renovate rate limits itself, I feel this is safe to turn off and let's us get all the PRs at once. It also help in that I can help tweak the config further by seeing the PRs opened.
2024-04-09 08:39:29 +02:00
renovate[bot]
1bfaf7b142 chore(deps): update dependency microsoft.sourcelink.github to v1.1.1 (#396)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-08 22:17:55 +00:00
renovate[bot]
2c71809f0d chore(deps): update dependency csharpier to v0.27.3 (#395)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-09 00:12:44 +02:00
0e906b5d86 fix(deps): update github.com/zoriya/go-mediainfo digest to 07018f0 (#392) 2024-04-09 00:10:27 +02:00
renovate[bot]
152916b543 fix(deps): update github.com/zoriya/go-mediainfo digest to 07018f0 2024-04-08 21:57:32 +00:00
1e82c1d0f3 chore: disable docker digest pinning and update config var (#394) 2024-04-08 23:56:44 +02:00
Devin Buhl
8adca4f4ca chore: disable docker digest pinning and update config var 2024-04-08 17:55:35 -04:00
a2624f85dd chore: set up renovate for dependency management (#387) 2024-04-08 23:46:29 +02:00
Devin Buhl
04850b2982 ignore front dir 2024-04-08 23:44:59 +02:00
Devin Buhl
9d83f02c8b add minimum release age to renovate config 2024-04-08 23:44:59 +02:00
Devin Buhl
9ffc1d6d92 add schema to config 2024-04-08 23:44:59 +02:00
Devin Buhl
ed3c58da12 chore: set up renovate for dependency management 2024-04-08 23:44:59 +02:00
e2ff1d07a0 back: migrations: fix postgres config (#388) 2024-04-07 13:16:49 +02:00
Antoine Labarussias
bd723a07cd back: migrations: fix postgres config 2024-04-07 12:28:16 +02:00
e07523f612 Change localhost to meilisearch on the healthcheck (#384) 2024-04-06 16:35:33 +02:00
939aaed64d Change localhost to meilisearch on the healthcheck
Co-authored-by: tam1m <tam1m@users.noreply.github.com>
2024-04-06 16:33:33 +02:00
55ddbf72d9 feat: add GHCR container images (#383) 2024-04-06 16:01:54 +02:00
Devin Buhl
ecbccc5fb6 fix: add package perms
Signed-off-by: Devin Buhl <devin@buhl.casa>
2024-04-06 08:33:03 -04:00
Devin Buhl
32a7f2cb1f feat: add GHCR container images
Signed-off-by: Devin Buhl <devin@buhl.casa>
2024-04-06 08:26:43 -04:00
8aa4d3f7d0 Allow cpu profile for docker compose versions where default profile i… (#379) 2024-04-06 13:33:32 +02:00
dde3af188d Allow cpu profile for docker compose versions where default profile is not valid 2024-04-06 13:31:41 +02:00
e04093df48 Add discord image on readme 2024-04-05 13:55:26 +02:00
37ed58b201 Update path for old datadir 2024-04-04 02:00:12 +02:00
1217ee3e54 Create image migration code (#373) 2024-04-04 01:55:22 +02:00
a8c7ecc865 Create image migration code 2024-04-04 01:52:06 +02:00
0f42775282 Fix small segments cut at beginning of transcode blocks (#372) 2024-04-03 23:59:43 +02:00
7c9bb11d14 Fix small segments cut at beginning of transcode blocks 2024-04-03 23:47:17 +02:00
3abdb0a4c4 Fix videostream handle flags 2024-04-03 23:47:17 +02:00
17a4e418a2 Fix watch status repository register 2024-04-03 23:47:17 +02:00
25be3d77a5 Add tv specifics genres (#371) 2024-04-02 23:27:18 +02:00
8758c7447e Format code 2024-04-02 23:24:24 +02:00
8a639a3aee Simplify lazy creation 2024-04-02 23:14:01 +02:00
7ee28f4557 Update dockerfile 2024-04-02 23:05:26 +02:00
1b4d1ef45e Add genres migrations 2024-04-02 22:06:32 +02:00
de2308f319 Fix dotnet ef design time context 2024-04-02 22:06:32 +02:00
f64cf161ab Remove all autofac references 2024-04-02 22:06:32 +02:00
436cbee752 Fix services provider issues 2024-04-02 22:06:32 +02:00
9bd1e50de3 Delete usless plugin/startup handling 2024-04-02 22:06:32 +02:00
13ad35a9ac Add tv specifics genres 2024-04-02 22:06:32 +02:00
266caa3f02 Fix segments list having a greater length than capacity (#370) 2024-04-01 23:09:39 +02:00
ea98598399 Use builtin max instead of custom one 2024-04-01 22:54:23 +02:00
83110374f8 Fix login page unscrollable on web 2024-04-01 21:39:27 +02:00
1f16271354 Use duration from /info endpoint instead of player's duration 2024-04-01 20:53:53 +02:00
0c387fc19a Fix segments list having a greater length than capacity 2024-04-01 20:36:05 +02:00
7d423bb049 Fix nvidia format change (#369) 2024-04-01 01:04:33 +02:00
c3bebdec01 Fix nvidia format change 2024-04-01 00:51:44 +02:00
d26934b602 Fix some android issues (#368) 2024-04-01 00:23:05 +02:00
e16fdc1036 Fix authorization tokens usage on android images 2024-03-31 23:24:29 +02:00
0008aa95c2 Sort qualites on android 2024-03-31 23:08:06 +02:00
a8d29b5b26 Fix authorization tokens usage on the android player 2024-03-31 23:00:12 +02:00
61a8b07f4b Fix login links no working on mobile 2024-03-31 22:57:24 +02:00
d3ec0cab9b Relax same codec check to not care about h264 level 2024-03-31 19:12:54 +02:00
5e054e12f7 Prevent 500 when specifing invalid show id on episode create (#367) 2024-03-31 18:10:28 +02:00
e8896b7787 Prevent 500 when specifing invalid show id on episode create 2024-03-31 16:15:40 +02:00
0cf7b1369b Remove usless logs 2024-03-31 16:00:25 +02:00
7428147100 Use rfc6381 to prevent h265 playback issues (#366) 2024-03-30 23:29:26 +01:00
88f3f7a9ae Include same quality transcoded level if codecs are differents 2024-03-30 23:16:59 +01:00
2ff507f641 Add codec info on transmux level of hls master playlist 2024-03-30 23:16:59 +01:00
3de751c880 Add rfc6381 codec on the /info endpoint 2024-03-30 23:16:59 +01:00
9a9e43269d Fix 10bits encoding and enable software encoding fallback on vaapi hwaccel 2024-03-30 23:16:59 +01:00
12276ed034 Disable bitrate check to allow h265 to be transcoded to h264 2024-03-30 23:16:59 +01:00
22b68f4dc7 Fix scanner deleting items with quotes or & in path 2024-03-30 23:16:59 +01:00
80e928ee43 Fix unlogged account error not showing (#365) 2024-03-27 02:03:50 +01:00
bb3e57ff2a Fix filters with string containing quotes 2024-03-27 00:04:40 +01:00
78247acba7 Fix unlogged account error not showing 2024-03-27 00:04:40 +01:00
e4f00d34bc Add targetarch support for Dockerfile.migrations (#364) 2024-03-26 22:25:48 +01:00
81d4a13735 Add targetarch support for Dockerfile.migrations 2024-03-26 16:54:24 +01:00
5d430f8ee8 Fix autosync image in docker-compose.prod.yml 2024-03-26 14:27:52 +01:00
aba6c873df Fix tag release CI (#363) 2024-03-26 14:23:23 +01:00
d140a6e392 Fix tag release CI 2024-03-26 14:17:34 +01:00
f7603db588 Fix enum mapping bugs (#360) 2024-03-26 01:24:02 +01:00
87754ae928 Organize imports 2024-03-26 01:11:55 +01:00
ecbf1f5db5 Fix enums handling with dapper 2024-03-26 01:00:32 +01:00
8ddf22d661 Use latest tagged version instead of edge as a default tag for the docker compose 2024-03-26 01:00:32 +01:00
13df17544c Display the invalid account page when the refresh token is invalid 2024-03-26 01:00:32 +01:00
39ce601344 Fix postgres enum mapping 2024-03-26 01:00:32 +01:00
db6670f699 Improve caching for migrations docker file 2024-03-26 01:00:32 +01:00
bd7991942a Use a service to run migrations (#358) 2024-03-26 00:07:12 +01:00
da594d6df1 Add migrations on the docker build ci 2024-03-26 00:02:30 +01:00
f6bb77a6a5 Add postgres dependency on migration service 2024-03-25 23:47:58 +01:00
ea979d9663 Handle connection string for migrations 2024-03-25 23:41:03 +01:00
646df0f393 Add a migration service on the docker compose 2024-03-25 22:28:22 +01:00
d24d18ea8e Create a migration dockerfile 2024-03-25 22:28:22 +01:00
9740a5d0d4 Remove custom dotnet output path 2024-03-25 22:28:22 +01:00
034a554bf4 Update dotnet tools 2024-03-25 22:28:22 +01:00
fb1c006cd9 Remove postgres migrations handled by the api 2024-03-25 22:28:22 +01:00
928bfe7876 Remove legacy meilisearch populate 2024-03-25 22:28:22 +01:00
6485c733bb Add workflow dispatch for docker builds (#355) 2024-03-25 02:26:59 +01:00
b44bdb8a75 Add workflow dispatch for docker builds 2024-03-25 02:25:38 +01:00
71f56699c8 Update README.md 2024-03-25 02:18:47 +01:00
66fa07f341 Fix lots of bugs (#354) 2024-03-25 00:43:47 +01:00
2c8467090e Fix gitattributes 2024-03-25 00:16:44 +01:00
a18d5d0532 Use new onPlayPause: onPlaybackStatusChanged to support native events 2024-03-25 00:13:58 +01:00
c5b0a76982 Fix replace behavior on android 2024-03-25 00:06:57 +01:00
f352085f62 Remove firefox bugfix hack now that it is fixed 2024-03-24 23:56:45 +01:00
5374666ac9 Move keyframes info into another struct to prevent invalid data race warnings 2024-03-24 23:53:25 +01:00
411bbef65c Fix error handling on some malformed videos 2024-03-24 23:52:41 +01:00
f798f2c025 Show episode description more button on android 2024-03-24 23:24:58 +01:00
44c88a885f Handle invalid users on mobile too 2024-03-24 23:01:17 +01:00
b08bfeceb6 Fix race condition on info retrival 2024-03-24 22:23:04 +01:00
be8bf53cc6 Use custom json convertor for images instead of relying on type convertor 2024-03-24 22:07:29 +01:00
fee6032e78 Fix images from string conversion used by the scanner 2024-03-24 20:47:56 +01:00
64eb70d292 Update dapper for DateOnly support 2024-03-24 20:42:02 +01:00
dc7f7feab1 Mark migrations as generated 2024-03-24 18:56:34 +01:00
8afbc63b85 Use DateOnly for dates fields instead of DateTime 2024-03-24 18:52:54 +01:00
c942794b89 Add autosync to docker builds 2024-03-24 17:52:33 +01:00
e58b5a063f Add trakt in the list of supported oidc (#353) 2024-03-24 16:26:03 +01:00
dee3af3016 Fix random seed parsing when non uint where specifed 2024-03-24 16:10:34 +01:00
9f42c29714 Fix linked account being stale after oidc link 2024-03-24 16:10:34 +01:00
95bc5b9f7c Add trakt in the list of supported oidc 2024-03-24 16:10:34 +01:00
1cd3704bc3 Add simkl automatic syncing (#347) 2024-03-23 16:01:52 +01:00
8bbccd42d5 Format code 2024-03-23 15:34:54 +01:00
f89ce7a965 Disable show update rabbit message when updating an episode 2024-03-23 15:33:39 +01:00
7905edaf24 Use new json serializer in rabbitmq contetxs 2024-03-23 15:09:08 +01:00
851baa030c Remove deprecated version value on docker-composes 2024-03-23 14:10:07 +01:00
567d2ac686 Fix sln file 2024-03-23 14:04:56 +01:00
71bf334ac4 Handle absolute hander for simkl sync 2024-03-23 14:00:47 +01:00
2df874e786 Fix simkl requests body and episode identification 2024-03-23 14:00:47 +01:00
fe9aa865f9 Add shows in episode watch status change events 2024-03-23 14:00:43 +01:00
1e8316e16d Fix simkl requests 2024-03-23 13:59:43 +01:00
380c80bbaf Fix datetime parsing on autosync side 2024-03-23 13:59:43 +01:00
a8fe8e2e13 Parse json messages on autosync 2024-03-23 13:59:43 +01:00
22d0d064f7 Add rabbitmq healthchecks 2024-03-23 13:49:21 +01:00
a5c7aef3b8 Add service aggregates for autosync 2024-03-23 13:49:21 +01:00
e1f889f862 Listen to watch status events to call simkl 2024-03-23 13:49:20 +01:00
c6f12ab2a8 Add a simkl sync implementation 2024-03-23 13:47:47 +01:00
31d8dcd6a8 Add models in the autosync module 2024-03-23 13:47:47 +01:00
1f3a985d3a Fix watch status message payload 2024-03-23 13:47:46 +01:00
6937a982d4 Add autosync rabbitmq consumer 2024-03-23 13:17:11 +01:00
44bb88910f Add simkl oidc 2024-03-23 13:17:11 +01:00
115b9fa4b3 Fix rabbitmq config 2024-03-23 13:17:11 +01:00
b6f9c050e1 Publish WatchStatus changes to rabbitmq 2024-03-23 13:17:09 +01:00
cbb05ac977 Change rabbit channel from fanout to topic based 2024-03-23 13:12:03 +01:00
f1d72cb480 Publish Create/Update/Delete resource events to rabbit 2024-03-23 13:12:03 +01:00
3a5d6ed2cd Add deleted events 2024-03-23 13:07:23 +01:00
c15dcb02ec Add watch status changed events 2024-03-23 13:07:23 +01:00
0d91001376 Add rabbitmq 2024-03-23 13:07:23 +01:00
6143125f7a Migrate to dotnet8 (#350) 2024-03-23 01:15:57 +01:00
ee0f703120 Update nuget packages 2024-03-23 01:13:18 +01:00
34393bf050 Update host di container for dotnet8 2024-03-23 01:13:18 +01:00
5a461bca7d Migrate to dotnet8 2024-03-23 01:13:18 +01:00
5fedce71a0 Switch to file scopped namespaces (#349) 2024-03-23 00:23:16 +01:00
c9663ff14f Add to ignore revs 2024-03-23 00:21:11 +01:00
18e301f26a Switch to file scopped namespaces 2024-03-23 00:20:40 +01:00
35e37bbe76 Move from newtonsoft.json to system.text.json (#348) 2024-03-23 00:16:40 +01:00
5997921eb9 Remove jetbrains attributes 2024-03-23 00:11:17 +01:00
e7bedd6a29 Fully migrate to system.text.json 2024-03-23 00:11:17 +01:00
7194dcb2c7 Fix oneof json serialization 2024-03-23 00:11:17 +01:00
d62bdfc637 Add loadable fields handling on system.text.json serializer 2024-03-23 00:11:17 +01:00
ec6b90b33c Remove some json ignores on ids 2024-03-23 00:11:17 +01:00
0c0037416a Fix kind serialation 2024-03-23 00:11:17 +01:00
ad9d1ee430 Migrate from newtonsoft.json to system.text.json 2024-03-23 00:11:17 +01:00
d7e5b8b916 Delete useles tests 2024-03-23 00:11:17 +01:00
3e44d38a90 Remove old People references 2024-03-23 00:11:17 +01:00
9493531eaa Remove custom serializer ignore 2024-03-22 21:22:11 +01:00
64031668c1 Fix theme error on ssr 2024-03-22 21:22:11 +01:00
b6d122e449 Edit fr translations 2024-03-22 21:22:11 +01:00
19f26c6d91 Print stack trace in query error for ssr debuging 2024-03-10 21:35:44 +01:00
4108434788 Format code 2024-03-10 21:35:44 +01:00
01d7f62c36 Prevent unlogged users to try to see a watchlist 2024-03-10 21:35:44 +01:00
5cffeea4fd Fix custom token use in queryFn 2024-03-10 21:35:44 +01:00
e0fb29bd80 Update README.md 2024-03-10 20:12:06 +01:00
ad9a59f894 Auto delete issues on startup 2024-03-10 18:30:03 +01:00
ddad768cd8 Format code 2024-03-10 18:27:24 +01:00
8ee4446b30 Refresh token to check if user was verifed after a 403 2024-03-10 18:27:24 +01:00
5f936d36b1 Make accounts switch while having a permission error work 2024-03-10 18:27:24 +01:00
08f3e9c06b Prevent two accounts from behing linked to the same external account 2024-03-10 18:27:24 +01:00
25b7903c37 Fix oidc links opening two times on web 2024-03-10 18:27:24 +01:00
c6dd7203bb Display permissions errors on the front 2024-03-10 18:27:24 +01:00
08c7ca99b6 fixup! Handle non-verifed users on the front 2024-03-10 18:27:24 +01:00
8f7320c298 Prioritize auth header compared to auth cookie 2024-03-10 18:27:24 +01:00
92bfbf662b Handle non-verifed users on the front 2024-03-10 18:27:24 +01:00
44e7323720 Handle require verification on account creation 2024-03-10 18:27:24 +01:00
78a3ae8aeb Remove security mode to use a simple require verification bool 2024-03-10 18:27:24 +01:00
041abb732d Introduce security mode option 2024-03-10 18:27:24 +01:00
9ee07794a8 Update .env.example 2024-03-09 01:41:10 +01:00
7adfef9f36 Add all oidc variables to .env.example 2024-03-09 00:49:11 +01:00
a3ec224cf0 Format code 2024-03-09 00:49:11 +01:00
6d4a6ee52a Add account unlinking 2024-03-09 00:49:11 +01:00
0add402434 Fix oidc list ssr 2024-03-09 00:49:11 +01:00
6933aecfa4 Fix external token edit detection 2024-03-09 00:49:11 +01:00
93decb02af Fix ssr issue 2024-03-09 00:49:11 +01:00
c0acf1c1a0 Add unlink route 2024-03-09 00:49:11 +01:00
a6c3ab33b1 Allow existing accounts to be linked 2024-03-09 00:49:11 +01:00
079a2cdbe3 Move oidc logic inside a service 2024-03-09 00:49:11 +01:00
d9022fde9f Display connected status on linked accounts 2024-03-09 00:49:11 +01:00
830a518b86 Add skeletons for linked services 2024-03-09 00:49:11 +01:00
fef04409af Add linked accounts category in settings 2024-03-09 00:49:11 +01:00
4bc54d350b Fix next episode url for onEnd callback 2024-03-09 00:49:11 +01:00
e3cc80d32a Add presets support 2024-03-08 19:02:37 +01:00
411e05e998 Remove useless failing test 2024-03-07 01:36:57 +01:00
c319f6117a Disable login page errors on the web 2024-03-07 01:36:57 +01:00
a7fd96800a Format code 2024-03-07 01:36:57 +01:00
a09e229711 Handle deep links on android for oidc 2024-03-07 01:36:57 +01:00
7abb66b86f Fix oidc routing 2024-03-07 01:36:57 +01:00
f1707db5fb Fix oidc links baseUrl 2024-03-07 01:36:57 +01:00
35e1cc7253 Add oidcs on the server-url page 2024-03-07 01:36:57 +01:00
e8b4a26eda Disable guest account button on android 2024-03-07 01:36:57 +01:00
93f93f0186 Fix seconds server-url logins 2024-03-07 01:36:57 +01:00
7c5de3c131 Save server url when switching between register and login pages 2024-03-07 01:36:57 +01:00
a2a3134523 Theme disabled buttons 2024-03-07 01:36:57 +01:00
3821950e49 Cleanup server address selector 2024-03-07 01:36:57 +01:00
d52cc045e0 Rework apiurl handling to allow guests login on android 2024-03-07 01:36:57 +01:00
158058b720 Add guest permissions to server info 2024-03-07 01:36:57 +01:00
df6f9ea71d Start server url selector page for native 2024-03-07 01:36:57 +01:00
f4464578c0 Add allow guests to the server-info struct 2024-03-07 01:36:57 +01:00
c48ee975c6 Use back auto for hr 2024-03-07 01:36:57 +01:00
e60e2306b7 Add connection error page on the web 2024-03-07 01:36:57 +01:00
af422e62e1 Fix account validity check on android 2024-03-07 01:36:57 +01:00
952beccafc Cleanup border radius of login form 2024-03-07 01:36:57 +01:00
06171ae638 Make username uniques 2024-03-07 01:36:57 +01:00
b3a341847e Add discord as a builtin oidc provider 2024-03-07 01:36:57 +01:00
0d325f2c73 Handle duplicated usernames with oidc login 2024-03-07 01:36:57 +01:00
577f3f768d Better error display when oidc login is used 2024-03-07 01:36:57 +01:00
15d479f1eb Add oidc callback handling on the front 2024-03-07 01:36:57 +01:00
2b93076146 Oidc login page cleanups 2024-03-07 01:36:57 +01:00
68c83d8a5d Add background color to login form even when it overflows 2024-03-07 01:36:57 +01:00
239ad9a4dc Add continue with oidc button on login and register pages 2024-03-07 01:36:57 +01:00
5f8d0d1b99 Add info endpoint to list oidc providers names and logo 2024-03-07 01:36:57 +01:00
5827a18866 Remove old-password form on reset-pasword menu if user does not have one 2024-03-07 01:36:57 +01:00
633db89031 Fix dapper user json parsing 2024-03-07 01:36:57 +01:00
1335ae13e8 Add permissions to new users from external signin 2024-03-07 01:36:57 +01:00
115d52977d Make password optional 2024-03-07 01:36:57 +01:00
3bb36f5e78 Fix user lookup by provider id 2024-03-07 01:36:57 +01:00
98e9ba0fa7 Parse user profile and get jwt 2024-03-07 01:36:57 +01:00
35a69edfa2 Add value comparers for json columns and add user externalids on db 2024-03-07 01:36:57 +01:00
7df1a295f3 Add /login/{provider} route for oidc login 2024-03-07 01:36:57 +01:00
85fbd37434 Move admin account creation logic to the repository 2024-03-07 01:36:57 +01:00
07f0862219 Add oidc options parsing 2024-03-07 01:36:57 +01:00
bc99408652 Add external ids to user 2024-03-07 01:36:57 +01:00
461dad2724 Remove usless var on docker-compose 2024-03-07 01:36:57 +01:00
6cf76f6535 Update docker compose to use ro for library volumes 2024-03-07 01:36:57 +01:00
33a5893da1 Add support for tmdb continuous (absolute) ordering when using normal ordering (ex: One piece) 2024-02-27 00:53:56 +01:00
c14c0a6af5 Fix movies sort by start/end air date on items routes 2024-02-27 00:53:56 +01:00
fc7926c2cc Run monitor before scan 2024-02-27 00:53:56 +01:00
faf8832572 Add COMPOSE_PROFILES note on installing.md 2024-02-27 00:53:56 +01:00
d047e5d48a Format code 2024-02-26 22:41:14 +01:00
7baa586738 Fix some race conditions 2024-02-26 22:41:14 +01:00
4c7e335ef4 Lazy load keyframes 2024-02-26 22:41:14 +01:00
df8a1d3b26 Use new keyframes struct in stream to allow async keyframes analysis 2024-02-26 22:41:14 +01:00
6a1fff227e Rework keyframes creations to allow fs caching 2024-02-26 22:41:14 +01:00
4810d6cc5c Remove can transmux check with extra segments creation 2024-02-26 22:41:14 +01:00
1b73beccf1 Save info to json file on fs 2024-02-26 22:41:14 +01:00
ff8a791a51 Move keyframes extraction to its own file 2024-02-26 22:41:14 +01:00
98ead6ac69 Add json file to cache /info 2024-02-26 22:41:14 +01:00
8b6741641c Only enable intel hwaccel libs on amd64 2024-02-26 14:32:25 +01:00
b035ad07ec Use sha in thumbnails extractors 2024-02-26 14:32:25 +01:00
25fc5d5835 wip: Add quicksync support 2024-02-26 14:32:25 +01:00
c1cdcddf41 Add vaapi hardware acceleration 2024-02-26 14:32:25 +01:00
9a5142ced3 Add note about nvidia artifical encode limit 2024-02-24 21:13:18 +01:00
586b7900bb Update docker compose to use profiles 2024-02-24 21:13:18 +01:00
0ccb03f004 fixup! Improve hwaccel error logic 2024-02-24 21:13:18 +01:00
90676ff8a4 Enable hwaccel flags in original mode 2024-02-24 21:13:18 +01:00
2cacd94f41 Improve hwaccel error logic 2024-02-24 21:13:18 +01:00
de3013eebf Use padding segment for audio since it give better results 2024-02-24 21:13:18 +01:00
1c71258984 fixup! Remove padding segment at the start 2024-02-24 21:13:18 +01:00
00831fdb61 Use precise durations for segment splits (needed in hardware transcode mode) 2024-02-24 21:13:18 +01:00
f5c629cb8a Remove padding segment at the start 2024-02-24 21:13:18 +01:00
9531795066 Fix keyframes i-frame type on hardware transcode 2024-02-24 21:13:18 +01:00
71fe10efaf Update docker debian version to use ffmpeg 6.1 2024-02-24 21:13:18 +01:00
b042b4cf60 Move sc_threshold and no_scenecut to hwaccel flags 2024-02-24 21:13:18 +01:00
f4980cefde Better scalling handling 2024-02-24 21:13:18 +01:00
25901cef45 Add start_at_zero flag to make debugging easier 2024-02-24 21:13:18 +01:00
d71cd625d0 Make video start time detection smarter 2024-02-24 21:13:18 +01:00
43350ee1fd Add hwaccelerated scalling flags 2024-02-24 21:13:18 +01:00
ae1dee9d51 Base transcoder image on debian to allow hwaccel 2024-02-24 21:13:18 +01:00
ff2d077a7f Add flags handling to support hwaccel 2024-02-24 21:13:18 +01:00
a383de971a Fix transcode for files that does not start at 0ms 2024-02-21 16:24:16 +01:00
800fa13071 Delete issues related to deleted files 2024-02-19 18:20:24 +01:00
490c68a9f5 Add overall.play on permissions setter of the admin panel 2024-02-19 18:10:22 +01:00
1ba03ba909 Fix play permission migration not behing applied 2024-02-19 18:08:22 +01:00
346750931d Fix type issue 2024-02-19 17:55:20 +01:00
e612869027 Fix xem overrides when no episodes connections exist 2024-02-19 17:55:20 +01:00
2673ddaf13 Fix tmdb absolute with long running animes (one-piece, naruto...) 2024-02-19 17:55:20 +01:00
a3172c7918 Format code 2024-02-19 17:14:41 +01:00
8269d80620 Update front to not use deprecated apis 2024-02-19 17:14:41 +01:00
d1158cab05 Fix thumbnails never returning 2024-02-19 17:14:41 +01:00
09430e56b8 Fix video route 2024-02-19 17:14:41 +01:00
51d3684fcc Fix new heads kill segf 2024-02-19 17:14:41 +01:00
2968ca3562 Update default permissions 2024-02-19 17:14:41 +01:00
ee3d8916ed Use cmap for thumbnails 2024-02-19 17:14:41 +01:00
acedb77c07 Fix old proxy api 2024-02-19 17:14:41 +01:00
32b1681573 Rework cache 2024-02-19 17:14:41 +01:00
5389e1b783 Use cmap for transcode streams 2024-02-19 17:14:41 +01:00
f54a876636 Use cmap for infos 2024-02-19 17:14:41 +01:00
2afed432f7 Use concurrent map for subtitles 2024-02-19 17:14:41 +01:00
b687d8ea95 Create a concurrent map 2024-02-19 17:14:41 +01:00
2594afc60f Fix extraction when it has failed previously 2024-02-19 17:14:41 +01:00
f5be4a8b99 Attachments handling 2024-02-19 17:14:41 +01:00
a8b0eeb973 Add generic thumbnails route 2024-02-19 17:14:41 +01:00
ff5ecb474f Make transcoding logic similar for episodes and movies 2024-02-19 17:14:41 +01:00
0a0939fa3d Start to remove transcoder dependence on kyoo 2024-02-19 17:14:41 +01:00
19485a110a Fix format 2024-02-18 16:10:56 +01:00
79dc4e5f33 Try to prefer transmux instead of transcode (not sure yet) 2024-02-18 16:10:56 +01:00
7f6721147a Prevent sigsegv when no video exist in the file 2024-02-18 16:10:56 +01:00
20bf6851c0 Always use on media unsuported on error on android since errors code are unreliables 2024-02-18 16:10:56 +01:00
7adbb5d299 Fix double press to skip 10s on web 2024-02-18 16:10:56 +01:00
2a3d5de54b Add scanner issues on the admin panel 2024-02-17 23:54:55 +01:00
18ff6fe71b Move admin's user list to specific file 2024-02-17 23:54:55 +01:00
a278e3a565 Save scanner issues on the db 2024-02-17 23:54:55 +01:00
9f003189e9 Add issues api 2024-02-17 23:54:55 +01:00
050b420f9a Fix last segment never showing on transcode/transmux 2024-02-17 23:54:55 +01:00
2b59a35bf3 Add issues table 2024-02-17 23:54:55 +01:00
7f20a3f36a Fix watch status delete status 2024-02-17 23:54:55 +01:00
784289a792 Format code 2024-02-14 15:52:40 +01:00
d79a73d311 Fix users overlap on admin panel 2024-02-14 15:52:40 +01:00
13c0430c93 Add set permission option on admin panel 2024-02-14 15:52:40 +01:00
1e4081a03f Add PATCH /{resource}/{id} route 2024-02-14 15:52:40 +01:00
275cc70e96 Fix permission check issue 2024-02-14 15:52:40 +01:00
3fccbae676 Add user list in admin panel 2024-02-14 15:52:40 +01:00
1fb3088f0e Add unauthorized guard for the admin panel 2024-02-14 15:52:40 +01:00
81131edf2d Add admin panel button 2024-02-14 15:52:40 +01:00
973685ec08 Fix admin creation logic 2024-02-14 15:52:40 +01:00
6139deb175 Add subrip anX position tag support 2024-02-13 03:46:53 +01:00
93daed8ec8 Format code 2024-02-13 00:52:21 +01:00
08c34a18f2 Remove back debug head limit 2024-02-13 00:52:21 +01:00
682dd1093f Disable deleted head cleanup 2024-02-13 00:52:21 +01:00
6806d1f242 Disable audio future heads preparation 2024-02-13 00:52:21 +01:00
394fe4871f Fix segments and keyframe params (segments need relative to 0, keyframes relative to original ts with -copyts) 2024-02-13 00:52:21 +01:00
edc1619962 Cleanup -to and always use -copyts 2024-02-13 00:52:21 +01:00
970d613285 Disable scene detection auto keyframes as they create weird segments in transcode 2024-02-13 00:52:21 +01:00
4167704f85 Fix audio sync issue 2024-02-13 00:52:21 +01:00
1e0ff4a950 Disable noaccurate_seek on audio streams 2024-02-13 00:52:21 +01:00
4993d34835 Cleanup next segment preparation 2024-02-13 00:52:21 +01:00
3f9446d46f Fix timestamps padding in transcode mode 2024-02-13 00:52:21 +01:00
030a4e0e86 Add start ref to seek before the current segment 2024-02-13 00:52:21 +01:00
d27cf2afc8 Distrust -to and -ss to be precise, use the segment splitter for that (wip) 2024-02-13 00:52:21 +01:00
5b27eab680 Cleanup end detection 2024-02-13 00:52:21 +01:00
345eabafb2 fixup! Fix missing last segment 2024-02-13 00:52:21 +01:00
c635fc00c3 Add back segment time delta 2024-02-13 00:52:21 +01:00
2877083ebe Fix missing last segment 2024-02-13 00:52:21 +01:00
bb29b7e7f7 Fix transcode wait time on extremly slow devices 2024-02-13 00:52:21 +01:00
7aca2b2d6d Remove segment delta 2024-02-13 00:52:21 +01:00
fe5ba9a84a Fix missing bitrate info when files use nominal bitrate 2024-02-13 00:52:21 +01:00
2067a58c70 Fix show slug in news page 2024-02-05 23:37:53 +01:00
8b2c0f732f Improve xem titles sanitizing 2024-02-05 23:22:03 +01:00
fbd76594ea Perform xemlookup based on names if tvdbid could not be found 2024-02-05 23:22:03 +01:00
a055dfac5b Remove non letters from titles for xem lookup 2024-02-05 23:22:03 +01:00
e772a798f7 Finish xem fixup rule 2024-02-05 23:22:03 +01:00
ed9c4ebb68 Create the xem fixup rule (always runs for now) 2024-02-05 23:22:03 +01:00
0439e1f37a Format code 2024-02-05 00:37:56 +01:00
eb4f88bc60 Add delete button for the avatar 2024-02-05 00:37:56 +01:00
666477e448 Add set and delete methods for the /users api 2024-02-05 00:37:56 +01:00
6787400056 Fix local avatar retrival 2024-02-05 00:37:56 +01:00
2ecda09ee4 Add avatar upload setting 2024-02-05 00:37:56 +01:00
0bd497279d Allow pp retrival without behing logged in (for easier cross backend access) 2024-02-05 00:37:56 +01:00
1023cf0120 Add account logo on the avatar component 2024-02-05 00:37:56 +01:00
f4dc4c315d Use cookie for the jwt for images or videos 2024-02-05 00:37:56 +01:00
8b92d0525f Remove user's logo in db 2024-02-05 00:37:56 +01:00
530811b699 Add a user api 2024-02-05 00:37:56 +01:00
cee7ca2ca0 Add group support to partial permissions 2024-02-05 00:37:56 +01:00
c26a95ed60 Fix gravatar proxy 2024-02-05 00:37:56 +01:00
b43b6d6f75 Add user pp support with gravatar fallback 2024-02-05 00:37:56 +01:00
c969908ff5 Add csharpier upgrade to git blame ignore revs 2024-02-05 00:04:19 +01:00
a5638203a6 Update csharpier 2024-02-03 14:55:18 +01:00
042cc018cb Fix format 2024-02-02 18:40:38 +01:00
42d2b8009c Add XemFixup todo 2024-02-02 18:40:38 +01:00
5264214eb3 Improve the TitleNumberFixup rule 2024-02-02 18:40:38 +01:00
bba1fd964d Add a naive TitleNumberFixup rule 2024-02-02 18:40:38 +01:00
5821a79af9 Add episode title promotion rule 2024-02-02 18:40:38 +01:00
9dde2475fc Add multi episodes/seasons safeguards 2024-02-02 18:40:38 +01:00
f90d2d2f04 Add multiple season rules 2024-02-02 18:40:38 +01:00
b4ba255afc Add custom guessit rules 2024-02-02 18:40:38 +01:00
1abee46f6d Fix android auto not selected by default 2024-02-01 01:11:54 +01:00
0fbfd5731d Fix snackbar text color 2024-02-01 01:11:54 +01:00
6265f9bc2c Use onMediaUnsupported on android too 2024-02-01 01:11:54 +01:00
8c910fa532 Fix start time reset issue on android by a new t props 2024-02-01 01:11:54 +01:00
08d2bb2fd5 Add default playmode setting 2024-02-01 01:11:54 +01:00
885b784f92 Add optimistic mutations on settings page 2024-02-01 01:11:54 +01:00
7c56ec8285 Add a snackbar when playback error occurs 2024-02-01 01:11:54 +01:00
b21fc9db25 Create a snackbar 2024-02-01 01:11:54 +01:00
e06989f2ae Fix start time not working when trying to play pristine without success 2024-01-31 13:51:36 +01:00
fab2784e16 Disable start time when switching episodes 2024-01-31 13:51:36 +01:00
b323736774 Fix account deselecting itself sometimes 2024-01-31 13:51:36 +01:00
a0c1fdbd74 Fix touch controls triggering when showing them 2024-01-31 13:51:36 +01:00
2db6255fae Migrate to ruff 2024-01-31 02:41:21 +01:00
898e7b272e Fix absolute episode parsing when seasons are missing on tmdb 2024-01-30 23:47:42 +01:00
f0e6ee5835 Fix duplicated exception when the item was deleted 2024-01-30 23:47:42 +01:00
a01ce5c11c Fix scanner delete/recreate handling 2024-01-30 23:47:42 +01:00
c7e6114480 Fix missing tvdb id after thexem lookup 2024-01-30 23:47:42 +01:00
e3908da7a9 Fix types 2024-01-30 18:46:28 +01:00
93608c9549 Fix react-native-video typescript 2024-01-30 18:46:28 +01:00
ecc2b70e43 Cleanup timeout handling 2024-01-30 18:46:28 +01:00
92a3c2945c Handle audio settings 2024-01-30 18:46:28 +01:00
0be1bf4f15 Center select arrow 2024-01-30 18:46:28 +01:00
65b0b22b01 Delete unused gitmodules 2024-01-30 18:46:28 +01:00
7b4b572802 Explain missing audio in pristine mode 2024-01-30 18:46:28 +01:00
049474e4bd Add missing more button on movies in the news and watchlist 2024-01-30 18:46:28 +01:00
5c11372543 Remove useless qualitiesAvailable props 2024-01-30 18:46:28 +01:00
de0eb0b4e9 Add default subtitle handling 2024-01-30 18:46:28 +01:00
e60a1e5a25 Fix web select warnings due to refs 2024-01-30 18:46:28 +01:00
27ae6b512b Add playback settings 2024-01-30 18:46:28 +01:00
5f89c6e498 Split settings in multiples files 2024-01-30 18:46:28 +01:00
b760287ca2 Update README.md 2024-01-30 03:23:51 +01:00
e80543e0a2 Fix int size not long enough 2024-01-30 01:13:07 +01:00
af6436c3d8 Switch seamlessly between pristine and auto quality 2024-01-29 13:25:51 +01:00
f65e4bc417 Format code 2024-01-29 03:41:39 +01:00
68c28ed358 Set default playlist to transmux instead of bandwidth dependant 2024-01-29 03:41:39 +01:00
fed94eab1b Prevent abort errors from behing printed 2024-01-29 03:41:39 +01:00
1dbee1d79f Fix hls start position 2024-01-29 03:41:39 +01:00
09b146928c Fix distance unit and make segment timeout bigger 2024-01-29 03:41:39 +01:00
983b558510 Use os.Stat instead of mediainfo for thumbnails cache path 2024-01-29 03:41:39 +01:00
9fd7ca35f1 Create a settings struct for paths 2024-01-29 03:41:39 +01:00
e886fbcc5f Do not wait for thumbnails extractions when requesting infos 2024-01-29 03:41:39 +01:00
853bfd5f9b Fix x-client-id error message 2024-01-29 03:41:39 +01:00
6ba0786608 Fix transcoder execution time prints 2024-01-29 03:41:39 +01:00
b33b428d3b Fix react query abort signal handling 2024-01-29 03:41:39 +01:00
19c5efaed0 Add good error message when transcoder is not available 2024-01-29 03:41:39 +01:00
dependabot[bot]
53285059c5 Bump golang.org/x/image in /transcoder
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.0.0-20191009234506-e7c1f5e7dbb8 to 0.10.0.
- [Commits](https://github.com/golang/image/commits/v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-28 21:27:48 +01:00
a8e4b74fba Add docker build cache 2024-01-28 21:21:01 +01:00
2374c2d22e Update ci 2024-01-28 21:21:01 +01:00
1df8d6589a Add chapters on bottom scrubber, set video progress only on seek end 2024-01-28 19:55:18 +01:00
90498eb117 Fix scrubber popup theme 2024-01-28 19:55:18 +01:00
0cc6274894 Fix bottom scrubber on android 2024-01-28 19:55:18 +01:00
085d337fb7 Fix typesd 2024-01-28 19:55:18 +01:00
a56c06ca33 Enable the bottom scrubber only on touch 2024-01-28 19:55:18 +01:00
d026f9b418 Cleanup chapter handling and display the good image 2024-01-28 19:55:18 +01:00
7803f8f11a Add web scrubber on hover 2024-01-28 19:55:18 +01:00
ec90862262 Add x and y props to image 2024-01-28 19:55:18 +01:00
5efcfb8b61 Move scrubbing vtt parsing to a hook 2024-01-28 19:55:18 +01:00
7193a599b7 Improve medioinfo with invalid videos and add multiple videos support to the /info 2024-01-28 19:55:18 +01:00
6ec387e724 Remove invalid fonts array when there is no fonts 2024-01-28 19:55:18 +01:00
c3e8f87562 Add file size in mediainfo popup 2024-01-28 19:55:18 +01:00
ac846ad351 Fix slider track on android 2024-01-28 19:55:18 +01:00
647a4c3782 Fix touch controls position with no next or no prev episode 2024-01-28 19:55:18 +01:00
1901c908ff Fix minutes display of thumbnails.vtt 2024-01-28 19:55:18 +01:00
797ea13982 Sync the scrobber with the current progress 2024-01-28 19:55:18 +01:00
6b006e78e5 Improve timer string 2024-01-28 19:55:18 +01:00
733d6c8c7b Add a basic bottom scrubber that displays thumbnails 2024-01-28 19:55:18 +01:00
d3d59443fa Add file size in /info 2024-01-28 19:55:18 +01:00
a74fbce48e Resize thumbnails and cap max number of thumbnails 2024-01-28 19:55:18 +01:00
cecf7b0f74 Update dockerfiles to add ffmpeg dependency 2024-01-28 19:55:18 +01:00
8a862c86a5 Dont extract thumbnails if already exists 2024-01-28 19:55:18 +01:00
e6a9e2c7da Add thumbnail cache 2024-01-28 19:55:18 +01:00
b147ee8850 Create a thumbnails sprite api 2024-01-28 19:55:18 +01:00
2d8bd207ed Use a fork of react-native-bg-downloader 2024-01-28 02:06:27 +01:00
3a125263b7 Fix shell.nix 2024-01-28 02:06:27 +01:00
a6a26cdf8d Update prettier 2024-01-28 02:06:27 +01:00
ec1184d5c9 Fix breaking changes 2024-01-28 02:06:27 +01:00
ae518cafe5 Update the downloader module 2024-01-28 02:06:27 +01:00
3ae167bd16 Fix lockfile 2024-01-28 02:06:27 +01:00
82c342c7db Update packages 2024-01-28 02:06:27 +01:00
0e10f29cd2 Resume to the last watched position 2024-01-28 02:06:27 +01:00
9c03bac804 Allow icons to wrap on the header page 2024-01-22 20:50:15 +01:00
6ff41c55fe Allow the mediainfo popup to wrap 2024-01-22 20:50:15 +01:00
992b64df8a Simplify medioinfo popup 2024-01-22 20:50:15 +01:00
53ac4a2050 Create a usePopup to simplify popup creation 2024-01-22 20:50:15 +01:00
Arthur Jamet
d9f4a6ff8d Front: Make MediaInfo Scrollable 2024-01-22 20:50:15 +01:00
521a68b4c7 Allow the popup to be styled 2024-01-22 20:50:15 +01:00
8e74413e18 Center popups on the screen 2024-01-22 20:50:15 +01:00
Arthur Jamet
5f7ef2a18e Front: Prettier 2024-01-22 20:50:15 +01:00
Arthur Jamet
fa969fa702 Front: Fix use of Yoshiki 2024-01-22 20:50:15 +01:00
Arthur Jamet
4aaba75c18 Front: Add Duration to media info 2024-01-22 20:50:15 +01:00
Arthur Jamet
b98df08f44 Front: MediaInfo: Show 'Default' only if there is more than 1 track + add missing translations 2024-01-22 20:50:15 +01:00
Arthur Jamet
4332bfee9b Front: Define Video Quality Enum 2024-01-22 20:50:15 +01:00
Arthur Jamet
4430450431 Front: Use another icon for mediainfo 2024-01-22 20:50:15 +01:00
Arthur Jamet
aea6253094 Front: Prettier 2024-01-22 20:50:15 +01:00
Arthur Jamet
37acfa1eec front: Add mediainfo button in movie page header 2024-01-22 20:50:15 +01:00
Arthur Jamet
0955da489c Front: Add Media Info in context menus 2024-01-22 20:50:15 +01:00
Arthur Jamet
2544f8f333 Front: Add translations for media info 2024-01-22 20:50:15 +01:00
Arthur Jamet
409a613e43 Front: Add Video Track Model/Validator 2024-01-22 20:50:15 +01:00
14da738cc8 Fix formating 2024-01-20 17:06:04 +01:00
7a8cc242ae Add runtime nullable migration 2024-01-20 17:06:04 +01:00
c0e6012d70 Make runtime nullable 2024-01-20 17:06:04 +01:00
b6df0ba2b1 Make runtime optional on the scanner 2024-01-20 17:06:04 +01:00
b9c1c766d6 Fix one segment transcode 2024-01-20 00:48:34 +01:00
802a872880 Fix empty audio segment bug 2024-01-20 00:29:39 +01:00
415b5b45b9 Add independent segments hint in m3u8 file 2024-01-20 00:29:39 +01:00
dd9e0b4fc7 Prevent unnecesarry future head creation 2024-01-20 00:29:39 +01:00
6c9a0ea576 Fix out of range segment for last segment 2024-01-20 00:29:39 +01:00
995f50cc21 Use better permission masks for folders 2024-01-19 22:00:29 +01:00
2a491ded00 Fix rw mutexes handling 2024-01-19 22:00:29 +01:00
0517f85d76 Fix out of range segment checking for future segments 2024-01-19 22:00:29 +01:00
f1c3844bd3 Use a multistage build for the docker transcoder 2024-01-18 13:32:06 +01:00
7309a435c5 Format code 2024-01-18 13:32:06 +01:00
2c26072560 Fix shell.nix python 2024-01-18 13:32:06 +01:00
425de0b315 Add extraction cache and wait for extraction to end to return subtitles/attachments 2024-01-18 13:32:06 +01:00
30cb171612 Add basic extraction methods 2024-01-18 13:32:06 +01:00
43ba1bb449 Start new transcode if next segments are not ready 2024-01-18 13:32:06 +01:00
d630f29753 Fix timing issue with cleanup 2024-01-18 13:32:06 +01:00
7b13733c9e Move last used handling inside the client tracker 2024-01-18 13:32:06 +01:00
ca6ec6a8ed Track and kill orphaned heads 2024-01-18 13:32:06 +01:00
efe07e39c2 Create a client tracker to delete old streams 2024-01-18 13:32:06 +01:00
c738e5bda3 Remove old transcoded values on startup 2024-01-18 13:32:06 +01:00
9d7e520168 Cleanup ffprobe reader 2024-01-18 13:32:06 +01:00
bc61c2e0ff Fix stream proximity check 2024-01-18 13:32:06 +01:00
f82e720aeb Kill old file streams 2024-01-18 13:32:06 +01:00
afacf61fbc Add audio streams 2024-01-18 13:32:06 +01:00
677cab6a57 Fix a lot of bugs 2024-01-18 13:32:06 +01:00
9df5eb4758 Rework vstream handle 2024-01-18 13:32:06 +01:00
892060334c Add videostream cache 2024-01-18 13:32:06 +01:00
f04d1dcf1e Fix ready check for segments blocking 2024-01-18 13:32:06 +01:00
6bb23d7acd Fix filestream retrival bug due to shadowing 2024-01-18 13:32:06 +01:00
aef30fecaa Add a kill command on streams 2024-01-18 13:32:06 +01:00
5f33172297 Kill streams that starts reencoding already read files 2024-01-18 13:32:06 +01:00
23feea4acc Use channels to wait for segments to become ready 2024-01-18 13:32:06 +01:00
e9738c2bc1 Add encoder heads 2024-01-18 13:32:06 +01:00
e5954712e2 Save processed segments in the stream 2024-01-18 13:32:06 +01:00
5d47a28ba6 Rename stream struct 2024-01-18 13:32:06 +01:00
95b1caeb26 Use pointers to store streams 2024-01-18 13:32:06 +01:00
049965cdc9 Add ffmpeg command building 2024-01-18 13:32:06 +01:00
88406c6ee5 Add video index generation 2024-01-18 13:32:06 +01:00
80d1b1af0f Add video and audio index/segment routes 2024-01-18 13:32:06 +01:00
d3a1c57111 Add ffprobe duration in print 2024-01-18 13:32:06 +01:00
8f824654e0 Add fonts in mediainfo output 2024-01-18 13:32:06 +01:00
2d36c6ad6e Finish master m3u8 retrival 2024-01-18 13:32:06 +01:00
4193b6b391 Add master m3u8 creation 2024-01-18 13:32:06 +01:00
b312403201 Fix chapter extraction bug when no chapters exist 2024-01-18 13:32:06 +01:00
a6076eb856 Add chapters in info 2024-01-18 13:32:06 +01:00
1cb54f44b1 Add subtitles in info 2024-01-18 13:32:06 +01:00
1c2049f918 Add audios in info 2024-01-18 13:32:06 +01:00
5c83162a29 Add get info route and video parsing 2024-01-18 13:32:06 +01:00
45091da5ac Fix channel concurency issue 2024-01-18 13:32:06 +01:00
b0c0ca0e0f Add basic cache clearing 2024-01-18 13:32:06 +01:00
46cf60a3b9 Fix error case in concurent transcode 2024-01-18 13:32:06 +01:00
68304af99e Allow transcoder to run concurently 2024-01-18 13:32:06 +01:00
8805f0f804 Cleanup string usage 2024-01-18 13:32:06 +01:00
570f08755d Add keyframe parsing 2024-01-18 13:32:06 +01:00
512aae252c Add direct stream route 2024-01-18 13:32:06 +01:00
e53a90a75d Add openapi.json from old transcoder 2024-01-18 13:32:06 +01:00
b2a0dfa702 Init go rewrite 2024-01-18 13:32:06 +01:00
439407ea59 Fix android release ci 2024-01-11 01:04:27 +01:00
aa26fd7d54 Update README.md 2024-01-10 23:31:18 +01:00
ca35611925 Format code 2024-01-10 22:44:41 +01:00
c3dae2c704 Cleanup settings page on android 2024-01-10 22:44:41 +01:00
9fe24cd115 Add a language preference 2024-01-10 22:44:41 +01:00
b97942b10f Add about tab on the settings page 2024-01-10 22:44:41 +01:00
c528d4dd78 Move delete account button to the settings page 2024-01-10 22:44:41 +01:00
ab6e8962e4 Add password reset button 2024-01-10 22:44:41 +01:00
6407579dd6 Add a password reset api 2024-01-10 22:44:41 +01:00
da4b877b0d Create a popup component 2024-01-10 22:44:41 +01:00
65a254d808 Allow username and email to be changed 2024-01-10 22:44:41 +01:00
08d9b9d950 Fix patch for direct values 2024-01-10 22:44:41 +01:00
a374e23821 Add account settings box 2024-01-10 22:44:41 +01:00
329b6fc67e Cleanup settings page 2024-01-10 22:44:41 +01:00
b4281188d4 Fix initial placeholders on mobile lists 2024-01-10 17:11:14 +01:00
1d6d27c0ee Fix bottom padding on infinte lists on mobile 2024-01-10 17:11:14 +01:00
721d9937e0 Create a refresh controller for the home page on android 2024-01-10 17:11:14 +01:00
c5c527ec10 Fix yarn cache in ci 2024-01-10 17:11:14 +01:00
ff154b03f3 Fix testcs 2024-01-10 13:12:37 +01:00
8e861faa24 Fix query params for the transcoder 2024-01-10 13:12:37 +01:00
fabafcb78b Rework patch apis 2024-01-10 13:12:37 +01:00
e668cdd89c Add settings field on the user 2024-01-10 13:12:37 +01:00
656dc493b8 Format scanner 2024-01-08 02:23:19 +01:00
3d697fbcd0 Fix scanner cache usage 2024-01-08 02:23:19 +01:00
0b55bd7dbb Use a sentinel instead of None for cache presence 2024-01-08 02:23:19 +01:00
b180429505 Some cache fix 2024-01-08 02:23:19 +01:00
472718c595 Fix absolute handling 2024-01-08 02:23:19 +01:00
6e6098b03a Fix faulty cache 2024-01-08 02:23:19 +01:00
e1b555781c Rework language handling in the scanner and handle seasons better 2024-01-08 02:23:19 +01:00
f9d6a816b0 Compute absolute ordering from normal seasons 2024-01-08 02:23:19 +01:00
d10eb66542 Extract absolute episodes handling to functions 2024-01-08 02:23:19 +01:00
8318a87d5d Fix bugs due to metadata ids behing ints instead of strings 2024-01-08 02:23:19 +01:00
1b140661ba Add xem show overrides 2024-01-08 02:23:19 +01:00
813d998bfb Fix cache for lists 2024-01-08 02:23:19 +01:00
a270edbde4 Extract show search in another cached function 2024-01-08 02:23:19 +01:00
e034d51ae0 Use the better cache in thexem 2024-01-08 02:23:19 +01:00
f110509ea0 Use the new cache in the scanner 2024-01-08 02:23:19 +01:00
5f787bedfe Create a really good async cache 2024-01-08 02:23:19 +01:00
b552ca7c51 Fix some bugs in xem 2024-01-08 02:23:19 +01:00
b3ddac60f6 Add a basic id mapper to retrive tvdb id from a tmdb id 2024-01-08 02:23:19 +01:00
91c88e7f43 Improve tvdb to tmdb season/episode conversion 2024-01-08 02:23:19 +01:00
5d7fc1ca0c Use xem mapping to retrive back episode number/season number 2024-01-08 02:23:19 +01:00
d063bd479c Add a basic xem provider 2024-01-08 02:23:19 +01:00
47e6c5f978 Fix bug in set last episode watch status as completed 2024-01-04 21:56:08 +01:00
df7b6ae71d Fix dapper from ids when the id list is empty 2024-01-02 00:40:04 +01:00
80a6ac0c80 Fix absolute episodes scanning 2023-12-24 12:31:34 +01:00
Arthur Jamet
1dd5c6b9f4 Front: Details Header: add Download Button (for Movies only) 2023-12-21 11:21:31 +01:00
Arthur Jamet
fdd3b72e52 Front: EpisodeLine: Remove unused CSS class 2023-12-21 09:37:15 +01:00
Arthur Jamet
5664465df5 Front: EpisodeLine: format releaseDate using current locale 2023-12-21 09:37:15 +01:00
Arthur Jamet
9a55262856 Front: EpisodeLine: Add Release date 2023-12-21 09:37:15 +01:00
Arthur Jamet
df451f56b1 Front: EpisodeLine: add 'Expand' button for description 2023-12-21 09:37:15 +01:00
9bee5df036 Format code 2023-12-20 05:04:41 +01:00
e843b73472 Fix mutations not resuming after reconnecting/relaunching 2023-12-20 05:04:41 +01:00
7a99bae541 Fix 'Item has not finished downloading' when item just finished 2023-12-20 05:04:41 +01:00
650ed8056e Format code 2023-12-20 04:21:27 +01:00
5ae386bac3 Build apk files instead of aab builds 2023-12-20 04:21:27 +01:00
9963bf6179 Allow the theme to be changed in the settings 2023-12-20 04:21:27 +01:00
c7061c8c75 Add a basic settings page 2023-12-20 04:21:27 +01:00
2919e07606 Implement the select component for mobile 2023-12-20 04:21:27 +01:00
b406ea6088 Create a select component for the web 2023-12-20 04:21:27 +01:00
7f6da9d79e Format code 2023-12-20 00:25:09 +01:00
e921095226 Fix weird fullscreen enter/exit event on the web 2023-12-20 00:25:09 +01:00
2b005d6ea5 Disable qualities button for downloaded items 2023-12-20 00:25:09 +01:00
d4ab42d98f Make the back button of the player goBack instead of going to the details page 2023-12-20 00:25:09 +01:00
a8ab835365 Fix some types 2023-12-20 00:25:09 +01:00
c0c39ab4d0 Display downloads progress bar and percentage 2023-12-20 00:25:09 +01:00
55a246d806 Add a retry mechanizum for downloads 2023-12-20 00:25:09 +01:00
85ba643bcc Fix episodes runtime wrap 2023-12-20 00:25:09 +01:00
022cd239d5 Handle offline mode 2023-12-20 00:25:09 +01:00
4a035327ef Persist mutations 2023-12-20 00:25:09 +01:00
78e30cd516 Fix types 2023-12-19 14:25:38 +01:00
14540081be Format code 2023-12-19 14:25:38 +01:00
883f39e4b5 Add basic download support on the web 2023-12-19 14:25:38 +01:00
213d5b74b5 Allow downloaded items to be played 2023-12-19 14:25:38 +01:00
c0cf11ee79 Create a basic download list 2023-12-19 14:25:38 +01:00
2e0a0e5eb0 Clean up kind handling in the front 2023-12-19 14:25:38 +01:00
7b035411c0 Fix download button errors 2023-12-19 14:25:38 +01:00
fb04daff9f Fix extension extraction 2023-12-19 14:25:38 +01:00
71d29a303f Add a downloads tab 2023-12-19 14:25:38 +01:00
f1cc396bfc Store and restore download lists 2023-12-19 14:25:38 +01:00
a483955763 Cleanup update code 2023-12-19 14:25:38 +01:00
3a2e5f5eb1 Add logic to download episodes and movies 2023-12-19 14:25:38 +01:00
b51c77dfa7 Add download option on contextual menues 2023-12-19 14:25:38 +01:00
2603c1b29d Add extension on the transcoder info 2023-12-19 14:25:38 +01:00
dd62f8f8ac Fix types 2023-12-15 02:10:01 +01:00
e176664bb4 Format front 2023-12-15 02:10:01 +01:00
e8bd663ad7 Add more menus everywhere 2023-12-15 02:10:01 +01:00
c67a11b8b6 Fix weird menus click via a weird hack 2023-12-15 02:10:01 +01:00
10924e2410 Add submenues for watchlist status 2023-12-15 02:10:01 +01:00
8b0faf8a0b Fix collection page padding 2023-12-15 02:10:01 +01:00
0fc23e2c86 Use a transparent navbar 2023-12-15 02:10:01 +01:00
0f7a8bd4f3 Add basics episodes more menu 2023-12-15 02:10:01 +01:00
8640fefc8b Fix menues padding on android 2023-12-15 02:10:01 +01:00
21c4a7c577 Fix typo 2023-12-13 20:09:28 +01:00
c453422317 Fix player hover touch control on android 2023-12-13 20:09:28 +01:00
60977f3631 Use onPress instead of onPointerDown on android 2023-12-13 20:09:28 +01:00
57b4463c01 Completly rewrite hover handling and add seek double press 2023-12-13 20:09:28 +01:00
fbc8e14125 Do not try to update watchstatus if the user is not connected 2023-12-13 20:09:28 +01:00
e13f2a7e42 Add basics touch controls for the player 2023-12-13 20:09:28 +01:00
d593eb3134 Disable jassub offset renderer for android chroem 2023-12-13 20:09:28 +01:00
6f81eeef7e Set maximum number of lines on the homepage 2023-12-12 23:10:40 +01:00
991e5004d7 Fix episodes display time overflow 2023-12-12 23:10:40 +01:00
91498f45cd Fix types 2023-12-12 23:10:40 +01:00
3d53693e68 Cleanup splash screen handling 2023-12-12 23:10:40 +01:00
1c7c4d3ab2 Cleanup safe area colors 2023-12-12 23:10:40 +01:00
7451452088 Add basics tabs on android 2023-12-12 23:10:40 +01:00
7403be6519 Format front 2023-12-12 23:10:40 +01:00
7de920154c Fix should build in ci 2023-12-12 23:10:40 +01:00
cdccc9bc8b Set minimum height of horizontal items 2023-12-12 23:10:40 +01:00
dab297413f Remove useles nginx dependencies on the dev docker compose 2023-12-12 23:10:40 +01:00
257ead2415 Remove some genres list on the home page for performances 2023-12-12 23:10:40 +01:00
445f193dbb Fix episodes box size on android 2023-12-12 23:10:40 +01:00
bf68f6b52c Fix horizontal lists on mobile 2023-12-12 23:10:40 +01:00
7895b535fa Support nested infinite lists on android 2023-12-12 23:10:40 +01:00
545e729f2e Cleanup recommanded card for android and nested links 2023-12-12 23:10:40 +01:00
dfe061e611 Fix ssr issue when not logged 2023-12-12 23:10:40 +01:00
21dffc846e Skip docker build if files did not change 2023-12-12 03:15:50 +01:00
e3824fc740 Format front 2023-12-11 01:57:24 +01:00
ac55a56e4a Fix show next episode css on android 2023-12-11 01:57:24 +01:00
5e95516190 Make tags clickables 2023-12-11 01:57:24 +01:00
9304c7ad2f Rework chip to support links and skeletons 2023-12-11 01:57:24 +01:00
0272b82166 Fix episode number round on android 2023-12-11 01:57:24 +01:00
d5a839b3c6 Use gap in android lists 2023-12-11 01:57:24 +01:00
5d26dd1945 Remove - suffix in accounts list on web 2023-12-11 01:57:24 +01:00
a6eb744cc9 Fix randomItems and images api url on android 2023-12-11 01:57:24 +01:00
6e530786b9 Rework auth guard on mobile 2023-12-11 01:57:24 +01:00
ce17229985 Fix reanimated version 2023-12-11 01:57:24 +01:00
869c6fac12 Update meilisearch healthcheck 2023-12-11 01:57:24 +01:00
2c465d5249 Use expo router entry 2023-12-11 01:57:24 +01:00
a27b4072be Fix babel warning 2023-12-11 01:57:24 +01:00
25e4978583 Update README.md 2023-12-11 01:57:06 +01:00
457a3c6709 Format the code 2023-12-09 19:02:15 +01:00
Arthur Jamet
ddb9b2926d Front: Recommended Component: fix align to position of play button 2023-12-09 19:02:15 +01:00
Arthur Jamet
1e5ef4003a Front: Constats: use camelCase 2023-12-09 19:02:15 +01:00
Arthur Jamet
f246b6ce32 Front: Constants: Move to single file 2023-12-09 19:02:15 +01:00
Arthur Jamet
b246f43c70 Front: Recommended: Use CSS calc to compute border radius of frame 2023-12-09 19:02:15 +01:00
Arthur Jamet
fbf660d532 Front: Recommended: Use theme for color 2023-12-09 19:02:15 +01:00
Arthur Jamet
db3f03dc6c Front: Prettier 2023-12-09 19:02:15 +01:00
Arthur Jamet
ba16d7873f Front: Recommended: Set color to white, for better contrast 2023-12-09 19:02:15 +01:00
Arthur Jamet
ee33c71dfe Front: Recommended: Add some padding around genre list and play button 2023-12-09 19:02:15 +01:00
Arthur Jamet
1eadcb6521 Front: Recommended: Fix position of play button when empty list of genres 2023-12-09 19:02:15 +01:00
Arthur Jamet
b3a9c9dae8 Front: Grid: If no subtitle, allow 2 lines for name 2023-12-09 19:02:15 +01:00
Arthur Jamet
c475691939 Front: Define and apply Image's border radius constant 2023-12-09 19:02:15 +01:00
Arthur Jamet
e6ac7e502c Front: 'Recommended' component: remove border radius on the right side 2023-12-09 19:02:15 +01:00
Arthur Jamet
30581a4ee1 Front: Fix chip text color on hover 2023-12-08 11:09:25 +01:00
a54311c53f Fix next episodes on continue watching 2023-12-08 03:09:45 +01:00
0c9711baea Create .git-blame-ignore-revs 2023-12-08 02:44:05 +01:00
bffd71fea5 Use csharpier in the ci 2023-12-08 02:42:46 +01:00
7e6e56a366 Add csharpier as a code formatter 2023-12-08 02:42:46 +01:00
baa78b9417 Add a healthcheck for meilisearch 2023-12-08 02:42:46 +01:00
b28bf5803d Add meilisearch to the back dependencies 2023-12-08 02:42:46 +01:00
Arthur Jamet
ee3eed6c23 Front: Better padding + text color for chips 2023-12-07 19:34:04 +01:00
bf831dba45 Fix previous episode when an absolute number is null 2023-12-07 00:42:15 +01:00
a43d54ee1d Fix tests 2023-12-07 00:03:13 +01:00
f536713f04 Format front 2023-12-07 00:03:13 +01:00
f438e80d3a Add login button instead of watchlist when user is not login 2023-12-07 00:03:13 +01:00
38cb4c4f28 Tranform completed shows in watching state when a new item is added 2023-12-07 00:03:13 +01:00
1178e8fd6c Hide completed items from the watchlist 2023-12-07 00:03:13 +01:00
e2414f94f3 Add movie watch percent progress bar 2023-12-07 00:03:13 +01:00
c87001d91e Create watchlist on the homepage 2023-12-07 00:03:13 +01:00
4cf9609153 Return next episode on /watchlist 2023-12-07 00:03:13 +01:00
83877d8dab Make infinite scroll fetch earlier 2023-12-07 00:03:13 +01:00
bab97fba5f Add watchlist filters and fix after id 2023-12-07 00:03:13 +01:00
c289161400 Create get all in watch status repository 2023-12-07 00:03:13 +01:00
7810f626c6 Add watchlist api 2023-12-07 00:03:13 +01:00
0294f538eb Create a component for watch status overlay 2023-12-07 00:03:13 +01:00
ce07cece06 Clean up 204 handling on the front 2023-12-07 00:03:13 +01:00
74013cf113 Rework the watch status observer to update every 10s 2023-12-07 00:03:13 +01:00
1eb7198e6f Set react query stale time to 5min 2023-12-07 00:03:13 +01:00
c24c8914bf Add watch status indicator on items list and recommanded card 2023-12-07 00:03:13 +01:00
e5dde472c9 Fix projected relations mixed with normal relations 2023-12-07 00:03:13 +01:00
7ccfab4d8b Add watch status indicator on items grid 2023-12-07 00:03:13 +01:00
0bc6512bcc Fix episodes count calculation on dapper 2023-12-07 00:03:13 +01:00
e70174cb24 Add watch percent display on episodes 2023-12-07 00:03:13 +01:00
fe155898bb Add show next up episode 2023-12-07 00:03:13 +01:00
bd48032a50 Handle next episode position/percent in show watch status 2023-12-07 00:03:13 +01:00
e124113d41 Add a watch observer to register watch status when playing 2023-12-07 00:03:13 +01:00
6974ef0163 Add watchlist menu to set status in details page 2023-12-07 00:03:13 +01:00
015bfe983c Push fix next episode id nullability 2023-12-07 00:03:13 +01:00
275a892ee1 Add react query devtools 2023-12-07 00:03:13 +01:00
0ac4a1daa0 Fix watch status upsert 2023-12-07 00:03:13 +01:00
7bf3ba2443 Disable watchlist button for unlogged users 2023-12-07 00:03:13 +01:00
cfa12b0fed Add basic watch status button on details page 2023-12-07 00:03:13 +01:00
2f309440cc Fix error messages for unlogged users on the watch status api 2023-12-07 00:03:13 +01:00
db3d7f1f2e Parse watch status on the front 2023-12-07 00:03:13 +01:00
d1febd13fd Standardize multiline raw strings indent 2023-12-07 00:03:13 +01:00
6fbd00a38f Add watchlists on news and library items 2023-12-07 00:03:13 +01:00
948c98f95b Add watchlist migration 2023-12-07 00:03:13 +01:00
4139362677 Update watch list code to use guids 2023-12-07 00:03:13 +01:00
b9932383c6 Nit picks files names 2023-12-07 00:03:13 +01:00
aa4ea2134a Add played date on watch status 2023-12-07 00:03:13 +01:00
48f77c2f7a Add watch apis 2023-12-07 00:03:13 +01:00
6567e78c8c Add percent, unseen episodes count and show completions handling 2023-12-07 00:03:13 +01:00
32050bcdcd Add episodes and shows watch status apis 2023-12-07 00:03:13 +01:00
2aa10c9b1f Add movie's watch status api 2023-12-07 00:03:13 +01:00
4f9c06c7bd Rename watch info to watch status 2023-12-07 00:03:13 +01:00
b6bb190e69 Add every tables for watchlists 2023-12-07 00:03:13 +01:00
4135fc5703 Start watchlist implementations 2023-12-07 00:03:13 +01:00
c1ba51b903 Run prettier 2023-12-05 23:56:14 +01:00
a218271001 Add guid parsing in filters 2023-12-05 23:56:14 +01:00
f4442fad0c Unselect account during refresh errors (could happen if server db was cleared) 2023-12-05 23:56:14 +01:00
87fdc1a444 Fix refresh token 403 first time 2023-12-05 23:56:14 +01:00
eed764c6e0 Use a promise cache to only refresh tokens one time on client side navigation 2023-12-05 23:56:14 +01:00
f9a2185748 Fix ssr issue with jwts 2023-12-05 23:56:14 +01:00
4f7c449ea7 Fix externalids error with null 2023-12-05 23:56:14 +01:00
7dab3fd094 Format front 2023-12-02 01:11:04 +01:00
49d225532c Various account fixes 2023-12-02 01:11:04 +01:00
b2c67e7df4 Fix yoshiki insert bug in input 2023-12-02 01:11:04 +01:00
07259a7635 Fix accounts under ssr 2023-12-02 01:11:04 +01:00
d63c601812 Fix some themes issues 2023-12-02 01:11:04 +01:00
ecd1b55fc6 Upgrade packages 2023-12-02 01:11:04 +01:00
4c955e4115 Add auth guard and connection check on mobile 2023-12-02 01:11:04 +01:00
14319a5c89 Rework account system 2023-12-02 01:11:04 +01:00
0ac388f3eb Rework login and navbar account display 2023-12-02 01:11:04 +01:00
fbf43fb10f Rework account storage system 2023-12-02 01:11:04 +01:00
e0f41be887 Expose more react query options to useFetch 2023-12-02 01:11:04 +01:00
bd84989454 Fix episodes comparison 2023-11-29 16:16:10 +01:00
e0b2e8e937 Lint code 2023-11-29 02:21:21 +01:00
f2ebc5659e Only list collections if more than 1 item is contained 2023-11-29 02:21:21 +01:00
b72553aa11 Restore incremental search 2023-11-29 02:21:21 +01:00
0ed35e0354 Fix random sort after id and implement dapper from ids 2023-11-29 02:21:21 +01:00
29d846a944 Allow kind to be used as a filter 2023-11-29 02:21:21 +01:00
9609fb150a Reduce the number of placeholder 2023-11-29 02:21:21 +01:00
9a5c4ab087 Improve duplicated error handling 2023-11-29 02:21:21 +01:00
f59f9a7ba0 Handle movies with the same slug but not the same date 2023-11-29 02:21:21 +01:00
8a925b35dd Fix duplicated episodes error 2023-11-29 02:21:21 +01:00
3e31c51f65 Fix news sort order 2023-11-29 02:21:21 +01:00
3c959ff532 Fix player poster always errored 2023-11-29 02:21:21 +01:00
fa6deb7f82 Fix guid test initialization 2023-11-28 23:27:50 +01:00
b7f5ede7cd Fix guid type issue on front 2023-11-28 23:27:50 +01:00
b2e0363594 Update tests with guids 2023-11-28 23:27:50 +01:00
73f4187087 Create new migration 2023-11-28 23:27:50 +01:00
1f63991ca0 Remove all migrations 2023-11-28 23:27:50 +01:00
8ea8d3ff57 Remove old watched episode and comment out usless people implementation 2023-11-28 23:27:50 +01:00
070a94d87d Switch from int ids to guid 2023-11-28 23:27:50 +01:00
22348e1554 Fix ci 2023-11-27 15:13:08 +01:00
0e2950ab69 Use entrypoint in dockerfiles 2023-11-27 15:13:08 +01:00
2b0f6837a8 Fix tests 2023-11-27 15:13:08 +01:00
ee4cc6706e Convert news items to dapper implementation 2023-11-27 15:13:08 +01:00
948f8694f2 Update front for new filter api and use includes when useful 2023-11-27 15:13:08 +01:00
29314d473f Support collections/id/items via dapper 2023-11-27 15:13:08 +01:00
5f177e9338 Fix count method of dapper 2023-11-27 15:13:08 +01:00
d7dd2bd138 Fix by after Id with random sorting in dapper 2023-11-27 15:13:08 +01:00
ba37786038 Implement a base repository for dapper 2023-11-27 15:13:08 +01:00
179b79c926 Handle images via dapper 2023-11-27 15:13:08 +01:00
411054afe9 Create a helper class to make queries eaiser 2023-11-27 15:13:08 +01:00
067eafbbe4 Fix reverse sorting 2023-11-27 15:13:08 +01:00
253e256458 Add keyset pagination support via generic filters 2023-11-27 15:13:08 +01:00
238fdf5d40 Delete in filter 2023-11-27 15:13:08 +01:00
13ddeaaf0a Add has and enums support 2023-11-27 15:13:08 +01:00
07afbdaa4b Add support for datetimes 2023-11-27 15:13:08 +01:00
0ff74d331f Use new filter on ef 2023-11-27 15:13:08 +01:00
3eff6228be Use new filter in dapper 2023-11-27 15:13:08 +01:00
edc6d11824 Parse new filters 2023-11-27 15:13:08 +01:00
e9aaa184cf Rework filters completly 2023-11-27 15:13:08 +01:00
e8351e960d Add projected relations 2023-11-27 15:13:08 +01:00
0ff03fb413 Support lateral queries on dapper 2023-11-27 15:13:08 +01:00
ba83edd26c Add custom relations on library items (first pass) 2023-11-27 15:13:08 +01:00
eed058c891 Disables many to many eager includes 2023-11-27 15:13:08 +01:00
48f82a6f13 Add include handling for one to one relations for library items 2023-11-27 15:13:08 +01:00
177391a74c Rework default sort and make it work with dapper 2023-11-27 15:13:08 +01:00
9ea177e2f6 Add kind attribute to json serializer 2023-11-27 15:13:08 +01:00
ca6a4d8ab5 Convert library items to an interface 2023-11-27 15:13:08 +01:00
c5a2a05af6 POC for library items includes 2023-11-27 15:13:08 +01:00
0034f93caa Add sort by and try includes for library items 2023-11-27 15:13:08 +01:00
d01ef02389 Fix StudioId casing on the movie 2023-11-27 15:13:08 +01:00
e8f2a72516 Install dapper and use it for library items 2023-11-27 15:13:08 +01:00
bc66d35497 Format front 2023-11-09 22:40:25 +01:00
e1d0d2c186 Cache identify request of the transcoder 2023-11-09 22:40:25 +01:00
e7c878b30a Fix some deprecation warnings 2023-11-09 22:40:25 +01:00
8fb46099d4 Split search sync and search manager to split lifetimes 2023-11-09 22:40:25 +01:00
72628519a5 Fix player hover overflow on really small phones 2023-11-09 22:40:25 +01:00
f7375428b6 Enable strict mode 2023-11-09 22:40:25 +01:00
ead8a44fe0 Differenciate metadata and info skeletons of the player 2023-11-09 22:40:25 +01:00
a1aa71e271 Fix search bar focus state 2023-11-09 22:40:25 +01:00
a72691a81f Add placeholders for the homepage 2023-11-09 22:40:25 +01:00
3be409ec70 Lazy load genre lists on the home page 2023-11-09 22:40:25 +01:00
9409197766 Use a canvas on the front to draw blurhash 2023-11-09 22:40:25 +01:00
1a92094eaf Fix images by updating ef projectables 2023-11-06 14:40:50 +01:00
fa47ccfd85 Fix slow queries by updating ef projectable 2023-11-06 13:59:42 +01:00
6b4468bf7d Format code 2023-11-06 01:24:55 +01:00
b0927b8388 Update and fix jassub 2023-11-06 01:24:55 +01:00
593dc3ca55 Reload subtitles on player ref change 2023-11-06 01:24:55 +01:00
a124a1a71f Disable hls ready callback to play 2023-11-06 01:24:55 +01:00
0e71242fd3 Limit cpu usage 2023-11-06 01:24:55 +01:00
556b2a2317 Cleanup focus reset 2023-11-06 01:24:55 +01:00
4bfd7c348d Unfocus control elements when controls hides 2023-11-06 01:24:55 +01:00
972007f9e5 Fix ratings and durations colors 2023-11-06 01:24:55 +01:00
9bfd1a78bd Use A instead of a Link component for external links 2023-11-06 01:24:55 +01:00
05d8332358 Use smallers chips 2023-11-06 01:24:55 +01:00
dd62611588 Fix no runtime info 2023-11-06 01:24:55 +01:00
f0d6402529 Fix infinite fetch 2023-11-06 01:24:55 +01:00
d73a37fbed Add head details for collections 2023-11-06 01:24:55 +01:00
9084a78420 Update node packages 2023-11-06 01:24:55 +01:00
1769aa45c9 Fix ratings migration default value 2023-11-03 21:13:43 +01:00
3386263fbe Fix metadata link contrast color 2023-11-03 18:12:45 +01:00
0eb7a58494 Limit the number of threads of the api 2023-11-03 18:12:45 +01:00
b995b86cee Add external links on show/movie page 2023-11-03 16:07:19 +01:00
a825912ad3 Add part of collection card on details page 2023-11-03 16:07:19 +01:00
e788dea8a4 Update ef projections 2023-11-03 16:07:19 +01:00
7622420f06 Create a collection page 2023-11-03 16:07:19 +01:00
66fff153e1 Format code 2023-11-03 16:07:19 +01:00
a33171ba87 Add rating and runtime to shows/movies pages 2023-11-03 16:07:19 +01:00
4bb7b4b6c4 Use harcoded s1e1 for items since relations dont work on them 2023-11-03 16:07:19 +01:00
f8e887c1f2 Fix some sizing issues of some scrollbars 2023-11-03 16:07:19 +01:00
47dc244a15 Use react tooltips instead of custom css 2023-11-03 16:07:19 +01:00
f872deffb8 Parse new fields in the front 2023-11-03 16:07:19 +01:00
5489f601d2 Fix items view for collections (sql) 2023-11-03 16:07:19 +01:00
d77813d82f Better healthcheck 2023-11-03 16:07:19 +01:00
b0f9d7906a Relax the fragment failure check of hls 2023-11-03 16:07:19 +01:00
eec08d4a3e Remove useless status check of the seach manager 2023-11-03 16:07:19 +01:00
320c45096b Add collections/id/items, movies and shows 2023-11-03 16:07:19 +01:00
68a83c31be Identify collections from themoviedb 2023-11-03 16:07:19 +01:00
88eb325079 Add PUT /collections/id/movie/id route to link movies/shows to colletions 2023-11-03 16:07:19 +01:00
b2f4933a5f Fix missing name errors 500 2023-11-03 16:07:19 +01:00
e12a1d369d Add a firstEpisode field on the backend 2023-11-03 16:07:19 +01:00
c4f1e420f8 Add runtime on the back 2023-11-03 16:07:19 +01:00
15a4280a36 Add ratings 2023-11-03 16:07:19 +01:00
3e39ef1705 Use a greater healthcheck timer 2023-11-01 21:18:43 +01:00
0dd3a6190e Fix meilisearch init 2023-11-01 21:14:29 +01:00
f03fbd42df Upgrade restart policy of the docker compose 2023-11-01 17:40:41 +01:00
dfc86e4b96 Fix tests 2023-11-01 17:36:11 +01:00
167e2853f0 Load every items from postgres on meilisearch creation 2023-11-01 17:36:11 +01:00
1698de332c Add href to news episode items 2023-11-01 17:36:11 +01:00
377d85c7f1 Add sorts to search items 2023-11-01 17:36:11 +01:00
68a3af0b52 Fix meilisearch indexes setup 2023-11-01 17:36:11 +01:00
5b7bfa79f9 Fix repositories create/edit/delete events 2023-11-01 17:36:11 +01:00
d7dee62e97 Add items index on meilisearch 2023-11-01 17:36:11 +01:00
4368f0cbe5 Setup meilsearch (part 1) 2023-11-01 17:36:11 +01:00
12f35fefc4 Add from id in repository 2023-11-01 17:36:11 +01:00
49a1dad51e wip 2023-11-01 17:36:11 +01:00
40c0403962 Add show thumbnail as backup for new episodes 2023-10-30 15:25:19 +01:00
068e153ae9 Use bigger episodes size in the news list 2023-10-30 15:25:19 +01:00
42869cb28f Style episodes in the news list 2023-10-30 15:25:19 +01:00
56a96540b4 Add show info on news episode, Add news on the front 2023-10-30 15:25:19 +01:00
5a6bb57fd5 Add news view in the db 2023-10-30 15:25:19 +01:00
44521d0d5f Add news repository and api 2023-10-30 15:25:19 +01:00
43a4a0e6ee Fix seasons list when there is no items 2023-10-29 21:37:53 +01:00
1373d0ce26 Add images links on the front instead of the back 2023-10-29 21:37:53 +01:00
c9c1ac5126 Cleanup hotfix thanks to the new option in Projectable 2023-10-29 00:58:56 +02:00
d136b98411 Update ef projectables 2023-10-28 23:27:57 +02:00
7e0e359f46 Hotfix next/previous episodes causing a 500 2023-10-28 22:32:42 +02:00
86427cf6ef Fix fields serialization 2023-10-27 22:44:45 +02:00
c7db07f7ba Add fields bindings 2023-10-27 22:44:45 +02:00
d3fbec1a9d Add include as a first class param and remove library manager thing 2023-10-27 22:44:45 +02:00
c621c45695 Add episodes count on the front 2023-10-27 02:46:31 +02:00
bb456738f0 Use privat prerelease version of ef.projectable 2023-10-27 02:46:31 +02:00
0112acdd2f wip update things 2023-10-27 02:46:31 +02:00
ae6121f3aa Fix seasons add 2023-10-27 02:46:31 +02:00
9b606cf9ac Add episode count in season 2023-10-27 02:46:31 +02:00
234d3c9c7c Fix ci 2023-10-27 00:47:57 +02:00
ce4663d512 Fix some aria items 2023-10-27 00:47:57 +02:00
97de98b89a Add seed in random queries next url 2023-10-27 00:47:57 +02:00
76d0c53cc1 Disable infinite fetch on some elements of the home 2023-10-27 00:47:57 +02:00
8b102b083f Use null safety 2023-10-27 00:47:57 +02:00
e13f9c6aa8 Allow random queries to be paginated 2023-10-27 00:47:57 +02:00
e8b929d4ca Clean up fetch story by allowing hook fetch 2023-10-27 00:47:57 +02:00
034f048883 Add browse link on home page 2023-10-22 01:00:34 +02:00
aceb6ee14c Fix home page for small screens 2023-10-22 01:00:34 +02:00
7698a1490e Format code 2023-10-22 01:00:34 +02:00
59a25fbee9 Clean up home page margins 2023-10-22 01:00:34 +02:00
fc598838c4 Disable empty genre list during ssr 2023-10-22 01:00:34 +02:00
11712b5b13 Add recommanded list 2023-10-22 01:00:34 +02:00
d2799adad0 Add recommanded card hover 2023-10-22 01:00:34 +02:00
872639dab9 Add play button on the recommanded card 2023-10-22 01:00:34 +02:00
e4562648ba Finish a basic recommanded card 2023-10-22 01:00:34 +02:00
941137ff51 Make images quality higher 2023-10-22 01:00:34 +02:00
eaec736676 Remove invalid next/prev in pages sorted by random 2023-10-22 01:00:34 +02:00
9ba7cb1ba5 Add darkOverlay in theme 2023-10-22 01:00:34 +02:00
2ce8e7f866 wip Add recommanded cards 2023-10-22 01:00:34 +02:00
5a618a8db2 Add random genres list to the home page 2023-10-22 01:00:34 +02:00
d21e4ffba2 Add a basic home page header 2023-10-22 01:00:34 +02:00
28855046b8 Fix ci 2023-10-18 00:09:06 +02:00
eb351f9bed Use css grid for infinite lists 2023-10-18 00:09:06 +02:00
0e0bb17ad9 Disable low value trancodes 2023-10-15 15:52:58 +02:00
e95f001dd2 Switch to jassub 2023-10-15 15:49:50 +02:00
0d4b9fe488 Use a better display name for audios 2023-10-12 00:14:40 +02:00
4be4fa2c4f Fix audio identify on some cases 2023-10-12 00:14:40 +02:00
8d4da63855 Fix obfuscated unique ID handling 2023-09-18 00:07:17 +02:00
3a9941f69f Format code 2023-09-16 16:07:30 +02:00
01486dfbec Use better error message for invalid video files 2023-09-15 00:21:33 +02:00
fb2280798a Fix invalid state after cache clear 2023-09-15 00:21:33 +02:00
29f874e390 Fix font detections when there is none 2023-09-15 00:21:33 +02:00
dc6bdf7715 Fix dead links 2023-09-15 00:21:33 +02:00
6022f5b9d2 Disable cursor on player's hover 2023-09-15 00:21:33 +02:00
30b6d4791f Add audio cache audio clear 2023-09-15 00:21:33 +02:00
e5c185627d Clear video cache on new transcode 2023-09-15 00:21:33 +02:00
573852d852 Update README.md 2023-09-13 00:12:29 +02:00
385c580358 Fix safari issue 2023-09-12 18:03:56 +02:00
ec2b0e0f78 Fix eslint warnings 2023-09-11 13:27:04 +02:00
c3816b709c Return more items by default in the api 2023-09-11 13:27:04 +02:00
4b8528af65 Fix show's 404 page 2023-09-11 13:27:04 +02:00
69ba636d74 Update cargo dependancies 2023-09-11 13:27:04 +02:00
1b035035ce Fix pull request docker build 2023-09-11 13:27:04 +02:00
4dc0d6a97c Fix ultrawide infinite scroll 2023-09-11 13:27:04 +02:00
34e4036f66 Fallback to path and modified date if there is no unique id 2023-09-11 01:00:00 +02:00
1dd3e37a37 Use a longer hls timeout delay 2023-09-11 01:00:00 +02:00
e79e568a4c Fix slow transcoder (use mediainfo id instead of sha1) 2023-09-11 01:00:00 +02:00
1641ba2898 Fix item types for android 2023-09-09 22:07:55 +02:00
31d9507033 Fix type issues 2023-09-09 21:47:49 +02:00
67deef897f Add season header 2023-09-09 21:47:49 +02:00
3b84161ec5 Fix some components style 2023-09-09 21:47:49 +02:00
a04bffbec9 Add blurhash container component 2023-09-09 21:47:49 +02:00
7ad1383acb Fix back tests 2023-09-07 22:55:41 +02:00
4217d471c4 Use random image and added date sort on the front 2023-09-07 22:55:41 +02:00
5f6e96333c Add creation date on the db 2023-09-07 22:55:41 +02:00
7962d3a16f Fix library item get all 2023-09-07 22:55:41 +02:00
de6d831498 Prevent resources to use the slug 'random' 2023-09-07 22:55:41 +02:00
be076616cc Add cache policy to images 2023-09-07 22:55:41 +02:00
0a38fdd8d3 Add random sort 2023-09-07 22:55:41 +02:00
2fa5587fbf Fix python version in dockerfile 2023-09-07 22:55:41 +02:00
4bfffa579f Fix contain query param of the api 2023-09-07 22:55:41 +02:00
010fab93d7 Fix player api mismatch bug 2023-09-06 22:01:54 +02:00
6f3eefb611 Improve image finder 2023-09-06 21:06:56 +02:00
328b378978 Filter out unpopular shows 2023-09-06 20:44:51 +02:00
1f518c2d33 Fix missing imdb/tvdb id 2023-09-06 20:44:51 +02:00
a1a5e665fb Fix special season handling 2023-09-06 20:44:51 +02:00
70afa7cc9b Add a space in the tabname (head) 2023-09-06 20:44:51 +02:00
5f1ea76cad Include images without languages in tmdb 2023-09-06 20:44:51 +02:00
462aa44473 Remove language parsing from guessit (fix issues with shows like tenki no ko) 2023-09-06 20:44:51 +02:00
dc0f0df92f Lint the scanner 2023-09-06 00:09:37 +02:00
0ec22766ba Handle series that only have absolte numbering 2023-09-06 00:09:37 +02:00
3549f8b2d2 Handle exact match differently in the scanner 2023-09-06 00:09:37 +02:00
8a3a2fecf5 Improve image selection and prefer original language one 2023-09-06 00:09:37 +02:00
5c8c7b8804 Handle absolute ordering 2023-09-06 00:09:37 +02:00
e88d4c2ca7 Enhance tmdb search ordering 2023-09-06 00:09:37 +02:00
83a91eea97 Use year to filter tv series 2023-09-06 00:09:37 +02:00
13ef0ba14a Fix empty blurhash 2023-09-05 14:18:09 +02:00
938ccd9215 Fix library item issue 2023-09-05 00:36:36 +02:00
d394c390f7 Fix broken next version 2023-09-04 23:54:19 +02:00
4c705a4605 Fix searchbar on web 2023-09-04 18:26:38 +02:00
105aa7874f Feat rework images, delete providers (#191) 2023-09-04 18:24:40 +02:00
27ab3b0b21 Fix mobile compilation 2023-09-04 17:35:24 +02:00
03af604e94 Fix tests 2023-09-04 17:34:34 +02:00
05b8f5b400 Lint code 2023-09-04 00:33:33 +02:00
e8654ca181 Fix front compilation issues 2023-09-04 00:28:18 +02:00
68b4e71281 Lint code 2023-09-02 17:47:43 +02:00
b89617d125 Use posters instead of thumbnails when no thumbnails exist 2023-09-02 17:20:34 +02:00
70466aba7e Fix thumbnails for episodse 2023-09-02 16:31:39 +02:00
5ddfe1ddb2 Update player to use new api 2023-09-01 17:55:18 +02:00
25418071fe Fix splashscreen breaking change 2023-08-31 23:28:32 +02:00
a9d4fb769d Fix show header colors and poster 2023-08-31 21:13:32 +02:00
1faf234255 Use react-native fast images and blurhash on mobile 2023-08-31 16:06:57 +02:00
c06afcd56d Fix thumbnails quality 2023-08-31 16:06:49 +02:00
607b973dbd Rework images to support lazy loading and blurhash (web only) 2023-08-31 11:42:24 +02:00
22e136d9fd Remove expo-image 2023-08-31 01:50:44 +02:00
7b2f44d19a Switch to webp 2023-08-31 01:49:28 +02:00
74c31a0f18 Add taglines on the front 2023-08-12 01:36:26 +09:00
fd3c2e5f9b Add tags on shows and movies 2023-08-12 01:21:17 +09:00
be3724c6b1 Fix some issues 2023-08-11 22:43:05 +09:00
b8e6c21538 Fix type errors 2023-08-09 12:52:27 +09:00
60afaf6211 Add low/medium/high image link on every images 2023-08-09 12:52:06 +09:00
090f305f02 Regenerate lock file 2023-08-09 02:13:54 +09:00
0a30e5022b Fix web error 2023-08-09 02:11:35 +09:00
6733fe9c40 wip Update packages 2023-08-09 00:35:49 +09:00
76ce4b8058 Update expo 2023-08-08 14:57:08 +09:00
36f4bbc7e7 wip front blurhash 2023-08-08 13:31:11 +09:00
30d52c6061 Fix tests 2023-08-08 12:08:51 +09:00
7018915686 Format the scanner 2023-08-07 15:30:47 +09:00
a1fb4ce8eb Fix warnings 2023-08-07 15:29:31 +09:00
5446dbce83 Fix tests compilation errors 2023-08-07 14:50:12 +09:00
93b36f1bd4 Fix image resize not working 2023-08-07 14:50:12 +09:00
ab12de8287 Add next/previous episode field. Add movie load 2023-08-07 14:50:12 +09:00
3cdfc91c93 Implement blurhash 2023-08-07 14:50:12 +09:00
a6c8105d8c Parse images from the scanner 2023-08-07 14:50:12 +09:00
ca99421624 Update library items for new movies 2023-08-07 14:50:12 +09:00
5c270a0362 Handle external ids 2023-08-07 14:50:12 +09:00
19ae15f53f Split movies and shows, enable nullable handling (wip) 2023-08-07 14:50:12 +09:00
386c6bf268 Feat rework images, delete providers 2023-08-07 14:50:12 +09:00
e075306363 Coding style 2023-08-02 00:57:27 +09:00
9591350c3e Allow subtitles menu to be scrolled on android 2023-08-02 00:57:27 +09:00
45b18eb8e6 Display when subtitles are invalid on the web app 2023-08-02 00:57:27 +09:00
0f59798e73 Fix subrip extraction 2023-08-02 00:57:27 +09:00
7b56924466 Fix type issues 2023-08-02 00:57:27 +09:00
3d30d65184 Fix tests 2023-08-02 00:57:27 +09:00
9bb896e84b Format the code 2023-08-02 00:57:27 +09:00
e0ee364929 Add srt support on the web 2023-08-02 00:57:27 +09:00
8e9cd2d2f3 Delete files via the scanner/monitor. Add an ignore folder 2023-08-02 00:57:27 +09:00
f58597379b Fix remaining issues with new track implementation 2023-08-02 00:57:27 +09:00
e6f263b6de Remove track table 2023-08-02 00:57:27 +09:00
c69864d0f5 Delete dotnet file system abstraction 2023-08-02 00:57:27 +09:00
ae901b257b Remove the C transcoder 2023-08-02 00:57:27 +09:00
fdc537d69a Add sub and metadata extraction on the new transcoder 2023-08-02 00:57:27 +09:00
f12c1053ca Try to fix the ci 2023-07-30 23:26:03 +09:00
6435114384 Fix json date serialization settings 2023-07-30 19:25:06 +09:00
c55c3bca72 Fix back arm build 2023-07-30 19:25:06 +09:00
83b8627717 Fix timestamps format 2023-07-30 19:25:06 +09:00
95ccceb259 Fix warnings 2023-07-30 19:25:06 +09:00
31d8f5f7b9 Update all dotnet libraries 2023-07-30 19:25:06 +09:00
Zoe Roux
f1660bbc74 Update the ci for dotnet 7 2023-07-30 19:25:06 +09:00
Zoe Roux
5d72fe44ab Update to dotnet 7 2023-07-30 19:25:06 +09:00
714b7d845a Fix slug creations 2023-07-25 15:01:23 +09:00
066229eb0e Fix tracks slugs 2023-07-25 15:01:23 +09:00
0f96f02df5 Fix event issue 2023-07-25 15:01:23 +09:00
b753fdd2b0 Fix database migration issue 2023-07-25 15:01:23 +09:00
f9df0b8a12 Fix web menu alligment 2023-07-25 15:01:23 +09:00
db41c55230 Remove database triggers 2023-07-25 15:01:23 +09:00
58b799edb4 Add events when resources are changed 2023-07-25 15:01:23 +09:00
94d3b8676f Persist subtitles 2023-07-20 23:27:52 +09:00
de7aa58195 Fix subtitles on android with transcode 2023-07-20 23:27:52 +09:00
5d4e251251 Allow user to change account when one server does not answer 2023-07-20 23:27:52 +09:00
45baa804e6 Add login timeout 2023-07-20 23:27:52 +09:00
2c49848dd7 Make video touch nicer to use on mobile 2023-07-20 23:27:52 +09:00
be499b3085 Replace episodes in history instead of pushing them 2023-07-20 23:27:52 +09:00
4fde5fb65f Fix hydratation error 2023-07-20 23:27:52 +09:00
4c84f857e7 Use different caches for differents servers 2023-07-20 23:27:52 +09:00
1e55b7bf50 Move android specific code to android specific file 2023-07-20 23:27:52 +09:00
479d3e9f07 Handle automatic store publish 2023-07-15 23:59:04 +09:00
dcf14c6e6f Fix web issue 2023-07-15 22:32:50 +09:00
96d5ca0f3c Fix web build 2023-07-15 20:57:50 +09:00
32fa639d4a Add token and client id on the android player 2023-07-15 20:57:50 +09:00
69760dd5f8 Finish multi accounts 2023-07-15 20:57:50 +09:00
1237a9157c wip: Replace the secure store 2023-07-15 20:57:50 +09:00
fee59833f2 Add a multiaccount menu on mobile 2023-07-15 20:57:50 +09:00
12f685010b Add icons for logout and delete account 2023-07-15 20:57:50 +09:00
6ac8af9946 Fix the connection error retry button 2023-07-15 20:57:50 +09:00
e8d4c128da Fix error page style 2023-07-15 20:57:50 +09:00
d2a5d4b3ec Fix account verification error not showing 2023-07-15 20:57:50 +09:00
7797a7bf53 Fix video fit 2023-07-15 20:57:50 +09:00
e5430a7aed Fix master m3u8 audio comma 2023-07-05 22:29:43 +09:00
88cd4a3ec2 Cargo fmt 2023-07-04 11:57:56 +09:00
8650c2d4c8 Fix media session duration issues 2023-07-04 11:57:56 +09:00
1734e57d43 Add error handling in the transcoder 2023-07-04 11:57:56 +09:00
28d0fc161b Fix web player episode name overflow 2023-07-04 11:57:56 +09:00
8ebc767b76 Automatically clear the transcoder cache 2023-06-20 14:13:57 +09:00
bbe8a19189 Use another watchfile library 2023-06-20 11:35:48 +09:00
4bffd359b9 Rework the scanner register check
Store all paths already registered in memory instead of asking kyoo for
each path individually. This should help reduce high response time of
kyoo on startup.
2023-06-20 11:35:48 +09:00
08bbfd91fe Add a privacy policy 2023-06-15 11:17:16 +09:00
1e3cd64ec9 Update the readme for google play 2023-06-14 22:25:07 +09:00
663de0e720 Add a delete account button 2023-06-14 16:56:55 +09:00
7cffd75749 Create an alert method 2023-06-14 16:56:55 +09:00
327ea4912a Use aab for android production builds 2023-06-14 11:47:07 +09:00
efa743a714 Fix web compilation 2023-06-14 11:20:44 +09:00
cd44e8e4c3 Fix account menu on android 2023-06-14 11:20:44 +09:00
e185625f4a Fix account button size 2023-06-14 11:20:44 +09:00
3e140e4f43 Fix incremental queries 2023-06-14 11:20:44 +09:00
47a22b6540 Always name audio tracks 2023-06-14 11:20:44 +09:00
72e74cea32 Fix hover issues on android 2023-06-14 11:20:44 +09:00
4993ae50fe Cleanup the etails page 2023-06-14 11:20:44 +09:00
eeb111dd9e Fix details page issue 2023-06-14 11:20:44 +09:00
4bb992fc67 Add header props on infinite lists 2023-06-14 11:20:44 +09:00
58040f8f49 Fix expo router 2023-06-14 11:20:44 +09:00
4f2cefb1be Implement quality and audio picker on android 2023-06-14 11:20:44 +09:00
2b33191db7 Fix browse page 2023-06-14 11:20:44 +09:00
0969d68adc Rework login guard on android 2023-06-14 11:20:44 +09:00
86533153bf Allow the login page to be scrolled 2023-06-14 11:20:44 +09:00
6349763abc Automatically load the login page on mobile 2023-06-14 11:20:44 +09:00
67693d6c31 Fix yarn packages mismatches 2023-06-14 11:20:44 +09:00
31a757a5cd Fix expo doctor 2023-06-14 11:20:44 +09:00
2c59dddca0 Add apk to releases 2023-06-14 11:20:44 +09:00
206466f9cc Fix variable bitrate videos 2023-06-14 11:20:44 +09:00
039c644453 Fix infinite scroll behavior of details page 2023-06-10 01:36:36 +09:00
5d377654aa Update master to the nex transcoder (#176) 2023-06-06 03:01:43 +09:00
ff163026c7 Disable sonarcloud 2023-06-05 23:25:29 +09:00
1d431ecad6 Add error logs for fullscreen change on the front 2023-06-05 23:08:47 +09:00
6a4c2c6aea Switch to the pointer event api instead of the pressable api on the player to support firefox android 2023-06-05 23:08:47 +09:00
3f928ad507 Fix firefox play/pause loop 2023-06-04 15:14:19 +09:00
735edf1529 Fix multi channels audio issues 2023-06-04 15:14:19 +09:00
f49882fb0d Fix live hls issues 2023-06-04 15:14:19 +09:00
6f4936f6be Fix transcoder docker 2023-06-01 14:59:48 +09:00
e8eb36284b Fix transcoder ci build 2023-06-01 04:03:30 +09:00
cec8400145 Disable the transcode with the same quality as the original tramsux 2023-06-01 04:03:30 +09:00
22d8ea8215 Fix audio index 2023-06-01 04:03:30 +09:00
e6a6131a14 Fix time update on the web player 2023-06-01 04:03:30 +09:00
92b5e33940 Fix ctranscoder dockerfiles 2023-06-01 04:03:30 +09:00
63f7a75394 Add transmux to the hls playlist 2023-06-01 04:03:30 +09:00
dbe85322ea Fix mediainfo number parsing 2023-06-01 04:03:30 +09:00
64d4ee9168 Implement chapter detection 2023-06-01 04:03:30 +09:00
f7f40be956 Implement a naive identify invoking mediainfo 2023-06-01 04:03:30 +09:00
f42eaeb953 Fix duplicated code issue 2023-05-05 14:14:04 +09:00
954909fecd Format code 2023-05-05 14:14:04 +09:00
95133deeb0 Add audio menu and rework qualities menu 2023-05-05 14:14:04 +09:00
8ba80e93e3 Add audio transcoding 2023-05-05 14:14:04 +09:00
47c7617d24 Split transcode commands and state 2023-05-05 14:14:04 +09:00
a5fc5b3753 Add audio transcode functions 2023-05-05 14:14:04 +09:00
0b2d8a7e2e Add routes for audio streams 2023-05-05 14:14:04 +09:00
5ee0a0044a Add all metadata to quality variants in the master playlist 2023-05-05 14:14:04 +09:00
6e39690d7a Create a master playlist 2023-05-05 14:14:04 +09:00
ca4e9e0052 Add bandwidth flags to ffmpeg transcodes 2023-05-05 14:14:04 +09:00
f76ce5dae1 Fix transcode upscale 2023-05-05 14:14:04 +09:00
4e4a90b2d2 Switch to the hls encoder instead of segments 2023-05-05 14:14:04 +09:00
98f6fda99f Add a video field to the identify 2023-05-05 14:14:04 +09:00
9a125e0359 Add transcode quality on the front 2023-05-05 14:14:04 +09:00
3778b2148c Lint rust files 2023-05-05 14:14:04 +09:00
3ab76006af Create a proxy for the trasncoder 2023-05-05 14:14:04 +09:00
c96db3a3dc Add openapi spec for the transcoder 2023-05-05 14:14:04 +09:00
ea52ce1c65 Add identify types 2023-05-05 14:14:04 +09:00
f80289aef1 Add identify route 2023-05-05 14:14:04 +09:00
5cdcff0cd0 Add episodes to the transcoder 2023-05-05 14:14:04 +09:00
4c523d56f5 Fetch paths from the api 2023-05-05 14:14:03 +09:00
67e4764a72 Wait for the first segment to exist before sending the m3u8 2023-05-05 14:14:03 +09:00
e7ace4d497 Add errors messages and fix segments 2023-05-05 14:14:03 +09:00
c6edf4e2cb Add segments route 2023-05-05 14:14:03 +09:00
2939ea0787 Allow the transcoder to be run 2023-05-05 14:14:03 +09:00
64adc63920 Make a clean transcoder state 2023-05-05 14:14:03 +09:00
33d212bd84 Add transcode cmd paramters 2023-05-05 14:14:03 +09:00
5543bc4c9d Migrate to actix 2023-05-05 14:14:03 +09:00
d106988fd7 Add transcoder's dockerfile 2023-05-05 14:14:03 +09:00
bc6fdec360 Create a transcoder crate 2023-05-05 14:14:03 +09:00
a7d8863998 Fix identify when the path has a column in it 2023-04-28 16:16:12 +09:00
a3b2b80c1e Add an error message if the moviedb api key is not set 2023-04-05 16:13:36 +09:00
0b614ec4b6 Add a tldr in the installation readme 2023-04-05 16:13:36 +09:00
0e2c029249 Fix docker's CI for tags 2023-04-05 16:13:36 +09:00
deade0010b Add support for arm builds 2023-04-05 02:23:51 +09:00
e94fae1d85 Update screenshots in readme 2023-04-05 02:15:42 +09:00
259ca2e14e Swap the scanner batch size to 20 2023-04-05 02:15:42 +09:00
e9f9ae5154 Update readme 2023-04-05 02:15:42 +09:00
3b98263fbc Show list headers on error 2023-04-05 02:15:42 +09:00
ca1d2dd16f Up the number of items per batch (scanner) 2023-04-05 02:15:42 +09:00
9e254e6813 Fix episodes duplicate check 2023-04-05 02:15:42 +09:00
9e250e6129 Fix docker compose postgres healthcheck 2023-04-05 02:15:42 +09:00
8f22785d2f Batch scans to prevent auto DDOS 2023-04-05 01:06:55 +09:00
bb716ab6b6 Prevent the scanner from running on non-video files 2023-04-05 00:06:21 +09:00
5acd231292 Make play button for series work 2023-04-04 20:41:25 +09:00
7ebe0adace Disable deferred queries for the search as it does not work 2023-04-04 20:41:25 +09:00
9e3337e9c5 Hide the cursor when playing a video 2023-04-04 20:41:25 +09:00
298dc9af27 Add trailler button 2023-04-04 20:41:25 +09:00
840b0c07ff Fix icon buttons not working 2023-04-04 20:41:25 +09:00
592c92785f Automatically download/extract info on API creation (dirtyfix) (#161
* Download thumbnails automatically

* Automatically extract tracks
2023-04-03 20:03:11 +09:00
d0db4815f1 Use json in healthcheck 2023-04-03 20:03:11 +09:00
8cf105a550 Fix coding style 2023-04-03 20:03:11 +09:00
9c6055a52e Add healthchecks on docker 2023-04-03 20:03:11 +09:00
a554b7681f Add healthchecks to the api 2023-04-03 20:03:11 +09:00
cbcc2f30b7 Dockerise the scanner 2023-04-03 20:03:11 +09:00
565125da67 Add a file monitor in the scanner 2023-04-03 20:03:11 +09:00
ec8782ad81 Clean up the scanner 2023-04-03 20:03:11 +09:00
7388719cad Add seasons metadata 2023-04-03 20:03:11 +09:00
75fb4b5809 Add seasons 2023-04-03 20:03:11 +09:00
408873b844 Add a cache for shows 2023-04-03 20:03:11 +09:00
31a349704b Use jsons for serialization 2023-04-03 20:03:11 +09:00
c3b8595cd7 Add kyoo requests for episodes 2023-04-03 20:03:11 +09:00
2334afb3eb Add episodes for themoviedb 2023-04-03 20:03:11 +09:00
ce9dc48d81 Merge translations for seasons 2023-04-03 20:03:11 +09:00
20f7f87072 Add show and seasons for themoviedatabase 2023-04-03 20:03:11 +09:00
a9ce596381 Add episode and show types 2023-04-03 20:03:11 +09:00
8ac5f02d93 Fix a test 2023-04-03 20:03:11 +09:00
10b291b4aa Add genres and studio objects for the scanner 2023-04-03 20:03:11 +09:00
c894f33c11 Add metadataid, original language metadata and genres 2023-04-03 20:03:11 +09:00
1167cfa3a4 Add most metadata information from themoviedb 2023-04-03 20:03:11 +09:00
541a7c9e2b Making the scanner send data to the back 2023-04-03 20:03:11 +09:00
8b2dd048d3 Fix shell.nix 2023-04-03 20:03:11 +09:00
d4d223dbf0 Cleanup error handling 2023-04-03 20:03:11 +09:00
6b9842c9d3 Fix import issue 2023-04-03 20:03:11 +09:00
e2387158dc Add black to lint the scannre 2023-04-03 20:03:11 +09:00
89fbb3a3cf Sending items to the kyoo api 2023-04-03 20:03:11 +09:00
55da64a702 Add the movie database as a provider 2023-04-03 20:03:11 +09:00
edff93917e Create python types 2023-04-03 20:03:11 +09:00
424390417a Make the scanner async 2023-04-03 20:03:11 +09:00
7427de1bb4 Add guessit 2023-04-03 20:03:11 +09:00
42adf023d9 Create a scanner python module 2023-04-03 20:03:11 +09:00
02214a127c Fix ApiKey configuration options 2023-04-03 20:03:11 +09:00
9e98bf3532 Cleanup JWT error messages 2023-04-03 20:03:11 +09:00
86955cf0cb Add ApiKeys authentication 2023-04-03 20:03:11 +09:00
bf281820b9 Remove the weird configuration options, add ApiKeys configuration 2023-04-03 20:03:11 +09:00
4d0dd674ad Fix provider doc 2023-04-03 20:03:11 +09:00
973f9cfdc2 Still apply postgres migration on startuo 2023-04-03 20:03:11 +09:00
13d79c5338 Delete the task system 2023-04-03 20:03:11 +09:00
dca91feff8 Delete tvdb and tmdb providers 2023-04-03 20:03:11 +09:00
505ebb48bc Delete env var 2023-03-19 00:59:51 +09:00
eaa4060f2a Fix transcoder in dockerfile 2023-03-17 02:36:31 +09:00
5e87a669de Add healthcheck for postgres 2023-03-17 02:36:31 +09:00
9ce8043667 Return empty lists for people instead of throwing 2023-03-17 01:30:18 +09:00
edf2941e01 Cleanups 2023-03-17 01:30:18 +09:00
da0c1087e9 Fix library creator task 2023-03-17 01:30:18 +09:00
a4f9d5b461 Trying to fix eas 2023-03-17 01:30:18 +09:00
ebb3b962a8 Fix eas build 2023-03-17 01:30:18 +09:00
38040ba1d3 Fix robot tests 2023-03-17 01:30:18 +09:00
e17b4c6e23 Cleanup config options 2023-03-17 01:30:18 +09:00
03bd5b4c78 Removing config things 2023-03-17 01:30:18 +09:00
ebe2da0309 Delete SQLite tests 2023-03-17 01:30:18 +09:00
201892ea7f Delete SQlite 2023-03-17 01:30:18 +09:00
e12ac9b3a4 Fix build errors 2023-03-16 02:34:28 +09:00
2b86a469a9 Disable moti on the web 2023-03-16 02:34:28 +09:00
dae11994c2 Update lockfile 2023-03-16 02:34:28 +09:00
3e53b28a10 Update packages 2023-03-16 02:34:28 +09:00
4c4e22a0e0 Update expo 2023-03-16 02:34:28 +09:00
b5f8799d0a Automatically sync readme to dockerhub 2023-03-16 02:34:28 +09:00
875c6eaa5e Use dockerhub instead of ghcr 2023-03-15 16:18:49 +09:00
a56af56009 Create a chip component for filters 2023-03-15 15:06:00 +09:00
eee51216b9 Fix icon button hover 2023-03-15 15:06:00 +09:00
73578736bc Update RNW to beta to make search work 2023-03-15 15:06:00 +09:00
33db01cbbf Finish sort menu 2023-03-15 15:06:00 +09:00
a716fd1e22 Add sort by button (v1) 2023-03-15 15:06:00 +09:00
19c3f44d9a Header 2023-03-15 15:06:00 +09:00
ae095b3e2c Fix build errors 2023-03-15 01:22:21 +09:00
eb92eed532 Generate avatar color based on placeholder 2023-03-15 01:22:21 +09:00
2652e558d2 Add focus handling for the details page 2023-03-15 01:22:21 +09:00
262a26e3df Add focus handling for the grid 2023-03-15 01:22:21 +09:00
Zoe Roux
4af4119561 Fix for body scroll bars on the web on some browsers 2023-03-15 01:22:21 +09:00
Zoe Roux
04eae360a7 Rework Pressable to handle ripple on android 2023-03-15 01:22:21 +09:00
Zoe Roux
a6c645c33f Small cleanups 2023-03-15 01:22:21 +09:00
4b7f59e2e9 Fix tests 2023-03-14 03:04:29 +09:00
da17fc3e6d Fix warnings 2023-03-14 03:04:29 +09:00
b62af8d2ae Handle mixed nulls for sorts and pagination 2023-03-14 03:04:29 +09:00
ef3e4dc39b Fix limit reverse issue 2023-03-14 03:04:29 +09:00
fbe624ca6d Add previous page support 2023-03-14 03:04:29 +09:00
67112a37da Rework exception handling 2023-03-14 03:04:29 +09:00
c0c263c4d7 Rework sort system to allow multiples keys 2023-03-14 03:04:29 +09:00
e32c09f48f Fix studio error in the movie header 2023-03-14 03:04:29 +09:00
91aa673dcb Fix navbar zindex 2023-03-14 03:04:29 +09:00
95257771a5 Automatically create libraries 2023-03-14 03:04:29 +09:00
fa6bb695f3 Update master to the next front. (#145) 2023-03-11 13:19:58 +09:00
9f5b5282b1 Fix build error 2023-03-11 12:54:21 +09:00
ea53eb9b24 Add logout button for logged in users 2023-03-11 12:54:21 +09:00
98a0466761 Display a login button when the user is loggedout 2023-03-11 12:54:21 +09:00
e3be74d519 Handle token refresh on SSR 2023-03-11 12:54:21 +09:00
fdc6a88317 Add login indicator 2023-03-11 12:54:21 +09:00
d67bd62393 Create shell.nix 2023-03-11 12:54:21 +09:00
Zoe Roux
ea986917af Add login and register calls in the front 2023-03-11 12:54:21 +09:00
Zoe Roux
ffbf4be19e Create login and register function 2023-03-11 12:54:21 +09:00
Zoe Roux
2b87aacc58 Add a register page 2023-03-11 12:54:21 +09:00
Zoe Roux
b62b272492 Adding login errors 2023-03-11 12:54:21 +09:00
Zoe Roux
e5027cf00d Add server address on the login page 2023-03-11 12:54:21 +09:00
Zoe Roux
e7b4c01f93 Use an svg blob for the login page 2023-03-11 12:54:21 +09:00
Zoe Roux
304951e463 Create a simple login page 2023-03-11 12:54:21 +09:00
Zoe Roux
e9622edee9 Add more features om the input primitive 2023-03-11 12:54:21 +09:00
Zoe Roux
80be960f29 Update pressable's feedback ripple 2023-03-11 12:54:21 +09:00
Zoe Roux
d2d736a7ec Create a button component 2023-03-11 12:54:21 +09:00
Zoe Roux
341d799207 Bootstrap login page 2023-03-11 12:54:21 +09:00
Zoe Roux
91289c8588 Fix Yoshiki ssr mismatch 2023-03-11 12:54:21 +09:00
Zoe Roux
bc878a2e90 Fix keyboard bindings 2023-03-11 12:54:21 +09:00
Zoe Roux
bb4e7b7712 Fix episode name without metadata 2023-01-08 01:52:11 +09:00
Zoe Roux
dad0a7d30a Fix web issues 2023-01-08 01:38:54 +09:00
Zoe Roux
b0ea38b047 Merge pull request #139 from AnonymusRaccoon/native 2023-01-07 23:47:28 +09:00
Zoe Roux
9c35801196 Update yoshiki 2023-01-07 23:30:49 +09:00
Zoe Roux
f5338fc8a8 Fix CI 2023-01-07 21:08:10 +09:00
Zoe Roux
aa38b34191 Fix typescript errors 2023-01-07 21:01:40 +09:00
Zoe Roux
01eae3f680 Create a ci for the front 2023-01-07 21:01:40 +09:00
Zoe Roux
6a098b6317 Fix alpha handling 2023-01-07 14:22:29 +09:00
Zoe Roux
e242867ddb Fix coding style 2023-01-07 14:22:29 +09:00
Zoe Roux
e11af205f8 Add automatic theme on the web 2023-01-07 14:22:29 +09:00
Zoe Roux
9dc9431170 Add a (rudimentary) splash screen 2023-01-07 14:22:29 +09:00
Zoe Roux
1e182e0d75 Install poppins as a font 2023-01-07 14:22:29 +09:00
Zoe Roux
a501c8e571 Add mobile support for the search bar 2023-01-07 14:22:29 +09:00
Zoe Roux
95eb703788 Make search bar collapse on small screen 2023-01-07 14:22:29 +09:00
Zoe Roux
942f4f1c75 Create a search page 2023-01-07 14:22:29 +09:00
Zoe Roux
8ca120aa6f Add items search support 2023-01-07 14:22:29 +09:00
Zoe Roux
1f33d52429 Remove unused files and packages 2023-01-07 14:22:29 +09:00
Zoe Roux
257e78dcaa Fix production build 2023-01-07 14:22:29 +09:00
Zoe Roux
b88cd583d3 Player cleanups 2022-12-31 01:01:38 +09:00
Zoe Roux
67da1563be Add hls support on the web 2022-12-31 01:01:38 +09:00
Zoe Roux
4b92b8a38e Add subtitles support for the web 2022-12-31 01:01:38 +09:00
Zoe Roux
39ae631cf1 Adding a web compatibility layer 2022-12-31 01:01:38 +09:00
Zoe Roux
84b4c998a7 Use react-native-video instead of expo-av and add subtitle support 2022-12-31 01:01:38 +09:00
Zoe Roux
e741b5aa6d Fix eas build and add expo dev client 2022-12-31 01:01:38 +09:00
Zoe Roux
162891ba1d Create the subtitle menu for the web 2022-12-31 01:01:38 +09:00
Zoe Roux
1139a726c9 Create menu (bottom sheet or side sheet) 2022-12-31 01:01:38 +09:00
Zoe Roux
b0eb8c3b42 Fix fullscreen handling 2022-12-31 01:01:38 +09:00
Zoe Roux
7315d5f5a1 Add keyboard input for the player on the web 2022-12-31 01:01:38 +09:00
Zoe Roux
7a1bde1b73 Add volume slider (keyboard accessible)
Fix tooltip position on the bottom of the screen.
Add fullscreen support on the web
2022-12-31 01:01:38 +09:00
Zoe Roux
b1b8772717 Add progress change listneer to update the video 2022-12-31 01:01:38 +09:00
Zoe Roux
856eaffda6 Add slider touch handlers 2022-12-31 01:01:38 +09:00
Zoe Roux
2c16fdad19 Add load and error state 2022-12-31 01:01:38 +09:00
Zoe Roux
c79a991024 Rewrite progress slider (part 1) 2022-12-31 01:01:38 +09:00
Zoe Roux
7b8d916685 Fix layout handling on the web via hoc 2022-12-31 01:01:38 +09:00
Zoe Roux
3c447f5708 Rework of the hover 2022-12-31 01:01:38 +09:00
Zoe Roux
4f5023f745 Add a circular progress component 2022-12-31 01:01:38 +09:00
Zoe Roux
2c5d37083b Add types for subtitles octopus 2022-12-31 01:01:38 +09:00
Zoe Roux
4f6024a473 Move the player to the ui package 2022-12-31 01:01:38 +09:00
Zoe Roux
2ac4c434f5 Make episode list work on mobile 2022-12-18 12:07:19 +09:00
Zoe Roux
eabf5e1faf Clean up episode list skeleton 2022-12-18 12:07:19 +09:00
Zoe Roux
1ee955fbfe Add an episode list for shows 2022-12-18 12:07:19 +09:00
Zoe Roux
de06c7f81f Movie cleanup 2022-12-18 12:07:19 +09:00
Zoe Roux
4347df0b9b Use svg icons instead of a font 2022-12-18 12:07:19 +09:00
Zoe Roux
b951ef5ce4 Fix staff list scroll behaviors 2022-12-18 12:07:19 +09:00
Zoe Roux
a12f78761d Cleanup layout and expo's withRoute 2022-12-18 12:07:19 +09:00
Zoe Roux
894cbb3c9d Rewrite infinite lists to support horizontal 2022-12-18 12:07:19 +09:00
Zoe Roux
26f9cf646b Adapt staff list to react native (first pass) 2022-12-18 12:07:19 +09:00
Zoe Roux
8c28df9517 Clean up movie's skeleton 2022-12-18 12:07:19 +09:00
Zoe Roux
1b76bbf6c2 Finish movie's header rework 2022-12-18 12:07:19 +09:00
Zoe Roux
e5b236f51c Rewrite the movie header 2022-12-18 12:07:19 +09:00
Zoe Roux
a213c39445 Clean up to prepare headers 2022-12-11 21:54:39 +09:00
Zoe Roux
be6551888e Add list view on browse 2022-12-11 21:54:39 +09:00
Zoe Roux
3b29e1a87a Make the main scroll instead of the body. Support other layouts 2022-12-11 21:54:39 +09:00
Zoe Roux
bb63340555 Create a link component with native feedback 2022-12-11 21:54:39 +09:00
Zoe Roux
24dddc3075 Finalize browse's grid layout 2022-12-11 21:54:39 +09:00
Zoe Roux
47ca25fe1c Add an infinite scroll on web and native 2022-12-11 21:54:39 +09:00
Zoe Roux
1cd418991c Allow kyoo url to be configured on docker 2022-12-11 21:54:39 +09:00
Zoe Roux
d15c3ed047 Add a poster component for react-native 2022-12-11 21:54:39 +09:00
Zoe Roux
26e5ce6852 Add skeleton hide animation.
Also hide the skeleton when the user has disabled js.
2022-12-11 21:54:39 +09:00
Zoe Roux
f834e08273 Create a homemade skeleton
with moti and css animations
2022-12-11 21:54:39 +09:00
Zoe Roux
26e40adb21 Make queries work on mobile 2022-12-11 21:54:39 +09:00
Zoe Roux
43ed65bc76 Rewrite the browse page (part 1) 2022-12-11 21:54:39 +09:00
Zoe Roux
1f049952cc Theme the focus ring 2022-12-06 15:17:55 +09:00
Zoe Roux
869c1fbe51 Add react native translation 2022-12-06 15:17:55 +09:00
Zoe Roux
5b78146db9 Add nextjs translations (via i18next) 2022-12-06 15:17:55 +09:00
Zoe Roux
fff73ed2b8 Add a tooltip function 2022-12-06 15:17:55 +09:00
Zoe Roux
71a506443f Add a skeleton component 2022-12-05 12:21:04 +09:00
Zoe Roux
2e50be6254 Install moti 2022-12-05 12:21:04 +09:00
Zoe Roux
ceaafc495d Merge pull request #129 from AnonymusRaccoon/feat/models
Add a model package and a fetch component
2022-12-03 22:57:06 +09:00
Zoe Roux
67de27578e Add error handling in the fetch component 2022-12-03 22:34:50 +09:00
Zoe Roux
e82e515a23 Fix zod utils import 2022-12-03 19:15:15 +09:00
Zoe Roux
20c740ce07 Add a fetch component 2022-12-03 11:33:58 +09:00
Zoe Roux
9a9538d14d Remake the appbar 2022-12-01 16:37:31 +09:00
Zoe Roux
ca50b53bae Merge branch 'feat/native-navbar' into feat/style 2022-11-30 14:43:26 +09:00
Zoe Roux
d420c7d0a9 Install react navigation 2022-11-30 14:03:38 +09:00
Zoe Roux
4195371efb Update expo version 2022-11-30 11:19:39 +09:00
Zoe Roux
27e309f04d wip 2022-11-29 21:04:14 +09:00
Zoe Roux
b20a4fa149 Add yoshiki 2022-11-23 00:02:34 +09:00
Zoe Roux
2c4bcb9c39 Create CssObject type 2022-11-04 02:45:34 +09:00
Zoe Roux
07b41716e8 wip Native navbar 2022-11-04 01:08:03 +09:00
Zoe Roux
e92e7758e7 Add a primitive package 2022-11-04 01:05:34 +09:00
Zoe Roux
c64c34a9fb Fix dockerfile 2022-11-02 22:57:31 +09:00
Zoe Roux
a221e6358e Make the ui package work for expo and next 2022-11-02 16:52:57 +09:00
Zoe Roux
f40122d5b2 Add ui package that work with next 2022-11-02 14:29:02 +09:00
Zoe Roux
a065205ea0 Add native dockerfile 2022-11-01 01:54:22 +09:00
Zoe Roux
856f42ce27 Add expo 2022-10-31 23:43:52 +09:00
Zoe Roux
016d50e383 Fix dev dockerfile 2022-10-31 04:30:52 +09:00
Zoe Roux
1507b279f7 Move next to start a monorepo 2022-10-31 04:15:39 +09:00
Zoe Roux
000f7cbfe1 Add theme utils 2022-10-30 02:25:24 +09:00
Zoe Roux
cbbd04efb6 Add catppuccin theme 2022-10-28 02:02:09 +09:00
Zoe Roux
3488aeb03b Fix coding style 2022-10-11 15:51:34 +09:00
Zoe Roux
d7dc66301e Add media session management 2022-10-11 15:51:34 +09:00
Zoe Roux
2c06924792 Add keybindings for the player 2022-10-11 15:51:34 +09:00
Zoe Roux
6bcff8d9a2 Add transmux support to the player 2022-10-11 15:51:34 +09:00
Zoe Roux
6534f3bd25 Support mobile devices in the player 2022-10-11 15:51:34 +09:00
Zoe Roux
6e4f5feb7c Add webvtt support 2022-10-11 15:51:34 +09:00
Zoe Roux
edc33f3c37 Add liks in the API for videos, fonts and subtitle 2022-10-11 15:51:34 +09:00
Zoe Roux
0652ffef68 Use jotai for player state and split 2022-10-11 15:51:34 +09:00
Zoe Roux
07e8504cea Move the fonts API into the watch API & Fix chapters API 2022-10-11 15:51:34 +09:00
Zoe Roux
6eccb2cede Add subtitles to the player 2022-10-11 15:51:34 +09:00
Zoe Roux
9b62cb8a93 Add hover controls 2022-10-11 15:51:34 +09:00
Zoe Roux
251b80b152 Add a video player 2022-10-11 15:51:34 +09:00
Zoe Roux
5dfd65c16f Fix swagger 2022-10-11 15:51:34 +09:00
Zoe Roux
3edec54fbb Add a favicon 2022-10-11 15:51:34 +09:00
Zoe Roux
9a09572722 Update the ci 2022-10-02 14:07:04 +09:00
Zoe Roux
88b1c04367 Add dev dockerfiles 2022-10-01 23:47:00 +09:00
Zoe Roux
5f73f86787 Fix the backend code to compile with the new path 2022-10-01 23:47:00 +09:00
Zoe Roux
506a16e10a Move the backend to a back folder 2022-10-01 23:47:00 +09:00
Zoe Roux
9f455b8065 Remove windows deployments 2022-10-01 23:47:00 +09:00
Zoe Roux
03b05dfc87 Format code 2022-09-28 13:54:59 +09:00
Zoe Roux
ca41ddb271 Add path based i18n 2022-09-28 13:54:59 +09:00
Zoe Roux
a776278caf Add front docker 2022-09-28 13:54:59 +09:00
Zoe Roux
649eee099e Add a browse page 2022-09-28 13:54:59 +09:00
Zoe Roux
aeef6bd44d Add movie page 2022-09-28 13:54:59 +09:00
Zoe Roux
9f6cdcdf91 Add staff buttons for left/right 2022-09-28 13:54:59 +09:00
Zoe Roux
0ba5a97d2e Add episodes SSR 2022-09-28 13:54:59 +09:00
Zoe Roux
23cc667692 Add episodes infinite scroll 2022-09-28 13:54:59 +09:00
Zoe Roux
f95d8b565e Fix skeletons and errors on show page 2022-09-28 13:54:59 +09:00
Zoe Roux
6cd976e057 Add episodes on show page 2022-09-28 13:54:59 +09:00
Zoe Roux
608bc15e1f Add staff list on show page 2022-09-28 13:54:59 +09:00
Zoe Roux
9b80b340e3 Add show details page 2022-09-28 13:54:59 +09:00
Zoe Roux
dfe6fa7cda Add zod to validate types 2022-09-28 13:54:59 +09:00
Zoe Roux
090d613266 Add image and poster component 2022-09-28 13:54:59 +09:00
Zoe Roux
50507a1379 Add a navbar 2022-09-28 13:54:59 +09:00
Zoe Roux
fb436fd0f5 Add Show, Movie, Collection and Library types 2022-09-28 13:54:59 +09:00
Zoe Roux
a3bdb8953c Add translations 2022-09-28 13:54:59 +09:00
Zoe Roux
92ff8f71eb Create custom getFetchUrl for react query SSR 2022-09-28 13:54:59 +09:00
Zoe Roux
86639629ee Moving sources to a src/ folder 2022-09-28 13:54:59 +09:00
Zoe Roux
56d0f1edd8 Add mui 2022-09-28 13:54:59 +09:00
Zoe Roux
dd86e2aae4 Bootstrop next app 2022-09-28 13:54:59 +09:00
Zoe Roux
68e908fb4d Remove angular 2022-09-28 13:54:59 +09:00
Zoe Roux
b6daaf6aaa Fix Uri scheme 2022-06-12 23:48:08 +02:00
Zoe Roux
54caa2956d Merge pull request #119 from AnonymusRaccoon/fix/url 2022-06-12 19:34:25 +02:00
Zoe Roux
25ceac2ef4 Remove the /api prefix 2022-06-12 19:13:25 +02:00
Zoe Roux
f6557e6bbc Remove public url 2022-06-12 19:13:16 +02:00
Zoe Roux
9dd783fd2f Merge pull request #118 from AnonymusRaccoon/fix/unauthorized
Set first user account admin
2022-05-28 11:33:21 +02:00
Zoe Roux
54ed8df2d8 First account is set as admin 2022-05-28 02:52:55 +02:00
Zoe Roux
5eddacb7d9 Fix permisson error return body 2022-05-28 02:43:55 +02:00
Zoe Roux
dc8152dfaf Merge pull request #116 from AnonymusRaccoon/feat/gitversion 2022-05-13 18:47:55 +02:00
Zoe Roux
fc67a19915 Remove PR template 2022-05-13 18:27:49 +02:00
Zoe Roux
f13046681a Add gitversion on builds 2022-05-13 18:25:49 +02:00
Zoe Roux
ee20ab496f Merge pull request #114 from AnonymusRaccoon/feat/robot-ci
Add robot CI
2022-05-13 00:26:39 +02:00
Zoe Roux
6db43bb19a Allow "USER" instead of "USER ID" in the configuration 2022-05-13 00:13:25 +02:00
Zoe Roux
f226b4c8b2 Add robot CI 2022-05-13 00:13:25 +02:00
Zoe Roux
8bfea04c6a Merge pull request #113 from AnonymusRaccoon/feat/patch 2022-05-10 22:11:30 +02:00
Zoe Roux
f233ae8c66 Add patch methods for resources and the user 2022-05-10 21:59:07 +02:00
Zoe Roux
7a8964c336 Merge pull request #111 from AnonymusRaccoon/jwt 2022-05-10 20:45:34 +02:00
Zoe Roux
b322b514fc Remove the old login page 2022-05-09 22:52:37 +02:00
Zoe Roux
b5821b0d02 Add authentication documentation to the swagger 2022-05-09 22:50:28 +02:00
Zoe Roux
d257901c64 Add more robot tests 2022-05-08 23:14:08 +02:00
Zoe Roux
14d23af0fd Create robot tests for login and register 2022-05-08 00:40:36 +02:00
Zoe Roux
ad57df45d7 wip: Add robot tests 2022-05-01 22:28:52 +02:00
Zoe Roux
aa673e1acc Remove old auth from front 2022-04-23 23:41:43 +02:00
Zoe Roux
9468346617 Fix startup issue with jwt 2022-04-18 23:17:29 +02:00
Zoe Roux
673cb48b75 Finishing Login/Register handling 2022-04-18 23:17:29 +02:00
Zoe Roux
1a534d2325 jwt: Starting to rework authentication 2022-04-18 23:17:29 +02:00
Zoe Roux
3962c0eb7a Removing Identity Server and creating a custom jwt 2022-04-18 23:17:29 +02:00
Zoe Roux
425c80237b Merge pull request #108 from AnonymusRaccoon/fix/dotfiles
Ignoring hidden files in scan
2022-04-17 13:35:43 +02:00
Zoe Roux
341d20883d Fixing tracks array size with unknown/font tracks 2022-04-17 13:23:47 +02:00
Zoe Roux
fcf56c205a Fixing #61 2022-04-17 13:23:47 +02:00
Zoe Roux
a84a9fed85 Merge pull request #104 from AnonymusRaccoon/fix/fonts 2022-04-16 19:33:43 +02:00
Zoe Roux
4644fc522a Initializing the transcoder only when needed. (Fixes #86) 2022-04-16 19:22:30 +02:00
Zoe Roux
48ae67168b Updating the front for the new font api 2022-04-16 18:18:59 +02:00
Zoe Roux
6348ae9aa6 Adding tests for the new font support 2022-04-15 22:56:42 +02:00
Zoe Roux
a71c22db92 Placing fonts on the episode directory, removing in show extras 2022-04-13 22:47:32 +02:00
Zoe Roux
22c600bd09 wip 2022-04-04 23:46:50 +02:00
Zoe Roux
b01198c110 Adding a dev docker compose 2022-04-04 23:10:01 +02:00
Zoe Roux
76a57459af Fixing duplicates font files on the /api/show/id/fonts route
Resolves #94
2022-03-31 01:00:05 +02:00
Zoe Roux
0f06033b42 Fixing dotnet format on all the code 2022-03-31 00:51:19 +02:00
Zoe Roux
34b06bd2fb Updating to net6.0 (#99) 2022-03-23 23:32:44 +00:00
974 changed files with 85203 additions and 53958 deletions

View File

@@ -1,8 +0,0 @@
.git
**/build
**/dist
src/Kyoo.WebApp/Front/nodes_modules
**/bin
**/obj
docs
tests

View File

@@ -9,85 +9,6 @@ indent_style = tab
indent_size = tab
smart_tab = true
[{*.yaml,*.yml}]
[{*.yaml,*.yml,*.nix}]
indent_style = space
indent_size = 2
[*.cs]
# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true
csharp_using_directive_placement = outside_namespace:warning
# Avoid "this." if not necessary
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
# Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
# Suggest more modern language features when available
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
dotnet_style_prefer_auto_properties = true
dotnet_style_prefer_conditional_expression_over_assignment = true
dotnet_style_prefer_conditional_expression_over_return = true
# Disable strange throw.
csharp_style_throw_expression = false:suggestion
# Forbid "var" everywhere
csharp_style_var_for_built_in_types = false:warning
csharp_style_var_when_type_is_apparent = false:warning
csharp_style_var_elsewhere = false:warning
# Prefer method-like constructs to have a block body
csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_constructors = false:none
csharp_style_expression_bodied_operators = false:none
# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_properties = true:none
csharp_style_expression_bodied_indexers = true:none
csharp_style_expression_bodied_accessors = true:none
# Newline settings
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = false
csharp_new_line_before_members_in_anonymous_types = true
# Indentation settings
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
# Modifiers
dotnet_style_readonly_field = true:suggestion
csharp_preferred_modifier_order = public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
# Naming style
dotnet_naming_symbols.privates.applicable_kinds = property,method,event,delegate
dotnet_naming_symbols.privates.applicable_accessibilities = private
dotnet_naming_style.underscore_pascal.capitalization = pascal_case
dotnet_naming_style.underscore_pascal.required_prefix = _
dotnet_naming_rule.privates_with_underscore.symbols = privates
dotnet_naming_rule.privates_with_underscore.style = underscore_pascal
dotnet_naming_rule.privates_with_underscore.severity = warning
dotnet_diagnostic.IDE1006.severity = warning
# ReSharper properties
resharper_align_multiline_binary_expressions_chain = false
resharper_csharp_empty_block_style = together_same_line
resharper_indent_nested_foreach_stmt = true
resharper_indent_nested_for_stmt = true
resharper_indent_nested_while_stmt = true
resharper_keep_existing_embedded_arrangement = false
resharper_place_accessorholder_attribute_on_same_line = true
resharper_place_simple_embedded_statement_on_same_line = false
resharper_wrap_before_arrow_with_expressions = true
resharper_xmldoc_attribute_indent = align_by_first_attribute
resharper_xmldoc_indent_child_elements = RemoveIndent
resharper_xmldoc_indent_text = RemoveIndent
# Waiting for https://github.com/dotnet/roslyn/issues/44596 to get fixed.
# file_header_template = Kyoo - A portable and vast media library solution.\nCopyright (c) Kyoo.\n\nSee AUTHORS.md and LICENSE file in the project root for full license information.\n\nKyoo is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\nany later version.\n\nKyoo is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with Kyoo. If not, see <https://www.gnu.org/licenses/>.

90
.env.example Normal file
View File

@@ -0,0 +1,90 @@
# vi: ft=sh
# shellcheck disable=SC2034
# Useful config options
# Library root can either be an absolute path or a relative path to your docker-compose.yml file.
LIBRARY_ROOT=./video
# You should set this to a path where kyoo can write large amount of data, this is used as a cache by the transcoder.
# It will automatically be cleaned up on kyoo's startup/shutdown/runtime.
CACHE_ROOT=/tmp/kyoo_cache
LIBRARY_LANGUAGES=en
# A pattern (regex) to ignore video files.
LIBRARY_IGNORE_PATTERN=".*/[dD]ownloads?/.*"
# If this is true, new accounts wont have any permissions before you approve them in your admin dashboard.
REQUIRE_ACCOUNT_VERIFICATION=true
# Specify permissions of guest accounts, default is no permissions.
UNLOGGED_PERMISSIONS=
# but you can allow anyone to use your instance without account by doing:
# UNLOGGED_PERMISSIONS=overall.read,overall.play
# You can specify this to allow guests users to see your collection without behing able to play videos for example:
# UNLOGGED_PERMISSIONS=overall.read
# Specify permissions of new accounts.
DEFAULT_PERMISSIONS=overall.read,overall.play
# Hardware transcoding (equivalent of --profile docker compose option).
COMPOSE_PROFILES=cpu # cpu (no hardware acceleration) or vaapi or qsv or nvidia
# the preset used during transcode. faster means worst quality, you can probably use a slower preset with hwaccels
# warning: using vaapi hwaccel disable presets (they are not supported).
GOCODER_PRESET=fast
# The following value should be set to a random sequence of characters.
# You MUST change it when installing kyoo (for security)
# You can input multiple api keys separated by a ,
KYOO_APIKEYS=t7H5!@4iMNsAaSJQ49pat4jprJgTcF656if#J3
# Keep those empty to use kyoo's default api key. You can also specify a custom API key if you want.
# go to https://www.themoviedb.org/settings/api and copy the api key (not the read access token, the api key)
THEMOVIEDB_APIKEY=
# go to https://thetvdb.com/api-information/signup and copy the api key
TVDB_APIKEY=
# you can also input your subscriber's pin to support TVDB
TVDB_PIN=
# The url you can use to reach your kyoo instance. This is used during oidc to redirect users to your instance.
PUBLIC_URL=http://localhost:5000
# Use a builtin oidc service (google, discord, trakt, or simkl):
# When you create a client_id, secret combo you may be asked for a redirect url. You need to specify https://YOUR-PUBLIC-URL/api/auth/logged/YOUR-SERVICE-NAME
OIDC_DISCORD_CLIENTID=
OIDC_DISCORD_SECRET=
# Or add your custom one:
OIDC_SERVICE_NAME=YourPrettyName
OIDC_SERVICE_LOGO=https://url-of-your-logo.com
OIDC_SERVICE_CLIENTID=
OIDC_SERVICE_SECRET=
OIDC_SERVICE_AUTHORIZATION=https://url-of-the-authorization-endpoint-of-the-oidc-service.com/auth
OIDC_SERVICE_TOKEN=https://url-of-the-token-endpoint-of-the-oidc-service.com/token
OIDC_SERVICE_PROFILE=https://url-of-the-profile-endpoint-of-the-oidc-service.com/userinfo
OIDC_SERVICE_SCOPE="the list of scopes space separeted like email identity"
# Token authentication method as seen in https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication
# Supported values: ClientSecretBasic (default) or ClientSecretPost
# If in doupt, leave this empty.
OIDC_SERVICE_AUTHMETHOD=ClientSecretBasic
# on the previous list, service is the internal name of your service, you can add as many as you want.
# Following options are optional and only useful for debugging.
# To debug the front end, you can set the following to an external backend
KYOO_URL=
# Database things
POSTGRES_USER=KyooUser
POSTGRES_PASSWORD=KyooPassword
POSTGRES_DB=kyooDB
POSTGRES_SERVER=postgres
POSTGRES_PORT=5432
MEILI_HOST="http://meilisearch:7700"
MEILI_MASTER_KEY="ghvjkgisbgkbgskegblfqbgjkebbhgwkjfb"
RABBITMQ_HOST=rabbitmq
RABBITMQ_PORT=5672
RABBITMQ_DEFAULT_USER=kyoo
RABBITMQ_DEFAULT_PASS=aohohunuhouhuhhoahothonseuhaoensuthoaentsuhha

3
.git-blame-ignore-revs Normal file
View File

@@ -0,0 +1,3 @@
7e6e56a366babe17e7891a5897180efbf93c00c5
a5638203a6ecb9f372a5a61e1c8fd443bf3a17fe
18e301f26acd7f2e97eac26c5f48377fa13956f5

64
.gitattributes vendored
View File

@@ -1,63 +1 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
*.Designer.cs linguist-generated=true

View File

@@ -1,20 +0,0 @@
---
name: Bug Report
about: Create a bug report to help improve Kyoo
title: "[BUG] "
labels: bug
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1.
**Expected Behavior**
A clear and concise description of what you expected to happen.
**Environment:**
- Platform [e.g. Windows / Linux]
- Action Version [e.g. v0.0.1 or a git commit's SHA]

11
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
name: Bug Report
description: Create a bug report to help improve Kyoo
labels: [bug]
body:
- type: input
attributes:
label: "Kyoo's version"
- type: textarea
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?

View File

@@ -1,18 +0,0 @@
---
name: Feature Request
about: Suggest a new feature for Kyoo (don't forget to check projects first)
title: "[FEATURE] "
labels: enhancement
---
**Is your feature request related to a problem? If yes, please describe.**
A clear and concise description of what the problem is.
**Describe the feature you'd like**
A clear and concise description of what you want Kyoo to have.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -0,0 +1,7 @@
name: Feature Request
description: Suggest a new feature for Kyoo (don't forget to check projects first)
labels: [enhancement]
body:
- type: textarea
attributes:
label: Feature description

View File

@@ -1,20 +0,0 @@
## Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.
## Information
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] New public API added
- [ ] Non-breaking changes
## Checklist
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added necessary documentation (if appropriate)
## Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did
and what alternatives you considered, etc...

View File

@@ -1,65 +0,0 @@
name: Analysis
on: [push, pull_request, workflow_dispatch]
jobs:
analysis:
name: Static Analysis
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v1
with:
path: ./.sonar/scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner
- name: Install SonarCloud scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
shell: bash
run: |
mkdir -p ./.sonar/scanner
dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner
- name: Wait for tests to run
uses: lewagon/wait-on-check-action@master
with:
ref: ${{github.ref}}
check-name: tests
repo-token: ${{secrets.GITHUB_TOKEN}}
running-workflow-name: analysis
allowed-conclusions: success,skipped,cancelled,neutral,failure
- name: Download coverage report
uses: dawidd6/action-download-artifact@v2
with:
commit: ${{env.COMMIT_SHA}}
workflow: tests.yml
github_token: ${{secrets.GITHUB_TOKEN}}
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: bash
run: |
find . -name 'coverage.opencover.xml'
dotnet build-server shutdown
./.sonar/scanner/dotnet-sonarscanner begin \
-k:"AnonymusRaccoon_Kyoo" \
-o:"anonymus-raccoon" \
-d:sonar.login="${{ secrets.SONAR_TOKEN }}" \
-d:sonar.host.url="https://sonarcloud.io" \
-d:sonar.cs.opencover.reportsPaths="**/coverage.opencover.xml" \
-d:sonar.cs.vstest.reportsPaths="**/TestOutputResults.xml"
dotnet build --no-incremental '-p:SkipTranscoder=true;SkipWebApp=true'
./.sonar/scanner/dotnet-sonarscanner end -d:sonar.login="${{ secrets.SONAR_TOKEN }}"

View File

@@ -1,170 +0,0 @@
name: Build
on: [push, pull_request, workflow_dispatch]
jobs:
build:
name: "${{matrix.artifact}}'s Build"
runs-on: ${{matrix.os}}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
runtime: linux-x64
artifact: linux
- os: windows-latest
runtime: win-x64
artifact: windows
- os: macOS-latest
runtime: osx-x64
artifact: macos
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Install ffmpeg
shell: bash
run: |
if [[ "${{runner.os}}" == "Windows" ]]; then
choco install ffmpeg-shared
elif [[ "${{runner.os}}" == "macOS" ]]; then
brew install ffmpeg
else
sudo apt-get update
sudo apt-get install -y libavutil-dev libavcodec-dev libavformat-dev
fi
- name: Enabling windows compilations tools
if: matrix.artifact == 'windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Select the project to build
shell: bash
run: |
echo "PROJECT=$([ "${{runner.os}}" == "Windows" ] \
&& echo " -p:IncludeConsole=true -p:CheckCodingStyle=false src/Kyoo.Host.WindowsTrait" \
|| echo " -p:CheckCodingStyle=false src/Kyoo.Host.Console")" >> $GITHUB_ENV
- name: Build the app
env:
INCLUDE: ${{env.INCLUDE}};C:\Program Files\FFmpeg\include
LIB: ${{env.LIB}};C:\Program Files\FFmpeg\lib
LIBPATH: ${{env.LIBPATH}};C:\Program Files\FFmpeg\lib
CFLAGS: -I/usr/local/include
LDFLAGS: -L/usr/local/lib
run: dotnet publish -r ${{matrix.runtime}} -c Release -o dist ${{env.PROJECT}}
- name: Compression output
shell: bash
run: |
assets=kyoo_${{matrix.artifact}}
if [[ "${{runner.os}}" == "Windows" ]]; then
cd dist
cp -r "/C/Program Files/FFmpeg/bin/." .
7z a "../$assets.zip"
else
rootgrp=$([ "${{runner.os}}" == "macOS" ] && echo wheel || echo root)
sudo chown -R root:$rootgrp dist
tar -C dist -czf "$assets.tar.gz" .
fi
- uses: actions/upload-artifact@v2
with:
name: kyoo_${{matrix.artifact}}
path: |
*.zip
*.tar.gz
windows_release:
name: Create windows release
runs-on: windows-latest
needs: build
if: ${{ github.ref == 'refs/heads/master' || contains(github.ref, 'tags') }}
steps:
- uses: actions/checkout@v1
- name: Download windows build
uses: actions/download-artifact@v2
with:
name: kyoo_windows
path: artifact
- name: Unzip windows files
run: mkdir dist_win && 7z x artifact/kyoo_windows.zip -odist_win
- name: Install Inno Setup
shell: cmd
run: |
curl -L https://jrsoftware.org/download.php/is.exe > innosetup.exe
innosetup.exe /VERYSILENT /SUPPRESSMSGBOXES /Log=log.txt || (cat log.txt && exit 1)
- name: Create windows installer
shell: bash
run: iscc -Dkyoo=$(realpath dist_win) -O./ -Fkyoo-windows deployment/kyoo-windows.iss
- uses: actions/upload-artifact@v2
with:
name: kyoo_windows_installer
path: ./kyoo-windows.exe
release:
name: Create debian, rpm & arch releases
runs-on: ubuntu-latest
needs: build
if: ${{ github.ref == 'refs/heads/master' || contains(github.ref, 'tags') }}
env:
description: "A media browser"
version: v0.0.1 #${{ github.ref }}
steps:
- uses: actions/checkout@v1
- name: Download linux build
uses: actions/download-artifact@v2
with:
name: kyoo_linux
path: artifact
- name: Unzip the published files.
run: mkdir dist && tar -C dist -xzf artifact/kyoo_linux.tar.gz
- name: Create the package structure
run: |
sudo mkdir -p pkg/usr/lib/
sudo cp -r --no-preserve ownership dist pkg/usr/lib/kyoo
sudo install -Dm 644 deployment/kyoo.service -t pkg/usr/lib/systemd/system/
sudo install -Dm 644 deployment/kyoo.sysusers pkg/usr/lib/sysusers.d/kyoo.conf
sudo install -Dm 644 deployment/kyoo.tmpfiles pkg/usr/lib/tmpfiles.d/kyoo.conf
- name: Build debian package
uses: jiro4989/build-deb-action@v2
with:
package: kyoo
package_root: pkg
maintainer: Zoe Roux <zoe.roux@sdg.moe>
version: ${{env.version}}
depends: "libavutil-dev, libavcodec-dev, libavformat-dev"
arch: amd64
desc: ${{env.description}}
- name: Build rpm package
run: |
mkdir out
sudo rm -rf pkg/DEBIAN
rpmbuild -bb --buildroot $(pwd)/out --build-in-place --define "_rpmdir $(pwd)/rpm" deployment/kyoo.spec
- name: Prepare arch package
run: |
mkdir deployment/output
mv deployment/PKGBUILD.github deployment/PKGBUILD
cp -a pkg/usr deployment/output/usr
- uses: edlanglois/pkgbuild-action@v1
id: makepkg
with:
pkgdir: deployment
namcapDisable: true
- uses: actions/upload-artifact@v2
with:
name: kyoo_rpm
path: ./rpm/x86_64/*.rpm
- uses: actions/upload-artifact@v2
with:
name: kyoo_debian
path: ./*.deb
- uses: actions/upload-artifact@v2
with:
name: kyoo_arch
path: ${{steps.makepkg.outputs.pkgfile0}}
# new-version:
# if: startsWith(github.ref, 'refs/tags/v')
# runs-on: ubuntu-latest

View File

@@ -1,15 +1,56 @@
name: CodingStyle
name: Coding Style
on: [pull_request, workflow_dispatch]
jobs:
build:
name: "Coding style check"
back:
name: "Lint Back"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./back
steps:
- uses: actions/checkout@v4
- name: Check coding style
run: |
dotnet tool restore
dotnet csharpier . --check
front:
name: "Lint Front"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./front
steps:
- uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest
- name: Run Biome
run: biome ci .
scanner:
name: "Lint scanner/autosync"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET
uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
dotnet-version: 5.0.x
- name: Build the app
run: dotnet build -p:CheckCodingStyle=true -p:TreatWarningsAsErrors=true '-p:SkipTranscoder=true;SkipWebApp=true'
args: format --check
transcoder:
name: "Lint transcoder"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./transcoder
steps:
- uses: actions/checkout@v4
- name: Run go fmt
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi

View File

@@ -1,36 +1,123 @@
name: Docker
on: [push, pull_request, workflow_dispatch]
on:
push:
branches:
- master
- next
tags:
- v*
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- context: ./back
dockerfile: Dockerfile
label: back
image: zoriya/kyoo_back
- context: ./back
dockerfile: Dockerfile.migrations
label: migrations
image: zoriya/kyoo_migrations
- context: ./front
dockerfile: Dockerfile
label: front
image: zoriya/kyoo_front
- context: ./scanner
dockerfile: Dockerfile
label: scanner
image: zoriya/kyoo_scanner
- context: ./autosync
dockerfile: Dockerfile
label: autosync
image: zoriya/kyoo_autosync
- context: ./transcoder
dockerfile: Dockerfile
label: transcoder
image: zoriya/kyoo_transcoder
name: Build ${{matrix.label}}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
submodules: recursive
filters: |
should_run:
- '${{matrix.context}}/**'
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{github.repository_owner}}/Kyoo
images: |
docker.io/${{matrix.image}}
ghcr.io/${{matrix.image}}
tags: |
type=ref,event=tag
type=edge
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Check if a package should be pushed
run: |
echo "SHOULD_PUSH=$([ "${GITHUB_REF##*/}" == "master" ] || [ "${GITHUB_REF##*/}" == "next" ] || [ "${GITHUB_REF_TYPE}" == "tag" ] && echo "true" || echo "false")" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v1
if: env.SHOULD_PUSH == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
if: env.SHOULD_PUSH == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.repository_owner}}
password: ${{secrets.GITHUB_TOKEN}}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
if: steps.filter.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch' || startsWith(github.event.ref, 'refs/tags/v')
with:
context: .
push: true
context: ${{matrix.context}}
file: ${{matrix.context}}/${{matrix.dockerfile}}
platforms: linux/amd64,linux/arm64
build-args: |
VERSION=0.0.0
push: ${{env.SHOULD_PUSH}}
tags: ${{steps.meta.outputs.tags}}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Sync README.MD
if: env.SHOULD_PUSH == 'true'
uses: ms-jpq/sync-dockerhub-readme@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ matrix.image }}
readme: "./README.md"

View File

@@ -1,32 +0,0 @@
name: Update the documentation
on:
push:
branches:
- master
jobs:
Building:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- uses: nikeee/docfx-action@v1.0.0
name: Build Documentation
with:
args: docs/docfx.json
- name: Update the docs
run: |
cd docs/_site
sudo chown $(whoami):$(whoami) . -R
echo -n docs.kyoo.moe > CNAME
git config --global user.email "${GITHUB_ACTOR}@github.com"
git config --global user.name "${GITHUB_ACTOR}"
git init
git add -A
git commit -m "Deploying the documentation"
git remote add origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@${GITHUB_REPO}
git checkout -b gh-pages
git push --force origin gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPO: "github.com/AnonymusRaccoon/Kyoo"

64
.github/workflows/native-build.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: Native build
on:
push:
tags:
- v*
jobs:
update:
name: Expo Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./front
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: yarn
cache-dependency-path: front/yarn.lock
- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: yarn install --immutable
- name: Build Mobile Release
run: yarn build:mobile:apk | tee log.txt
- name: Parse Asset URL
id: url
run: |
ASSET_URL=$(cat log.txt | jq '.[0].artifacts.buildUrl' -r)
echo The android url is $ASSET_URL
echo "assetUrl=$ASSET_URL" >> $GITHUB_OUTPUT
- name: Download APK Asset
run: wget -O kyoo.apk ${{ steps.url.outputs.assetUrl }}
- uses: actions/upload-artifact@v4
with:
name: kyoo.apk
path: ./front/kyoo.apk
- name: Upload release artifacts
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./front/kyoo.apk

43
.github/workflows/native-update.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Native update
on:
push:
tags:
- v*
jobs:
update:
name: Expo Update
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./front
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: yarn
cache-dependency-path: front/yarn.lock
- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: yarn install --immutable
- name: Publish update
run: yarn update

View File

@@ -1,44 +1,30 @@
name: Release
on:
push:
tags:
- v*
workflow_dispatch:
- v*
jobs:
release:
update:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set commit environment
run: echo "COMMIT_SHA=$(git rev-list -n 1 ${{github.ref}})" >> $GITHUB_ENV
- name: Wait for builds & tests to finish
uses: lewagon/wait-on-check-action@master
- name: Checkout repository
uses: actions/checkout@v4
- name: Set correct versions
run: |
VERSION=${{ github.ref_name }}
VERSION=${VERSION:1} # Remove v prefix
VERSION=${VERSION%.*} # Remove minor version
sed "s/edge/$VERSION/" -i docker-compose.yml
- uses: actions/upload-artifact@v4
with:
ref: ${{github.ref}}
repo-token: ${{secrets.GITHUB_TOKEN}}
running-workflow-name: release
allowed-conclusions: success,skipped,cancelled,neutral
- name: Download artifacts
uses: dawidd6/action-download-artifact@v2
name: docker-compose.yml
path: ./docker-compose.yml
- name: Upload release artifacts
uses: softprops/action-gh-release@v2
with:
commit: ${{env.COMMIT_SHA}}
workflow: build.yml
path: ./artifacts
github_token: ${{secrets.GITHUB_TOKEN}}
# - name: Public the abstractions to nuget
# id: publish_nuget
# uses: rohith/publish-nuget@v2
# with:
# PROJECT_FILE_PATH: Kyoo.Abstractions/Kyoo.Abstractions.csproj
# PACKAGE_NAME: Kyoo.Abstractions
# VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
# NUGET_KEY: ${{secrets.NUGET_API_KEY}}
# INCLUDE_SYMBOLS: true
- name: Create Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
artifacts: ./artifacts/**/*
token: ${{secrets.GITHUB_TOKEN}}
files: ./docker-compose.yml

50
.github/workflows/robot.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: RobotTests
on:
push:
branches:
- master
- next
pull_request:
jobs:
test:
name: Run Robot Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Pull images
run: |
cp .env.example .env
docker compose version
docker compose pull
- name: Docker cache
uses: satackey/action-docker-layer-caching@v0.0.11
continue-on-error: true
- name: Start the service
run: |
docker compose up -d back postgres traefik meilisearch --wait
- name: Perform healthchecks
run: |
docker compose ps -a
docker compose logs
wget --retry-connrefused --retry-on-http-error=502 http://localhost:8901/api/health || (docker compose logs && exit 1)
- name: Run robot tests
run: |
pip install -r back/tests/robot/requirements.txt
robot -d out back/tests/robot/
- name: Show logs
if: failure()
run: docker compose logs
- uses: actions/upload-artifact@v4
with:
name: results
path: out

View File

@@ -1,48 +0,0 @@
name: Testing
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
container: mcr.microsoft.com/dotnet/sdk:5.0
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Restore dependencies
run: dotnet restore
- name: Build
run: |
dotnet build --no-restore '-p:SkipWebApp=true;SkipTranscoder=true' -p:CopyLocalLockFileAssemblies=true
cp ./src/Kyoo.Abstractions/bin/Debug/net5.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll ./tests/Kyoo.Tests/bin/Debug/net5.0/
- name: Test
run: dotnet test --no-build '-p:CollectCoverage=true;CoverletOutputFormat=opencover' --logger "trx;LogFileName=TestOutputResults.xml"
env:
POSTGRES_HOST: postgres
POSTGRES_USERNAME: postgres
POSTGRES_PASSWORD: postgres
- name: Sanitize coverage output
if: ${{ always() }}
run: sed -i "s'$(pwd)'.'" tests/Kyoo.Tests/coverage.opencover.xml
- name: Upload tests results
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: results.xml
path: "**/TestOutputResults.xml"
- name: Upload coverage report
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: coverage.xml
path: "**/coverage.opencover.xml"

361
.gitignore vendored
View File

@@ -1,353 +1,8 @@
## PROJECT CUSTOM IGNORES
# Transcoder build (auto generated from Kyoo.Transcoder sub-project)
Kyoo/Transcoder/Kyoo.Transcoder.dll
Kyoo/Transcoder/Kyoo.Transcoder.ilk
Kyoo/Transcoder/Kyoo.Transcoder.lib
Kyoo/Transcoder/Kyoo.Transcoder.pdb
Kyoo/Transcoder/Kyoo.Transcoder.exp
libtranscoder.so
libtranscoder.dylib
transcoder.dll
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- Backup*.rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
/Kyoo/TheTVDB-Credentials.json
/video
.env
.venv
.idea
.vscode
log.html
output.xml
report.html

4
.gitmodules vendored
View File

@@ -1,4 +0,0 @@
[submodule "transcoder"]
path = src/Kyoo.Transcoder
url = ../Kyoo.Transcoder.git
branch = master

5
.pg_format Normal file
View File

@@ -0,0 +1,5 @@
tabs=1
function-case=1 #lowercase
keyword-case=1
type-case=1
no-space-function=1

View File

@@ -1,4 +1,4 @@
# Authors
Ordered by the date of the first commit.
* Zoe Roux ([@AnonymusRaccoon](http://github.com/AnonymusRaccoon))
* Zoe Roux ([@zoriya](http://github.com/zoriya))

View File

@@ -3,21 +3,19 @@
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
Contributions to this project are [released](https://docs.github.com/en/github/site-policy/github-terms-of-service#6-contributions-under-repository-license)
to the public under the [GPL-3.0 License](https://github.com/AnonymusRaccoon/Kyoo/blob/master/LICENSE).
to the public under the [GPL-3.0 License](https://github.com/zoriya/Kyoo/blob/master/LICENSE).
## Submitting a pull request
1. [Fork](https://github.com/AnonymusRaccoon/Kyoo/fork) and clone the repository
2. Install the toolstack and/or download precompiled binaries for the transcoder (see [Development & Build](https://github.com/AnonymusRaccoon/Kyoo#development--build))
3. Create a new branch: `git checkout -b my-branch-name`
4. Make your changes (Please try to follow the same coding style as what has already been made - indent with tabs, align with spaces etc)
5. Make sure the tests pass: `dotnet tests`
6. Push to your fork and [submit a pull request](https://github.com/AnonymusRaccoon/Kyoo/compare)
7. Pat your self on the back and wait for your pull request to be reviewed and merged.
1. [Fork](https://github.com/zoriya/Kyoo/fork) and clone the repository
2. Create a new branch: `git checkout -b my-branch-name`
3. Make your changes (Please try to follow the same coding style as what has already been made - indent with tabs, align with spaces etc).
Don't forget to run the auto-formatter.
4. Push to your fork and [submit a pull request](https://github.com/zoriya/Kyoo/compare)
5. Pat your self on the back and wait for your pull request to be reviewed and merged.
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
- Write tests.
- Make sure the `README.md` and any other relevant **documentation are kept up-to-date**.
- We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as **separate pull requests**.

View File

@@ -1,25 +0,0 @@
FROM gcc:latest as transcoder
RUN apt-get update && apt-get install -y cmake make libavutil-dev libavcodec-dev libavformat-dev
WORKDIR /transcoder
COPY src/Kyoo.Transcoder .
RUN cmake . && make -j
FROM node:14-alpine as webapp
WORKDIR /webapp
COPY front .
RUN npm install -g @angular/cli
RUN yarn install --frozen-lockfile
RUN yarn run build --configuration production
FROM mcr.microsoft.com/dotnet/sdk:5.0 as builder
COPY . .
RUN dotnet publish -c Release -o /opt/kyoo '-p:SkipWebApp=true;SkipTranscoder=true;CheckCodingStyle=false' src/Kyoo.Host.Console
FROM mcr.microsoft.com/dotnet/aspnet:5.0
RUN apt-get update && apt-get install -y libavutil-dev libavcodec-dev libavformat-dev
EXPOSE 5000
COPY --from=builder /opt/kyoo /usr/lib/kyoo
COPY --from=transcoder /transcoder/libtranscoder.so /usr/lib/kyoo
COPY --from=webapp /webapp/dist/* /usr/lib/kyoo/wwwroot/
CMD ["/usr/lib/kyoo/Kyoo.Host.Console"]

90
INSTALLING.md Normal file
View File

@@ -0,0 +1,90 @@
# Installing TLDR
1. Install docker & docker-compose
2. Download the
[`docker-compose.yml`](https://github.com/zoriya/kyoo/releases/latest/download/docker-compose.yml) and
[`.env`](https://raw.githubusercontent.com/zoriya/Kyoo/master/.env.example) files
3. Fill the `.env` file with your configuration options
4. Look at [Hardware Acceleration section](#Hardware-Acceleration) if you need it
5. Run `docker compose up -d` and see kyoo at `http://localhost:8901`
# Installing
To install Kyoo, you need docker and docker-compose. Those can be installed from here for
[Linux](https://docs.docker.com/engine/install/)
[Mac](https://docs.docker.com/desktop/install/mac-install/)
or [Windows](https://docs.docker.com/desktop/install/windows-install/). Docker is used to run each services of Kyoo in
an isolated environment with all the dependencies they need.
Kyoo also needs 2 files to work properly. The first should be downloaded from the latest release artifact, the other needs to be filled in with your configurations.
Those files can be put in any directory of your choice.
Those files are:
- A `docker-compose.yml` (simply download docker-compose.yml from [the latest release](https://github.com/zoriya/kyoo/releases/latest/download/docker-compose.yml)).
- A `.env` file that you will need to **fill**. Look at the example [.env.example](https://raw.githubusercontent.com/zoriya/Kyoo/master/.env.example)
> If you want an explanation of what are those files, you can read the following:
> The `docker-compose.yml` file describes the different services of Kyoo, where they should be downloaded and their start order. \
> The `.env` file contains all the configuration options that the services in `docker-compose.yml` will read.
If you need hardware acceleration, look at [Hardware Acceleration section](#Hardware-Acceleration) if you need it
The next and last step is actually starting Kyoo. To do that, open a terminal in the same directory as the 3 configurations files
and run `docker-compose up -d`.
Congratulation, everything is now ready to use Kyoo. You can navigate to `http://localhost:8901` on a web browser to see your instance of Kyoo.
# Updating
Updating Kyoo is exactly the same as installing it. Get an updated version of the `docker-compose.yml` file and
unsure that your `.env` contains all the options specified in the updated `.env.example` file.
After that, you will need to update Kyoo's services. For that, open a terminal in the configuration's directory and run
the command `docker-compose pull`. You are now ready to restart Kyoo, you can run `docker-compose up -d`.
# Uninstalling
To uninstall Kyoo, you need to open a terminal in the configuration's directory and run `docker-compose down`. This will
stop Kyoo's services. You can then remove the configuration files.
# Hardware Acceleration
## VA-API (intel, amd)
First install necessary drivers on your system, when running `vainfo` you should have something like this:
```
libva info: VA-API version 1.20.0
libva info: Trying to open /run/opengl-driver/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.3.5 ()
vainfo: Supported profile and entrypoints
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
...Truncated...
VAProfileHEVCSccMain444_10 : VAEntrypointVLD
VAProfileHEVCSccMain444_10 : VAEntrypointEncSliceLP
```
Kyoo will default to use your primary card (located at `/dev/dri/renderD128`). If you need to specify a secondary one, you
can use the `GOCODER_VAAPI_RENDERER` env-var to specify `/dev/dri/renderD129` or another one.
Then you can simply run kyoo using `docker compose --profile vaapi up -d` (notice the `--profile vaapi` added)
You can also add `COMPOSE_PROFILES=vaapi` to your `.env` instead of adding the `--profile` flag.
## Nvidia
To enable nvidia hardware acceleration, first install necessary drivers on your system.
Then, install the [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html), you can simply
follow the instructions on the official webpage or your distribution wiki.
To test if everything works, you can run `sudo docker run --rm --gpus all ubuntu nvidia-smi`. If your version of docker is older,
you might need to add `--runtime nvidia` like so: `sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi`
After that, you can now use `docker compose --profile nvidia up -d` to start kyoo with nvidia hardware acceleration (notice the `--profile nvidia` added).
You can also add `COMPOSE_PROFILES=nvidia` to your `.env` instead of adding the `--profile` flag.
Note that most nvidia cards have an artificial limit on the number of encodes. You can confirm your card limit [here](https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new).
This limit can also be removed by applying an [unofficial patch](https://github.com/keylase/nvidia-patch) to you driver.

116
Kyoo.sln
View File

@@ -1,116 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kyoo.Core", "src\Kyoo.Core\Kyoo.Core.csproj", "{0F8275B6-C7DD-42DF-A168-755C81B1C329}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Abstractions", "src\Kyoo.Abstractions\Kyoo.Abstractions.csproj", "{BAB2CAE1-AC28-4509-AA3E-8DC75BD59220}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Database", "src\Kyoo.Database\Kyoo.Database.csproj", "{6F91B645-F785-46BB-9C4F-1EFC83E489B6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Postgresql", "src\Kyoo.Postgresql\Kyoo.Postgresql.csproj", "{3213C96D-0BF3-460B-A8B5-B9977229408A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Authentication", "src\Kyoo.Authentication\Kyoo.Authentication.csproj", "{7A841335-6523-47DB-9717-80AA7BD943FD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.SqLite", "src\Kyoo.SqLite\Kyoo.SqLite.csproj", "{6515380E-1E57-42DA-B6E3-E1C8A848818A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.TheTvdb", "src\Kyoo.TheTvdb\Kyoo.TheTvdb.csproj", "{D06BF829-23F5-40F3-A62D-627D9F4B4D6C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.TheMovieDb", "src\Kyoo.TheMovieDb\Kyoo.TheMovieDb.csproj", "{BAB270D4-E0EA-4329-BA65-512FDAB01001}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Tests", "tests\Kyoo.Tests\Kyoo.Tests.csproj", "{0C8AA7EA-E723-4532-852F-35AA4E8AFED5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.WebApp", "src\Kyoo.WebApp\Kyoo.WebApp.csproj", "{2374D500-1ADB-4752-85DB-8BB0DDF5A8E8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Host.WindowsTrait", "src\Kyoo.Host.WindowsTrait\Kyoo.Host.WindowsTrait.csproj", "{98851001-40DD-46A6-94B3-2F8D90722076}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Host.Console", "src\Kyoo.Host.Console\Kyoo.Host.Console.csproj", "{D8658BEA-8949-45AC-BEBB-A4FFC4F800F5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Swagger", "src\Kyoo.Swagger\Kyoo.Swagger.csproj", "{7D1A7596-73F6-4D35-842E-A5AD9C620596}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{FEAE1B0E-D797-470F-9030-0EF743575ECC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Providers", "Providers", "{8D28F5EF-0CD7-4697-A2A7-24EC31A48F21}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Databases", "Databases", "{865461CA-EC06-4B42-91CF-8723B0A9BB67}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Hosts", "Hosts", "{C569FF25-7E01-484C-9F72-5B99845AD94B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Host.Generic", "src\Kyoo.Host.Generic\Kyoo.Host.Generic.csproj", "{0938459E-2E2B-457F-8120-7D8CA93866A6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0F8275B6-C7DD-42DF-A168-755C81B1C329}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F8275B6-C7DD-42DF-A168-755C81B1C329}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F8275B6-C7DD-42DF-A168-755C81B1C329}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F8275B6-C7DD-42DF-A168-755C81B1C329}.Release|Any CPU.Build.0 = Release|Any CPU
{BAB2CAE1-AC28-4509-AA3E-8DC75BD59220}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BAB2CAE1-AC28-4509-AA3E-8DC75BD59220}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAB2CAE1-AC28-4509-AA3E-8DC75BD59220}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BAB2CAE1-AC28-4509-AA3E-8DC75BD59220}.Release|Any CPU.Build.0 = Release|Any CPU
{6F91B645-F785-46BB-9C4F-1EFC83E489B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6F91B645-F785-46BB-9C4F-1EFC83E489B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6F91B645-F785-46BB-9C4F-1EFC83E489B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6F91B645-F785-46BB-9C4F-1EFC83E489B6}.Release|Any CPU.Build.0 = Release|Any CPU
{3213C96D-0BF3-460B-A8B5-B9977229408A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3213C96D-0BF3-460B-A8B5-B9977229408A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3213C96D-0BF3-460B-A8B5-B9977229408A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3213C96D-0BF3-460B-A8B5-B9977229408A}.Release|Any CPU.Build.0 = Release|Any CPU
{7A841335-6523-47DB-9717-80AA7BD943FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A841335-6523-47DB-9717-80AA7BD943FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A841335-6523-47DB-9717-80AA7BD943FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A841335-6523-47DB-9717-80AA7BD943FD}.Release|Any CPU.Build.0 = Release|Any CPU
{6515380E-1E57-42DA-B6E3-E1C8A848818A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6515380E-1E57-42DA-B6E3-E1C8A848818A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6515380E-1E57-42DA-B6E3-E1C8A848818A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6515380E-1E57-42DA-B6E3-E1C8A848818A}.Release|Any CPU.Build.0 = Release|Any CPU
{D06BF829-23F5-40F3-A62D-627D9F4B4D6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D06BF829-23F5-40F3-A62D-627D9F4B4D6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D06BF829-23F5-40F3-A62D-627D9F4B4D6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D06BF829-23F5-40F3-A62D-627D9F4B4D6C}.Release|Any CPU.Build.0 = Release|Any CPU
{BAB270D4-E0EA-4329-BA65-512FDAB01001}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BAB270D4-E0EA-4329-BA65-512FDAB01001}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAB270D4-E0EA-4329-BA65-512FDAB01001}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BAB270D4-E0EA-4329-BA65-512FDAB01001}.Release|Any CPU.Build.0 = Release|Any CPU
{0C8AA7EA-E723-4532-852F-35AA4E8AFED5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C8AA7EA-E723-4532-852F-35AA4E8AFED5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C8AA7EA-E723-4532-852F-35AA4E8AFED5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C8AA7EA-E723-4532-852F-35AA4E8AFED5}.Release|Any CPU.Build.0 = Release|Any CPU
{2374D500-1ADB-4752-85DB-8BB0DDF5A8E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2374D500-1ADB-4752-85DB-8BB0DDF5A8E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2374D500-1ADB-4752-85DB-8BB0DDF5A8E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2374D500-1ADB-4752-85DB-8BB0DDF5A8E8}.Release|Any CPU.Build.0 = Release|Any CPU
{4FF1ECD9-6EEF-4440-B037-A661D78FB04D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FF1ECD9-6EEF-4440-B037-A661D78FB04D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FF1ECD9-6EEF-4440-B037-A661D78FB04D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FF1ECD9-6EEF-4440-B037-A661D78FB04D}.Release|Any CPU.Build.0 = Release|Any CPU
{98851001-40DD-46A6-94B3-2F8D90722076}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{98851001-40DD-46A6-94B3-2F8D90722076}.Debug|Any CPU.Build.0 = Debug|Any CPU
{98851001-40DD-46A6-94B3-2F8D90722076}.Release|Any CPU.ActiveCfg = Release|Any CPU
{98851001-40DD-46A6-94B3-2F8D90722076}.Release|Any CPU.Build.0 = Release|Any CPU
{D8658BEA-8949-45AC-BEBB-A4FFC4F800F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D8658BEA-8949-45AC-BEBB-A4FFC4F800F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8658BEA-8949-45AC-BEBB-A4FFC4F800F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D8658BEA-8949-45AC-BEBB-A4FFC4F800F5}.Release|Any CPU.Build.0 = Release|Any CPU
{7D1A7596-73F6-4D35-842E-A5AD9C620596}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D1A7596-73F6-4D35-842E-A5AD9C620596}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D1A7596-73F6-4D35-842E-A5AD9C620596}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7D1A7596-73F6-4D35-842E-A5AD9C620596}.Release|Any CPU.Build.0 = Release|Any CPU
{0938459E-2E2B-457F-8120-7D8CA93866A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0938459E-2E2B-457F-8120-7D8CA93866A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0938459E-2E2B-457F-8120-7D8CA93866A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0938459E-2E2B-457F-8120-7D8CA93866A6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{0C8AA7EA-E723-4532-852F-35AA4E8AFED5} = {FEAE1B0E-D797-470F-9030-0EF743575ECC}
{BAB270D4-E0EA-4329-BA65-512FDAB01001} = {8D28F5EF-0CD7-4697-A2A7-24EC31A48F21}
{D06BF829-23F5-40F3-A62D-627D9F4B4D6C} = {8D28F5EF-0CD7-4697-A2A7-24EC31A48F21}
{6F91B645-F785-46BB-9C4F-1EFC83E489B6} = {865461CA-EC06-4B42-91CF-8723B0A9BB67}
{3213C96D-0BF3-460B-A8B5-B9977229408A} = {865461CA-EC06-4B42-91CF-8723B0A9BB67}
{6515380E-1E57-42DA-B6E3-E1C8A848818A} = {865461CA-EC06-4B42-91CF-8723B0A9BB67}
{D8658BEA-8949-45AC-BEBB-A4FFC4F800F5} = {C569FF25-7E01-484C-9F72-5B99845AD94B}
{98851001-40DD-46A6-94B3-2F8D90722076} = {C569FF25-7E01-484C-9F72-5B99845AD94B}
{0938459E-2E2B-457F-8120-7D8CA93866A6} = {C569FF25-7E01-484C-9F72-5B99845AD94B}
EndGlobalSection
EndGlobal

44
PRIVACY.md Normal file
View File

@@ -0,0 +1,44 @@
# Privacy Policy for Kyoo
Effective Date: 2023-06-15
Thank you for using Kyoo. This Privacy Policy outlines how we collect, use, and protect your personal information when you use our service. We are committed to ensuring the privacy and security of your data. Please read this policy carefully to understand our practices regarding your information.
### 1. Information We Collect:
We collect and store only the email addresses you provide during the registration process. No other personal information is requested or stored.
### 2. Use of Personal Information:
We use your email address solely for the purpose of user authentication and login. We do not use, access, or share your email address with any third parties.
### 3. Data Storage and Security:
All personal information, limited to email addresses, is stored securely on our self-hosted servers. We take appropriate technical and organizational measures to protect against unauthorized access, alteration, disclosure, or destruction of your personal information.
### 4. Data Sharing:
We do not share any personal information, including email addresses, with any third parties. Your data remains confidential and is used only for the purposes stated in this Privacy Policy.
### 5. Account Deletion:
You have the right to delete your Kyoo account at any time. To do so, please click on the `Delete your account` button on the account's menu of the app/website. Upon account deletion, all associated personal information, including your email address, will be permanently and irreversibly removed from our servers.
### 6. Cookies and Tracking Technologies:
Kyoo does not use any cookies or tracking technologies to collect or store user information.
### 7. Legal Basis for Processing:
Our collection and processing of your email address is based on your consent, as it is necessary for the performance of the contract between you and Kyoo.
### 8. Changes to this Privacy Policy:
We may update this Privacy Policy from time to time. Any changes will be posted on this page, and the effective date will be indicated at the top of the policy. Please review this policy periodically for any updates.
### 9. Contact Us:
If you have any questions, concerns, or requests regarding this Privacy Policy or the processing of your personal information, please contact us at https://github.com/zoriya/kyoo/issues.
By using Kyoo, you acknowledge and agree to the practices described in this Privacy Policy.

182
README.md
View File

@@ -1,96 +1,90 @@
# <img width="24px" src="./icons/icon-256x256.png" alt="Kyoo"> Kyoo
<p>
<a href="https://github.com/AnonymusRaccoon/Kyoo/actions/workflows/build.yml"><img src="https://img.shields.io/github/workflow/status/AnonymusRaccoon/Kyoo/Build?style=flat-square" alt="Build status"></a>
<a href="https://github.com/AnonymusRaccoon/Kyoo/actions/workflows/tests.yml"><img src="https://img.shields.io/github/workflow/status/AnonymusRaccoon/Kyoo/Testing?label=tests&style=flat-square" alt="Tests status"></a>
<a href="https://github.com/users/AnonymusRaccoon/packages/container/package/kyoo"><img src="https://img.shields.io/github/workflow/status/AnonymusRaccoon/Kyoo/Docker?label=docker&style=flat-square" alt="Docker status"/></a>
<a href="https://sonarcloud.io/dashboard?id=AnonymusRaccoon_Kyoo"><img src="https://img.shields.io/sonar/tests/AnonymusRaccoon_Kyoo?compact_message&server=https%3A%2F%2Fsonarcloud.io&style=flat-square" alt="Test report"></a>
<a href="https://sonarcloud.io/dashboard?id=AnonymusRaccoon_Kyoo"><img src="https://img.shields.io/sonar/coverage/AnonymusRaccoon_Kyoo?server=https%3A%2F%2Fsonarcloud.io&style=flat-square" alt="Coverage"></a>
<a href="./LICENSE"><img src="https://img.shields.io/github/license/AnonymusRaccoon/Kyoo?style=flat-square" alt="License"></a>
# <img width="24px" src="./icons/icon-256x256.png" alt=""> Kyoo
Kyoo is a self-hosted media server focused on video content (Movies, Series & Anime). It is an alternative to Jellyfin or Plex.
It aims to have a low amount of maintenance needed (no folder structure required nor manual metadata edits). Media not being scanned correctly (even with weird names) is considered a bug.
Kyoo does not have a plugin system and aim to have every features built-in (see [#Features](#-features) for the list).
![Kyoo in Action](https://raw.githubusercontent.com/zoriya/kyoo/screens/home.png)
## 🌐 Getting Started
- **[Installation](./INSTALLING.md):** Basic installation guidelines, how to start Kyoo, enable OIDC or hardware transcoding.
- **[Join the discord](https://discord.gg/E6Apw3aFaA):** Ask questions, talk about the development, feature you might want or bugs you might encounter.
- **[API Documentation](https://kyoo.zoriya.dev/api/doc):** The API to integrate Kyoo with other services, if you have any questions, please ask on github or discord!
- **[Contributing](./CONTRIBUTING.md):** Feel free to open issues, submit pull requests, and contribute to making Kyoo even better. We need you!
[![](https://discord.com/api/guilds/1216460898139635753/widget.png?style=banner2)](https://discord.gg/zpA74Qpvj5)
## 🚀 Features
- **Dynamic Transcoding:** Transcode your media to any quality, change on the fly with auto quality, and seek instantly without waiting for the transcoder.
- **Video Preview Thumbnails:** Simply hover the video's progress bar and see a preview of the video.
- **Meilisearch-Powered Search:** Advanced, typo-resilient search system powered by Meilisearch.
- **OIDC Connection:** Connect using any OIDC compliant service (Google, Discord, Authelia, you name it).
- **Watch List Scrubbing Support:** Your watch list is automatically synced to connected services (SIMKL and soon others [#351](https://github.com/zoriya/Kyoo/issues/351), [#352](https://github.com/zoriya/Kyoo/issues/352)). No need to manually mark episodes as watched.
- **Download and Offline Support:** Download videos to watch them without internet access, you progress will automatically be synced next time your devices goes online.
- **Enhanced Subtitle Support:** Subtitles are important, Kyoo supports SSA/ASS and uses the video's embedded fonts when available.
- **Anime Name Parsing**: While there are still some issues (see [#466](https://github.com/zoriya/Kyoo/issues/466), Kyoo will match weird anime names (like `[Some-Stuffs] Jojo's Bizarre Adventure Stone Ocean 24 (1920x1080 Blu-Ray Opus) [2750810F].mkv`) without issue.
- **Cloud Native:** Still an ongoing effort (see [#357](https://github.com/zoriya/Kyoo/issues/357)) but Kyoo is made with the idea that it could run distributed or standalone, on an RPI or on huge home-datacenters.
## 📺 Clients
Clients is a bit part of media servers but for now, Kyoo's focus is on features. Only a web version and an android apps are available for now. The front is written with react-native (expo) so adapting for others platform is possible. Here is a rough roadmap of clients supports:
- Today: Web & Android
- End of 2024: Chromecast support
- Summer 2025: Android TV app
Apple devices are not planned for now because I do not own any of their device, and it requires $100/year.
If you would like to have a client sooner or on devices not listed on the roadmap, come hang on the discord and consider contributing to Kyoo.
## 📖 Translations
If Kyoo is not available on your language, you can use [weblate](https://hosted.weblate.org/engage/kyoo/) to add translations easily.
[![Translation status](https://hosted.weblate.org/widget/kyoo/kyoo/multi-auto.svg)](https://hosted.weblate.org/engage/kyoo/)
## 📜 Why another media-browser?
From a technical standpoint, both Jellyfin and Plex lean on SQLite and confine everything within a single container, Kyoo takes a different route. We're not afraid to bring in additional containers when it makes sense whether for specialized features like Meilisearch powering our search system or for scalability, as seen with our transcoder.
Kyoo embraces the "setup once, forget about it" philosophy. Unlike Plex and Jellyfin, we don't burden you with manual file renaming or specific folder structures. Kyoo seamlessly works with files straight from your download directory, minimizing the maintenance headache for server admins.
Kyoo narrows its focus to movies, TV shows, and anime streaming. No music, ebooks, or games just pure cinematic delight.
## 🔗 Live Demo
Curious to see Kyoo in action? Check out our live demo featuring copyright-free movies at [kyoo.zoriya.dev](https://kyoo.zoriya.dev). Special thanks to the Blender Studio for providing open-source movies available for all.
## 👀 Screens
![Web Show](https://raw.githubusercontent.com/zoriya/kyoo/screens/show-details.png)
![Desktop Scrubber](https://raw.githubusercontent.com/zoriya/kyoo/screens/hover-scrubber.png)
![Touch Scrubber](https://raw.githubusercontent.com/zoriya/kyoo/screens/bottom-scrubber.png)
![Collection](https://raw.githubusercontent.com/zoriya/kyoo/screens/collection.png)
![List](https://raw.githubusercontent.com/zoriya/kyoo/screens/list.png)
<p align="center">
<img
src="https://raw.githubusercontent.com/zoriya/kyoo/screens/android-movie.png"
alt="Android Movie"
width="350"
/>
</p>
Ready to elevate your streaming experience? Dive into Kyoo now! 🎬🎉
Kyoo is an open-source media browser which allow you to stream your movies, tv-shows or anime.
It is an alternative to Plex, Emby or Jellyfin.
Kyoo has been created from scratch, it is not a fork. Everything is and always will be free and open-source.
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)
## Features
- Manage your movies, tv-series & anime
- Download metadata automatically
- Transmux files to make them available on every platform (Transcode coming soon)
- Account system with a permission system
- Handle subtitles natively with embedded fonts (ass, subrip or vtt)
- Entirely free and works without internet (when metadata have already been downloaded)
- Works on Linux, Windows, Docker and probably Mac
- A powerful plugin system
## Live Demo
You can see a live demo with copyright-free movies here: [demo.kyoo.moe](https://demo.kyoo.moe).
Thanks to the [blender studio](https://www.blender.org/about/studio/) for providing open-source movies available for all.
The demo server is simply created using the following docker compose:
```yml
version: "3.8"
services:
kyoo:
image: ghcr.io/anonymusraccoon/kyoo:master
restart: on-failure
environment:
- KYOO_DATADIR=/var/lib/kyoo
- BASICS__PUBLICURL=https://demo.kyoo.moe
- BASICS__MetadataInShow=false
- DATABASE__ENABLED=postgres
- DATABASE__CONFIGURATIONS__POSTGRES__SERVER=postgres
- DATABASE__CONFIGURATIONS__POSTGRES__USER ID=kyoo
- DATABASE__CONFIGURATIONS__POSTGRES__PASSWORD=kyooPassword
- TVDB__APIKEY=TheTvDbApiKey
- THE-MOVIEDB__APIKEY=TheMovieDbApiKey
ports:
- "80:5000"
depends_on:
- postgres
volumes:
- kyoo:/var/lib/kyoo
- video:/video
postgres:
image: "postgres"
restart: on-failure
environment:
- POSTGRES_USER=kyoo
- POSTGRES_PASSWORD=kyooPassword
volumes:
- db:/var/lib/postgresql/data
volumes:
kyoo:
video:
db:
```
## Screens
![Show](../screens/show.png?raw=true)
- - -
![Show Dropdown](../screens/show_dropdown.png?raw=true)
- - -
![Browse](../screens/browse.png?raw=true)
- - -
![Filters](../screens/filters.png?raw=true)
- - -
![People](../screens/people.png?raw=true)
- - -
![Player](../screens/player.png?raw=true)
- - -
![Search](../screens/search.png?raw=true)
<!-- vim: set wrap: -->

1
autosync/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
__pycache__

8
autosync/Dockerfile Normal file
View File

@@ -0,0 +1,8 @@
FROM python:3.12
WORKDIR /app
COPY ./requirements.txt .
RUN pip3 install -r ./requirements.txt
COPY . .
ENTRYPOINT ["python3", "-m", "autosync"]

View File

@@ -0,0 +1,11 @@
async def main():
import logging
from autosync.services.simkl import Simkl
from autosync.services.aggregate import Aggregate
from autosync.consumer import Consumer
logging.basicConfig(level=logging.INFO)
service = Aggregate([Simkl()])
async with Consumer() as consumer:
await consumer.listen(service)

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env python
import asyncio
import autosync
asyncio.run(autosync.main())

View File

@@ -0,0 +1,51 @@
import asyncio
from msgspec import json
import os
from logging import getLogger
from aio_pika import ExchangeType, connect_robust
from aio_pika.abc import AbstractIncomingMessage
from autosync.services.service import Service
from autosync.models.message import Message
logger = getLogger(__name__)
class Consumer:
QUEUE = "autosync"
async def __aenter__(self):
self._con = await connect_robust(
host=os.environ.get("RABBITMQ_HOST", "rabbitmq"),
port=int(os.environ.get("RABBITMQ_PORT", "5672")),
login=os.environ.get("RABBITMQ_DEFAULT_USER", "guest"),
password=os.environ.get("RABBITMQ_DEFAULT_PASS", "guest"),
)
self._channel = await self._con.channel()
self._exchange = await self._channel.declare_exchange(
"events.watched", type=ExchangeType.TOPIC
)
self._queue = await self._channel.declare_queue(self.QUEUE)
await self._queue.bind(self._exchange, routing_key="#")
return self
async def __aexit__(self, exc_type, exc_value, exc_tb):
await self._con.close()
async def listen(self, service: Service):
async def on_message(message: AbstractIncomingMessage):
try:
msg = json.decode(message.body, type=Message)
service.update(msg.value.user, msg.value.resource, msg.value)
await message.ack()
except Exception as e:
logger.exception("Unhandled error", exc_info=e)
await message.reject()
# Allow up to 20 requests to run in parallel on the same listener.
# Since most work is calling API not doing that is a waste.
await self._channel.set_qos(prefetch_count=20)
await self._queue.consume(on_message)
logger.info("Listening for autosync.")
await asyncio.Future()

View File

@@ -0,0 +1,12 @@
from msgspec import Struct
from autosync.models.show import Show
from .metadataid import EpisodeID
class Episode(Struct, rename="camel", tag_field="kind", tag="episode"):
external_id: dict[str, EpisodeID]
show: Show
season_number: int
episode_number: int
absolute_number: int

View File

@@ -0,0 +1,17 @@
from msgspec import Struct
from autosync.models.episode import Episode
from autosync.models.movie import Movie
from autosync.models.show import Show
from autosync.models.user import User
from autosync.models.watch_status import WatchStatus
class WatchStatusMessage(WatchStatus):
user: User
resource: Movie | Show | Episode
class Message(Struct, rename="camel"):
action: str
type: str
value: WatchStatusMessage

View File

@@ -0,0 +1,14 @@
from msgspec import Struct
from typing import Optional
class MetadataID(Struct, rename="camel"):
data_id: str
link: Optional[str]
class EpisodeID(Struct, rename="camel"):
show_id: str
season: Optional[int]
episode: int
link: Optional[str]

View File

@@ -0,0 +1,15 @@
from typing import Optional
from datetime import date
from msgspec import Struct
from .metadataid import MetadataID
class Movie(Struct, rename="camel", tag_field="kind", tag="movie"):
name: str
air_date: Optional[date]
external_id: dict[str, MetadataID]
@property
def year(self):
return self.air_date.year if self.air_date is not None else None

View File

@@ -0,0 +1,15 @@
from typing import Optional
from datetime import date
from msgspec import Struct
from .metadataid import MetadataID
class Show(Struct, rename="camel", tag_field="kind", tag="show"):
name: str
start_air: Optional[date]
external_id: dict[str, MetadataID]
@property
def year(self):
return self.start_air.year if self.start_air is not None else None

View File

@@ -0,0 +1,26 @@
from msgspec import Struct
from datetime import datetime
from typing import Optional
class JwtToken(Struct):
token_type: str
access_token: str
refresh_token: Optional[str]
expire_at: datetime
class ExternalToken(Struct, rename="camel"):
id: str
username: str
profile_url: Optional[str]
token: JwtToken
class User(Struct, rename="camel", tag_field="kind", tag="user"):
id: str
username: str
email: str
permissions: list[str]
settings: dict[str, str]
external_id: dict[str, ExternalToken]

View File

@@ -0,0 +1,21 @@
from datetime import datetime
from typing import Optional
from enum import Enum
from msgspec import Struct
class Status(str, Enum):
COMPLETED = "Completed"
WATCHING = "Watching"
DROPED = "Droped"
PLANNED = "Planned"
DELETED = "Deleted"
class WatchStatus(Struct, rename="camel"):
added_date: datetime
played_date: Optional[datetime]
status: Status
watched_time: Optional[int]
watched_percent: Optional[int]

View File

@@ -0,0 +1,28 @@
from logging import getLogger
from autosync.services.service import Service
from ..models.user import User
from ..models.show import Show
from ..models.movie import Movie
from ..models.episode import Episode
from ..models.watch_status import WatchStatus
logger = getLogger(__name__)
class Aggregate(Service):
def __init__(self, services: list[Service]):
self._services = [x for x in services if x.enabled]
logger.info("Autosync enabled with %s", [x.name for x in self._services])
@property
def name(self) -> str:
return "aggragate"
def update(self, user: User, resource: Movie | Show | Episode, status: WatchStatus):
for service in self._services:
try:
service.update(user, resource, status)
except Exception as e:
logger.exception(
"Unhandled error on autosync %s:", service.name, exc_info=e
)

View File

@@ -0,0 +1,21 @@
from abc import abstractmethod, abstractproperty
from ..models.user import User
from ..models.show import Show
from ..models.movie import Movie
from ..models.episode import Episode
from ..models.watch_status import WatchStatus
class Service:
@abstractproperty
def name(self) -> str:
raise NotImplementedError
@abstractproperty
def enabled(self) -> bool:
return True
@abstractmethod
def update(self, user: User, resource: Movie | Show | Episode, status: WatchStatus):
raise NotImplementedError

View File

@@ -0,0 +1,117 @@
import os
import requests
from logging import getLogger
from autosync.models.metadataid import MetadataID
from autosync.services.service import Service
from ..models.user import User
from ..models.show import Show
from ..models.movie import Movie
from ..models.episode import Episode
from ..models.watch_status import WatchStatus, Status
logger = getLogger(__name__)
class Simkl(Service):
def __init__(self) -> None:
self._api_key = os.environ.get("OIDC_SIMKL_CLIENTID")
@property
def name(self) -> str:
return "simkl"
@property
def enabled(self) -> bool:
return self._api_key is not None
def update(self, user: User, resource: Movie | Show | Episode, status: WatchStatus):
if "simkl" not in user.external_id or self._api_key is None:
return
watch_date = status.played_date or status.added_date
if isinstance(resource, Episode):
if status.status != Status.COMPLETED:
return
resp = requests.post(
"https://api.simkl.com/sync/history",
json={
"shows": [
{
"watched_at": watch_date.isoformat(),
"title": resource.show.name,
"year": resource.show.year,
"ids": self._map_external_ids(resource.show.external_id),
"seasons": [
{
"number": resource.season_number,
"episodes": [{"number": resource.episode_number}],
},
{
"number": 1,
"episodes": [{"number": resource.absolute_number}],
},
],
}
]
},
headers={
"Authorization": f"Bearer {user.external_id['simkl'].token.access_token}",
"simkl-api-key": self._api_key,
},
)
logger.info("Simkl response: %s %s", resp.status_code, resp.text)
return
category = "movies" if isinstance(resource, Movie) else "shows"
simkl_status = self._map_status(status.status)
if simkl_status is None:
return
resp = requests.post(
"https://api.simkl.com/sync/add-to-list",
json={
category: [
{
"to": simkl_status,
"watched_at": watch_date.isoformat()
if status.status == Status.COMPLETED
else None,
"title": resource.name,
"year": resource.year,
"ids": self._map_external_ids(resource.external_id),
}
]
},
headers={
"Authorization": f"Bearer {user.external_id['simkl'].token.access_token}",
"simkl-api-key": self._api_key,
},
)
logger.info("Simkl response: %s %s", resp.status_code, resp.text)
def _map_status(self, status: Status):
match status:
case Status.COMPLETED:
return "completed"
case Status.WATCHING:
return "watching"
case Status.COMPLETED:
return "completed"
case Status.PLANNED:
return "plantowatch"
case Status.DELETED:
# do not delete items on simkl, most of deleted status are for a rewatch.
return None
case _:
return None
def _map_external_ids(self, ids: dict[str, MetadataID]):
return {service: id.data_id for service, id in ids.items()} | {
"tmdb": int(ids["themoviedatabase"].data_id)
if "themoviedatabase" in ids
else None
}

2
autosync/pyproject.toml Normal file
View File

@@ -0,0 +1,2 @@
[tool.ruff.format]
indent-style = "tab"

View File

@@ -0,0 +1,3 @@
aio-pika
msgspec
requests

View File

@@ -0,0 +1,18 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "8.0.6",
"commands": [
"dotnet-ef"
]
},
"csharpier": {
"version": "0.28.2",
"commands": [
"dotnet-csharpier"
]
}
}
}

17
back/.dockerignore Normal file
View File

@@ -0,0 +1,17 @@
Dockerfile
Dockerfile.dev
Dockerfile.*
.dockerignore
.gitignore
docker-compose.yml
README.md
**/build
**/dist
**/bin
**/obj
out
docs
tests
front
video
nginx.conf.template

99
back/.editorconfig Normal file
View File

@@ -0,0 +1,99 @@
root = false
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = tab
smart_tab = true
[*.cs]
csharp_prefer_braces = false
dotnet_diagnostic.IDE0046.severity = none
dotnet_diagnostic.IDE0055.severity = none
dotnet_diagnostic.IDE0058.severity = none
dotnet_diagnostic.IDE0130.severity = none
# Convert to file-scoped namespace
csharp_style_namespace_declarations = file_scoped:warning
# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true
csharp_using_directive_placement = outside_namespace:warning
# Avoid "this." if not necessary
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
# Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
# Suggest more modern language features when available
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
dotnet_style_prefer_auto_properties = true
dotnet_style_prefer_conditional_expression_over_assignment = true
dotnet_style_prefer_conditional_expression_over_return = true
# Disable strange throw.
csharp_style_throw_expression = false:suggestion
# Forbid "var" everywhere
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = false:suggestion
csharp_style_var_elsewhere = false:suggestion
# Prefer method-like constructs to have a block body
csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_constructors = false:none
csharp_style_expression_bodied_operators = false:none
# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_properties = true:none
csharp_style_expression_bodied_indexers = true:none
csharp_style_expression_bodied_accessors = true:none
# Newline settings
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = false
csharp_new_line_before_members_in_anonymous_types = true
# Indentation settings
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
# Modifiers
dotnet_style_readonly_field = true:suggestion
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
# Naming style
dotnet_naming_symbols.privates.applicable_kinds = property,method,event,delegate
dotnet_naming_symbols.privates.applicable_accessibilities = private
dotnet_naming_style.underscore_pascal.capitalization = pascal_case
dotnet_naming_style.underscore_pascal.required_prefix = _
dotnet_naming_rule.privates_with_underscore.symbols = privates
dotnet_naming_rule.privates_with_underscore.style = underscore_pascal
dotnet_naming_rule.privates_with_underscore.severity = warning
dotnet_diagnostic.IDE1006.severity = warning
# ReSharper properties
resharper_align_multiline_binary_expressions_chain = false
resharper_csharp_empty_block_style = together_same_line
resharper_indent_nested_foreach_stmt = true
resharper_indent_nested_for_stmt = true
resharper_indent_nested_while_stmt = true
resharper_keep_existing_embedded_arrangement = false
resharper_place_accessorholder_attribute_on_same_line = true
resharper_place_simple_embedded_statement_on_same_line = false
resharper_wrap_before_arrow_with_expressions = true
resharper_xmldoc_attribute_indent = align_by_first_attribute
resharper_xmldoc_indent_child_elements = RemoveIndent
resharper_xmldoc_indent_text = RemoveIndent
# Switch on enum
dotnet_diagnostic.CS8509.severity=error # missing switch case for named enum value
dotnet_diagnostic.CS8524.severity=none # missing switch case for unnamed enum value
# Waiting for https://github.com/dotnet/roslyn/issues/44596 to get fixed.
# file_header_template = Kyoo - A portable and vast media library solution.\nCopyright (c) Kyoo.\n\nSee AUTHORS.md and LICENSE file in the project root for full license information.\n\nKyoo is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\nany later version.\n\nKyoo is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with Kyoo. If not, see <https://www.gnu.org/licenses/>.

352
back/.gitignore vendored Normal file
View File

@@ -0,0 +1,352 @@
out
libtranscoder.so
libtranscoder.dylib
transcoder.dll
kyoo_datadir
video
.env
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- Backup*.rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
/Kyoo/TheTVDB-Credentials.json
.vscode
.netcoredbg_hist

29
back/Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 as builder
ARG TARGETARCH
WORKDIR /kyoo
COPY Kyoo.sln ./Kyoo.sln
COPY nuget.config ./nuget.config
COPY src/Directory.Build.props src/Directory.Build.props
COPY src/Kyoo.Authentication/Kyoo.Authentication.csproj src/Kyoo.Authentication/Kyoo.Authentication.csproj
COPY src/Kyoo.Abstractions/Kyoo.Abstractions.csproj src/Kyoo.Abstractions/Kyoo.Abstractions.csproj
COPY src/Kyoo.Core/Kyoo.Core.csproj src/Kyoo.Core/Kyoo.Core.csproj
COPY src/Kyoo.Postgresql/Kyoo.Postgresql.csproj src/Kyoo.Postgresql/Kyoo.Postgresql.csproj
COPY src/Kyoo.Meilisearch/Kyoo.Meilisearch.csproj src/Kyoo.Meilisearch/Kyoo.Meilisearch.csproj
COPY src/Kyoo.RabbitMq/Kyoo.RabbitMq.csproj src/Kyoo.RabbitMq/Kyoo.RabbitMq.csproj
COPY src/Kyoo.Swagger/Kyoo.Swagger.csproj src/Kyoo.Swagger/Kyoo.Swagger.csproj
RUN dotnet restore -a $TARGETARCH
COPY . .
ARG VERSION
RUN dotnet publish -a $TARGETARCH --no-restore -c Release -o /app "-p:Version=${VERSION:-"0.0.0-dev"}" src/Kyoo.Core
FROM mcr.microsoft.com/dotnet/aspnet:8.0
RUN apt-get update && apt-get install -y curl
COPY --from=builder /app /app
WORKDIR /app
EXPOSE 5000
# The back can take a long time to start if meilisearch is initializing
HEALTHCHECK --interval=5s --retries=15 CMD curl --fail http://localhost:5000/health || exit
ENTRYPOINT ["/app/kyoo"]

22
back/Dockerfile.dev Normal file
View File

@@ -0,0 +1,22 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0
RUN apt-get update && apt-get install -y curl
WORKDIR /app
COPY Kyoo.sln ./Kyoo.sln
COPY nuget.config ./nuget.config
COPY src/Directory.Build.props src/Directory.Build.props
COPY src/Kyoo.Authentication/Kyoo.Authentication.csproj src/Kyoo.Authentication/Kyoo.Authentication.csproj
COPY src/Kyoo.Abstractions/Kyoo.Abstractions.csproj src/Kyoo.Abstractions/Kyoo.Abstractions.csproj
COPY src/Kyoo.Core/Kyoo.Core.csproj src/Kyoo.Core/Kyoo.Core.csproj
COPY src/Kyoo.Postgresql/Kyoo.Postgresql.csproj src/Kyoo.Postgresql/Kyoo.Postgresql.csproj
COPY src/Kyoo.Meilisearch/Kyoo.Meilisearch.csproj src/Kyoo.Meilisearch/Kyoo.Meilisearch.csproj
COPY src/Kyoo.RabbitMq/Kyoo.RabbitMq.csproj src/Kyoo.RabbitMq/Kyoo.RabbitMq.csproj
COPY src/Kyoo.Swagger/Kyoo.Swagger.csproj src/Kyoo.Swagger/Kyoo.Swagger.csproj
RUN dotnet restore
WORKDIR /app
EXPOSE 5000
ENV DOTNET_USE_POLLING_FILE_WATCHER 1
# HEALTHCHECK --interval=5s CMD curl --fail http://localhost:5000/health || exit
HEALTHCHECK CMD true
ENTRYPOINT ["dotnet", "watch", "--non-interactive", "run", "--no-restore", "--project", "/app/src/Kyoo.Core"]

View File

@@ -0,0 +1,30 @@
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 as builder
ARG TARGETARCH
WORKDIR /kyoo
COPY .config/dotnet-tools.json .config/dotnet-tools.json
RUN dotnet tool restore
COPY Kyoo.sln ./Kyoo.sln
COPY nuget.config ./nuget.config
COPY src/Directory.Build.props src/Directory.Build.props
COPY src/Kyoo.Authentication/Kyoo.Authentication.csproj src/Kyoo.Authentication/Kyoo.Authentication.csproj
COPY src/Kyoo.Abstractions/Kyoo.Abstractions.csproj src/Kyoo.Abstractions/Kyoo.Abstractions.csproj
COPY src/Kyoo.Core/Kyoo.Core.csproj src/Kyoo.Core/Kyoo.Core.csproj
COPY src/Kyoo.Postgresql/Kyoo.Postgresql.csproj src/Kyoo.Postgresql/Kyoo.Postgresql.csproj
COPY src/Kyoo.Meilisearch/Kyoo.Meilisearch.csproj src/Kyoo.Meilisearch/Kyoo.Meilisearch.csproj
COPY src/Kyoo.RabbitMq/Kyoo.RabbitMq.csproj src/Kyoo.RabbitMq/Kyoo.RabbitMq.csproj
COPY src/Kyoo.Swagger/Kyoo.Swagger.csproj src/Kyoo.Swagger/Kyoo.Swagger.csproj
RUN dotnet restore -a $TARGETARCH
COPY . .
RUN dotnet build
RUN dotnet ef migrations bundle \
--msbuildprojectextensionspath out/obj/Kyoo.Postgresql \
--no-build --self-contained -r linux-${TARGETARCH} -f \
-o /app/migrate -p src/Kyoo.Postgresql --verbose
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0
COPY --from=builder /app/migrate /app/migrate
ENTRYPOINT ["/app/migrate"]

View File

@@ -2,6 +2,7 @@
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.MaintainabilityRules">
<Rule Id="SA1413" Action="None" /> <!-- UseTrailingCommasInMultiLineInitializers -->
<Rule Id="SA1414" Action="None" /> <!-- UseTrailingCommasInMultiLineInitializers -->
<Rule Id="SA1114" Action="None" /> <!-- UseTrailingCommasInMultiLineInitializers -->
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.OrderingRules">
<Rule Id="SA1201" Action="None" /> <!-- ElementsMustAppearInTheCorrectOrder -->
@@ -27,18 +28,20 @@
<Rule Id="SA1027" Action="None"/> <!-- UseTabsCorrectly (smarts tabs are broken). TODO find a way to enable smart tabs -->
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.LayoutRules">
<Rule Id="SA1402" Action="None"/> <!-- SingleClassPerFile -->
<Rule Id="SA1649" Action="None"/> <!-- Class name must be filename -->
<Rule Id="SA1503" Action="None"/> <!-- BracesMustNotBeOmitted -->
<Rule Id="SA1512" Action="None"/> <!-- Let me comment -->
<Rule Id="SA1520" Action="None"/> <!-- UseBracesConsistently -->
<Rule Id="SA1515" Action="None"/> <!-- SingleLineCommentMustBePrecededByBlankLine -->
<Rule Id="SA1513" Action="None"/> <!-- ClosingBraceMustBeFollowedByBlankLine -->
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.DocumentationRules">
<Rule Id="SA1600" Action="None" /> <!-- Elements Shuld be Documented -->
<Rule Id="SA1602" Action="None" /> <!-- Enums should be documented -->
<Rule Id="SA1642" Action="None" /> <!-- ConstructorSummaryDocumentationMustBeginWithStandardText -->
<Rule Id="SA1643" Action="None" /> <!-- DestructorSummaryDocumentationMustBeginWithStandardText -->
<Rule Id="SA1623" Action="None" /> <!-- PropertySummaryDocumentationMustMatchAccessors -->
<Rule Id="SA1629" Action="None" /> <!-- DocumentationTextMustEndWithAPeriod TODO remove this, this is only temporary -->
<Rule Id="SA1629" Action="None" /> <!-- DocumentationTextMustEndWithAPeriod -->
</Rules>
</RuleSet>

64
back/Kyoo.sln Normal file
View File

@@ -0,0 +1,64 @@
Microsoft Visual Studio Solution File, Format Version 12.00
#
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kyoo.Core", "src\Kyoo.Core\Kyoo.Core.csproj", "{0F8275B6-C7DD-42DF-A168-755C81B1C329}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Abstractions", "src\Kyoo.Abstractions\Kyoo.Abstractions.csproj", "{BAB2CAE1-AC28-4509-AA3E-8DC75BD59220}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Postgresql", "src\Kyoo.Postgresql\Kyoo.Postgresql.csproj", "{3213C96D-0BF3-460B-A8B5-B9977229408A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Authentication", "src\Kyoo.Authentication\Kyoo.Authentication.csproj", "{7A841335-6523-47DB-9717-80AA7BD943FD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Swagger", "src\Kyoo.Swagger\Kyoo.Swagger.csproj", "{7D1A7596-73F6-4D35-842E-A5AD9C620596}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.Meilisearch", "src\Kyoo.Meilisearch\Kyoo.Meilisearch.csproj", "{F8E6018A-FD51-40EB-99FF-A26BA59F2762}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kyoo.RabbitMq", "src\Kyoo.RabbitMq\Kyoo.RabbitMq.csproj", "{B97AD4A8-E6E6-41CD-87DF-5F1326FD7198}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0F8275B6-C7DD-42DF-A168-755C81B1C329}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F8275B6-C7DD-42DF-A168-755C81B1C329}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F8275B6-C7DD-42DF-A168-755C81B1C329}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F8275B6-C7DD-42DF-A168-755C81B1C329}.Release|Any CPU.Build.0 = Release|Any CPU
{BAB2CAE1-AC28-4509-AA3E-8DC75BD59220}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BAB2CAE1-AC28-4509-AA3E-8DC75BD59220}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAB2CAE1-AC28-4509-AA3E-8DC75BD59220}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BAB2CAE1-AC28-4509-AA3E-8DC75BD59220}.Release|Any CPU.Build.0 = Release|Any CPU
{3213C96D-0BF3-460B-A8B5-B9977229408A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3213C96D-0BF3-460B-A8B5-B9977229408A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3213C96D-0BF3-460B-A8B5-B9977229408A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3213C96D-0BF3-460B-A8B5-B9977229408A}.Release|Any CPU.Build.0 = Release|Any CPU
{7A841335-6523-47DB-9717-80AA7BD943FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A841335-6523-47DB-9717-80AA7BD943FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A841335-6523-47DB-9717-80AA7BD943FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A841335-6523-47DB-9717-80AA7BD943FD}.Release|Any CPU.Build.0 = Release|Any CPU
{6515380E-1E57-42DA-B6E3-E1C8A848818A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6515380E-1E57-42DA-B6E3-E1C8A848818A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6515380E-1E57-42DA-B6E3-E1C8A848818A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6515380E-1E57-42DA-B6E3-E1C8A848818A}.Release|Any CPU.Build.0 = Release|Any CPU
{2374D500-1ADB-4752-85DB-8BB0DDF5A8E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2374D500-1ADB-4752-85DB-8BB0DDF5A8E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2374D500-1ADB-4752-85DB-8BB0DDF5A8E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2374D500-1ADB-4752-85DB-8BB0DDF5A8E8}.Release|Any CPU.Build.0 = Release|Any CPU
{4FF1ECD9-6EEF-4440-B037-A661D78FB04D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FF1ECD9-6EEF-4440-B037-A661D78FB04D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FF1ECD9-6EEF-4440-B037-A661D78FB04D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FF1ECD9-6EEF-4440-B037-A661D78FB04D}.Release|Any CPU.Build.0 = Release|Any CPU
{7D1A7596-73F6-4D35-842E-A5AD9C620596}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D1A7596-73F6-4D35-842E-A5AD9C620596}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D1A7596-73F6-4D35-842E-A5AD9C620596}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7D1A7596-73F6-4D35-842E-A5AD9C620596}.Release|Any CPU.Build.0 = Release|Any CPU
{F8E6018A-FD51-40EB-99FF-A26BA59F2762}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F8E6018A-FD51-40EB-99FF-A26BA59F2762}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F8E6018A-FD51-40EB-99FF-A26BA59F2762}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F8E6018A-FD51-40EB-99FF-A26BA59F2762}.Release|Any CPU.Build.0 = Release|Any CPU
{B97AD4A8-E6E6-41CD-87DF-5F1326FD7198}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B97AD4A8-E6E6-41CD-87DF-5F1326FD7198}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B97AD4A8-E6E6-41CD-87DF-5F1326FD7198}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B97AD4A8-E6E6-41CD-87DF-5F1326FD7198}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

4
back/ef.rsp Normal file
View File

@@ -0,0 +1,4 @@
--project
src/Kyoo.Postgresql
--msbuildprojectextensionspath
out/obj/Kyoo.Postgresql

BIN
back/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

14
back/nuget.config Normal file
View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear/>
<add key="feedz" value="https://f.feedz.io/zoriya/entityframeworkcore-projectables/nuget/index.json"/>
<add key="nuget" value="https://api.nuget.org/v3/index.json"/>
</packageSources>
<disabledPackageSources>
<clear/>
</disabledPackageSources>
<fallbackPackageFolders>
<clear/>
</fallbackPackageFolders>
</configuration>

View File

@@ -0,0 +1,47 @@
<Project>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>default</LangVersion>
<Nullable>enable</Nullable>
<Company>Kyoo</Company>
<Authors>Kyoo</Authors>
<Copyright>Copyright (c) Kyoo</Copyright>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<RequireLicenseAcceptance>true</RequireLicenseAcceptance>
<RepositoryUrl>https://github.com/zoriya/Kyoo</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageProjectUrl>https://github.com/zoriya/Kyoo</PackageProjectUrl>
<PackageVersion>1.0.0</PackageVersion>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<ApplicationIcon>$(MSBuildThisFileDirectory)../icon.ico</ApplicationIcon>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup>
<CheckCodingStyle Condition="$(CheckCodingStyle) == ''">true</CheckCodingStyle>
</PropertyGroup>
<PropertyGroup>
<BaseIntermediateOutputPath>$(MsBuildThisFileDirectory)/../out/obj/$(MSBuildProjectName)</BaseIntermediateOutputPath>
<BaseOutputPath>$(MsBuildThisFileDirectory)/../out/bin/$(MSBuildProjectName)</BaseOutputPath>
</PropertyGroup>
<ItemGroup Condition="$(CheckCodingStyle) == true">
<None Include="$(MSBuildThisFileDirectory)../.editorconfig" Link=".editorconfig" Visible="false" />
</ItemGroup>
<PropertyGroup Condition="$(CheckCodingStyle) == true">
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)../Kyoo.ruleset</CodeAnalysisRuleSet>
<NoWarn>1591;1305;8618;SYSLIB1045;CS1573</NoWarn>
<!-- <AnalysisMode>All</AnalysisMode> -->
</PropertyGroup>
<!-- vim: ft=xml -->
</Project>

View File

@@ -0,0 +1,35 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System.Collections.Generic;
using System.Threading.Tasks;
using Kyoo.Abstractions.Models;
using Kyoo.Abstractions.Models.Utils;
namespace Kyoo.Abstractions.Controllers;
public interface IIssueRepository
{
Task<ICollection<Issue>> GetAll(Filter<Issue>? filter = default);
Task<int> GetCount(Filter<Issue>? filter = default);
Task<Issue> Upsert(Issue issue);
Task DeleteAll(Filter<Issue>? filter = default);
}

View File

@@ -0,0 +1,80 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using Kyoo.Abstractions.Models;
namespace Kyoo.Abstractions.Controllers;
/// <summary>
/// An interface to interact with the database. Every repository is mapped through here.
/// </summary>
public interface ILibraryManager
{
IRepository<T> Repository<T>()
where T : IResource, IQuery;
/// <summary>
/// The repository that handle libraries items (a wrapper around shows and collections).
/// </summary>
IRepository<ILibraryItem> LibraryItems { get; }
/// <summary>
/// The repository that handle new items.
/// </summary>
IRepository<INews> News { get; }
/// <summary>
/// The repository that handle watched items.
/// </summary>
IWatchStatusRepository WatchStatus { get; }
/// <summary>
/// The repository that handle collections.
/// </summary>
IRepository<Collection> Collections { get; }
/// <summary>
/// The repository that handle shows.
/// </summary>
IRepository<Movie> Movies { get; }
/// <summary>
/// The repository that handle shows.
/// </summary>
IRepository<Show> Shows { get; }
/// <summary>
/// The repository that handle seasons.
/// </summary>
IRepository<Season> Seasons { get; }
/// <summary>
/// The repository that handle episodes.
/// </summary>
IRepository<Episode> Episodes { get; }
/// <summary>
/// The repository that handle studios.
/// </summary>
IRepository<Studio> Studios { get; }
/// <summary>
/// The repository that handle users.
/// </summary>
IRepository<User> Users { get; }
}

View File

@@ -0,0 +1,46 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using Kyoo.Abstractions.Models.Permissions;
using Microsoft.AspNetCore.Mvc.Filters;
namespace Kyoo.Abstractions.Controllers;
/// <summary>
/// A service to validate permissions.
/// </summary>
public interface IPermissionValidator
{
/// <summary>
/// Create an IAuthorizationFilter that will be used to validate permissions.
/// This can registered with any lifetime.
/// </summary>
/// <param name="attribute">The permission attribute to validate.</param>
/// <returns>An authorization filter used to validate the permission.</returns>
IFilterMetadata Create(PermissionAttribute attribute);
/// <summary>
/// Create an IAuthorizationFilter that will be used to validate permissions.
/// This can registered with any lifetime.
/// </summary>
/// <param name="attribute">
/// A partial attribute to validate. See <see cref="PartialPermissionAttribute"/>.
/// </param>
/// <returns>An authorization filter used to validate the permission.</returns>
IFilterMetadata Create(PartialPermissionAttribute attribute);
}

View File

@@ -0,0 +1,267 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Kyoo.Abstractions.Models;
using Kyoo.Abstractions.Models.Exceptions;
using Kyoo.Abstractions.Models.Utils;
namespace Kyoo.Abstractions.Controllers;
/// <summary>
/// A common repository for every resources.
/// </summary>
/// <typeparam name="T">The resource's type that this repository manage.</typeparam>
public interface IRepository<T> : IBaseRepository
where T : IResource, IQuery
{
/// <summary>
/// The event handler type for all events of this repository.
/// </summary>
/// <param name="resource">The resource created/modified/deleted</param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
public delegate Task ResourceEventHandler(T resource);
/// <summary>
/// Get a resource from it's ID.
/// </summary>
/// <param name="id">The id of the resource</param>
/// <param name="include">The related fields to include.</param>
/// <exception cref="ItemNotFoundException">If the item could not be found.</exception>
/// <returns>The resource found</returns>
Task<T> Get(Guid id, Include<T>? include = default);
/// <summary>
/// Get a resource from it's slug.
/// </summary>
/// <param name="slug">The slug of the resource</param>
/// <param name="include">The related fields to include.</param>
/// <exception cref="ItemNotFoundException">If the item could not be found.</exception>
/// <returns>The resource found</returns>
Task<T> Get(string slug, Include<T>? include = default);
/// <summary>
/// Get the first resource that match the predicate.
/// </summary>
/// <param name="filter">A predicate to filter the resource.</param>
/// <param name="include">The related fields to include.</param>
/// <param name="sortBy">A custom sort method to handle cases where multiples items match the filters.</param>
/// <param name="reverse">Reverse the sort.</param>
/// <param name="afterId">Select the first element after this id if it was in a list.</param>
/// <exception cref="ItemNotFoundException">If the item could not be found.</exception>
/// <returns>The resource found</returns>
Task<T> Get(
Filter<T> filter,
Include<T>? include = default,
Sort<T>? sortBy = default,
bool reverse = false,
Guid? afterId = default
);
/// <summary>
/// Get a resource from it's ID or null if it is not found.
/// </summary>
/// <param name="id">The id of the resource</param>
/// <param name="include">The related fields to include.</param>
/// <returns>The resource found</returns>
Task<T?> GetOrDefault(Guid id, Include<T>? include = default);
/// <summary>
/// Get a resource from it's slug or null if it is not found.
/// </summary>
/// <param name="slug">The slug of the resource</param>
/// <param name="include">The related fields to include.</param>
/// <returns>The resource found</returns>
Task<T?> GetOrDefault(string slug, Include<T>? include = default);
/// <summary>
/// Get the first resource that match the predicate or null if it is not found.
/// </summary>
/// <param name="filter">A predicate to filter the resource.</param>
/// <param name="include">The related fields to include.</param>
/// <param name="sortBy">A custom sort method to handle cases where multiples items match the filters.</param>
/// <param name="reverse">Reverse the sort.</param>
/// <param name="afterId">Select the first element after this id if it was in a list.</param>
/// <returns>The resource found</returns>
Task<T?> GetOrDefault(
Filter<T>? filter,
Include<T>? include = default,
Sort<T>? sortBy = default,
bool reverse = false,
Guid? afterId = default
);
/// <summary>
/// Search for resources with the database.
/// </summary>
/// <param name="query">The query string.</param>
/// <param name="include">The related fields to include.</param>
/// <returns>A list of resources found</returns>
Task<ICollection<T>> Search(string query, Include<T>? include = default);
/// <summary>
/// Get every resources that match all filters
/// </summary>
/// <param name="filter">A filter predicate</param>
/// <param name="sort">Sort information about the query (sort by, sort order)</param>
/// <param name="include">The related fields to include.</param>
/// <param name="limit">How pagination should be done (where to start and how many to return)</param>
/// <returns>A list of resources that match every filters</returns>
Task<ICollection<T>> GetAll(
Filter<T>? filter = null,
Sort<T>? sort = default,
Include<T>? include = default,
Pagination? limit = default
);
/// <summary>
/// Get the number of resources that match the filter's predicate.
/// </summary>
/// <param name="filter">A filter predicate</param>
/// <returns>How many resources matched that filter</returns>
Task<int> GetCount(Filter<T>? filter = null);
/// <summary>
/// Map a list of ids to a list of items (keep the order).
/// </summary>
/// <param name="ids">The list of items id.</param>
/// <param name="include">The related fields to include.</param>
/// <returns>A list of resources mapped from ids.</returns>
Task<ICollection<T>> FromIds(IList<Guid> ids, Include<T>? include = default);
/// <summary>
/// Create a new resource.
/// </summary>
/// <param name="obj">The item to register</param>
/// <returns>The resource registers and completed by database's information (related items and so on)</returns>
Task<T> Create(T obj);
/// <summary>
/// Create a new resource if it does not exist already. If it does, the existing value is returned instead.
/// </summary>
/// <param name="obj">The object to create</param>
/// <returns>The newly created item or the existing value if it existed.</returns>
Task<T> CreateIfNotExists(T obj);
/// <summary>
/// Called when a resource has been created.
/// </summary>
static event ResourceEventHandler OnCreated;
/// <summary>
/// Callback that should be called after a resource has been created.
/// </summary>
/// <param name="obj">The resource newly created.</param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
protected static Task OnResourceCreated(T obj) => OnCreated?.Invoke(obj) ?? Task.CompletedTask;
/// <summary>
/// Edit a resource and replace every property
/// </summary>
/// <param name="edited">The resource to edit, it's ID can't change.</param>
/// <exception cref="ItemNotFoundException">If the item is not found</exception>
/// <returns>The resource edited and completed by database's information (related items and so on)</returns>
Task<T> Edit(T edited);
/// <summary>
/// Edit only specific properties of a resource
/// </summary>
/// <param name="id">The id of the resource to edit</param>
/// <param name="patch">
/// A method that will be called when you need to update every properties that you want to
/// persist.
/// </param>
/// <exception cref="ItemNotFoundException">If the item is not found</exception>
/// <returns>The resource edited and completed by database's information (related items and so on)</returns>
Task<T> Patch(Guid id, Func<T, T> patch);
/// <summary>
/// Called when a resource has been edited.
/// </summary>
static event ResourceEventHandler OnEdited;
/// <summary>
/// Callback that should be called after a resource has been edited.
/// </summary>
/// <param name="obj">The resource newly edited.</param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
protected static Task OnResourceEdited(T obj) => OnEdited?.Invoke(obj) ?? Task.CompletedTask;
/// <summary>
/// Delete a resource by it's ID
/// </summary>
/// <param name="id">The ID of the resource</param>
/// <exception cref="ItemNotFoundException">If the item is not found</exception>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
Task Delete(Guid id);
/// <summary>
/// Delete a resource by it's slug
/// </summary>
/// <param name="slug">The slug of the resource</param>
/// <exception cref="ItemNotFoundException">If the item is not found</exception>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
Task Delete(string slug);
/// <summary>
/// Delete a resource
/// </summary>
/// <param name="obj">The resource to delete</param>
/// <exception cref="ItemNotFoundException">If the item is not found</exception>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
Task Delete(T obj);
/// <summary>
/// Delete all resources that match the predicate.
/// </summary>
/// <param name="filter">A predicate to filter resources to delete. Every resource that match this will be deleted.</param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
Task DeleteAll(Filter<T> filter);
/// <summary>
/// Called when a resource has been edited.
/// </summary>
static event ResourceEventHandler OnDeleted;
/// <summary>
/// Callback that should be called after a resource has been deleted.
/// </summary>
/// <param name="obj">The resource newly deleted.</param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
protected static Task OnResourceDeleted(T obj) => OnDeleted?.Invoke(obj) ?? Task.CompletedTask;
}
/// <summary>
/// A base class for repositories. Every service implementing this will be handled by the <see cref="ILibraryManager"/>.
/// </summary>
public interface IBaseRepository
{
/// <summary>
/// The type for witch this repository is responsible or null if non applicable.
/// </summary>
Type RepositoryType { get; }
}
public interface IUserRepository : IRepository<User>
{
Task<User?> GetByExternalId(string provider, string id);
Task<User> AddExternalToken(Guid userId, string provider, ExternalToken token);
Task<User> DeleteExternalToken(Guid userId, string provider);
}

View File

@@ -1,4 +1,4 @@
// Kyoo - A portable and vast media library solution.
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
@@ -17,12 +17,12 @@
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using System.Threading.Tasks;
namespace Kyoo.Abstractions.Models.Attributes
namespace Kyoo.Abstractions.Controllers;
public interface IScanner
{
/// <summary>
/// Remove an property from the serialization pipeline. It will simply be skipped.
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
public class SerializeIgnoreAttribute : Attribute { }
Task SendRescanRequest();
Task SendRefreshRequest(string kind, Guid id);
}

View File

@@ -0,0 +1,119 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System.Threading.Tasks;
using Kyoo.Abstractions.Models;
using Kyoo.Abstractions.Models.Utils;
namespace Kyoo.Abstractions.Controllers;
/// <summary>
/// The service to search items.
/// </summary>
public interface ISearchManager
{
/// <summary>
/// Search for items.
/// </summary>
/// <param name="query">The seach query.</param>
/// <param name="sortBy">Sort information about the query (sort by, sort order)</param>
/// <param name="pagination">How pagination should be done (where to start and how many to return)</param>
/// <param name="include">The related fields to include.</param>
/// <returns>A list of resources that match every filters</returns>
public Task<SearchPage<ILibraryItem>.SearchResult> SearchItems(
string? query,
Sort<ILibraryItem> sortBy,
SearchPagination pagination,
Include<ILibraryItem>? include = default
);
/// <summary>
/// Search for movies.
/// </summary>
/// <param name="query">The seach query.</param>
/// <param name="sortBy">Sort information about the query (sort by, sort order)</param>
/// <param name="pagination">How pagination should be done (where to start and how many to return)</param>
/// <param name="include">The related fields to include.</param>
/// <returns>A list of resources that match every filters</returns>
public Task<SearchPage<Movie>.SearchResult> SearchMovies(
string? query,
Sort<Movie> sortBy,
SearchPagination pagination,
Include<Movie>? include = default
);
/// <summary>
/// Search for shows.
/// </summary>
/// <param name="query">The seach query.</param>
/// <param name="sortBy">Sort information about the query (sort by, sort order)</param>
/// <param name="pagination">How pagination should be done (where to start and how many to return)</param>
/// <param name="include">The related fields to include.</param>
/// <returns>A list of resources that match every filters</returns>
public Task<SearchPage<Show>.SearchResult> SearchShows(
string? query,
Sort<Show> sortBy,
SearchPagination pagination,
Include<Show>? include = default
);
/// <summary>
/// Search for collections.
/// </summary>
/// <param name="query">The seach query.</param>
/// <param name="sortBy">Sort information about the query (sort by, sort order)</param>
/// <param name="pagination">How pagination should be done (where to start and how many to return)</param>
/// <param name="include">The related fields to include.</param>
/// <returns>A list of resources that match every filters</returns>
public Task<SearchPage<Collection>.SearchResult> SearchCollections(
string? query,
Sort<Collection> sortBy,
SearchPagination pagination,
Include<Collection>? include = default
);
/// <summary>
/// Search for episodes.
/// </summary>
/// <param name="query">The seach query.</param>
/// <param name="sortBy">Sort information about the query (sort by, sort order)</param>
/// <param name="pagination">How pagination should be done (where to start and how many to return)</param>
/// <param name="include">The related fields to include.</param>
/// <returns>A list of resources that match every filters</returns>
public Task<SearchPage<Episode>.SearchResult> SearchEpisodes(
string? query,
Sort<Episode> sortBy,
SearchPagination pagination,
Include<Episode>? include = default
);
/// <summary>
/// Search for studios.
/// </summary>
/// <param name="query">The seach query.</param>
/// <param name="sortBy">Sort information about the query (sort by, sort order)</param>
/// <param name="pagination">How pagination should be done (where to start and how many to return)</param>
/// <param name="include">The related fields to include.</param>
/// <returns>A list of resources that match every filters</returns>
public Task<SearchPage<Studio>.SearchResult> SearchStudios(
string? query,
Sort<Studio> sortBy,
SearchPagination pagination,
Include<Studio>? include = default
);
}

View File

@@ -0,0 +1,41 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using System.IO;
using System.Threading.Tasks;
using Kyoo.Abstractions.Models;
namespace Kyoo.Abstractions.Controllers;
public interface IThumbnailsManager
{
Task DownloadImages<T>(T item)
where T : IThumbnails;
Task DownloadImage(Image? image, string what);
string GetImagePath(Guid imageId, ImageQuality quality);
Task DeleteImages<T>(T item)
where T : IThumbnails;
Task<Stream> GetUserImage(Guid userId);
Task SetUserImage(Guid userId, Stream? image);
}

View File

@@ -0,0 +1,83 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Kyoo.Abstractions.Models;
using Kyoo.Abstractions.Models.Utils;
namespace Kyoo.Abstractions.Controllers;
/// <summary>
/// A local repository to handle watched items
/// </summary>
public interface IWatchStatusRepository
{
public delegate Task ResourceEventHandler<T>(T resource);
Task<ICollection<IWatchlist>> GetAll(
Filter<IWatchlist>? filter = default,
Include<IWatchlist>? include = default,
Pagination? limit = default
);
Task<MovieWatchStatus?> GetMovieStatus(Guid movieId, Guid userId);
Task<MovieWatchStatus?> SetMovieStatus(
Guid movieId,
Guid userId,
WatchStatus status,
int? watchedTime,
int? percent
);
static event ResourceEventHandler<WatchStatus<Movie>> OnMovieStatusChangedHandler;
protected static Task OnMovieStatusChanged(WatchStatus<Movie> obj) =>
OnMovieStatusChangedHandler?.Invoke(obj) ?? Task.CompletedTask;
Task DeleteMovieStatus(Guid movieId, Guid userId);
Task<ShowWatchStatus?> GetShowStatus(Guid showId, Guid userId);
Task<ShowWatchStatus?> SetShowStatus(Guid showId, Guid userId, WatchStatus status);
static event ResourceEventHandler<WatchStatus<Show>> OnShowStatusChangedHandler;
protected static Task OnShowStatusChanged(WatchStatus<Show> obj) =>
OnShowStatusChangedHandler?.Invoke(obj) ?? Task.CompletedTask;
Task DeleteShowStatus(Guid showId, Guid userId);
Task<EpisodeWatchStatus?> GetEpisodeStatus(Guid episodeId, Guid userId);
/// <param name="watchedTime">Where the user has stopped watching. Only usable if Status
/// is <see cref="WatchStatus.Watching"/></param>
Task<EpisodeWatchStatus?> SetEpisodeStatus(
Guid episodeId,
Guid userId,
WatchStatus status,
int? watchedTime,
int? percent
);
static event ResourceEventHandler<WatchStatus<Episode>> OnEpisodeStatusChangedHandler;
protected static Task OnEpisodeStatusChanged(WatchStatus<Episode> obj) =>
OnEpisodeStatusChangedHandler?.Invoke(obj) ?? Task.CompletedTask;
Task DeleteEpisodeStatus(Guid episodeId, Guid userId);
}

View File

@@ -0,0 +1,64 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using Kyoo.Abstractions.Models.Exceptions;
using Kyoo.Authentication.Models;
namespace Kyoo.Authentication;
/// <summary>
/// Extension methods.
/// </summary>
public static class Extensions
{
/// <summary>
/// Get the permissions of an user.
/// </summary>
/// <param name="user">The user</param>
/// <returns>The list of permissions</returns>
public static ICollection<string> GetPermissions(this ClaimsPrincipal user)
{
return user.Claims.FirstOrDefault(x => x.Type == Claims.Permissions)?.Value.Split(',')
?? Array.Empty<string>();
}
/// <summary>
/// Get the id of the current user or null if unlogged or invalid.
/// </summary>
/// <param name="user">The user.</param>
/// <returns>The id of the user or null.</returns>
public static Guid? GetId(this ClaimsPrincipal user)
{
Claim? value = user.FindFirst(Claims.Id);
if (Guid.TryParse(value?.Value, out Guid id))
return id;
return null;
}
public static Guid GetIdOrThrow(this ClaimsPrincipal user)
{
Guid? ret = user.GetId();
if (ret == null)
throw new UnauthorizedException();
return ret.Value;
}
}

View File

@@ -1,18 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>default</LangVersion>
<Title>Kyoo.Abstractions</Title>
<Description>Base package to create plugins for Kyoo.</Description>
<RootNamespace>Kyoo.Abstractions</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="6.2.0" />
<PackageReference Include="JetBrains.Annotations" Version="2021.2.0" />
<PackageReference Include="Dapper" Version="2.1.44" />
<PackageReference Include="EntityFrameworkCore.Projectables" Version="4.1.4-prebeta" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
<PackageReference Include="System.ComponentModel.Composition" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageReference Include="Sprache" Version="2.3.1" />
<PackageReference Include="System.ComponentModel.Composition" Version="8.0.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,51 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
namespace Kyoo.Abstractions.Models.Attributes;
/// <summary>
/// An attribute to specify on apis to specify it's documentation's name and category.
/// If this is applied on a method, the specified method will be exploded from the controller's page and be
/// included on the specified tag page.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public class ApiDefinitionAttribute : Attribute
{
/// <summary>
/// The public name of this api.
/// </summary>
public string Name { get; }
/// <summary>
/// The name of the group in witch this API is. You can also specify a custom sort order using the following
/// format: <code>order:name</code>. Everything before the first <c>:</c> will be removed but kept for
/// th alphabetical ordering.
/// </summary>
public string? Group { get; set; }
/// <summary>
/// Create a new <see cref="ApiDefinitionAttribute"/>.
/// </summary>
/// <param name="name">The name of the api that will be used on the documentation page.</param>
public ApiDefinitionAttribute(string name)
{
Name = name;
}
}

View File

@@ -0,0 +1,27 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
namespace Kyoo.Abstractions.Models.Attributes;
/// <summary>
/// An attribute to inform that the property is computed automatically and can't be assigned manually.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class ComputedAttribute : NotMergeableAttribute { }

View File

@@ -17,33 +17,37 @@
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using Kyoo.Abstractions.Controllers;
namespace Kyoo.Abstractions.Models.Attributes
namespace Kyoo.Abstractions.Models.Attributes;
/// <summary>
/// The targeted relation can be loaded.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class LoadableRelationAttribute : Attribute
{
/// <summary>
/// The targeted relation can be loaded via a call to <see cref="ILibraryManager.Load"/>.
/// The name of the field containing the related resource's ID.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class LoadableRelationAttribute : Attribute
public string? RelationID { get; }
public string? Sql { get; set; }
public string? On { get; set; }
public string? Projected { get; set; }
/// <summary>
/// Create a new <see cref="LoadableRelationAttribute"/>.
/// </summary>
public LoadableRelationAttribute() { }
/// <summary>
/// Create a new <see cref="LoadableRelationAttribute"/> with a baking relationID field.
/// </summary>
/// <param name="relationID">The name of the RelationID field.</param>
public LoadableRelationAttribute(string relationID)
{
/// <summary>
/// The name of the field containing the related resource's ID.
/// </summary>
public string RelationID { get; }
/// <summary>
/// Create a new <see cref="LoadableRelationAttribute"/>.
/// </summary>
public LoadableRelationAttribute() { }
/// <summary>
/// Create a new <see cref="LoadableRelationAttribute"/> with a baking relationID field.
/// </summary>
/// <param name="relationID">The name of the RelationID field.</param>
public LoadableRelationAttribute(string relationID)
{
RelationID = relationID;
}
RelationID = relationID;
}
}

View File

@@ -16,26 +16,24 @@
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
namespace Kyoo.Authentication.Models
using System;
namespace Kyoo.Abstractions.Models.Attributes;
/// <summary>
/// Specify that a property can't be merged.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class NotMergeableAttribute : Attribute { }
/// <summary>
/// An interface with a method called when this object is merged.
/// </summary>
public interface IOnMerge
{
/// <summary>
/// Permission options.
/// This function is called after the object has been merged.
/// </summary>
public class PermissionOption
{
/// <summary>
/// The path to get this option from the root configuration.
/// </summary>
public const string Path = "authentication:permissions";
/// <summary>
/// The default permissions that will be given to a non-connected user.
/// </summary>
public string[] Default { get; set; }
/// <summary>
/// Permissions applied to a new user.
/// </summary>
public string[] NewUser { get; set; }
}
/// <param name="merged">The object that has been merged with this.</param>
void OnMerge(object merged);
}

View File

@@ -16,21 +16,18 @@
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
namespace Kyoo.Authentication.Models.DTO
using System;
namespace Kyoo.Abstractions.Models.Attributes;
/// <summary>
/// An attribute to inform that this interface is a type union
/// </summary>
[AttributeUsage(AttributeTargets.Interface)]
public class OneOfAttribute : Attribute
{
/// <summary>
/// A model to represent an otac request
/// The types this union concist of.
/// </summary>
public class OtacRequest
{
/// <summary>
/// The One Time Access Code
/// </summary>
public string Otac { get; set; }
/// <summary>
/// Should the user stay logged
/// </summary>
public bool StayLoggedIn { get; set; }
}
public Type[] Types { get; set; }
}

View File

@@ -0,0 +1,87 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using Kyoo.Abstractions.Controllers;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.DependencyInjection;
namespace Kyoo.Abstractions.Models.Permissions;
/// <summary>
/// Specify one part of a permissions needed for the API (the kind or the type).
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
public class PartialPermissionAttribute : Attribute, IFilterFactory
{
/// <summary>
/// The needed permission type.
/// </summary>
public string? Type { get; }
/// <summary>
/// The needed permission kind.
/// </summary>
public Kind? Kind { get; }
/// <summary>
/// The group of this permission.
/// </summary>
public Group Group { get; set; }
/// <summary>
/// Ask a permission to run an action.
/// </summary>
/// <remarks>
/// With this attribute, you can only specify a type or a kind.
/// To have a valid permission attribute, you must specify the kind and the permission using two attributes.
/// Those attributes can be dispatched at different places (one on the class, one on the method for example).
/// If you don't put exactly two of those attributes, the permission attribute will be ill-formed and will
/// lead to unspecified behaviors.
/// </remarks>
/// <param name="type">The type of the action</param>
public PartialPermissionAttribute(string type)
{
Type = type.ToLower();
}
/// <summary>
/// Ask a permission to run an action.
/// </summary>
/// <remarks>
/// With this attribute, you can only specify a type or a kind.
/// To have a valid permission attribute, you must specify the kind and the permission using two attributes.
/// Those attributes can be dispatched at different places (one on the class, one on the method for example).
/// If you don't put exactly two of those attributes, the permission attribute will be ill-formed and will
/// lead to unspecified behaviors.
/// </remarks>
/// <param name="permission">The kind of permission needed.</param>
public PartialPermissionAttribute(Kind permission)
{
Kind = permission;
}
/// <inheritdoc />
public IFilterMetadata CreateInstance(IServiceProvider serviceProvider)
{
return serviceProvider.GetRequiredService<IPermissionValidator>().Create(this);
}
/// <inheritdoc />
public bool IsReusable => true;
}

View File

@@ -0,0 +1,136 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using Kyoo.Abstractions.Controllers;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.DependencyInjection;
namespace Kyoo.Abstractions.Models.Permissions;
/// <summary>
/// The kind of permission needed.
/// </summary>
public enum Kind
{
/// <summary>
/// Allow the user to read for this kind of data.
/// </summary>
Read,
/// <summary>
/// Allow the user to write for this kind of data.
/// </summary>
Write,
/// <summary>
/// Allow the user to create this kind of data.
/// </summary>
Create,
/// <summary>
/// Allow the user to delete this kind of data.
/// </summary>
Delete,
/// <summary>
/// Allow the user to play this file.
/// </summary>
Play,
}
/// <summary>
/// The group of the permission.
/// </summary>
public enum Group
{
/// <summary>
/// Default group indicating no value.
/// </summary>
None,
/// <summary>
/// Allow all operations on basic items types.
/// </summary>
Overall,
/// <summary>
/// Allow operation on sensitive items like libraries path, configurations and so on.
/// </summary>
Admin
}
/// <summary>
/// Specify permissions needed for the API.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
public class PermissionAttribute : Attribute, IFilterFactory
{
/// <summary>
/// The needed permission as string.
/// </summary>
public string Type { get; }
/// <summary>
/// The needed permission kind.
/// </summary>
public Kind Kind { get; }
/// <summary>
/// The group of this permission.
/// </summary>
public Group Group { get; set; }
/// <summary>
/// Ask a permission to run an action.
/// </summary>
/// <param name="type">
/// The type of the action
/// </param>
/// <param name="permission">
/// The kind of permission needed.
/// </param>
/// <param name="group">
/// The group of this permission (allow grouped permission like overall.read
/// for all read permissions of this group).
/// </param>
public PermissionAttribute(string type, Kind permission, Group group = Group.Overall)
{
Type = type.ToLower();
Kind = permission;
Group = group;
}
/// <inheritdoc />
public IFilterMetadata CreateInstance(IServiceProvider serviceProvider)
{
return serviceProvider.GetRequiredService<IPermissionValidator>().Create(this);
}
/// <inheritdoc />
public bool IsReusable => true;
/// <summary>
/// Return this permission attribute as a string.
/// </summary>
/// <returns>The string representation.</returns>
public string AsPermissionString()
{
return Type;
}
}

View File

@@ -0,0 +1,30 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
namespace Kyoo.Abstractions.Models.Permissions;
/// <summary>
/// The annotated route can only be accessed by a logged in user.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
public class UserOnlyAttribute : Attribute
{
// TODO: Implement a Filter Attribute to make this work. For now, this attribute is only useful as documentation.
}

View File

@@ -16,26 +16,22 @@
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
namespace Kyoo.Core.Models.Options
using System;
using Kyoo.Utils;
namespace Kyoo.Abstractions.Models.Attributes;
[AttributeUsage(AttributeTargets.Class)]
public class SqlFirstColumnAttribute : Attribute
{
/// <summary>
/// Options for media registering.
/// The name of the first column of the element. Used to split multiples
/// items on a single sql query. If not specified, it defaults to "Id".
/// </summary>
public class MediaOptions
public string Name { get; set; }
public SqlFirstColumnAttribute(string name)
{
/// <summary>
/// The path of this options
/// </summary>
public const string Path = "Media";
/// <summary>
/// A regex for episodes
/// </summary>
public string[] Regex { get; set; }
/// <summary>
/// A regex for subtitles
/// </summary>
public string[] SubtitleRegex { get; set; }
Name = name.ToSnakeCase();
}
}

View File

@@ -16,21 +16,19 @@
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
namespace Kyoo.TheTvdb.Models
using System;
namespace Kyoo.Abstractions.Models.Exceptions;
/// <summary>
/// An exception raised when an item already exists in the database.
/// </summary>
[Serializable]
public class DuplicatedItemException(object? existing = null)
: Exception("Already exists in the database.")
{
/// <summary>
/// The option containing the api key for the tvdb.
/// The existing object.
/// </summary>
public class TvdbOption
{
/// <summary>
/// The path to get this option from the root configuration.
/// </summary>
public const string Path = "tvdb";
/// <summary>
/// The api key of the tvdb.
/// </summary>
public string ApiKey { get; set; }
}
public object? Existing { get; } = existing;
}

View File

@@ -18,23 +18,24 @@
using System;
namespace Kyoo.Abstractions.Models.Attributes
namespace Kyoo.Abstractions.Models.Exceptions;
/// <summary>
/// An exception raised when an item could not be found.
/// </summary>
[Serializable]
public class ItemNotFoundException : Exception
{
/// <summary>
/// Specify that a property can't be merged.
/// Create a default <see cref="ItemNotFoundException"/> with no message.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class NotMergeableAttribute : Attribute { }
public ItemNotFoundException()
: base("Item not found") { }
/// <summary>
/// An interface with a method called when this object is merged.
/// Create a new <see cref="ItemNotFoundException"/> with a message
/// </summary>
public interface IOnMerge
{
/// <summary>
/// This function is called after the object has been merged.
/// </summary>
/// <param name="merged">The object that has been merged with this.</param>
void OnMerge(object merged);
}
/// <param name="message">The message of the exception</param>
public ItemNotFoundException(string message)
: base(message) { }
}

View File

@@ -0,0 +1,31 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
namespace Kyoo.Abstractions.Models.Exceptions;
[Serializable]
public class UnauthorizedException : Exception
{
public UnauthorizedException()
: base("User not authenticated or token invalid.") { }
public UnauthorizedException(string message)
: base(message) { }
}

View File

@@ -0,0 +1,50 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
namespace Kyoo.Abstractions.Models;
/// <summary>
/// A genre that allow one to specify categories for shows.
/// </summary>
public enum Genre
{
Action,
Adventure,
Animation,
Comedy,
Crime,
Documentary,
Drama,
Family,
Fantasy,
History,
Horror,
Music,
Mystery,
Romance,
ScienceFiction,
Thriller,
War,
Western,
Kids,
News,
Reality,
Soap,
Talk,
Politics,
}

View File

@@ -0,0 +1,31 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using Kyoo.Abstractions.Controllers;
using Kyoo.Abstractions.Models.Attributes;
namespace Kyoo.Abstractions.Models;
/// <summary>
/// A show, a movie or a collection.
/// </summary>
[OneOf(Types = new[] { typeof(Show), typeof(Movie), typeof(Collection) })]
public interface ILibraryItem : IResource, IThumbnails, IMetadata, IAddedDate, IQuery
{
static Sort IQuery.DefaultSort => new Sort<ILibraryItem>.By(nameof(Movie.Name));
}

View File

@@ -0,0 +1,31 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using Kyoo.Abstractions.Controllers;
using Kyoo.Abstractions.Models.Attributes;
namespace Kyoo.Abstractions.Models;
/// <summary>
/// A show, a movie or a collection.
/// </summary>
[OneOf(Types = [typeof(Episode), typeof(Movie)])]
public interface INews : IResource, IThumbnails, IAddedDate, IQuery
{
static Sort IQuery.DefaultSort => new Sort<INews>.By(nameof(AddedDate), true);
}

View File

@@ -0,0 +1,27 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using Kyoo.Abstractions.Models.Attributes;
namespace Kyoo.Abstractions.Models;
/// <summary>
/// A watch list item.
/// </summary>
[OneOf(Types = new[] { typeof(Show), typeof(Movie) })]
public interface IWatchlist : IResource, IThumbnails, IMetadata, IAddedDate { }

View File

@@ -0,0 +1,52 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
namespace Kyoo.Abstractions.Models;
/// <summary>
/// An issue that occured on kyoo.
/// </summary>
public class Issue : IAddedDate
{
/// <summary>
/// The type of issue (for example, "Scanner" if this issue was created due to scanning error).
/// </summary>
public string Domain { get; set; }
/// <summary>
/// Why this issue was caused? An unique cause that can be used to identify this issue.
/// For the scanner, a cause should be a video path.
/// </summary>
public string Cause { get; set; }
/// <summary>
/// A human readable string explaining why this issue occured.
/// </summary>
public string Reason { get; set; }
/// <summary>
/// Some extra data that could store domain-specific info.
/// </summary>
public Dictionary<string, object> Extra { get; set; } = new();
/// <inheritdoc/>
public DateTime AddedDate { get; set; }
}

View File

@@ -0,0 +1,61 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
namespace Kyoo.Abstractions.Models;
/// <summary>
/// ID and link of an item on an external provider.
/// </summary>
public class MetadataId
{
/// <summary>
/// The ID of the resource on the external provider.
/// </summary>
public string DataId { get; set; }
/// <summary>
/// The URL of the resource on the external provider.
/// </summary>
public string? Link { get; set; }
}
/// <summary>
/// ID informations about an episode.
/// </summary>
public class EpisodeId
{
/// <summary>
/// The Id of the show on the metadata database.
/// </summary>
public string ShowId { get; set; }
/// <summary>
/// The season number or null if absolute numbering is used in this database.
/// </summary>
public int? Season { get; set; }
/// <summary>
/// The episode number or absolute number if Season is null.
/// </summary>
public int Episode { get; set; }
/// <summary>
/// The URL of the resource on the external provider.
/// </summary>
public string? Link { get; set; }
}

View File

@@ -0,0 +1,105 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System.Collections.Generic;
using System.Linq;
using Kyoo.Utils;
namespace Kyoo.Abstractions.Models;
/// <summary>
/// A page of resource that contains information about the pagination of resources.
/// </summary>
/// <typeparam name="T">The type of resource contained in this page.</typeparam>
public class Page<T>
where T : IResource
{
/// <summary>
/// The link of the current page.
/// </summary>
public string This { get; }
/// <summary>
/// The link of the first page.
/// </summary>
public string First { get; }
/// <summary>
/// The link of the previous page.
/// </summary>
public string? Previous { get; }
/// <summary>
/// The link of the next page.
/// </summary>
public string? Next { get; }
/// <summary>
/// The number of items in the current page.
/// </summary>
public int Count => Items.Count;
/// <summary>
/// The list of items in the page.
/// </summary>
public ICollection<T> Items { get; }
/// <summary>
/// Create a new <see cref="Page{T}"/>.
/// </summary>
/// <param name="items">The list of items in the page.</param>
/// <param name="this">The link of the current page.</param>
/// <param name="previous">The link of the previous page.</param>
/// <param name="next">The link of the next page.</param>
/// <param name="first">The link of the first page.</param>
public Page(ICollection<T> items, string @this, string? previous, string? next, string first)
{
Items = items;
This = @this;
Previous = previous;
Next = next;
First = first;
}
/// <summary>
/// Create a new <see cref="Page{T}"/> and compute the urls.
/// </summary>
/// <param name="items">The list of items in the page.</param>
/// <param name="url">The base url of the resources available from this page.</param>
/// <param name="query">The list of query strings of the current page</param>
/// <param name="limit">The number of items requested for the current page.</param>
public Page(ICollection<T> items, string url, Dictionary<string, string> query, int limit)
{
Items = items;
This = url + query.ToQueryString();
if (items.Count > 0 && query.ContainsKey("afterID"))
{
query["afterID"] = items.First().Id.ToString();
query["reverse"] = "true";
Previous = url + query.ToQueryString();
}
query.Remove("reverse");
if (items.Count == limit && limit > 0)
{
query["afterID"] = items.Last().Id.ToString();
Next = url + query.ToQueryString();
}
query.Remove("afterID");
First = url + query.ToQueryString();
}
}

View File

@@ -0,0 +1,46 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text.Json;
using Kyoo.Abstractions.Models;
namespace Kyoo.Models;
public class Patch<T> : Dictionary<string, JsonDocument>
where T : class, IResource
{
public Guid? Id => this.GetValueOrDefault(nameof(IResource.Id))?.Deserialize<Guid>();
public string? Slug => this.GetValueOrDefault(nameof(IResource.Slug))?.Deserialize<string>();
public T Apply(T current)
{
foreach ((string property, JsonDocument value) in this)
{
PropertyInfo prop = typeof(T).GetProperty(
property,
BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance
)!;
prop.SetValue(current, value.Deserialize(prop.PropertyType));
}
return current;
}
}

View File

@@ -0,0 +1,100 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using Kyoo.Abstractions.Controllers;
using Kyoo.Utils;
namespace Kyoo.Abstractions.Models;
/// <summary>
/// A class representing collections of <see cref="Show"/>.
/// </summary>
public class Collection
: IQuery,
IResource,
IMetadata,
IThumbnails,
IAddedDate,
IRefreshable,
ILibraryItem
{
public static Sort DefaultSort => new Sort<Collection>.By(nameof(Collection.Name));
/// <inheritdoc />
public Guid Id { get; set; }
/// <inheritdoc />
[MaxLength(256)]
public string Slug { get; set; }
/// <summary>
/// The name of this collection.
/// </summary>
public string Name { get; set; }
/// <summary>
/// The description of this collection.
/// </summary>
public string? Overview { get; set; }
/// <inheritdoc />
public DateTime AddedDate { get; set; }
/// <inheritdoc />
public Image? Poster { get; set; }
/// <inheritdoc />
public Image? Thumbnail { get; set; }
/// <inheritdoc />
public Image? Logo { get; set; }
/// <summary>
/// The list of movies contained in this collection.
/// </summary>
[JsonIgnore]
public ICollection<Movie>? Movies { get; set; }
/// <summary>
/// The list of shows contained in this collection.
/// </summary>
[JsonIgnore]
public ICollection<Show>? Shows { get; set; }
/// <inheritdoc />
public Dictionary<string, MetadataId> ExternalId { get; set; } = new();
/// <inheritdoc />
public DateTime? NextMetadataRefresh { get; set; }
public Collection() { }
[JsonConstructor]
public Collection(string name)
{
if (name != null)
{
Slug = Utility.ToSlug(name);
Name = name;
}
}
}

View File

@@ -0,0 +1,302 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text.Json.Serialization;
using System.Text.RegularExpressions;
using EntityFrameworkCore.Projectables;
using Kyoo.Abstractions.Controllers;
using Kyoo.Abstractions.Models.Attributes;
namespace Kyoo.Abstractions.Models;
/// <summary>
/// A class to represent a single show's episode.
/// </summary>
public class Episode : IQuery, IResource, IThumbnails, IAddedDate, IRefreshable, INews
{
// Use absolute numbers by default and fallback to season/episodes if it does not exists.
public static Sort DefaultSort =>
new Sort<Episode>.Conglomerate(
new Sort<Episode>.By(x => x.AbsoluteNumber),
new Sort<Episode>.By(x => x.SeasonNumber),
new Sort<Episode>.By(x => x.EpisodeNumber)
);
/// <inheritdoc />
public Guid Id { get; set; }
/// <inheritdoc />
[Computed]
[MaxLength(256)]
public string Slug
{
get
{
if (ShowSlug != null || Show?.Slug != null)
return GetSlug(ShowSlug ?? Show!.Slug, SeasonNumber, EpisodeNumber, AbsoluteNumber);
return GetSlug(ShowId.ToString(), SeasonNumber, EpisodeNumber, AbsoluteNumber);
}
private set
{
Match match = Regex.Match(value, @"(?<show>.+)-s(?<season>\d+)e(?<episode>\d+)");
if (match.Success)
{
ShowSlug = match.Groups["show"].Value;
SeasonNumber = int.Parse(match.Groups["season"].Value);
EpisodeNumber = int.Parse(match.Groups["episode"].Value);
}
else
{
match = Regex.Match(value, @"(?<show>.+)-(?<absolute>\d+)");
if (match.Success)
{
ShowSlug = match.Groups["show"].Value;
AbsoluteNumber = int.Parse(match.Groups["absolute"].Value);
}
else
ShowSlug = value;
SeasonNumber = null;
EpisodeNumber = null;
}
}
}
/// <summary>
/// The slug of the Show that contain this episode. If this is not set, this episode is ill-formed.
/// </summary>
[JsonIgnore]
public string? ShowSlug { private get; set; }
/// <summary>
/// The ID of the Show containing this episode.
/// </summary>
public Guid ShowId { get; set; }
/// <summary>
/// The show that contains this episode.
/// </summary>
[LoadableRelation(nameof(ShowId))]
public Show? Show { get; set; }
/// <summary>
/// The ID of the Season containing this episode.
/// </summary>
public Guid? SeasonId { get; set; }
/// <summary>
/// The season that contains this episode.
/// </summary>
/// <remarks>
/// This can be null if the season is unknown and the episode is only identified
/// by it's <see cref="AbsoluteNumber"/>.
/// </remarks>
[LoadableRelation(nameof(SeasonId))]
public Season? Season { get; set; }
/// <summary>
/// The season in witch this episode is in.
/// </summary>
public int? SeasonNumber { get; set; }
/// <summary>
/// The number of this episode in it's season.
/// </summary>
public int? EpisodeNumber { get; set; }
/// <summary>
/// The absolute number of this episode. It's an episode number that is not reset to 1 after a new season.
/// </summary>
public int? AbsoluteNumber { get; set; }
/// <summary>
/// The path of the video file for this episode.
/// </summary>
public string Path { get; set; }
/// <summary>
/// The title of this episode.
/// </summary>
public string? Name { get; set; }
/// <summary>
/// The overview of this episode.
/// </summary>
public string? Overview { get; set; }
/// <summary>
/// How long is this episode? (in minutes)
/// </summary>
public int? Runtime { get; set; }
/// <summary>
/// The release date of this episode. It can be null if unknown.
/// </summary>
public DateOnly? ReleaseDate { get; set; }
/// <inheritdoc />
public DateTime AddedDate { get; set; }
/// <inheritdoc />
public Image? Poster { get; set; }
/// <inheritdoc />
public Image? Thumbnail { get; set; }
/// <inheritdoc />
public Image? Logo { get; set; }
/// <inheritdoc />
public Dictionary<string, EpisodeId> ExternalId { get; set; } = [];
/// <inheritdoc />
public DateTime? NextMetadataRefresh { get; set; }
/// <summary>
/// The previous episode that should be seen before viewing this one.
/// </summary>
[Projectable(UseMemberBody = nameof(_PreviousEpisode), OnlyOnInclude = true)]
[LoadableRelation(
// language=PostgreSQL
Sql = """
select
pe.* -- Episode as pe
from
episodes as "pe"
where
pe.show_id = "this".show_id
and (pe.absolute_number < "this".absolute_number
or pe.season_number < "this".season_number
or (pe.season_number = "this".season_number
and e.episode_number < "this".episode_number))
order by
pe.absolute_number desc nulls last,
pe.season_number desc,
pe.episode_number desc
limit 1
"""
)]
public Episode? PreviousEpisode { get; set; }
private Episode? _PreviousEpisode =>
Show!
.Episodes!.OrderBy(x => x.AbsoluteNumber == null)
.ThenByDescending(x => x.AbsoluteNumber)
.ThenByDescending(x => x.SeasonNumber)
.ThenByDescending(x => x.EpisodeNumber)
.FirstOrDefault(x =>
x.AbsoluteNumber < AbsoluteNumber
|| x.SeasonNumber < SeasonNumber
|| (x.SeasonNumber == SeasonNumber && x.EpisodeNumber < EpisodeNumber)
);
/// <summary>
/// The next episode to watch after this one.
/// </summary>
[Projectable(UseMemberBody = nameof(_NextEpisode), OnlyOnInclude = true)]
[LoadableRelation(
// language=PostgreSQL
Sql = """
select
ne.* -- Episode as ne
from
episodes as "ne"
where
ne.show_id = "this".show_id
and (ne.absolute_number > "this".absolute_number
or ne.season_number > "this".season_number
or (ne.season_number = "this".season_number
and e.episode_number > "this".episode_number))
order by
ne.absolute_number,
ne.season_number,
ne.episode_number
limit 1
"""
)]
public Episode? NextEpisode { get; set; }
private Episode? _NextEpisode =>
Show!
.Episodes!.OrderBy(x => x.AbsoluteNumber)
.ThenBy(x => x.SeasonNumber)
.ThenBy(x => x.EpisodeNumber)
.FirstOrDefault(x =>
x.AbsoluteNumber > AbsoluteNumber
|| x.SeasonNumber > SeasonNumber
|| (x.SeasonNumber == SeasonNumber && x.EpisodeNumber > EpisodeNumber)
);
[JsonIgnore]
public ICollection<EpisodeWatchStatus>? Watched { get; set; }
/// <summary>
/// Metadata of what an user as started/planned to watch.
/// </summary>
[Projectable(UseMemberBody = nameof(_WatchStatus), OnlyOnInclude = true)]
[LoadableRelation(
Sql = "episode_watch_status",
On = "episode_id = \"this\".id and \"relation\".user_id = [current_user]"
)]
public EpisodeWatchStatus? WatchStatus { get; set; }
// There is a global query filter to filter by user so we just need to do single.
private EpisodeWatchStatus? _WatchStatus => Watched!.FirstOrDefault();
/// <summary>
/// Links to watch this episode.
/// </summary>
public VideoLinks Links =>
new() { Direct = $"/episode/{Slug}/direct", Hls = $"/episode/{Slug}/master.m3u8", };
/// <summary>
/// Get the slug of an episode.
/// </summary>
/// <param name="showSlug">The slug of the show. It can't be null.</param>
/// <param name="seasonNumber">
/// The season in which the episode is.
/// If this is a movie or if the episode should be referred by it's absolute number, set this to null.
/// </param>
/// <param name="episodeNumber">
/// The number of the episode in it's season.
/// If this is a movie or if the episode should be referred by it's absolute number, set this to null.
/// </param>
/// <param name="absoluteNumber">
/// The absolute number of this show.
/// If you don't know it or this is a movie, use null
/// </param>
/// <returns>The slug corresponding to the given arguments</returns>
public static string GetSlug(
string showSlug,
int? seasonNumber,
int? episodeNumber,
int? absoluteNumber = null
)
{
return seasonNumber switch
{
null when absoluteNumber == null => showSlug,
null => $"{showSlug}-{absoluteNumber}",
_ => $"{showSlug}-s{seasonNumber}e{episodeNumber}"
};
}
}

View File

@@ -18,11 +18,15 @@
using System;
namespace Kyoo.Abstractions.Models.Attributes
namespace Kyoo.Abstractions.Models;
/// <summary>
/// An interface applied to resources.
/// </summary>
public interface IAddedDate
{
/// <summary>
/// An attribute to inform that the property is computed automatically and can't be assigned manually.
/// The date at which this resource was added to kyoo.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class ComputedAttribute : NotMergeableAttribute { }
public DateTime AddedDate { get; set; }
}

View File

@@ -16,21 +16,17 @@
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
namespace Kyoo.TheMovieDb.Models
using System.Collections.Generic;
namespace Kyoo.Abstractions.Models;
/// <summary>
/// An interface applied to resources containing external metadata.
/// </summary>
public interface IMetadata
{
/// <summary>
/// The option containing the api key for TheMovieDb.
/// The link to metadata providers that this show has. See <see cref="MetadataId"/> for more information.
/// </summary>
public class TheMovieDbOptions
{
/// <summary>
/// The path to get this option from the root configuration.
/// </summary>
public const string Path = "the-moviedb";
/// <summary>
/// The api key of TheMovieDb.
/// </summary>
public string ApiKey { get; set; }
}
public Dictionary<string, MetadataId> ExternalId { get; set; }
}

View File

@@ -1,4 +1,4 @@
// Kyoo - A portable and vast media library solution.
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
@@ -19,11 +19,12 @@
using System;
using Kyoo.Abstractions.Controllers;
namespace Kyoo.Abstractions.Models.Attributes
namespace Kyoo.Abstractions.Models;
public interface IQuery
{
/// <summary>
/// The targeted relation can be edited via calls to the repository's <see cref="IRepository{T}.Edit"/> method.
/// The sorting that will be used when no user defined one is present.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class EditableRelationAttribute : Attribute { }
public static virtual Sort DefaultSort => throw new NotImplementedException();
}

View File

@@ -0,0 +1,40 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
namespace Kyoo.Abstractions.Models;
public interface IRefreshable
{
/// <summary>
/// The date of the next metadata refresh. Null if auto-refresh is disabled.
/// </summary>
public DateTime? NextMetadataRefresh { get; set; }
public static DateTime ComputeNextRefreshDate(DateOnly airDate)
{
int days = DateOnly.FromDateTime(DateTime.UtcNow).DayNumber - airDate.DayNumber;
return days switch
{
<= 4 => DateTime.UtcNow.AddDays(1),
<= 21 => DateTime.UtcNow.AddDays(14),
_ => DateTime.UtcNow.AddMonths(2)
};
}
}

View File

@@ -0,0 +1,49 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using System.ComponentModel.DataAnnotations;
using Kyoo.Abstractions.Controllers;
namespace Kyoo.Abstractions.Models;
/// <summary>
/// An interface to represent a resource that can be retrieved from the database.
/// </summary>
public interface IResource : IQuery
{
/// <summary>
/// A unique ID for this type of resource. This can't be changed and duplicates are not allowed.
/// </summary>
/// <remarks>
/// You don't need to specify an ID manually when creating a new resource,
/// this field is automatically assigned by the <see cref="IRepository{T}"/>.
/// </remarks>
public Guid Id { get; set; }
/// <summary>
/// A human-readable identifier that can be used instead of an ID.
/// A slug must be unique for a type of resource but it can be changed.
/// </summary>
/// <remarks>
/// There is no setter for a slug since it can be computed from other fields.
/// For example, a season slug is {ShowSlug}-s{SeasonNumber}.
/// </remarks>
[MaxLength(256)]
public string Slug { get; }
}

View File

@@ -0,0 +1,147 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using System.ComponentModel.DataAnnotations;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Kyoo.Abstractions.Models;
/// <summary>
/// An interface representing items that contains images (like posters, thumbnails, logo, banners...)
/// </summary>
public interface IThumbnails
{
/// <summary>
/// A poster is a 2/3 format image with the cover of the resource.
/// </summary>
public Image? Poster { get; set; }
/// <summary>
/// A thumbnail is a 16/9 format image, it could ether be used as a background or as a preview but it usually
/// is not an official image.
/// </summary>
public Image? Thumbnail { get; set; }
/// <summary>
/// A logo is a small image representing the resource.
/// </summary>
public Image? Logo { get; set; }
}
[JsonConverter(typeof(ImageConvertor))]
public class Image
{
/// <summary>
/// A unique identifier for the image. Used for proper http caches.
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// The original image from another server.
/// </summary>
public string Source { get; set; }
/// <summary>
/// A hash to display as placeholder while the image is loading.
/// </summary>
[MaxLength(32)]
public string Blurhash { get; set; }
/// <summary>
/// The url to access the image in low quality.
/// </summary>
public string Low => $"/thumbnails/{Id}?quality=low";
/// <summary>
/// The url to access the image in medium quality.
/// </summary>
public string Medium => $"/thumbnails/{Id}?quality=medium";
/// <summary>
/// The url to access the image in high quality.
/// </summary>
public string High => $"/thumbnails/{Id}?quality=high";
public Image() { }
[JsonConstructor]
public Image(string source, string? blurhash = null)
{
Source = source;
Blurhash = blurhash ?? "000000";
}
//
public class ImageConvertor : JsonConverter<Image>
{
/// <inheritdoc />
public override Image? Read(
ref Utf8JsonReader reader,
Type typeToConvert,
JsonSerializerOptions options
)
{
if (reader.TokenType == JsonTokenType.String && reader.GetString() is string source)
return new Image(source);
using JsonDocument document = JsonDocument.ParseValue(ref reader);
string? src = document.RootElement.GetProperty("Source").GetString();
string? blurhash = document.RootElement.GetProperty("Blurhash").GetString();
Guid? id = document.RootElement.GetProperty("Id").GetGuid();
return new Image(src ?? string.Empty, blurhash) { Id = id ?? Guid.Empty };
}
/// <inheritdoc />
public override void Write(
Utf8JsonWriter writer,
Image value,
JsonSerializerOptions options
)
{
writer.WriteStartObject();
writer.WriteString("source", value.Source);
writer.WriteString("blurhash", value.Blurhash);
writer.WriteString("low", value.Low);
writer.WriteString("medium", value.Medium);
writer.WriteString("high", value.High);
writer.WriteEndObject();
}
}
}
/// <summary>
/// The quality of an image
/// </summary>
public enum ImageQuality
{
/// <summary>
/// Small
/// </summary>
Low,
/// <summary>
/// Medium
/// </summary>
Medium,
/// <summary>
/// Large
/// </summary>
High,
}

View File

@@ -0,0 +1,65 @@
// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
using System;
using System.Text.Json.Serialization;
namespace Kyoo.Abstractions.Models;
/// <summary>
/// A container representing the response of a login or token refresh.
/// </summary>
/// <remarks>
/// Initializes a new instance of the <see cref="JwtToken"/> class.
/// </remarks>
/// <param name="accessToken">The access token used to authorize requests.</param>
/// <param name="refreshToken">The refresh token to retrieve a new access token.</param>
/// <param name="expireIn">When the access token will expire.</param>
public class JwtToken(string accessToken, string refreshToken, TimeSpan expireIn)
{
/// <summary>
/// The type of this token (always a Bearer).
/// </summary>
[JsonPropertyName("token_type")]
public string TokenType => "Bearer";
/// <summary>
/// The access token used to authorize requests.
/// </summary>
[JsonPropertyName("access_token")]
public string AccessToken { get; set; } = accessToken;
/// <summary>
/// The refresh token used to retrieve a new access/refresh token when the access token has expired.
/// </summary>
[JsonPropertyName("refresh_token")]
public string RefreshToken { get; set; } = refreshToken;
/// <summary>
/// When the access token will expire. After this time, the refresh token should be used to retrieve.
/// a new token.cs
/// </summary>
[JsonPropertyName("expire_in")]
public TimeSpan ExpireIn => ExpireAt.Subtract(DateTime.UtcNow);
/// <summary>
/// The exact date at which the access token will expire.
/// </summary>
[JsonPropertyName("expire_at")]
public DateTime ExpireAt { get; set; } = DateTime.UtcNow + expireIn;
}

Some files were not shown because too many files have changed in this diff Show More