Compare commits

..

692 Commits

Author SHA1 Message Date
IRHM 1e7702b16b docker/ui-build: Add doc link to readme 2025-02-28 23:50:56 +00:00
IRHM fa2a4a40d0 doc: Create docker-compose-subpath installation guide 2025-02-28 23:46:57 +00:00
IRHM 203e4a31ef doc: Remove docsVersionDropdown from nav
Was going to version doc, but never did and don't want to anymore.. doc site will only support latest version of watcharr.

If anyone needs an older version for any reason, can always browse through them in specific git tag.
2025-02-28 23:03:57 +00:00
IRHM 5f2c1977ee Create toBaseUrl and use everywhere we navigate
Simply prefixes the absolute paths we use for internal navigations with the `base` variable set when the app was built.
2025-02-28 22:48:34 +00:00
IRHM 5860fd2783 ui-build compose: Add name to volume
and use latest prod image in ui-replace compose test
2025-02-28 21:11:55 +00:00
IRHM 3c2cbf55c6 new ui-build image, WATCHARR_BASE env var for svelte cfg, rename compose files 2025-02-25 22:58:59 +00:00
Andreas 565d90dbf0 feat: new about modal (#811)
* FaceMenu: Add about modal

added modal with about info to FaceMenu bottom.
added 4 new SVG icons.

* FaceMenu: npm format

* FaceMenu: refactor about modal

- moved about modal into its own file
- minor fixes

* AboutModal: Add text to gh/site links, use Modal title prop, add attribution file link

, added a hover effect to all links in the modal and removed the margin on h5.

Also updated the top paragraph.

* AboutModal: Remove unused style

* Menu: Use color variables

---------

Co-authored-by: IRHM <37304121+IRHM@users.noreply.github.com>
2025-02-21 01:14:13 +00:00
IRHM b6d6e66f04 v2.0.2 2025-02-16 21:18:27 +00:00
IRHM 0b4f3c8604 2.0.2-dev 2025-02-16 21:00:09 +00:00
Mr 0a5a4e39f5 DetailedMenu: Fix wlDetailedView not setting correctly (#814)
wasn't causing setter to trigger and save to localStorage
2025-02-16 19:57:55 +00:00
IRHM 2d8def18ed v2.0.1 2025-02-14 04:14:25 +00:00
IRHM d53f62e96c 2.0.1-dev 2025-02-14 03:50:53 +00:00
Mr 4dd0b419e0 SeasonsList: Horizontal scroller for mobile view (#808)
* SeasonsList: Turn into horizontal list for mobile

* SeasonsList: Make seasons sticky for mobile view
2025-02-14 03:48:50 +00:00
Antonio Sarro 41948f15ba SeasonsList: Show season status and episode count (#784)
* feat: improved overall look of the series season sidebar

* SeasonsList: Responsivity fixes

- Fix responsivity for seasons when names are very long (eg on shows that have custom season names)
- Increase status icon size
- Create color variables for season episodes text for resuability and to fix bug causing z index rendering issues with opacity usage.

* SeasonsList: checkSeasonStatus: Improve log

* SeasonsList: Remove $inspect: Causing errors in console for some reason

* vars: Fix --text-color-accent for dark theme

---------

Co-authored-by: IRHM <37304121+IRHM@users.noreply.github.com>
2025-02-14 03:27:50 +00:00
Mr 49f0739503 Merge pull request #807 from sbondCo/search-by-id
Search by IGDB ID & TMDB ID support
2025-02-14 01:21:03 +00:00
IRHM 1c763e9761 search: by tmdb id, return after goto call 2025-02-14 01:17:32 +00:00
IRHM 18a30639b9 Search by tmdbId with movie or tv or series provider aliases
barbarically
2025-02-14 01:10:08 +00:00
IRHM a3847ccb3c Search by igdb id (with igdb or game provider aliases) 2025-02-14 00:58:48 +00:00
Mr 5f5eb3e9f2 game: Fix search query parameter (#806)
Was passing encoded query parameter, now unescaped first, fixing request to igdb.
2025-02-14 00:38:20 +00:00
IRHM 3bf1f64f25 v2.0.0 2025-01-23 22:23:19 +00:00
IRHM 82b5b30e1c 2.0.0-dev3 2025-01-23 21:46:25 +00:00
Mr 303761dc4c Fix importing state error (#781) 2025-01-21 23:50:51 +00:00
Mr 16012da267 Merge pull request #771 from sbondCo/new-screens
New screenshots for readme/doc site
2025-01-20 00:08:19 +00:00
IRHM 74bceee57b Update ATTRIBUTION.md
Added Ionicons, commons, google fonts, tmdb, igdb.
2025-01-20 00:06:26 +00:00
IRHM bc0aa56ced doc: HomepageTwoColFeats: Add v=2 to imgSrcs 2025-01-19 23:47:25 +00:00
IRHM 84753ce829 README: Add v=2 to screens 2025-01-19 23:44:26 +00:00
IRHM 780d7c55b1 screenshot: Fix homepage-poster-hover.png
i wasn't hovering over the damn poster
2025-01-19 23:42:07 +00:00
IRHM 9318df3e14 screenshot: Fix homepage-poster-hover
scrollbar is showing
2025-01-19 23:40:19 +00:00
IRHM d0c0ec1f67 Upload new screenshots 2025-01-19 23:37:42 +00:00
IRHM 32b3b792e5 ATTRIBUTION: Add penpot 2025-01-19 22:38:50 +00:00
IRHM 5018a229c0 Create ATTRIBUTION.md 2025-01-19 22:36:10 +00:00
IRHM 6e20ab85c3 devices-mock.png: higher resolution 2025-01-19 22:21:39 +00:00
IRHM 9c8a093b2e readme: Add devices-mock image 2025-01-19 22:02:35 +00:00
IRHM 1870d15c41 2.0.0-dev2 2025-01-19 17:13:46 +00:00
Mr 06cf9c012f Fix search debounce and styling (#770)
* app layout: Fix search styling and other small issues

- return destroy func in onMount to remove event listeners
- Fix timeout var type

* search: Fix searchUsers call not waiting for debounce
2025-01-19 17:11:05 +00:00
IRHM fdc415f545 2.0.0-dev1 2025-01-17 19:50:05 +00:00
IRHM e7ff4b7a4e Dockerfile: Ignore scripts when installing dependencies for runner layer
Fixes issue with new `prepare` script that we added for sveltekit, would always error here since we don't have any dev dependencies in this step for the command to work.

Also made the comments for each section bigger for readability (makes it easier to scan for where sections are).
2025-01-17 19:47:37 +00:00
IRHM 051acf5118 TagMenu: Fix title btns styling 2025-01-17 19:13:55 +00:00
IRHM a58a3c1bd7 2.0.0-dev 2025-01-17 18:56:09 +00:00
dependabot[bot] 0b04c9b827 ui: bump @sveltejs/kit from 2.15.1 to 2.16.0 (#764)
* ui: bump @sveltejs/kit from 2.15.1 to 2.16.0

Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.15.1 to 2.16.0.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.16.0/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* package: Add "prepare" script for sveltekit v2.16 update

So install script does its thing and generates types.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: IRHM <37304121+IRHM@users.noreply.github.com>
2025-01-17 18:34:46 +00:00
dependabot[bot] d05ec6c8fa ui: bump @sveltejs/adapter-node from 5.2.11 to 5.2.12 (#763)
Bumps [@sveltejs/adapter-node](https://github.com/sveltejs/kit/tree/HEAD/packages/adapter-node) from 5.2.11 to 5.2.12.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/adapter-node/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/adapter-node@5.2.12/packages/adapter-node)

---
updated-dependencies:
- dependency-name: "@sveltejs/adapter-node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-17 18:19:14 +00:00
dependabot[bot] 04594df963 server: bump github.com/go-co-op/gocron/v2 in /server (#761)
Bumps [github.com/go-co-op/gocron/v2](https://github.com/go-co-op/gocron) from 2.14.0 to 2.14.2.
- [Release notes](https://github.com/go-co-op/gocron/releases)
- [Commits](https://github.com/go-co-op/gocron/compare/v2.14.0...v2.14.2)

---
updated-dependencies:
- dependency-name: github.com/go-co-op/gocron/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-17 18:17:09 +00:00
dependabot[bot] dacfd65603 server: bump github.com/gin-contrib/cache from 1.3.0 to 1.3.1 in /server (#746)
Bumps [github.com/gin-contrib/cache](https://github.com/gin-contrib/cache) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/gin-contrib/cache/releases)
- [Changelog](https://github.com/gin-contrib/cache/blob/master/.goreleaser.yaml)
- [Commits](https://github.com/gin-contrib/cache/compare/v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: github.com/gin-contrib/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-17 18:16:01 +00:00
dependabot[bot] 70d37d3555 server: bump golang.org/x/crypto from 0.31.0 to 0.32.0 in /server (#748)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.31.0 to 0.32.0.
- [Commits](https://github.com/golang/crypto/compare/v0.31.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-17 18:14:41 +00:00
Mr f01f26fd39 Merge pull request #762 from sbondCo/svelte-5
Svelte 5, new code format rules for frontend, some general overdue refactoring
2025-01-17 18:10:59 +00:00
IRHM ea86451686 fix linting issues 2025-01-17 18:05:44 +00:00
IRHM 27699192b4 Refactor menus to use new component
Created a new <Menu> component which is now used for all of our menus (the ones for the nav + the menu in AddToTagButton).

Looks better now, easier to use, not sure why I ever did the global style for it, that was dumb. oh wait no im smart, it was probably because it wasn't used for the complex stuff it is now anyways shulda refactored ages agU
2025-01-17 01:40:31 +00:00
IRHM aff86db95e PosterRating: Fix styling for thumb rating system 2025-01-13 05:16:16 +00:00
IRHM bd2e645608 EditUserModal: Fix usage and reactivity 2025-01-13 05:16:01 +00:00
IRHM 0a22484037 Remove now-unknown svelte-ignore comment 2025-01-13 04:09:47 +00:00
IRHM aad65a2b4f login: finish migration to svelte 5 2025-01-13 04:09:15 +00:00
IRHM d93fbb0710 prettier: ignore .vscode folder 2025-01-13 04:00:07 +00:00
IRHM ea8e435e64 FilterMenu: Re-set activeFilters after modifying so setter saves new value 2025-01-13 03:57:11 +00:00
IRHM 10dcd6d4cc plain layout: Remove '/' link from watcharr text in nav
Clicking it would take the user to home page without login, but they are not logged in so no data.
2025-01-13 01:09:36 +00:00
IRHM b59f8a2850 profile: toFormattedTimeLong: Return "0 hours" as default 2025-01-13 01:03:43 +00:00
IRHM 00f645e001 Store: Use normal store for logging activeSort restore 2025-01-13 00:59:12 +00:00
IRHM 897bbf54e2 Store: Refactor to use get/set for all properties
So that we can use the setters for saving properties to localStorage after an update. $effect is not meant to be used for this, so using setters seemed like the best option, gives us a lot more control over behaviour.
2025-01-13 00:57:18 +00:00
IRHM e97662314b Create hooks.client.ts: Use init hook for logging app version 2025-01-13 00:54:45 +00:00
IRHM 910695474c login: Fix state by actually using state rune 2025-01-12 23:53:03 +00:00
IRHM b91e4f0e28 WatchedList: Fix list not re-sorting when item updated via poster
This change caused an issue where the poster mouseLeave event would not fire if the poster element was moved as a result of the re-sort, so some stuff has been restructured and a new call added to check if mouse is no longer over the poster to manually unactivate it.
2025-01-12 19:45:39 +00:00
IRHM 5ea8f59e6f Activity: Fix styling, remove isActivityEditorVisible and use clickedActivity state for all uses 2025-01-12 16:48:59 +00:00
IRHM aa71cdd20a SortMenu: Fix style & not updating store when sort changed 2025-01-12 01:04:12 +00:00
IRHM 64bd3296ab WatchedList: Fix filtering
this was wow many time wasted trying to figure this out but at least its a one time waste i hoppe.

Removed the games filter auto removal thing in filt() because it's not _really_ necessary. We have added additional UX stuff around this since, so if this rare case ever does occur, the user has easy ways around it.
2025-01-12 00:58:27 +00:00
IRHM c6a66e9a67 Run startStoreSaver outside onMount in main layout 2025-01-12 00:55:38 +00:00
IRHM c862bd6c09 store: Add debug logging to saver/rehydrator 2025-01-12 00:55:15 +00:00
IRHM 2b5ce07554 person: refactor and fix infinite loop in new/old sorts
- Refactored the newest/oldest sorts into one function used for both: newestOldestSort()
- Fixed an issue in the sort where an infinite loop could be caused when A & B both have no release date (added new case to resolve this).
2025-01-11 00:31:22 +00:00
IRHM c0b9074b7e PosterRating: Fix button fonts 2025-01-11 00:29:15 +00:00
IRHM 4f0ef3d12b fix some stuff 2025-01-09 22:51:50 +00:00
IRHM 21da15e284 deps: Remove tslib
maybe i set it up wrong but it didnt seem to noticeable change file size so i dont think its worth using? idk
2025-01-06 23:27:15 +00:00
IRHM ead70c9315 Fix poster Rating/Status styling 2025-01-06 22:59:05 +00:00
IRHM 2cfe1d13e7 format all code with new style (printWidth=80, useTabs=true, trailingComma=all) 2025-01-05 20:48:53 +00:00
IRHM a40f90a6b7 migrate more stuff to svelte 5 in a minimal fashion
getting stuff working first, then will cleanup where necessary
2025-01-05 20:07:21 +00:00
IRHM 738d48138a wip svelte 5 migration
some code has still wrongly been deleted by the migration tool, have to restore that............ aaaaaaaaaaaaaaaa
2025-01-03 21:21:24 +00:00
dependabot[bot] f858c21c51 server: bump github.com/gin-contrib/cors from 1.7.2 to 1.7.3 in /server (#745)
Bumps [github.com/gin-contrib/cors](https://github.com/gin-contrib/cors) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/gin-contrib/cors/releases)
- [Changelog](https://github.com/gin-contrib/cors/blob/master/.goreleaser.yaml)
- [Commits](https://github.com/gin-contrib/cors/compare/v1.7.2...v1.7.3)

---
updated-dependencies:
- dependency-name: github.com/gin-contrib/cors
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-01 23:40:41 +00:00
dependabot[bot] df8ca2a6e7 ui: bump @types/papaparse from 5.3.14 to 5.3.15 (#742)
Bumps [@types/papaparse](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/papaparse) from 5.3.14 to 5.3.15.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/papaparse)

---
updated-dependencies:
- dependency-name: "@types/papaparse"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-01 20:41:02 +00:00
Mr a029d38b7f Merge pull request #747 from sbondCo/user-type-change
manage_users: Support swapping users between Watcharr/Proxy users
2025-01-01 20:08:43 +00:00
IRHM 9ba1049d7f types: DropDownItem: remove disabled prop 2025-01-01 20:07:20 +00:00
IRHM a2ee161cc6 manage_users: Support changing user types (only watcharr/proxy currently) 2025-01-01 19:49:14 +00:00
IRHM 20b170393e Create UserTypeIcon component, use in /users/ table 2025-01-01 18:53:31 +00:00
Mr aa67f7eadb Create an error page with home and refresh btns (#738) 2024-12-30 13:42:31 +00:00
dependabot[bot] 7af39699dd server: bump golang.org/x/crypto from 0.27.0 to 0.31.0 in /server (#717)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.27.0 to 0.31.0.
- [Commits](https://github.com/golang/crypto/compare/v0.27.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-29 23:39:55 +00:00
dependabot[bot] 694aefad30 server: bump gorm.io/driver/sqlite from 1.5.6 to 1.5.7 in /server (#723)
Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.5.6 to 1.5.7.
- [Commits](https://github.com/go-gorm/sqlite/compare/v1.5.6...v1.5.7)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-29 23:37:39 +00:00
dependabot[bot] 1e908fba38 server: bump github.com/go-co-op/gocron/v2 in /server (#731)
Bumps [github.com/go-co-op/gocron/v2](https://github.com/go-co-op/gocron) from 2.11.0 to 2.14.0.
- [Release notes](https://github.com/go-co-op/gocron/releases)
- [Commits](https://github.com/go-co-op/gocron/compare/v2.11.0...v2.14.0)

---
updated-dependencies:
- dependency-name: github.com/go-co-op/gocron/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-29 23:35:50 +00:00
dependabot[bot] 7acd8681b9 ui: bump prettier from 3.3.2 to 3.4.2 (#714)
* ui: bump prettier from 3.3.2 to 3.4.2

Bumps [prettier](https://github.com/prettier/prettier) from 3.3.2 to 3.4.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.3.2...3.4.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* search: fix linting issue

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: IRHM <37304121+IRHM@users.noreply.github.com>
2024-12-29 23:31:23 +00:00
dependabot[bot] 940f719345 ui: bump @vite-pwa/sveltekit from 0.5.0 to 0.6.6 (#669)
Bumps [@vite-pwa/sveltekit](https://github.com/vite-pwa/sveltekit) from 0.5.0 to 0.6.6.
- [Release notes](https://github.com/vite-pwa/sveltekit/releases)
- [Commits](https://github.com/vite-pwa/sveltekit/compare/v0.5.0...v0.6.6)

---
updated-dependencies:
- dependency-name: "@vite-pwa/sveltekit"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-29 23:22:57 +00:00
dependabot[bot] 76379938eb ui: bump typescript from 5.5.4 to 5.7.2 (#703)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.5.4 to 5.7.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.5.4...v5.7.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-29 23:19:13 +00:00
dependabot[bot] 45ab9b6b1c ui: bump @typescript-eslint/eslint-plugin from 7.14.1 to 8.18.2 (#733)
* ui: bump @typescript-eslint/eslint-plugin from 7.14.1 to 8.18.2

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.14.1 to 8.18.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.18.2/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update @typescript-eslint/parser to ^8.18.2

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: IRHM <37304121+IRHM@users.noreply.github.com>
2024-12-29 23:18:15 +00:00
IRHM f77893bcc1 test-pr-web.yml: Trigger on related files outside src folder changed 2024-12-29 23:09:22 +00:00
dependabot[bot] 646c0586ab ui: bump @sveltejs/kit from 2.5.27 to 2.15.1 (#737)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.5.27 to 2.15.1.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.15.1/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-29 23:03:20 +00:00
Mr 64bfbd51a0 Merge pull request #736 from sbondCo/proxy-auth-flow
Trusted header authentication
2024-12-29 22:51:33 +00:00
IRHM 31fc6633a2 login: Expand 'SSO' to 'Single Sign-On' in related btn text 2024-12-29 22:50:28 +00:00
IRHM 85c5131dad ProxyUserLogoutModal: Make watcharr logout warning more clear 2024-12-29 22:40:56 +00:00
IRHM b13da26b8b loginTrustedHeaderAuth: Only allow login to a PROXY_USER account 2024-12-29 22:33:38 +00:00
IRHM ad3271df7f Use clearWatcharrData in 401 axios interceptor 2024-12-28 19:11:23 +00:00
IRHM dfb49ee2a7 Config: Correct HEADER_AUTH comment 2024-12-28 16:33:16 +00:00
IRHM a456701bde loginTrustedHeaderAuth: Move creating user log to inside correct if block 2024-12-28 16:26:44 +00:00
IRHM 2b000c8d2f ProxyUserLogoutModal: Update desc to make more sense on modal 2024-12-28 16:07:08 +00:00
IRHM cbd2cfcfbe sso logout flow 2024-12-28 16:01:44 +00:00
IRHM eb2e2e9f93 handle sso auto login on client 2024-12-28 14:19:03 +00:00
IRHM 5dd26a09c0 login: let main btns wrap 2024-12-28 14:08:56 +00:00
IRHM 040297fb2a Update login sso btn style, update trusted header modal save action 2024-12-24 22:54:16 +00:00
IRHM c89e5e5027 TrustedHeaderAuthModal: More info in warning 2024-12-22 20:00:57 +00:00
IRHM 4e875b2f8a Create header auth form and save logic 2024-12-22 19:46:44 +00:00
IRHM a42b7e8ed3 wip new HEADER_AUTH setting to hold all related settings
moved around some code too, not tested, just saving my work
2024-12-21 00:08:12 +00:00
IRHM 69bbba9ff4 Add proxyLogin logic back
Co-Authored-By: Lukas S <62517060+lufixsch@users.noreply.github.com>
2024-12-20 19:36:21 +00:00
IRHM 13f2912009 Organise config and add warning to proxy auth header setting 2024-12-20 19:34:35 +00:00
IRHM 5d14691b7e Add missing loginProxy func
Co-Authored-By: Lukas S <62517060+lufixsch@users.noreply.github.com>
2024-12-20 19:27:05 +00:00
LufixSch 7334f9c29e add settings to specify authentication header 2024-12-20 19:18:08 +00:00
Mr 216ebc183c Merge pull request #728 from sbondCo/imdb-episodes
Imdb episodes import support (only if show is imported too from list)
2024-12-18 19:50:39 +00:00
IRHM 2305a0b7ac Support IMDb episode importing 2024-12-18 19:46:57 +00:00
IRHM b18c889777 searchByExternalId: Combine season/episode results too and fix search result processing in client 2024-12-18 17:44:00 +00:00
Mr e952011de8 import: Disable 'change statuses' button while importing (#727) 2024-12-18 02:23:51 +00:00
Mr cfb6196c2b Merge pull request #726 from sbondCo/imdb-import
Imdb import
2024-12-18 02:12:47 +00:00
IRHM 8eb4f1b297 import/process: Fix changeAllStatusesModalCb call when closing modal 2024-12-18 02:01:54 +00:00
IRHM c031b2aaf0 tooltip: Run hide() in destroy() to fix scenarios where it stay revealed forever when node is removed 2024-12-18 01:53:44 +00:00
IRHM 447523edfc import: Change all statuses button
For allow user to quickly override all statuses in the table for all content to a new one
2024-12-18 01:53:12 +00:00
IRHM 1e4d3b4076 imdb import: log type when skipping 2024-12-18 01:21:49 +00:00
IRHM a8ae54359a IMDb import support 2024-12-18 01:19:38 +00:00
Mr 52de4d4fe8 Search: Support special characters (technically breaking) (#713)
Now using query parameters for the search queries (q).

Don't think theres a way to get slashes (/) working in the url without putting the whole query in a query param rather than the path param.

Think this is proper REST too prob
2024-12-08 17:53:40 +00:00
Mr 6c404877f5 Merge pull request #709 from sbondCo/search-by-id
Search by external id
2024-12-05 22:01:57 +00:00
IRHM bb939ccb36 search: support all external ids with aliases 2024-12-05 21:53:19 +00:00
IRHM e43e249890 search: external id search 2024-12-03 23:40:59 +00:00
IRHM 63fee3111a search: fix max page check
encountered a bug where doing a search while last was loading could infinitely keep loading next pages because curPage got higher than maxContentPage.

Corrected the logic to check for curPage bigger OR equal to max page, rather than only checking equal.
2024-12-03 23:08:56 +00:00
IRHM af6bead88e content: create searchByExternalId endpoint 2024-12-03 23:04:37 +00:00
Mr bc5651905e person: show message when no credits to show (#705)
* person: show message when no credits to show

also hides filters when no credits, since they don't do anything in that case.

* person: remove unused css selector
2024-12-01 23:05:13 +00:00
Mr 5b5743210b Person: 'On my list' filter support (#704)
Port based on #671 with changes.

Co-authored-by: Alex Perathoner <31958579+AlexPerathoner@users.noreply.github.com>
2024-12-01 22:49:48 +00:00
Mr 27218e871b Merge pull request #670 from AlexPerathoner/dev
Sort items in people view
2024-11-05 01:20:25 +00:00
IRHM 0106f9c763 person: sortCredits: Remove use of sorted intermediary array, sort credits array directly
I believe this should be more performant (removing the use of spread operator) and is just a little cleaner.
2024-11-05 01:04:55 +00:00
IRHM 5dd4c4c6c6 DropDown: showActiveElementsInOptions: Just use options when true
No need for the filter when this is true, we can just pass the options var.
2024-11-05 00:51:47 +00:00
IRHM 525816a8fc person: Add max-width to .filters ctr, remove min-width, combine with .container
- Removed min-width so improve responsivity for mobile (overflows).
- Removed unused styles (margin-top/bottom that were overridden in .container).
- Add max-width to match PosterList.
- Remove .container and add styles to .filters (combined them).
2024-11-05 00:27:51 +00:00
Alex Perathoner acba239b8a Sort items in people view 2024-10-29 13:48:42 +01:00
IRHM d21eb06600 v1.44.2 2024-10-15 23:41:45 +01:00
IRHM 1cc8acd839 1.44.2-dev 2024-10-15 23:28:50 +01:00
Mr 99ea97a160 Merge pull request #664 from sbondCo/ryot-fix-dates-import
Ryot fix dates import
2024-10-15 22:23:02 +00:00
IRHM 77a0ba39ba issue templates: format all 2024-10-15 23:21:27 +01:00
IRHM e584cf22f7 import: ryot: add ended_on check before parsing date
idk
2024-10-15 23:20:37 +01:00
IRHM c7bb7a264c import: Add note to try refreshing page if missing data on successful import 2024-10-15 23:07:10 +01:00
IRHM f84a04d29b Add createdAt field to watchedEpisodes for ryot import
and don't set it if item is a movie
2024-10-15 23:06:55 +01:00
Mr 31737baf75 Update and rename feature_request.md to 02-feature_request.md 2024-10-14 13:17:01 +00:00
Mr 9f18893149 Rename bug_report.md to 01-bug_report.md 2024-10-14 13:14:31 +00:00
Mr 7c20414229 bug_report.md: Add comment and update eg: values
Added comment to ask for one issue per bug if they are unrelated.
2024-10-14 13:13:26 +00:00
Mr a33f7cc999 Update issue templates 2024-10-14 13:01:23 +00:00
Mr b38991a7d5 GamePoster: Fix focus lost issue on rating/status via quick btns (#659) 2024-10-13 12:52:39 +00:00
IRHM 94ef4cd4da v1.44.1 2024-10-13 13:13:02 +01:00
IRHM 09f6739686 1.44.1-dev 2024-10-13 12:51:03 +01:00
Mr c3b5f44045 Improve download file func - don't make empty files, logs (#658)
- Now makes the out file after the request, that way we ensure the request succeeds before creating the file.
- Added logging to every case, should make debugging easier in the future.
2024-10-13 11:43:16 +00:00
Mr b023763f63 Poster: Fix focus lost after giving status/rating via quick btns (#657)
* Poster: Fix focus loss shrink issue

* PosterRating: Only add extra padding when is-minimal

So we don't alter the spacing when this  component is used on an actual posters
2024-10-13 01:42:48 +00:00
Mr c24fb54c44 Merge pull request #655 from sbondCo/fix-rat
Fix PosterRating minimal option
2024-10-13 01:02:53 +00:00
IRHM 3f40bca286 SeasonsList: Remove explicit width on ratings container, now resized to fit max-content 2024-10-13 01:56:22 +01:00
IRHM e9cc54bd73 PosterRating: Add extra x axis padding 2024-10-13 01:55:56 +01:00
IRHM fd3e57e7bf PosterRating: Fix minimal style
Was used for season/episode ratings, which wouldn't open. Now fixed and works for all rating systems.
2024-10-13 01:46:21 +01:00
Mr 66faf7a741 Create SECURITY.md 2024-10-07 18:49:33 +00:00
IRHM ba28ae14f1 v1.44.0 2024-10-06 22:10:51 +01:00
IRHM 674c1a0e86 1.44.0-dev 2024-10-06 20:18:39 +01:00
IRHM aa754210a4 auth: use secret from config 2024-10-06 19:40:11 +01:00
IRHM 2fbdd5a16a Fix .small-scrollbar style for chromium
.small-scrollbar is used on poster rating/status lists, but wasn't working because we also have the `scrollbar-width` property set, so now if the browser supports the webkit scrollbar styling, we will prefer that over scrollbar-width.

Don't know if this will break safari or whatever but hell if ima download that.

firefox scrollbar looks nice and this will let us keep using scrollbar-width: small wherever we want for that sweet smol bar action in ff
2024-10-04 02:15:07 +00:00
IRHM 09954d2370 Poster: Let title/overview overflow with scroll 2024-10-04 02:15:07 +00:00
Mr 8d34513ab7 Merge pull request #647 from sbondCo/fix-poster-focus
Fix poster focus/accessibility issues and middle clicking
2024-10-03 23:21:04 +00:00
IRHM ed9a9aae7e Poster: fix being re-focused after window regain focus 2024-10-04 00:11:09 +01:00
IRHM 48814c213a Poster: Fix issues i made 11 days ago 2024-10-03 23:27:04 +01:00
IRHM 5a70b8a240 Posters: Fix mouseleave from rating/status menus causing extraDetails to show
hopefully they were left here by accident
2024-09-22 22:08:29 +01:00
IRHM 31ce74545a Posters: Fix mobile tab and hold link 2024-09-22 21:08:53 +01:00
IRHM 2b78581062 Posters: Fix keyboard focus not hiding ExtraDetails
Focus events now do same thing and mouse enter/leave (focusin/out), so we have the same behaviour.
2024-09-22 20:49:04 +01:00
IRHM 6d5aa0feff Poster: Set tabindex to -1 for inner container to avoid extra element to highlight when tabbing through
The inner container is not helpful for highlighting when tabbing through posters. The title of poster can still be used to enter the content via keyboard, the inner container did the same thing so was redundant and only added an extra click for any navigating via keyboard.
2024-09-22 20:39:28 +01:00
IRHM 7cfbc6c344 Posters: Fix focus style (only apply if focused via keyboard) 2024-09-22 20:37:49 +01:00
Mr 64e7929714 Merge pull request #636 from sbondCo/fix-tagmenu-oob
Fix tagmenu oob
2024-09-22 12:55:27 +00:00
IRHM b2f817b639 TagMenu: Use stayInView action, use an element for arrow
TagMenu uses an element for the arrow now so the stayInView action can control its position.
2024-09-22 13:48:52 +01:00
IRHM 7a3e5f4354 norm.scss: .menu support using an element with .arrow class instead of ::before pseudoelement when more control is needed
more control = need to be able to move it in js.

Still supports using ::before, so not all menus need updating and can stay simple, just the menus needing more control can start using an actual element for the arrow.
2024-09-22 13:46:50 +01:00
IRHM f033a50632 stayInView: Make logs debug scope, fix log in update func 2024-09-22 13:44:30 +01:00
IRHM e3ace9f2fe Create stayInView action
Currently will only shift elements back into view if out of bounds on the left.

Not necessary at the moment to support oob on other sides, or support resizing to fit. Maybe in the future when it's used more.
2024-09-22 13:43:09 +01:00
dependabot[bot] f07c2c797b ui: bump prettier-plugin-svelte from 3.2.3 to 3.2.6 (#616)
Bumps [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte) from 3.2.3 to 3.2.6.
- [Changelog](https://github.com/sveltejs/prettier-plugin-svelte/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/prettier-plugin-svelte/compare/v3.2.3...v3.2.6)

---
updated-dependencies:
- dependency-name: prettier-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-19 22:16:09 +00:00
dependabot[bot] 1a8da9137a ui: bump svelte-check from 3.8.6 to 4.0.2 (#628)
Bumps [svelte-check](https://github.com/sveltejs/language-tools) from 3.8.6 to 4.0.2.
- [Release notes](https://github.com/sveltejs/language-tools/releases)
- [Commits](https://github.com/sveltejs/language-tools/compare/svelte-check-3.8.6...svelte-check-4.0.2)

---
updated-dependencies:
- dependency-name: svelte-check
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-19 22:14:02 +00:00
dependabot[bot] 2476833a19 server: bump golang.org/x/crypto from 0.26.0 to 0.27.0 in /server (#624)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.26.0 to 0.27.0.
- [Commits](https://github.com/golang/crypto/compare/v0.26.0...v0.27.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-19 22:11:58 +00:00
dependabot[bot] 9f89d2101c ui: bump @sveltejs/adapter-node from 5.0.1 to 5.2.3 (#635)
Bumps [@sveltejs/adapter-node](https://github.com/sveltejs/kit/tree/HEAD/packages/adapter-node) from 5.0.1 to 5.2.3.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/adapter-node/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/adapter-node@5.2.3/packages/adapter-node)

---
updated-dependencies:
- dependency-name: "@sveltejs/adapter-node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-19 22:09:27 +00:00
dependabot[bot] c3db5054b4 server: bump gorm.io/gorm from 1.25.11 to 1.25.12 in /server (#623)
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.25.11 to 1.25.12.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.25.11...v1.25.12)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-19 22:07:36 +00:00
dependabot[bot] f96562e2df ui: bump @sveltejs/kit from 2.5.24 to 2.5.27 (#629)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.5.24 to 2.5.27.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.5.27/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-19 22:05:37 +00:00
dependabot[bot] 22163950ef ui: bump vite from 5.2.11 to 5.4.6 (#631)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.11 to 5.4.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-19 22:04:18 +00:00
Mr c80d5cabcb Add format_check_go job (#634)
* test-pr.yml: Add format_check_go job

* separate test-pr into two files for client and server

so we can set the `paths` property and make the jobs only run when changes are detected for the client or server

* test breaking formatting

* correct formatting

* test-pr-server.yml: uncomment yml path

test has succeeded
2024-09-19 21:59:04 +00:00
Mr d3cfc9258f Merge pull request #633 from sbondCo/fix-no-filtering-tag-page
Fix no filtering tag page and other stuffs i found
2024-09-19 01:29:02 +00:00
IRHM 74ff9f04dd FilterMenu: Remove array join from class name on clear button 2024-09-19 02:25:32 +01:00
IRHM 28f13836a1 WatchedList: Clear Filters btn when filters hiding all results 2024-09-19 01:53:21 +01:00
IRHM 242e70c9ec store: fix clear filters func name
y did me name features ;-()
2024-09-19 01:52:57 +01:00
IRHM 4bf2e0b376 FilterMenu: Keep height same with and without clear btn 2024-09-19 01:47:50 +01:00
IRHM 144244bd5e TagMenu: Fix title text and a comment in deleteTag() 2024-09-19 01:44:15 +01:00
IRHM 473f8f6319 FilterMenu: Clear filters button 2024-09-19 01:43:52 +01:00
IRHM b86ab4229f Icon: Fix ticket and filter-circle colors 2024-09-19 01:39:24 +01:00
IRHM 8f20589faa Show filter/sort btns on tag page 2024-09-19 01:03:16 +01:00
IRHM 33c2000182 Tag: Make empty tag page error nicer
Added icon, consistent font sizes to watched list empty error
2024-09-19 01:02:33 +01:00
IRHM 0505d265fe WatchedList: Improve empty list error to take active filters into account 2024-09-19 01:00:57 +01:00
Mr f8e5a668f8 Merge pull request #618 from AlexPerathoner/dev
Import: add todomovies
2024-09-16 23:52:38 +00:00
IRHM 447ee2e82f import/process: Add status table header and fix status dropdown PLANNED option
Status table header was missing, corrected dropdown value from PLANNING to PLANNED
2024-09-17 00:21:57 +01:00
IRHM fe7730dbcc tags: Rename getTag to getTagByNameAndColor
and formatted code, updated some logs
2024-09-16 23:58:13 +01:00
IRHM 09ac804730 import: Move trakt import button higher
Probably a more famous import option, so moving it a bit higher in the list
2024-09-16 23:57:19 +01:00
IRHM 0f24623384 Icon: Fix todomovies icon
simplified and removed fill so styling can color it
2024-09-16 23:56:37 +01:00
Mr 964c71382a Merge pull request #627 from sbondCo/new-rating-systems
New rating systems
2024-09-15 21:14:29 +00:00
IRHM 65f8f67e4d Rating: Remove debug text 2024-09-15 21:36:20 +01:00
IRHM 8b92d42634 RatingSetting: Allow overflow
Allow scrolling if too smol
2024-09-15 21:30:15 +01:00
IRHM 1cab95370b StarRating: Fix firefox mobile clicks not saving rating and the jitter after selecting a rating
We now wait for the save request to complete before unfocusing the stars, which avoids the jitter where it snaps back to actual rating before snapping to new rating when it finally saves
2024-09-15 21:16:28 +01:00
IRHM b5fac676e9 StarRating: Remove tap highlight 2024-09-15 18:36:53 +01:00
IRHM b67b0acc9a toShowableRating: Round OutOf5 Point1 result 2024-09-15 18:27:15 +01:00
IRHM c2fe4486d9 StarRating: Save selected rating on touchEnd 2024-09-15 18:21:46 +01:00
IRHM 88fea6a8bd StarRating: Fix oneStarWidth
Is smaller when the media query makes the letter-spacing smaller. If i need to change this again, might be better to get it dynamically, but on component load and window resize instead of in each func call?
2024-09-15 16:13:39 +01:00
IRHM 6b64aa0d89 StarRating: Off right check better 2024-09-15 16:02:11 +01:00
IRHM df3955cfe1 Rating: Make more responsive 2024-09-15 15:38:31 +01:00
IRHM 8359be7bee StarRating: Extra checks to keep text on screen 2024-09-15 15:23:21 +01:00
IRHM 15f4a98ccb StarRating: Fix rating texts being one off or completely wrong for OutOf5 2024-09-15 02:58:13 +01:00
IRHM 02e9654791 ExtraDetails now a component and supports rating scaling
- Moved ExtraDetails (from Poster and GamePoster) to its own component for reuse, also no longer one line.
- Consolodated ExtraDetails and ExtraDetailsGame types into one type: PosterExtraDetails.
- Created Rating helpers lib. Contains: toShowableRating() and toWhichThumb()
- Fix extra detail dates not listing for games on search page
2024-09-14 23:31:44 +01:00
IRHM 8fd570ad5c StarRating: Restore the longer 100ms transition for rating text 2024-09-14 19:52:50 +01:00
IRHM bd10d6854a StarRating: Fix centering issue in moveRatingText func
Instead of trying to center the rating text element ourselves by using its width/2, we can just simply rely on the tranlateX -50% style instead of removing it.
2024-09-14 19:50:23 +01:00
IRHM 6249134dd6 StarRating: Fix showing hoveredRating when 0 2024-09-10 01:44:09 +01:00
IRHM 5d425cadd6 StarRating: Comment log 2024-09-09 01:24:04 +01:00
IRHM 695015b481 PosterRating: Separate rating popup for minimal usage
Used for Season/Episode ratings.... probably should separate that out or support the rating systems there in the future
2024-09-09 01:21:09 +01:00
IRHM 8d81b96692 poster ratings 2024-09-09 01:10:04 +01:00
IRHM 0bc9aa612c StarRating: Fix shown ratings
Should work in all cases when swapping between star systems/steps now
2024-09-06 01:26:48 +01:00
IRHM 968212e189 StarRating: Show ratingText with svelte
Fixes responsive var issues where the value of hoveredRating was for the old one
2024-09-06 01:05:56 +01:00
IRHM 4ab2267867 StarRating: Show rating in ratingText for .1 increments 2024-09-06 00:40:30 +01:00
IRHM 2cfe39f276 StarRating: Wrap try/catch around moveRatingText 2024-09-06 00:34:24 +01:00
IRHM a155e1eeea StarRating: Get ratingText working again 2024-09-06 00:31:24 +01:00
IRHM 81299f30de StarRating: Scale rating before saving 2024-09-06 00:03:23 +01:00
IRHM 17349e8367 ThumbRating: Show rating and save 2024-09-05 23:49:55 +01:00
IRHM f2faad3886 Save rating settings, separate StarRating to its own component, create ThumRating component, RatingStep is now an enum to avoid using decimal value on server 2024-09-05 23:41:39 +01:00
IRHM 451a5923d4 rating now float64
Seems to actually be accurate for what we need, I think we should just use float64 instead of importing a library for decimal values (if it continues working and i find no more issues)
2024-09-05 16:18:36 +01:00
Alex Perathoner 5e3ed9ceed import: add todomovies
Added:
- button in /import
- process of .todomovieslist files
- tags from import
2024-09-03 16:39:56 +02:00
IRHM 57f29c054a Rating: Fix rating being reset before being saved
Because of a bug with mouseleave tirggering when a star is clicked directly and browser focused at same time.

Also renamed handleStarHoverEnd->handleRatingHoverEnd since its now on the rating wrap element instead of a star element
2024-09-03 00:45:32 +01:00
IRHM be10df1c57 Rating: Uncomment save rating code 2024-09-03 00:44:25 +01:00
IRHM baba2fad4d Rating: Keyboard support, fix type errors, moved things around, some cleanup 2024-09-03 00:18:01 +01:00
IRHM bad4f505ef Watched: Rating now a float32 instead of int8
The only backwards compatible way to support the new rating systems is to turn ratings into a float, still max 10.
2024-09-03 00:16:47 +01:00
IRHM 4390f02f4d WIP: New Rating System
Most of the client work is done:
- Added new RatingSystem and RatingStep settings
- Rating component now supports all systems and steps (minus thumbs)

Thumbs and server work for saving user setting and then testing! yupee
2024-09-01 20:57:30 +01:00
dependabot[bot] a790e0d4e0 ui: bump svelte from 4.2.17 to 4.2.19 (#611)
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.2.17 to 4.2.19.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/svelte@4.2.19/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.2.19/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-31 16:26:49 +00:00
IRHM 3ccd983a5e v1.43.0 2024-08-30 01:00:21 +01:00
IRHM 760de9dead 1.43.0-dev 2024-08-30 00:42:10 +01:00
Mr b997b421fa Preload last season viewed (#609)
* Save requested season number in `LastViewedSeason` property

When season details are requested and a watchedId is passed as a query parameter, the requested season number is now saved in the watched entries `LastViewedSeason` property.

* SeasonsList: Restore activeSeason and update state after request with new lastViewedSeason value

* get season details route: add extra log for else case where no watchedId is found
2024-08-29 01:53:05 +00:00
Mr 208a66f303 person: Fix credits not changing if nav between two people (#608) 2024-08-26 21:04:40 +00:00
Mr d431f4a434 page titles (profile, content, person) (#607)
* page titles (profile, content, person)

* person: remove log
2024-08-26 20:47:23 +00:00
dependabot[bot] b571239312 ui: bump svelte-check from 3.8.5 to 3.8.6 (#604)
Bumps [svelte-check](https://github.com/sveltejs/language-tools) from 3.8.5 to 3.8.6.
- [Release notes](https://github.com/sveltejs/language-tools/releases)
- [Commits](https://github.com/sveltejs/language-tools/compare/svelte-check-3.8.5...svelte-check-3.8.6)

---
updated-dependencies:
- dependency-name: svelte-check
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 20:17:06 +00:00
dependabot[bot] 126717ecdc ui: bump tslib from 2.6.2 to 2.7.0 (#605)
Bumps [tslib](https://github.com/Microsoft/tslib) from 2.6.2 to 2.7.0.
- [Release notes](https://github.com/Microsoft/tslib/releases)
- [Commits](https://github.com/Microsoft/tslib/compare/v2.6.2...v2.7.0)

---
updated-dependencies:
- dependency-name: tslib
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 20:16:42 +00:00
dependabot[bot] 374fc59499 ui: bump eslint-plugin-svelte from 2.41.0 to 2.43.0 (#603)
Bumps [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte) from 2.41.0 to 2.43.0.
- [Release notes](https://github.com/sveltejs/eslint-plugin-svelte/releases)
- [Commits](https://github.com/sveltejs/eslint-plugin-svelte/compare/eslint-plugin-svelte@2.41.0...eslint-plugin-svelte@2.43.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 20:16:28 +00:00
dependabot[bot] c8db3093be ui: bump svelte-eslint-parser from 0.39.2 to 0.41.0 (#606)
Bumps [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser) from 0.39.2 to 0.41.0.
- [Release notes](https://github.com/sveltejs/svelte-eslint-parser/releases)
- [Changelog](https://github.com/sveltejs/svelte-eslint-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte-eslint-parser/compare/v0.39.2...v0.41.0)

---
updated-dependencies:
- dependency-name: svelte-eslint-parser
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 20:14:13 +00:00
IRHM e182799ca9 v1.42.0 2024-08-25 23:33:16 +01:00
IRHM 870f2614b5 Import: fix trakt button colors for dark theme 2024-08-25 23:25:10 +01:00
IRHM 0e88f40a99 Tag: Fix icon color for dark theme 2024-08-25 23:22:21 +01:00
IRHM faead2ebd3 TagMenu: Move menu more to left 2024-08-25 23:17:31 +01:00
IRHM 416098b53d 1.42.0-dev1 2024-08-25 21:54:22 +01:00
IRHM 73c756a780 doc/README: Include link to live site 2024-08-25 21:41:33 +01:00
dependabot[bot] b7d261bad4 server: bump github.com/go-co-op/gocron/v2 in /server (#587)
Bumps [github.com/go-co-op/gocron/v2](https://github.com/go-co-op/gocron) from 2.7.0 to 2.11.0.
- [Release notes](https://github.com/go-co-op/gocron/releases)
- [Commits](https://github.com/go-co-op/gocron/compare/v2.7.0...v2.11.0)

---
updated-dependencies:
- dependency-name: github.com/go-co-op/gocron/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-25 19:50:02 +00:00
dependabot[bot] c8203187a7 server: bump gorm.io/gorm from 1.25.10 to 1.25.11 in /server (#584)
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.25.10 to 1.25.11.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.25.10...v1.25.11)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-25 15:03:07 +00:00
dependabot[bot] 3014019692 ui: bump svelte-preprocess from 5.1.4 to 6.0.2 (#586)
Bumps [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess) from 5.1.4 to 6.0.2.
- [Changelog](https://github.com/sveltejs/svelte-preprocess/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.4...v6.0.2)

---
updated-dependencies:
- dependency-name: svelte-preprocess
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-25 01:02:01 +00:00
dependabot[bot] 9e2f60fa56 ui: bump typescript from 5.4.5 to 5.5.4 (#588)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.5 to 5.5.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.5...v5.5.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-25 00:56:54 +00:00
dependabot[bot] 7642655ef0 ui: bump svelte-check from 3.7.1 to 3.8.5 (#590)
Bumps [svelte-check](https://github.com/sveltejs/language-tools) from 3.7.1 to 3.8.5.
- [Release notes](https://github.com/sveltejs/language-tools/releases)
- [Commits](https://github.com/sveltejs/language-tools/compare/svelte-check-3.7.1...svelte-check-3.8.5)

---
updated-dependencies:
- dependency-name: svelte-check
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-25 00:55:45 +00:00
dependabot[bot] a28d199431 ui: bump axios from 1.7.2 to 1.7.4 (#600)
Bumps [axios](https://github.com/axios/axios) from 1.7.2 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.2...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-25 00:53:07 +00:00
dependabot[bot] cf387d1c0a server: bump golang.org/x/crypto from 0.24.0 to 0.26.0 in /server (#593)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.24.0 to 0.26.0.
- [Commits](https://github.com/golang/crypto/compare/v0.24.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-25 00:52:20 +00:00
dependabot[bot] 64f31a234e ui: bump @sveltejs/kit from 2.5.10 to 2.5.24 (#596)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.5.10 to 2.5.24.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.5.24/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-25 00:49:19 +00:00
Mr 09d1c513d6 api: Use location to create baseURL var in dev mode (#599)
Makes it easier when accessing the vite dev server from outside the local machine, instead of making me change the variable to my machines local ip all the time
2024-08-25 00:46:01 +00:00
Mr 89f703ae9b Close all sub menus on nav bar after a navigation (#598) 2024-08-25 00:34:19 +00:00
Mr ae09de6f71 Merge pull request #597 from sbondCo/tags
Tags
2024-08-25 00:28:37 +00:00
IRHM 7c39a0649a Tag: remove unused css 2024-08-25 01:21:48 +01:00
IRHM 035d68a103 Add AddToTagButton to Movies and Games pages 2024-08-25 01:02:29 +01:00
IRHM 3b501e73c8 Tag: Add subtitle with some more info on empty tag text 2024-08-25 00:55:55 +01:00
IRHM d7353fc2a7 Support editing tags
by clicking on the tag in the tag page.. not very obvious, may need some way to make it so
2024-08-25 00:52:15 +01:00
IRHM c65579c0f6 Nav: Close tagMenu when tag clicked 2024-08-25 00:19:00 +01:00
IRHM 0a886f0062 DeleteTagModal: Also remove tag from all watched entries 2024-08-25 00:14:50 +01:00
IRHM a347e6dc97 Finish DeleteTagModal 2024-08-25 00:09:04 +01:00
IRHM a9088c9626 wip: Tag deletion (route working, modal nearly done) 2024-08-20 17:27:07 +01:00
IRHM a19d61a16d Tag: Show tag icon instead of 'viewing tag' text 2024-08-20 15:51:00 +01:00
IRHM 003c8e724c Tag: Add 'viewing tag:' text 2024-08-20 15:47:37 +01:00
IRHM 053fc28371 Fix nav input responsiveness 2024-08-20 15:47:23 +01:00
IRHM 9d8ae819a7 Fix nav menu positions 2024-08-20 15:36:54 +01:00
IRHM 658b9f356c Tag: not exist errors 2024-08-19 16:18:25 +01:00
IRHM becf9dd601 basic tag view page 2024-08-19 16:07:19 +01:00
IRHM b74ecbddf7 AddToTagButton: Close menu on scroll 2024-08-19 14:36:47 +01:00
IRHM 38e52bd821 Tagging and untagging watched content working 2024-08-18 20:25:36 +01:00
IRHM c3e08b2dc0 watched: getWatched: Preload Tags and format each call in chain to newline 2024-08-17 18:15:51 +01:00
IRHM f0019b540a OnTagClick 2024-08-17 18:15:20 +01:00
IRHM b0a72bf636 tag watched route 2024-08-17 00:43:17 +01:00
IRHM 1701dd560e Make TagMenu more reusable, create AddToTagButton
Started working on adding content to tag button (from the content page), will likely have to have other ways of adding content to a tag
2024-08-16 23:20:43 +01:00
IRHM 7ddb880843 Tag creation working
- New Tag component (to display a tag button)
- Modified tag color presets to be more readable
2024-08-14 00:13:42 +01:00
IRHM f0c929d743 Modal: New error property
Just simplifies what we have been doing in other places where we use the  Modal component; making an error span at the top.
2024-08-14 00:12:16 +01:00
IRHM a7fc789056 Basic tag creation modal, color selector 2024-08-11 23:31:43 +01:00
IRHM 11cf23acb8 Start work on tags 2024-08-11 00:07:23 +01:00
IRHM c05c271e1b Dockerfile: update backend image to golang:1.22-alpine
becuase we use go 1.22 now
2024-07-13 23:10:11 +01:00
IRHM 9dd7ecbff1 1.42.0-dev 2024-07-13 23:05:23 +01:00
oPisiti 96ec6f2c8e Fixed unit oversight (#578) 2024-07-13 21:58:45 +00:00
Mr ae707df709 job: support adding unique jobs (by name) (#583) 2024-07-13 21:57:16 +00:00
Mr 4bbc7ad869 Trakt import (#582)
* wip

* wip

* wip

* wip (also update go version)

* wip

* wip

* wip looks like its working

* increase job done time before deletion

30m seems more reasonable?
2024-07-13 21:27:59 +00:00
Mr 953dcf0034 doc: Create backup guide (#573)
* doc: Create backup guide

* doc: backup: correct grammar i think
2024-07-02 21:08:15 +00:00
IRHM fb4bf1e372 v1.41.0 2024-06-28 04:31:25 +01:00
IRHM ff067d28e6 1.41.0-dev5 2024-06-28 04:10:10 +01:00
IRHM 950e9afffb search: fix loader being hidden after a running request is cancelled
When a search request is running, and the query is changed, the previous request cancellation would hide the loader just after the new request started loading, resulting in the loader being hidden for the duration of the request being completed. Now the loader will only hide if the request errors, not for cancellations too which was causing this issue
2024-06-28 04:09:38 +01:00
IRHM ee15f64e55 1.41.0-dev4 2024-06-28 03:36:42 +01:00
IRHM 7888e0490f #566 Add max=10 validation to Rating in import/watched eps and seasons 2024-06-28 03:35:18 +01:00
IRHM bf45f1a279 1.41.0-dev3 2024-06-28 02:50:20 +01:00
IRHM 0299f03aa1 Ryot import: fix ratings
Ratings are out of 100 on ryot, scaled them down to fit with our out of 10 rating system
2024-06-28 02:48:23 +01:00
IRHM 56d1ed9f10 1.41.0-dev2 2024-06-28 02:29:52 +01:00
oPisiti 855b8722de Ryot import implementation (#563)
* Initial implementation of ryot import process

* Bug fixes for movie imports and show ratings

* Cleanup

* Added Ryot's logo to import button

* Ryot import now supports the DROPPED flag for shows

* Formatted the code and added restrictions for tv shows and movies only

* Better units

* Prettier format

* Fix type errors, change stat styling to push value down

---------

Co-authored-by: IRHM <37304121+IRHM@users.noreply.github.com>
2024-06-28 01:23:04 +00:00
IRHM aff99b5fa5 README: Add third party tools section with kodi plugin 2024-06-27 20:53:03 +01:00
IRHM d4683fb89d search: update page destroyed log 2024-06-26 03:30:43 +01:00
IRHM b61855d00f search: stop afterNavigate running when we only want onMount to 2024-06-26 03:29:46 +01:00
IRHM 3ee763fe29 Search: Support cancelling running searches
with only a few bugs introduced!
2024-06-26 03:10:35 +01:00
IRHM 03f7c51655 Search: Fix big jump when clicking try again and we fail again
Added same margin-bottom to the spinner.
2024-06-26 02:00:46 +01:00
IRHM 0c95468f93 Search: Comment out curPage 2024-06-25 02:18:20 +01:00
IRHM f7b96fb4b9 1.41.0-dev1 2024-06-25 02:16:13 +01:00
IRHM 471f3e3f6f Search: Fix race cond potentially causing all pages to load in background 2024-06-25 02:15:26 +01:00
IRHM 091bce7383 Search: Add comment to curPage increment in multi results 2024-06-25 01:58:33 +01:00
IRHM e3cec34c8b Search: Fix 'try again' not working if initial multi results failed to load 2024-06-25 01:57:18 +01:00
IRHM 4b82913308 1.41.0-dev 2024-06-25 00:49:31 +01:00
IRHM 0a50ead42a Search: Don't show games filter if games are not enabled on server 2024-06-25 00:43:15 +01:00
dependabot[bot] 1428b33279 server: bump github.com/go-co-op/gocron/v2 in /server (#557)
Bumps [github.com/go-co-op/gocron/v2](https://github.com/go-co-op/gocron) from 2.5.0 to 2.7.0.
- [Release notes](https://github.com/go-co-op/gocron/releases)
- [Commits](https://github.com/go-co-op/gocron/compare/v2.5.0...v2.7.0)

---
updated-dependencies:
- dependency-name: github.com/go-co-op/gocron/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:27:40 +00:00
dependabot[bot] 91bf6a6adf ui: bump eslint-plugin-svelte from 2.39.0 to 2.41.0 (#558)
Bumps [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte) from 2.39.0 to 2.41.0.
- [Release notes](https://github.com/sveltejs/eslint-plugin-svelte/releases)
- [Commits](https://github.com/sveltejs/eslint-plugin-svelte/compare/v2.39.0...eslint-plugin-svelte@2.41.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:26:42 +00:00
dependabot[bot] cbafb8c77b ui: bump svelte-eslint-parser from 0.36.0 to 0.39.2 (#559)
Bumps [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser) from 0.36.0 to 0.39.2.
- [Release notes](https://github.com/sveltejs/svelte-eslint-parser/releases)
- [Changelog](https://github.com/sveltejs/svelte-eslint-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte-eslint-parser/compare/v0.36.0...v0.39.2)

---
updated-dependencies:
- dependency-name: svelte-eslint-parser
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:26:26 +00:00
dependabot[bot] ec12281e9b ui: bump @typescript-eslint/eslint-plugin from 7.12.0 to 7.14.1 (#560)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.12.0 to 7.14.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.14.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:25:37 +00:00
dependabot[bot] e65afd8b9d workflow: bump docker/build-push-action from 5 to 6 (#545)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:20:12 +00:00
dependabot[bot] 49d1411e47 server: bump gorm.io/driver/sqlite from 1.5.5 to 1.5.6 in /server (#546)
Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.5.5 to 1.5.6.
- [Commits](https://github.com/go-gorm/sqlite/compare/v1.5.5...v1.5.6)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:18:15 +00:00
dependabot[bot] 7ba0b8106d ui: bump prettier from 3.2.5 to 3.3.2 (#549)
Bumps [prettier](https://github.com/prettier/prettier) from 3.2.5 to 3.3.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.5...3.3.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:16:03 +00:00
dependabot[bot] b7cfb904a2 server: bump golang.org/x/crypto from 0.23.0 to 0.24.0 in /server (#539)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.23.0 to 0.24.0.
- [Commits](https://github.com/golang/crypto/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:15:17 +00:00
Mr eed3a7cee7 Merge pull request #562 from sbondCo/search-pages
Search: Infinite scrolling and serverside content type filters
2024-06-24 23:11:25 +00:00
IRHM 014984cdd1 Search: Comment out page num and log instead
Kind of wanted to display the page number somewhere but I can't think of where it could go
2024-06-24 23:53:04 +01:00
IRHM c1f0a954bf Search: Return nothing if higher page than 1 is requested for games
Doesn't support pagination, fixes showing duplicate games on multi search when scrolling down.
2024-06-24 02:25:54 +01:00
IRHM 5ca7841e61 Search: Auto load next page if first doesn't fill page 2024-06-24 02:24:50 +01:00
IRHM 54f8dd8912 Search: Better error handling, add retry button 2024-06-24 02:00:04 +01:00
IRHM fc4cbf3c66 Search: Basic infinite scrolling 2024-06-23 18:24:15 +01:00
IRHM b4cc8f85b7 search: Use new search routes for filters
Instead of using a local filter of `multi`+`game` results.
2024-06-23 18:09:42 +01:00
IRHM 4056178be4 content: Create movie, tv and person search services/routes 2024-06-22 01:03:03 +01:00
IRHM 2aab7b3fce routes: content: Move /:query route to /search/multi/:query 2024-06-22 01:02:12 +01:00
IRHM 9df978a4fd searchContent: Support pagination 2024-06-11 23:50:20 +01:00
IRHM d2a8e54ce0 v1.40.0 2024-06-09 18:28:04 +01:00
IRHM a1d8a894b3 1.40.0-dev2 2024-06-09 17:30:45 +01:00
IRHM dc984fae1f watched_hooks: Update season to watching when held or dropped too 2024-06-09 17:25:08 +01:00
IRHM 1a3c9e0880 watched: WatchedStatus: Fix HOLD value
Has always been set as HOLD from frontend apparently, never used this value before on server so must've missed it (until now, i wasted a lot of time ;().
2024-06-09 17:24:49 +01:00
IRHM 95debb0551 watched_hooks: Set season to watching in more cases, fix reason string 2024-06-09 16:36:50 +01:00
IRHM f3e8377f34 watched_hooks: remove first check, dropped episode statuses will be processed
Fixes the problem where if the user drops the last episode in a season, it wouldn't complete the season, since we wouldn't process it.
2024-06-09 16:19:53 +01:00
IRHM 00bd652752 1.40.0-dev1 2024-06-09 05:21:38 +01:00
IRHM 214abd4110 watched_hooks: comment note of boog 2024-06-09 05:20:41 +01:00
IRHM 22bdadc0db Activity: Fix header font-family 2024-06-09 05:15:00 +01:00
IRHM 04a17af9ca watched_hooks: Fix finishing season when already finished, season status response 2024-06-09 05:11:34 +01:00
IRHM b90dc289f6 watched_hooks: Fix response watchedSeason status when watchedSeason was just created 2024-06-09 05:01:43 +01:00
IRHM 34ab553cd6 1.40.0-dev 2024-06-09 02:25:46 +01:00
dependabot[bot] 85c2c430ce ui: bump eslint-plugin-svelte from 2.35.1 to 2.39.0 (#529)
Bumps [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte) from 2.35.1 to 2.39.0.
- [Release notes](https://github.com/sveltejs/eslint-plugin-svelte/releases)
- [Changelog](https://github.com/sveltejs/eslint-plugin-svelte/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/eslint-plugin-svelte/compare/v2.35.1...v2.39.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-09 01:15:12 +00:00
dependabot[bot] c8c24d9958 ui: bump @sveltejs/kit from 2.5.3 to 2.5.10 (#530)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.5.3 to 2.5.10.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.5.10/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-09 01:13:59 +00:00
dependabot[bot] 87035f1ee8 ui: bump @typescript-eslint/eslint-plugin from 7.8.0 to 7.12.0 (#534)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.8.0 to 7.12.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.12.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-09 01:11:48 +00:00
dependabot[bot] d5b37ac423 ui: bump axios from 1.6.8 to 1.7.2 (#533)
Bumps [axios](https://github.com/axios/axios) from 1.6.8 to 1.7.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.8...v1.7.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-09 01:09:39 +00:00
Mr 02867d26db plex: Comment out ViewMode property from structs (#538) 2024-06-09 01:07:10 +00:00
Mr eb146517fb Merge pull request #537 from sbondCo/update-related-stuff-setting
AutomateShowStatuses setting
2024-06-09 01:00:25 +00:00
IRHM 5dd4e8f333 AutomateShowStatuses setting
Disables hookEpisodeStatusChanged and will disable future related hooks when they are made
2024-06-09 01:49:49 +01:00
Mr 697a1ecb89 Merge pull request #536 from sbondCo/update-related-stuff
Episode automations
2024-06-08 19:59:37 +00:00
IRHM 15b7fd564b watched_hooks: Make EpisodeStatusChangedHookResponse->WatchedSeason a pointer
Also removed TODO comments and added check to ensure hook response has any keys SeasonsListEpisode
2024-06-08 20:44:28 +01:00
IRHM 0bee8b4fde watched_hooks: Fix watchedSeason response when FINISHED status is set
We weren't ensuring that the whole watched season object was set to hookResponse.WatchedSeason first, so they client wouldn't get the WatchedSeason `id` (so couldn't update the season).
2024-06-08 20:28:28 +01:00
IRHM 64223e9fa5 Mostly finalize episode automations 2024-06-08 20:20:50 +01:00
IRHM faf6df5de5 wip: Basic episode hook to update season/show status
New hookEpisodeStatusChanged method (and others to assist) that performs various checks to see if we should also update the season/shows status.
2024-06-07 15:05:10 +01:00
IRHM 45496fa61a Content: seasonDetails: Manually cache function
Handle caching manually in the function, so it can be used in other places.
2024-06-07 15:03:16 +01:00
dependabot[bot] f5a0495fa9 ui: bump svelte from 4.2.15 to 4.2.17 (#527)
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.2.15 to 4.2.17.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/svelte@4.2.17/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.2.17/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 03:18:51 +00:00
dependabot[bot] 2461ba65c9 server: bump github.com/gin-gonic/gin from 1.9.1 to 1.10.0 in /server (#521)
Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.9.1 to 1.10.0.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gin-gonic/gin/compare/v1.9.1...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 16:48:19 +00:00
dependabot[bot] a61de6a831 server: bump github.com/gin-contrib/cache from 1.2.0 to 1.3.0 in /server (#522)
Bumps [github.com/gin-contrib/cache](https://github.com/gin-contrib/cache) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/gin-contrib/cache/releases)
- [Changelog](https://github.com/gin-contrib/cache/blob/master/.goreleaser.yaml)
- [Commits](https://github.com/gin-contrib/cache/compare/v1.2.0...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/gin-contrib/cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 16:45:12 +00:00
dependabot[bot] d7e1a8d5a5 ui: bump svelte-eslint-parser from 0.33.1 to 0.36.0 (#520)
Bumps [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser) from 0.33.1 to 0.36.0.
- [Release notes](https://github.com/sveltejs/svelte-eslint-parser/releases)
- [Changelog](https://github.com/sveltejs/svelte-eslint-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte-eslint-parser/compare/v0.33.1...v0.36.0)

---
updated-dependencies:
- dependency-name: svelte-eslint-parser
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 16:42:10 +00:00
dependabot[bot] 27fcba929e ui: bump @vite-pwa/sveltekit from 0.3.0 to 0.5.0 (#512)
Bumps [@vite-pwa/sveltekit](https://github.com/vite-pwa/sveltekit) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/vite-pwa/sveltekit/releases)
- [Commits](https://github.com/vite-pwa/sveltekit/compare/v0.3.0...v0.5.0)

---
updated-dependencies:
- dependency-name: "@vite-pwa/sveltekit"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 16:41:23 +00:00
dependabot[bot] dff50559bc ui: bump svelte-preprocess from 5.1.3 to 5.1.4 (#519)
Bumps [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess) from 5.1.3 to 5.1.4.
- [Changelog](https://github.com/sveltejs/svelte-preprocess/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte-preprocess/compare/v5.1.3...v5.1.4)

---
updated-dependencies:
- dependency-name: svelte-preprocess
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 16:38:11 +00:00
Mr 62ca49816d Merge pull request #526 from sbondCo/better-tasks
Better tasks
2024-05-21 16:34:21 +00:00
IRHM 127b2481e0 TaskScheduleModal: Remove unused css 2024-05-21 17:32:37 +01:00
IRHM 6c8b2235f1 TaskScheduleModal: Sort tasks 2024-05-21 17:14:12 +01:00
dependabot[bot] ef12ad5f2c --- (#525)
updated-dependencies:
- dependency-name: svelte-check
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 13:08:03 +00:00
IRHM ab1da011e6 TaskScheduleModal: Reschedule loading notif, increase getTasksInterval to 8s 2024-05-20 23:56:24 +01:00
IRHM eb643ba5f7 tasks: Save schedule to config when rescheduling 2024-05-20 23:55:52 +01:00
IRHM ebc954e6d4 TaskScheduleModal: Basic rescheduling 2024-05-20 23:38:53 +01:00
IRHM a17aac9303 TaskScheduleModal: Display next run times 2024-05-20 23:17:28 +01:00
dependabot[bot] 21a35a2daa ui: bump vite from 5.2.8 to 5.2.11 (#518)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.8 to 5.2.11.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.2.11/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-19 21:12:05 +00:00
IRHM 0b8fb35809 Settings: Simple TaskScheduleModal
Currently only displays the schedules
2024-05-19 22:11:14 +01:00
IRHM aa2555cb36 tasks: Rework taskFuncs so we can return seconds in getAllTasks 2024-05-19 22:10:17 +01:00
IRHM 127393245d tasks: Create task_schedule config
Use it, just need a frontend and way to edit it.
2024-05-19 21:20:23 +01:00
IRHM 7868015ce6 tasks: Replace tasks scheduling with go-cron
The server can now handle rescheduling the tasks (just need to save schedules in config).
2024-05-19 21:03:43 +01:00
dependabot[bot] 7e40fe0eda ui: bump @typescript-eslint/parser from 7.6.0 to 7.8.0 (#506)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.6.0 to 7.8.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.8.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 22:37:44 +00:00
dependabot[bot] 16688b6932 ui: bump prettier-plugin-svelte from 3.2.2 to 3.2.3 (#483)
Bumps [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte) from 3.2.2 to 3.2.3.
- [Changelog](https://github.com/sveltejs/prettier-plugin-svelte/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/prettier-plugin-svelte/compare/v3.2.2...v3.2.3)

---
updated-dependencies:
- dependency-name: prettier-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 22:34:04 +00:00
dependabot[bot] 3513f0da4b ui: bump @typescript-eslint/eslint-plugin from 7.4.0 to 7.8.0 (#507)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.4.0 to 7.8.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.8.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 22:33:30 +00:00
dependabot[bot] c85fd32f0b ui: bump svelte from 4.2.12 to 4.2.15 (#501)
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.2.12 to 4.2.15.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/svelte@4.2.15/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.2.15/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 22:30:26 +00:00
dependabot[bot] c8523799be server: bump gorm.io/gorm from 1.25.9 to 1.25.10 in /server (#505)
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.25.9 to 1.25.10.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.25.9...v1.25.10)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 22:28:39 +00:00
dependabot[bot] 050798f7a1 server: bump github.com/gin-contrib/cors from 1.7.1 to 1.7.2 in /server (#513)
Bumps [github.com/gin-contrib/cors](https://github.com/gin-contrib/cors) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/gin-contrib/cors/releases)
- [Changelog](https://github.com/gin-contrib/cors/blob/master/.goreleaser.yaml)
- [Commits](https://github.com/gin-contrib/cors/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/gin-contrib/cors
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 22:26:55 +00:00
dependabot[bot] bf4d479a07 server: bump golang.org/x/crypto from 0.22.0 to 0.23.0 in /server (#514)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.22.0 to 0.23.0.
- [Commits](https://github.com/golang/crypto/compare/v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 22:23:24 +00:00
IRHM fb5a5c309b v1.39.0 2024-04-23 02:25:46 +01:00
IRHM 9dc5684a3e 1.39.0-dev2 2024-04-23 01:51:51 +01:00
Mr 7083e2c90e Support emby branding (#504)
* Support emby branding

Swap out jellyfin branding for emby when USE_EMBY is enabled.

* Server: Change jellyfin host setting text to emby when USE_EMBY enabled
2024-04-23 00:49:15 +00:00
IRHM a2266afcdc 1.39.0-dev1 2024-04-22 04:53:37 +01:00
IRHM 16a4316854 Search: Fix filtering for a type, then searching and no results for that type showing, hiding the button
basically buddy, if you search for something and filter for 'movies' (for example), then you change the search to something else, but no movies come up in the results, the 'movies' filter would hide, but still be active. That was confusing behavour, so now the button 'movies' in this case will always stay visible, if it's the active filter.
2024-04-22 04:49:12 +01:00
IRHM 727c3fecbb MyThoughts: Fix border color on dark theme 2024-04-22 04:37:10 +01:00
IRHM 03f2a13dba 1.39.0-dev 2024-04-22 04:17:59 +01:00
Mr 068ff846e6 Content Pages: Make btns container wrap elements when overflowing (#499) 2024-04-22 02:48:49 +00:00
Mr 10923fdf05 Support pinning watched list items to top (#498)
* Support for pinning watched list items

* GamePoster: Support `pinned` prop
2024-04-22 02:21:21 +00:00
Mr b1a2b3df8a Support detailed view on search page (#497)
* Support detailed view on search page

* WatchedList: Remove unused imports
2024-04-21 19:51:05 +00:00
Mr 7a8c433466 Improve search (filters, remove dumb sort) (#496)
* Search: Add filters (for content type), remove terrible result sort, dynamic page title

* Search: Better responsiveness for filters

Moving margin to wrapper and adding to right makes it wrap sooner.

* Search: Even better responsiveness for filters

On smaller screens, changes flex-flow to column and centers buttons
2024-04-21 17:11:33 +00:00
Mr 13410023e2 Merge pull request #495 from sbondCo/better-thoughts
Better thoughts
2024-04-20 20:32:14 +00:00
IRHM 265fc4bafe MyThoughts: Change modal description (remove 'review/')
Removed the word review, I think it's fairly obvious and it makes the sentence longer for now reason.

I think it's nicer without it.
2024-04-20 21:31:34 +01:00
IRHM 46f5aea674 Content: Made rating section max-width smaller on viewports 420px and below 2024-04-20 21:25:46 +01:00
IRHM 45e65c234a MyThoughts: Don't close if saving failed
to avoid thought changes being lost if the server fails when saving.

Also stopped saving changed on blur of textarea, now only saves when close modal is clicked.
2024-04-20 21:01:21 +01:00
IRHM eba923c929 api: Return bool (was success) from update watched/played funcs 2024-04-20 20:59:56 +01:00
IRHM b7fe07a1ef Create and use MyThoughts component
Now displays preview of thoughts as a button, which when clicked will open a modal with the full review.
2024-04-20 20:32:37 +01:00
Mr 19c4bc415e LastFinished Sort: Use customDate, use updatedAt as fallback (#494) 2024-04-20 17:00:45 +00:00
Mr 3684c79477 v1.38.2 2024-04-18 14:36:41 +01:00
Mr b749bffa15 Remove version properties from docker-compose examples 2024-04-18 14:28:52 +01:00
Mr b800369165 container-release: Fix metadata step (probably) 2024-04-18 14:13:10 +01:00
IRHM 5ac07c0f6e v1.38.1 2024-04-18 02:41:42 +01:00
IRHM 434d3fca3d WatchedList: Catch and show if filtering/sorting list fails 2024-04-18 02:39:19 +01:00
IRHM 57c7fb1dec Watched: Preload Activity for public watched lists
To support 'Last Finished' filter on public lists.
Also added user_id to logs in getPublicWatched.
2024-04-18 02:36:18 +01:00
IRHM f209709200 WatchedList: Fix 'Last Finished' filter on public lists
Where activity is not currently provided.
2024-04-18 02:35:06 +01:00
IRHM f5b15854e0 v1.38.0 2024-04-18 02:00:14 +01:00
IRHM 6aec9a938a 1.38.0-dev 2024-04-18 01:07:32 +01:00
IRHM 8180780c87 arr_requests: Link to content on title 2024-04-18 00:44:33 +01:00
Mr a8b369fdb5 Games: Fix not able to add games previously removed from list (#487) 2024-04-15 22:38:15 +00:00
Mr 0c6a550871 Add delete button to content pages (#486) 2024-04-15 22:34:47 +00:00
Mr b006fafbdf import: Fix customDates all coming back the same in all activity (#485) 2024-04-15 21:57:50 +00:00
Mr 3c0c014b6a Sort by last finished/played (#479)
* Nav: Swap filter and sort icons (and positions)

* Last finished sort

I feel disgusting every time i touch this sort/filter code
2024-04-15 02:09:47 +00:00
dependabot[bot] c086348a44 server: bump golang.org/x/crypto from 0.21.0 to 0.22.0 in /server (#470)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.21.0 to 0.22.0.
- [Commits](https://github.com/golang/crypto/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-14 17:13:28 +00:00
dependabot[bot] 6bc18e61ed workflow: bump peaceiris/actions-gh-pages from 3 to 4 (#465)
Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3 to 4.
- [Release notes](https://github.com/peaceiris/actions-gh-pages/releases)
- [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-gh-pages/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peaceiris/actions-gh-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-14 17:13:02 +00:00
Mr fc714ebfe0 ProvidersList: Also display free providers (#478)
- Display free providers
- Align text/icons to center
- Add BCC iPlayer and Hulu provider icons
2024-04-14 17:08:24 +00:00
dependabot[bot] 5018805ffe ui: bump @typescript-eslint/parser from 7.2.0 to 7.6.0 (#466)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.2.0 to 7.6.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.6.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-14 03:08:38 +00:00
dependabot[bot] c6c48950c4 ui: bump svelte-check from 3.6.4 to 3.6.9 (#467)
Bumps [svelte-check](https://github.com/sveltejs/language-tools) from 3.6.4 to 3.6.9.
- [Release notes](https://github.com/sveltejs/language-tools/releases)
- [Commits](https://github.com/sveltejs/language-tools/compare/svelte-check-3.6.4...svelte-check-3.6.9)

---
updated-dependencies:
- dependency-name: svelte-check
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-14 03:08:14 +00:00
dependabot[bot] 75baa5468c ui: bump typescript from 5.3.3 to 5.4.5 (#475)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.3.3 to 5.4.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.5)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-14 03:07:25 +00:00
dependabot[bot] c462aca6ed ui: bump vite from 5.1.6 to 5.2.8 (#469)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.1.6 to 5.2.8.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.2.8/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-14 03:00:33 +00:00
stignarnia c5d817c68c Ability to set a country, both in server and user settings, to have the correct streaming provider (but doesn't affect language) (#463)
* Country support for watch providers (#1, not functional)

* frontend dropdowns now actually read and write the correct setting

* user country setting now respects the server side default when creating a new user

* watch providers correctly show based on country, but changing the coutnry requires restarting the container to take effect

* flushing cache when updating user settings

* non functional, initial support for getting all the countries of which tmdb has streaming providers for to let users pick one

* users get shown a list of country codes to pick from and the selection gets saved and used, but the dropdown menu doesn't allow for scrolling

* limited dropdown height and auto scroll to the letter the user hits

* simplified auto scroll code

* the dropdown to choose countries now shows their full english name

* server/user region improvements

* DropDown: remove console log

used to test

* DropDown: Add keypress event listener on main div

instead of document body, so only triggered when key pressed whilst focused on dropdown.

---------

Co-authored-by: Stig <stig.narnia@gmail.com>
Co-authored-by: IRHM <37304121+IRHM@users.noreply.github.com>
2024-04-14 02:57:51 +00:00
Mr 4a7503bbfd Merge pull request #474 from sbondCo/arr-progress
Arr progress
2024-04-12 23:46:32 +00:00
IRHM c08686a255 idkanymore 2024-04-13 00:32:03 +01:00
IRHM 6cad057e58 Fix: getSonarrQueueDetails
Was calling to radarr.
2024-04-10 23:06:52 +01:00
IRHM d62e911cc2 wip: arr progress - response requests management, auto approve perm ui 2024-04-08 00:18:37 +01:00
IRHM 82b0941cd4 wip: arr progress - requests: display created at time, sort by update time 2024-04-07 21:02:51 +01:00
IRHM 3a5ed7cdc0 wip: arr progress - set status from request in request button 2024-04-07 18:02:48 +01:00
IRHM ae32bb4955 wip: arr progress - info calls, stop deleting request on 404 if request hasnt been approved yet 2024-04-07 18:02:29 +01:00
IRHM 42ca418d55 wip: arr progress - request approval/denial 2024-04-07 17:42:58 +01:00
IRHM a4fab86472 wip: arr progress - manage arr requests ui
the basic request management ui and the get all requests route
2024-04-03 06:28:18 +01:00
IRHM 0c5c9eba6e wip: arr progress - tv requests 2024-04-02 06:10:02 +01:00
IRHM a58d940473 wip: arr progress - handle more cases a movie could be in 2024-04-01 22:55:39 +01:00
IRHM c415bf4c52 wip: arr progress - Radarr progress 2024-04-01 01:42:53 +01:00
IRHM cb59a9e6b1 workflow: container-release: Update to use docker hub (copied from container-dev changes) 2024-03-30 23:12:04 +00:00
IRHM bedcfcc07c workflow: container-dev: fix tags/labels
at least i hope this is the fix
2024-03-30 22:37:40 +00:00
IRHM a95365525a workflow: container-dev: Also push to docker hub
testing out pushing to docker hub
2024-03-30 22:16:34 +00:00
dependabot[bot] f54c8feb2f ui: bump @typescript-eslint/eslint-plugin from 7.2.0 to 7.4.0 (#434)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.2.0 to 7.4.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.4.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 23:06:46 +00:00
dependabot[bot] 4dee46a7f7 ui: bump @sveltejs/adapter-node from 4.0.1 to 5.0.1 (#419)
Bumps [@sveltejs/adapter-node](https://github.com/sveltejs/kit/tree/HEAD/packages/adapter-node) from 4.0.1 to 5.0.1.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/adapter-node/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/adapter-node@5.0.1/packages/adapter-node)

---
updated-dependencies:
- dependency-name: "@sveltejs/adapter-node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 23:06:23 +00:00
dependabot[bot] a7e564af1e ui: bump prettier-plugin-svelte from 3.2.1 to 3.2.2 (#417)
Bumps [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte) from 3.2.1 to 3.2.2.
- [Changelog](https://github.com/sveltejs/prettier-plugin-svelte/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/prettier-plugin-svelte/compare/v3.2.1...v3.2.2)

---
updated-dependencies:
- dependency-name: prettier-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 23:05:55 +00:00
dependabot[bot] f72fa54931 ui: bump axios from 1.6.7 to 1.6.8 (#418)
Bumps [axios](https://github.com/axios/axios) from 1.6.7 to 1.6.8.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.7...v1.6.8)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 23:02:59 +00:00
dependabot[bot] 0089ea416e ui: bump svelte from 4.2.10 to 4.2.12 (#421)
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.2.10 to 4.2.12.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/svelte@4.2.12/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.2.12/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 23:02:32 +00:00
dependabot[bot] a163e4c9be server: bump github.com/gin-contrib/cors from 1.7.0 to 1.7.1 in /server (#435)
Bumps [github.com/gin-contrib/cors](https://github.com/gin-contrib/cors) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/gin-contrib/cors/releases)
- [Changelog](https://github.com/gin-contrib/cors/blob/master/.goreleaser.yaml)
- [Commits](https://github.com/gin-contrib/cors/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/gin-contrib/cors
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 23:01:48 +00:00
dependabot[bot] b5028f5405 server: bump gorm.io/gorm from 1.25.7 to 1.25.9 in /server (#449)
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.25.7 to 1.25.9.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.25.7...v1.25.9)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 23:01:03 +00:00
Mr 70ed52cec4 Merge pull request #445 from sbondCo/doc-envvars
docs: Environment Variables
2024-03-27 22:56:16 +00:00
IRHM 63700a5a1e docs: Environment Variables 2024-03-27 22:55:09 +00:00
IRHM 60323ecd61 v1.37.0 2024-03-27 22:23:59 +00:00
IRHM 49b3c8e96a 1.37.0-dev 2024-03-27 21:43:53 +00:00
IRHM 2d39e29db0 PosterList: Responsive fix AGAIN ;( 2024-03-27 21:02:17 +00:00
IRHM 8c39ec881e manage_users: Change username cell flex-flow to col for mobile 2024-03-27 20:11:02 +00:00
IRHM 3ea7001986 import: Make pages use 100% width on smaller screens 2024-03-27 20:05:11 +00:00
Mr ec4b9c993f Import: support importing watched episodes/seasons from watcharr export 2024-03-27 00:50:08 +00:00
Mr 248935c4e7 manage_users: Add word-wrap: anywhere to table cells
So long usernames don't break the tables usage
2024-03-26 23:54:21 +00:00
Mr cfbc8def98 Merge pull request #440 from sbondCo/imgbot
[ImgBot] Optimize images
2024-03-26 12:30:59 +00:00
ImgBotApp 6453f7c274 [ImgBot] Optimize images
*Total -- 96.10kb -> 77.57kb (19.28%)

/doc/docs/installation/img/forking-repo.png -- 1.84kb -> 1.32kb (28.18%)
/doc/docs/server_config/img/watcharr-jellyfin-host-setting.png -- 12.35kb -> 9.61kb (22.16%)
/doc/docs/server_config/img/request-admin/admin-token-generated-log-example.png -- 19.12kb -> 15.14kb (20.8%)
/doc/docs/server_config/img/watcharr-plex-host-setting-filled.png -- 16.79kb -> 13.46kb (19.85%)
/doc/docs/importing/img/mal/export.png -- 10.68kb -> 8.64kb (19.09%)
/doc/docs/server_config/img/watcharr-plex-host-setting.png -- 11.36kb -> 9.20kb (19.04%)
/doc/docs/server_config/img/request-admin/request-admin-btn.png -- 6.97kb -> 5.76kb (17.36%)
/doc/docs/server_config/img/request-admin/redeeming-admin-token.png -- 17.00kb -> 14.44kb (15.02%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2024-03-26 05:25:08 +00:00
Mr 7261f2f454 Merge pull request #439 from sbondCo/import-myanimelist
Importing from MyAnimeList
2024-03-26 02:33:46 +00:00
IRHM 1e6e22942c myanimelist importing: import start and finish dates 2024-03-26 02:28:35 +00:00
IRHM 3b556ef5e7 Enable fluidSize on posters on search and people pages 2024-03-26 01:20:24 +00:00
IRHM dc05c7aaeb Basic MyAnimeList importing
also fixed poster sizing - added fluidSize property so we only have that on the watched list
2024-03-26 01:18:33 +00:00
stephaje ef0d119907 Import Watcharr Exports (#389)
* Issue #130

* Watcharr import: support activity import and fix ImportedList data

Also added padding to bottom of import page

---------

Co-authored-by: John Stephani <me@johnstephani.com>
Co-authored-by: IRHM <37304121+IRHM@users.noreply.github.com>
2024-03-25 22:12:57 +00:00
Mr a12ac3c4a0 Merge pull request #438 from sbondCo/doc-restoring-admin
docs: restoring admin guide
2024-03-25 21:19:03 +00:00
Mr 564788a4c8 Merge pull request #437 from sbondCo/user-management
User management
2024-03-25 21:16:41 +00:00
IRHM 06ddda1137 EditUserModal: Remove unused style 2024-03-25 21:12:38 +00:00
IRHM 48a969b367 Link 'Users' stat to manage_users page 2024-03-25 21:06:08 +00:00
IRHM 5c08980e27 Support PERM_REQUEST_CONTENT on sonarr/radarr routes
Now content can be requested with only the PERM_REQUEST_CONTENT permission required.
2024-03-25 21:03:16 +00:00
Mr 96575c2c6d docs: restoring admin guide
Taken from v1.19.0 release (from before we had a doc site)
2024-03-25 16:32:02 +00:00
IRHM ea3a5d99f0 manage_users: Get all users again after edit user modal closes
fetches data again, because I'm too lazy to make it work locally. Also don't think it's that crucial just for an admin page to make it super duper deliciouso at the el momento
2024-03-25 02:16:14 +00:00
IRHM c47b9a07b8 manage_users: admin tag on table 2024-03-25 02:08:02 +00:00
IRHM c8743fadb6 manage_users: manage user perms 2024-03-25 01:56:00 +00:00
IRHM 42f2cde43f manage_users: Basic user management table
tldr: viewing all users in a table now works
2024-03-24 18:42:39 +00:00
Mr ac1ac76891 Merge pull request #432 from sbondCo/inst-doc
docs: installation for development
2024-03-24 18:08:05 +00:00
IRHM 7abed85a56 docs: installation for development
rough guide
2024-03-24 18:02:48 +00:00
Mr f20e52bbe6 Merge pull request #428 from sbondCo/mobile-responsiveness-fixes
Posters and Search mobile responsiveness fixes
2024-03-24 00:03:05 +00:00
IRHM bea8294f26 Move poster media queries to PosterList
So we can only apply then when the PosterList is in wrapping mode.

Added default min-width to posters of 170px.

This fixes posters on other pages, where they would be super small.
2024-03-23 23:59:59 +00:00
IRHM ca11301410 Nav: Searchbar even more centered better 2024-03-23 23:11:57 +00:00
IRHM b1f48309aa Nav: Make searchbox look a little more centered 2024-03-23 23:08:19 +00:00
IRHM d989f13621 Nav: Fix searchbar responsiveness on other pages
and add text-overflow
2024-03-23 23:04:08 +00:00
IRHM 85cd946619 Nav: Slowly decrease gap instead of always splitting nav below 390px screen size 2024-03-23 22:48:02 +00:00
IRHM 40420aa14b Nav: Keep main input on lower screens by replacing placeholder with a search icon 2024-03-23 22:41:24 +00:00
IRHM aec1014acf Nav: More responsive search bar
We now have two search bars in the markup to make this easily possible. When the size of the main input becomes too small to see the placeholder, we hide it and show another search bar below the main nav content.
2024-03-23 21:31:18 +00:00
IRHM fc49e9986f Poster: More responsive for smaller screens
Small range where we have a dynamic size to hopefully work better on a bigger range of devices. Can't go too big or too small otherwise the posters can become ugly and unusable.

Works well now with all the preset device sizes in my browser.
2024-03-20 22:43:22 +00:00
mordquist c9e23e1eba Configurable data location (#423)
* envvar to configure datadir if set

* config: Rename data environment variable

---------

Co-authored-by: mordquist <mordquist@proton.me>
Co-authored-by: IRHM <37304121+IRHM@users.noreply.github.com>
2024-03-20 21:22:06 +00:00
IRHM f992841314 docs: jellyfin and plex auth docs, add description to all install/config docs 2024-03-18 02:56:51 +00:00
IRHM afb1fa6dfd v1.36.0 2024-03-18 02:30:39 +00:00
IRHM a58351c539 1.36.0-dev1 2024-03-18 01:41:51 +00:00
IRHM d643d349ac Plex Auth: Remove plexUserHasAccessToPlexHost and use getPlexHomeServerAuthToken instead
If we can get an auth token for our home server, then the user must have access to it.

plexUserHasAccessToPlexHost method wouldn't work if our plex server had zero allowed users (except ourselves), since the data would not appear for ourself.
2024-03-18 01:40:45 +00:00
IRHM 4fdb3e9f9d 1.36.0-dev 2024-03-17 18:48:57 +00:00
Mr c1be94738b Jobs: Use wildcard for get job route id param (#415)
Fixes 404 errors when there is a '/' in the job id.
2024-03-17 18:22:27 +00:00
IRHM ea66615f65 plex: Remove info log 2024-03-17 17:39:00 +00:00
IRHM 5b38f762ed Remove old plex remnants
- $plex scss variable
- plexOauthId property in AvailableAuthProviders interface
2024-03-17 17:30:36 +00:00
dependabot[bot] 2aa81f036e Bump follow-redirects from 1.15.5 to 1.15.6 in /doc (#414)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-17 17:18:07 +00:00
Mr cbf0120647 Merge pull request #412 from sbondCo/dependabot/npm_and_yarn/follow-redirects-1.15.6
ui: bump follow-redirects from 1.15.4 to 1.15.6
2024-03-17 17:17:49 +00:00
Mr 2865115b1f Merge pull request #413 from sbondCo/plex-sync
Plex sync
2024-03-17 17:13:19 +00:00
IRHM b21d2bf603 Plex: Move auth tokens to new UserServices table and get local auth tokens 2024-03-17 17:04:10 +00:00
IRHM 0667f33250 plex sync: dont parse lastViewedAt for seasons/episodes if not set 2024-03-16 23:37:44 +00:00
IRHM 0da264480c plex auth: update auth token on login
hm mite save twice on creation
2024-03-16 23:23:39 +00:00
IRHM 622d10e743 Plex sync seasons and episodes 2024-03-16 23:18:32 +00:00
dependabot[bot] 5cbc817089 ui: bump follow-redirects from 1.15.4 to 1.15.6
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-16 22:36:17 +00:00
IRHM 7c216f4691 Plex sync movies and shows
Based on #401 - Seemed easier to port the relevant changes with some modifications than to fix merge conflicts and mess with history.

Co-Authored-By: stephaje <57157278+stephaje@users.noreply.github.com>
2024-03-16 22:26:01 +00:00
dependabot[bot] b5f9700345 ui: bump @typescript-eslint/eslint-plugin from 7.0.2 to 7.2.0 (#407)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.0.2 to 7.2.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.2.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-12 19:59:37 +00:00
Mr 7e03557e56 README: Add matrix chat badge to top and text in getting help section 2024-03-11 21:08:23 +00:00
dependabot[bot] 10a79a31cd server: bump github.com/gin-contrib/cors from 1.5.0 to 1.7.0 in /server (#403)
Bumps [github.com/gin-contrib/cors](https://github.com/gin-contrib/cors) from 1.5.0 to 1.7.0.
- [Release notes](https://github.com/gin-contrib/cors/releases)
- [Changelog](https://github.com/gin-contrib/cors/blob/master/.goreleaser.yaml)
- [Commits](https://github.com/gin-contrib/cors/compare/v1.5.0...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/gin-contrib/cors
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 20:28:42 +00:00
dependabot[bot] e41d408cd0 ui: bump eslint from 8.56.0 to 8.57.0 (#378)
Bumps [eslint](https://github.com/eslint/eslint) from 8.56.0 to 8.57.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.56.0...v8.57.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 20:27:40 +00:00
dependabot[bot] 6b22b4a4e2 server: bump golang.org/x/crypto from 0.19.0 to 0.21.0 in /server (#393)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.19.0 to 0.21.0.
- [Commits](https://github.com/golang/crypto/compare/v0.19.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 20:26:52 +00:00
dependabot[bot] 67c3083edd server: bump github.com/golang-jwt/jwt/v5 from 5.2.0 to 5.2.1 in /server (#404)
Bumps [github.com/golang-jwt/jwt/v5](https://github.com/golang-jwt/jwt) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/golang-jwt/jwt/releases)
- [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md)
- [Commits](https://github.com/golang-jwt/jwt/compare/v5.2.0...v5.2.1)

---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 20:26:25 +00:00
dependabot[bot] e968b7ff28 ui: bump @typescript-eslint/parser from 7.0.2 to 7.2.0 (#406)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.0.2 to 7.2.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.2.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 20:25:39 +00:00
dependabot[bot] adfd983a68 ui: bump @sveltejs/kit from 2.5.0 to 2.5.3 (#405)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.5.0 to 2.5.3.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.5.3/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 20:25:08 +00:00
dependabot[bot] b32ba86c5d ui: bump vite from 5.1.3 to 5.1.6 (#408)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.1.3 to 5.1.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.1.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 20:23:57 +00:00
Mr ebb0b132bd plex auth improvements (#402)
- Our own auth flow, removed 'plex-oauth' dep.
- Fixed normal registrations
- Combined login/register plex methods
- Changed login page plex btn styling
- Reverted colors on jellyfin/plex btns (couldn't find a nice one and it hurt me)
- Removed plex client id from server config, replaced by plex host and plex machine id config items
- Plex client id is generated on the client and stored for reuse, each client will do that instead of the server storing it for everyone.
- Use plex machine id to ensure only approved users can login via plex (users with access to host server library)
- Renamed some structs and funcs
- Removed background from plex icon
- Made buttons and inputs bigger (more padding, also unrelated to rest of changed but i think it looks nice)
2024-03-11 03:21:03 +00:00
stephaje 4f1fbf4a45 Plex Auth (#387) 2024-03-10 00:49:04 +00:00
IRHM 74f896a8bc docs: Fix viewjs css not loading in build 2024-03-09 03:42:22 +00:00
IRHM 3b1d42c148 docs: Screenshots (+ viewerjs for viewing them closer), demo link in nav 2024-03-09 01:55:06 +00:00
IRHM 7a902212a5 v1.35.2 2024-03-07 11:24:34 +00:00
IRHM 2a718ef6d8 #400 Fix signup_enabled default config value
Set defaults when generating config so they are stored in the json file.
2024-03-07 11:23:56 +00:00
IRHM f71dc287bd v1.35.1 2024-03-06 23:29:06 +00:00
IRHM 77d2c6f49a 1.35.1-dev 2024-03-06 23:10:29 +00:00
Mr 3eb454cc93 Config: Don't omit SIGNUP_ENABLED when empty (#399)
Was being removed from config when set to false, then once the server restarts would be set back to default value (true).

Now is kept in config with value of false when turned off.
2024-03-06 22:40:50 +00:00
Mr 8a5fd8182f Add restart property to docker-compose example (#398)
* #390

and update docker-compose file in proj root to match one in docs

* docker-compose.yml: fix port

i changed this :(
2024-03-06 22:31:47 +00:00
IRHM aa7a38b2ee v1.35.0 2024-03-05 20:50:09 +00:00
IRHM ed7a780c44 1.35.0-dev 2024-03-05 18:57:19 +00:00
Mr 32f72f382e Merge pull request #395 from sbondCo/jellyfin-sync
Jellyfin sync improvements
2024-03-05 18:20:34 +00:00
IRHM 2e0ea4d6c7 seasonAndEpToReadable: Remove padStart and fix showing season 0 as unknown
season 0 = specials, dont want to show 'unknown' in this case.
2024-03-05 17:54:23 +00:00
IRHM 2a9a3691a3 Jellyfin Sync: Add full_item debug log for episodes and seasons 2024-03-05 17:41:14 +00:00
IRHM 49692f5e02 Jellyfin Sync: Save episode/season watch dates
and change activity to show 'synced' instead of 'imported' for JF types
2024-03-05 17:38:44 +00:00
Mr 5f06e7b52f Merge pull request #394 from sbondCo/jellyfin-sync
Jellyfin (Manual) Sync
2024-03-05 01:04:19 +00:00
IRHM 1933ca350d jobs: Remove job after 1m of status being set to done 2024-03-05 01:03:00 +00:00
IRHM 337957fb9f Jellyfin Sync: _JF activity types
Not doing anything with them now, but later we can add to the UI (maybe jf icon if _JF activity variant)
2024-03-05 00:33:52 +00:00
IRHM 458c91d505 Jellyfin Sync: Don't add imported date activity if movie already on list 2024-03-05 00:00:08 +00:00
IRHM 5498236b48 JellyfinSyncModal: Stop job watcher after 10 errors in a row 2024-03-04 23:49:45 +00:00
IRHM 0e7cdb0199 watched episodes/seasons: Don't add activity if we didn't update the status/rating 2024-03-04 20:35:55 +00:00
IRHM 7d25b0bf5d wip: jellyfin sync modal 2024-03-04 03:50:41 +00:00
IRHM ccadcf2152 wip: jellyfin sync 2024-03-03 22:53:05 +00:00
IRHM 8e0fb190d1 ui: bump @typescript-eslint (eslint-plugin and parser) to 7.0.2 2024-02-22 02:43:03 +00:00
dependabot[bot] 62033c66aa ui: bump svelte-check from 3.6.3 to 3.6.4 (#370)
Bumps [svelte-check](https://github.com/sveltejs/language-tools) from 3.6.3 to 3.6.4.
- [Release notes](https://github.com/sveltejs/language-tools/releases)
- [Commits](https://github.com/sveltejs/language-tools/compare/svelte-check-3.6.3...svelte-check-3.6.4)

---
updated-dependencies:
- dependency-name: svelte-check
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 02:36:12 +00:00
dependabot[bot] 95130fd4fb ui: bump prettier-plugin-svelte from 3.1.2 to 3.2.1 (#368)
Bumps [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte) from 3.1.2 to 3.2.1.
- [Changelog](https://github.com/sveltejs/prettier-plugin-svelte/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/prettier-plugin-svelte/compare/v3.1.2...v3.2.1)

---
updated-dependencies:
- dependency-name: prettier-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 02:35:54 +00:00
dependabot[bot] c4cebb717c ui: bump @typescript-eslint/eslint-plugin from 6.21.0 to 7.0.0 (#367)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.21.0 to 7.0.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.0.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 02:35:21 +00:00
dependabot[bot] d92dd51bc8 ui: bump vite from 5.0.12 to 5.1.3 (#369)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.12 to 5.1.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.1.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 02:34:55 +00:00
Mr 4e4f8f9fcf ActivityEditor: Accept any valid date (#372)
* Activity: Allow any valid date in editor, add try/catch to updateActivity method

* api: Update updateActivity log
2024-02-22 02:33:34 +00:00
Mr 11a0ec55d5 Merge pull request #366 from stephaje/Issue-#61
Issue #61 - Editing activity
2024-02-22 01:48:46 +00:00
John Stephani 14b3f38b5d Add client validation 2024-02-21 19:17:13 -06:00
stephaje 5799cd649b context => c 2024-02-19 12:44:11 -06:00
stephaje d4b873ec7d Clean up errors, CSS, fix tv/games activity 2024-02-18 23:26:31 -06:00
stephaje d00ae04074 Add user id checking; fix log/error messages 2024-02-18 14:00:07 -06:00
stephaje 8955ca7b26 npm run format 2024-02-18 10:52:17 -06:00
stephaje 82c6729a22 Issue #61 2024-02-18 10:47:16 -06:00
IRHM 1929272705 v1.34.0 2024-02-18 16:45:56 +00:00
IRHM 709dead520 1.34.0-dev 2024-02-18 16:21:40 +00:00
Mr 7cd348804c Merge pull request #365 from sbondCo/fix-discovery
Fix discovery (trending) requests
2024-02-18 16:20:25 +00:00
IRHM ba91f65cee #364 Fix discovery requests
Trailing / causing 404
2024-02-18 16:18:59 +00:00
Mr a09488dbba Merge pull request #363 from sbondCo/rate-episodes
Ratings and Statuses for episodes
2024-02-18 16:08:23 +00:00
IRHM 111b2b1afd getLatestWatchedInTv: Fix undefined check, should be looking for bigger than -1 2024-02-18 16:04:13 +00:00
IRHM c0ff3205a6 Include episode in watching season extra detail 2024-02-18 15:43:59 +00:00
IRHM 92815f6907 #42 Episode Ratings 2024-02-17 23:15:43 +00:00
dependabot[bot] d9257e767f server: bump gorm.io/driver/sqlite from 1.5.4 to 1.5.5 in /server (#353)
Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.5.4 to 1.5.5.
- [Commits](https://github.com/go-gorm/sqlite/compare/v1.5.4...v1.5.5)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 23:12:43 +00:00
dependabot[bot] 26ec0f592a server: bump golang.org/x/crypto from 0.18.0 to 0.19.0 in /server (#354)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.18.0 to 0.19.0.
- [Commits](https://github.com/golang/crypto/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 23:11:09 +00:00
dependabot[bot] 1e4814d50a server: bump gorm.io/gorm from 1.25.6 to 1.25.7 in /server (#355)
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.25.6 to 1.25.7.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.25.6...v1.25.7)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 23:10:49 +00:00
dependabot[bot] bbe2123c1e ui: bump prettier from 3.2.4 to 3.2.5 (#341)
Bumps [prettier](https://github.com/prettier/prettier) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.4...3.2.5)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 23:07:04 +00:00
dependabot[bot] d7c2897698 ui: bump @typescript-eslint/eslint-plugin from 6.20.0 to 6.21.0 (#338)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.20.0 to 6.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.21.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 23:05:45 +00:00
dependabot[bot] 8cd930369d ui: bump svelte from 4.2.8 to 4.2.10 (#337)
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.2.8 to 4.2.10.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/svelte@4.2.10/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.2.10/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 23:04:47 +00:00
dependabot[bot] 4cea72d8e9 ui: bump axios from 1.6.5 to 1.6.7 (#339)
Bumps [axios](https://github.com/axios/axios) from 1.6.5 to 1.6.7.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.5...v1.6.7)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 23:04:13 +00:00
imgbot[bot] e9a4629c2a [ImgBot] Optimize images (#357)
*Total -- 936.02kb -> 774.21kb (17.29%)

/doc/docs/server_config/img/twitch-register-app.png -- 80.15kb -> 58.27kb (27.29%)
/doc/docs/server_config/img/watcharr-settings-dropdown.png -- 8.20kb -> 6.11kb (25.44%)
/doc/docs/server_config/img/watcharr-twitch-config.png -- 34.31kb -> 26.69kb (22.2%)
/doc/docs/server_config/img/watcharr-twitch-service.png -- 10.34kb -> 8.17kb (21.04%)
/doc/docs/server_config/img/watcharr-game-details.png -- 803.03kb -> 674.97kb (15.95%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2024-02-16 15:52:28 +00:00
Mr 3e02af9c40 README: Update description, adding video games. 2024-02-12 01:01:37 +00:00
IRHM 2a5a470347 v1.33.0 2024-02-12 00:33:07 +00:00
IRHM 07e3f5f7a8 1.33.0-dev 2024-02-11 23:44:07 +00:00
Mr 1b83c70b5e Merge pull request #344 from sbondCo/twitch-config-modal-doc-link
TwitchModal: Add link to setup docs.
2024-02-11 23:41:09 +00:00
IRHM 1e5cdc151b TwitchModal: Add link to setup docs. 2024-02-11 23:37:53 +00:00
Mr dcb21a6e1e Merge pull request #343 from sbondCo/game-docs
Game docs
2024-02-11 23:30:41 +00:00
IRHM 0b4f3d5c97 Create game setup guide
i just realised screenshots are in dark mode, not matching the others in another guide, but it's too late to change em cuz what's done is done.
2024-02-11 23:29:14 +00:00
IRHM 0d8ea359e4 doc: Update docusaurus to v3 2024-02-11 22:41:51 +00:00
Mr 1c44b1812a Merge pull request #342 from sbondCo/games
Games
2024-02-11 21:56:58 +00:00
IRHM 3d5cf70ec0 FilterMenu: Change held to on hold 2024-02-10 20:26:35 +00:00
IRHM f1f26d0f57 Dockerfile: Copy game module 2024-02-10 19:54:18 +00:00
IRHM e3fe047afd follow: Fix get watched item logic for followed thoughts
Before it could get two entries if user has two entries that had same id number for content and game ids.
2024-02-10 17:50:10 +00:00
IRHM 4afc32f9d1 FilterMenu: Fix type styling 2024-02-10 17:49:10 +00:00
IRHM 7ea78f2d57 watched: preload game when getting public list 2024-02-10 17:31:10 +00:00
IRHM 6092410b20 Followed thoughts for games 2024-02-10 17:28:29 +00:00
IRHM 8f5293a769 Remove game filter if games disabled, update status filters for games 2024-02-10 16:48:25 +00:00
IRHM 6d25356d30 WatchedList: Fix type filtering 2024-02-10 16:18:14 +00:00
IRHM dbd86b89c7 FilterMenu: Add Game type 2024-02-10 16:18:07 +00:00
IRHM bf0b4fbb6a game: remove log of credentials 2024-02-10 15:56:35 +00:00
IRHM 5585053b85 igdb token refresh logic 2024-02-10 15:53:30 +00:00
IRHM a61b82e9af Search: Fix if games, catch search requests separately 2024-02-08 22:55:30 +00:00
IRHM d4fe6d3653 Search: Remove unused interface, remove comment 2024-02-08 22:45:30 +00:00
IRHM 6d2ab6e7e4 Search: Only search movies/tv if games disabled 2024-02-08 22:44:46 +00:00
IRHM c5e6ae702a Poster: Don't try loading image unless we have a poster path 2024-02-08 22:44:27 +00:00
IRHM 2a9b0443f5 Tv: Fix wListItem find 2024-02-08 00:10:55 +00:00
IRHM e1e933af16 Fix Status 2024-02-08 00:08:39 +00:00
IRHM a5fbecd32a Remove unneeded comments 2024-02-07 23:54:32 +00:00
IRHM 98006efb03 Games: Fix similar games having wrong status/rating 2024-02-07 23:49:11 +00:00
IRHM 926b0f8267 GamePoster: Use blurhash when available for poster loader 2024-02-07 23:46:59 +00:00
IRHM cc3f21aa93 Cache game covers 2024-02-07 22:47:16 +00:00
IRHM e311bcd901 Display status differently for games
Created toUnderstandableStatus and toUnderstandableWatchedStatus helpers to convert statuses into readable.
2024-02-06 23:56:49 +00:00
IRHM eb66baba80 Routes: Remove testing cache exp time for game routes 2024-02-03 21:41:26 +00:00
IRHM 09795b4da3 Game: Display similar games 2024-02-03 21:41:03 +00:00
IRHM 8088184e6b Create getPlayedDependedProps for searched game posters 2024-02-03 21:09:04 +00:00
IRHM 1b6c56dd8f sorta finalize gameposter on own watched list 2024-02-03 21:00:26 +00:00
IRHM 86195eb682 Game: Add check before trying to iterate over genres and modes
and show 'Unknown' message if we have none available
2024-02-03 20:38:12 +00:00
IRHM f40ffa124c GamePoster: Accept generic props so we can reuse on watched list 2024-02-03 20:38:12 +00:00
IRHM 704b6380c7 Game: Use cover if no artwork available for backdrop 2024-02-03 20:38:12 +00:00
IRHM b434665caf fix content undefined issues 2024-02-03 20:38:12 +00:00
IRHM 3554d4bc60 updating games watched item 2024-02-03 20:38:12 +00:00
IRHM 917ddd5401 fix profile stats
since Content pointer stored now
2024-02-03 20:38:12 +00:00
IRHM e7cf21fdb2 basic adding games to list 2024-02-03 20:33:52 +00:00
IRHM c932bd188a basic game detail page 2024-02-03 20:32:44 +00:00
IRHM e5d17bee81 game search ep 2024-02-03 20:31:45 +00:00
IRHM 65836a1654 idk if this works
bakup the beginnings of game support
2024-02-03 20:31:45 +00:00
IRHM 0f7bdaffbb v1.32.1 2024-02-03 15:16:09 +00:00
IRHM 30dae4c5c9 1.32.1-dev1 2024-02-03 14:57:28 +00:00
Mr f67d1641db Merge pull request #336 from sbondCo/awesome-stuff-too
Fix movary importing and include previously watched filter
2024-02-03 14:54:39 +00:00
IRHM 0ff02e00c9 WatchedList: Fix type filter when finished status enabled 2024-02-03 13:37:24 +00:00
IRHM 194081ac2f Profile: get profile stats again after updating includepreviouslywatched setting 2024-02-03 13:34:24 +00:00
IRHM 896f80ebd6 profile: Include previously watched in stats if enabled by user 2024-02-03 13:16:55 +00:00
IRHM 862279e914 import: Fix customDates being the same on all dateswatched activity
pointer value being updated each iteration, so we end up using same date for all object in the array
2024-02-03 12:51:17 +00:00
IRHM bdf5cf54af 1.32.1-dev 2024-02-03 02:53:16 +00:00
Mr 4323ab7086 Merge pull request #335 from sbondCo/amazing-stuff
https://github.com/sbondCo/Watcharr/issues/332#issuecomment-1923230972
2024-02-03 02:51:26 +00:00
IRHM 555b237ed0 WatchedList: Filter on sort change, add STATUS_CHANGED as activity that could make show watched 2024-02-03 02:37:58 +00:00
IRHM 5146af2672 Filtering: Add includePreviouslyWatched setting 2024-02-03 02:13:46 +00:00
IRHM 4d3da51ae7 Movary Import: Keep history data if show is also on watchlist 2024-02-02 21:35:54 +00:00
IRHM 9cba877fe6 Movary Import: Set latest watched date as watched entry CreatedAt 2024-02-02 21:21:21 +00:00
IRHM 924ffcb33f v1.32.0 2024-02-02 02:24:50 +00:00
IRHM b638062d36 1.32.0-dev 2024-02-02 01:47:20 +00:00
dependabot[bot] da64b5ca59 ui: bump svelte-check from 3.6.2 to 3.6.3 (#317)
Bumps [svelte-check](https://github.com/sveltejs/language-tools) from 3.6.2 to 3.6.3.
- [Release notes](https://github.com/sveltejs/language-tools/releases)
- [Commits](https://github.com/sveltejs/language-tools/compare/svelte-check-3.6.2...svelte-check-3.6.3)

---
updated-dependencies:
- dependency-name: svelte-check
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-02 01:30:51 +00:00
dependabot[bot] 8f2d9b0984 ui: bump @typescript-eslint/parser from 6.18.0 to 6.20.0 (#328)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.18.0 to 6.20.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.20.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-02 01:30:34 +00:00
dependabot[bot] c2e85ff8b3 server: bump gorm.io/gorm from 1.25.5 to 1.25.6 in /server (#327)
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.25.5 to 1.25.6.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.25.5...v1.25.6)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-02 01:29:18 +00:00
dependabot[bot] 3c9d074169 ui: bump @typescript-eslint/eslint-plugin from 6.18.0 to 6.20.0 (#330)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.18.0 to 6.20.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.20.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-02 01:28:38 +00:00
dependabot[bot] 7a254222a1 ui: bump @sveltejs/adapter-node from 2.0.2 to 4.0.1 (#331)
Bumps [@sveltejs/adapter-node](https://github.com/sveltejs/kit/tree/HEAD/packages/adapter-node) from 2.0.2 to 4.0.1.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/adapter-node/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/adapter-node@4.0.1/packages/adapter-node)

---
updated-dependencies:
- dependency-name: "@sveltejs/adapter-node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-02 01:26:35 +00:00
dependabot[bot] 4662977677 ui: bump prettier from 3.1.1 to 3.2.4 (#322)
Bumps [prettier](https://github.com/prettier/prettier) from 3.1.1 to 3.2.4.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.1.1...3.2.4)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-02 01:25:01 +00:00
dependabot[bot] 798c80f69b ui: bump vite from 5.0.11 to 5.0.12 (#320)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.11 to 5.0.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-02 01:24:29 +00:00
Mr d8e4182824 Merge pull request #334 from sbondCo/movary-import
Movary Importing
2024-02-02 01:21:49 +00:00
IRHM ac9fb8c28d import/process: Update importText for TMDb to TMDB 2024-02-02 01:11:32 +00:00
IRHM d0b1b9ed17 import: add error to sucimp log 2024-02-02 00:56:16 +00:00
IRHM 548643327d Support importing status, thoughts and datesWatched
for movary import
2024-02-02 00:45:36 +00:00
IRHM a86d2a218a wip build movary import list 2024-02-02 00:18:41 +00:00
IRHM 21ecc4cbbf wip movary importing from the 3 export files 2024-02-01 01:32:01 +00:00
Mr 2e19cad3a8 Merge pull request #314 from sbondCo/update-cache-on-req
Update content table on request
2024-01-13 22:47:48 +00:00
IRHM 8bffc7380e saveContent: remove test log and debug on Updates
and update its error handling, copied from below, removed case not needed for updating... or even that code anymore but whatevz
2024-01-13 22:44:02 +00:00
IRHM 96720caace saveContent: Support onlyUpdate parameter 2024-01-13 17:40:33 +00:00
IRHM 6c130952d7 update cache when content is freshly fetched 2024-01-11 02:29:46 +00:00
IRHM 3c1fc0e950 split out content caching for reuse 2024-01-11 02:05:35 +00:00
IRHM d95990fc56 v1.31.1 2024-01-09 20:45:59 +00:00
dependabot[bot] 9d0a433121 Bump follow-redirects from 1.15.3 to 1.15.4 in /doc (#311)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 20:44:50 +00:00
Mr 2bd02439c2 Support ARM64 Arch (#310)
* dev workflow: Add arm64 platform build

in sequence because paralellising the jobs looks hard

* dev action: remove `dev` tag

I think it would be better to just refer to them with their sha256 instead + i dont like that when a `dev` image is built, the `dev` tag goes to top of list of tagged images

* Revert "dev action: remove `dev` tag"

This reverts commit 0179f616fa.

nevermind, that is not a thing.

* release action: add arm platform
2024-01-09 20:42:30 +00:00
dependabot[bot] 6a1fdd69e3 ui: bump @sveltejs/kit from 2.0.7 to 2.0.8 (#308)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.0.7 to 2.0.8.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.0.8/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 20:35:40 +00:00
dependabot[bot] fb7dc5d0f8 ui: bump axios from 1.6.3 to 1.6.5 (#304)
Bumps [axios](https://github.com/axios/axios) from 1.6.3 to 1.6.5.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.3...v1.6.5)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 20:34:12 +00:00
dependabot[bot] c3d480d47b ui: bump @sveltejs/kit from 2.0.6 to 2.0.7 (#305)
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 2.0.6 to 2.0.7.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.0.7/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 20:33:39 +00:00
dependabot[bot] 274c97bcdd ui: bump @typescript-eslint/eslint-plugin from 6.17.0 to 6.18.0 (#306)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.17.0 to 6.18.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.18.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 20:33:20 +00:00
dependabot[bot] d6b5fc9cd3 server: bump golang.org/x/crypto from 0.17.0 to 0.18.0 in /server (#303)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.17.0 to 0.18.0.
- [Commits](https://github.com/golang/crypto/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 20:32:51 +00:00
dependabot[bot] 4de9865a39 ui: bump vite from 5.0.10 to 5.0.11 (#307)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.10 to 5.0.11.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.11/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 20:32:22 +00:00
Mr d278f2cf98 Merge pull request #302 from sbondCo/watchtime
Watchtime Profile Stat
2024-01-07 23:41:21 +00:00
IRHM 5aec83c2f0 Profile: Badly implement show watchtime
for now... hopefully
2024-01-07 23:36:56 +00:00
IRHM fbda3d4b9b Stat: Add disclaimer prop 2024-01-07 23:15:52 +00:00
IRHM dde8fad248 Profile: Implement movies watched runtime stat 2024-01-07 21:52:26 +00:00
IRHM e8309568bc v1.31.0 2024-01-07 17:50:51 +00:00
IRHM 997e3afb7e 1.31.0-dev 2024-01-07 01:07:39 +00:00
Mr 891fc51bcd Input changed validation (#299)
* thoughts change validation

* Rating & Status change validation

* Poster: status change validation
2024-01-07 01:04:00 +00:00
dependabot[bot] ebe42f1d34 ui: bump @typescript-eslint/parser from 6.16.0 to 6.18.0 (#298)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.16.0 to 6.18.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.18.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-06 18:43:04 +00:00
Mr b799c660ca Merge pull request #294 from sbondCo/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-6.17.0
ui: bump @typescript-eslint/eslint-plugin from 6.16.0 to 6.17.0
2024-01-06 18:41:14 +00:00
Mr a10f570983 Merge pull request #293 from sbondCo/dependabot/npm_and_yarn/axios-1.6.3
ui: bump axios from 1.6.2 to 1.6.3
2024-01-06 18:40:51 +00:00
Mr f205f96010 Merge pull request #297 from sbondCo/detail-view
Detail view
2024-01-06 18:39:49 +00:00
IRHM 735a98e0b2 Poster: Make extra details box more opaque
and use same color for both themes
2024-01-06 17:45:47 +00:00
IRHM f87aa70a3b Poster: fix extra details colors and spacing 2024-01-06 17:41:13 +00:00
IRHM a2dc418ee6 Poster: Hide empty extra-details 2024-01-05 19:35:39 +00:00
IRHM 4c7982f7be improve getLatestWatchedSeason
it could be improved more though
2024-01-05 06:17:41 +00:00
IRHM 43d603c212 Detailed Poster: Use real data 2024-01-05 05:39:49 +00:00
IRHM ebf623ed1b Redesign poster extra details and allow configuring displayed data 2024-01-05 04:53:00 +00:00
IRHM d925519beb Create DetailedPoster 2024-01-03 23:13:38 +00:00
dependabot[bot] 07b72452e8 ui: bump @typescript-eslint/eslint-plugin from 6.16.0 to 6.17.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.16.0 to 6.17.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.17.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 19:22:43 +00:00
dependabot[bot] ab4781bec0 ui: bump axios from 1.6.2 to 1.6.3
Bumps [axios](https://github.com/axios/axios) from 1.6.2 to 1.6.3.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.2...v1.6.3)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 19:21:56 +00:00
IRHM 7719b6336c v1.30.0 2024-01-01 02:50:19 +00:00
IRHM e749e94bfb 1.30.0-dev 2023-12-31 20:23:17 +00:00
IRHM c1ceb17ada Rating: Fix text not updating if network request resolves after we hoverEnd 2023-12-31 20:18:39 +00:00
IRHM 91dd00b556 routes: Set AuthRequired middleware once for auth routes that require it
indenting authd routes definitely helps with readability
2023-12-30 17:37:59 +00:00
Mr 60e873b4c0 Merge pull request #292 from sbondCo/content-stars-text
Content rating text follow hovered star
2023-12-30 05:02:28 +00:00
IRHM 4333591c9c Rating: Add transition to transform
to make it smoother when moving to initial close rating to default middle pos.
2023-12-30 04:53:10 +00:00
IRHM 462a46aabb Rating: Fix causing page overflow on small viewports 2023-12-30 04:52:15 +00:00
IRHM c766d68d49 Rating: Center desc text and make it follow hovered star 2023-12-29 03:04:56 +00:00
Mr 6b7c38aa7a Merge pull request #291 from sbondCo/exportwl
Export Watched List
2023-12-29 02:08:48 +00:00
IRHM 367c79f29c Change empty watch list error text 2023-12-29 02:07:35 +00:00
IRHM c59eb82a1a dont try saving an empty watch list 2023-12-29 02:03:46 +00:00
IRHM 3d40e5554f change suggested export name to watcharr-export.json 2023-12-29 01:58:49 +00:00
IRHM 75f091cfa0 Basic exporting watched list support 2023-12-29 01:55:07 +00:00
Mr 1d0abe4982 Merge pull request #290 from iamericfletcher/user-password-change-issue-279
Implement Change Password Feature (Issue #279)
2023-12-28 22:24:01 +00:00
Mr f8490481a5 Merge branch 'dev' into user-password-change-issue-279 2023-12-28 22:16:54 +00:00
IRHM 1adc56f965 userChangePassword: Select only pass from db 2023-12-28 22:12:50 +00:00
IRHM 8861233aaa Move GetPassArgonParams, Remove DEBUG, add use of ternary operator 2023-12-28 22:01:58 +00:00
iamericfletcher 3c4718bc45 Update error handling in changeUserPassword and display of error messages in pwChangeModal
The 'changeUserPassword' callback is updated such that error messages are passed back to the calling function in `PwChangeModal` allowing errors to show up in the same place.
2023-12-28 16:19:31 -05:00
iamericfletcher f6fa9e7666 Refactor ArgonParams to a function for register and userChangePassword in auth.go 2023-12-28 15:37:11 -05:00
iamericfletcher 98a7c370a8 Removed unneeded else branches in auth.go 2023-12-28 14:59:57 -05:00
iamericfletcher 37f9bffb13 Move server endpoint to /auth/change_password and update corresponding frontend API call 2023-12-28 14:52:19 -05:00
iamericfletcher a4573fe52a Move userChangePassword function to auth.go 2023-12-28 14:40:35 -05:00
iamericfletcher aeaaccda88 Remove Form.svelte and related import
Form.svelte was deleted due to not being used or needed. An associated import line in PwChangeModal.svelte has also been removed.

Additionally, setting parameter DEBUG was removed from server/config.go.
2023-12-27 17:48:18 -05:00
iamericfletcher 3a2ce0c718 Refactor password change feature and update debug messages
Removed a substantial block of commented-out code related to password changing in the `user.go` file, which simplifies the structure and readability of the code. Improved clarity and specificity of console debug/feedback messages throughout the frontend, ensuring easier debugging. Commit also includes minor code clean up in some files.
2023-12-27 17:24:05 -05:00
iamericfletcher 2ac80d0b8c Refine password change error handling and reporting
The commit delivers improved error handling and debugging information for password change functionality. Error messages now provide more detailed context on failures. Additionally, new password hashing has been added in the password change process. The user interface has also been updated to reflect specific error messages returned from the API.
2023-12-27 14:14:53 -05:00
iamericfletcher 3ff5d9836b Refactor user password change functionality
The password change function now involves first querying user data from the database, before checking the validity of their old password. Logic has been updated on both frontend and backend code. Errors have been added for handling instances where password comparison, user retrieval or other processes fail.
2023-12-27 10:08:06 -05:00
iamericfletcher e6d486c2a2 Implement password change feature
A new feature has been added that allows users to change their password. This includes updates in several different files to accommodate this new functionality. Changes include adding a new API endpoint, creating a new function to handle the password change request, and removing the username field from the ChangePasswordForm interface.
2023-12-26 20:43:11 -05:00
iamericfletcher c4e591e2f2 Improve form validation in PwChangeModal.svelte
Updated form validation to check for missing inputs and ensure consistency between new password and re-entered new password. Enhanced logging for better status tracking and error reporting during form validation process.
2023-12-26 12:36:32 -05:00
iamericfletcher 0eb1a88103 Refactoring password button in PwChangeModal to be in line with button in SonarrModal 2023-12-26 11:58:47 -05:00
iamericfletcher c767572905 Refactoring password change modal form 2023-12-26 09:36:24 -05:00
iamericfletcher b3ba00cd0d Added beginning stages of password change functionality in user profile
A new interface ChangePasswordForm has been created to handle password change form data.

The 'PwChangeModal.svelte' modal allows the user to input current and new passwords for a change password request.

The user profile page has been updated to include a "Change Password" button which triggers the change password modal.
2023-12-25 21:39:54 -05:00
255 changed files with 41622 additions and 20628 deletions
+3
View File
@@ -0,0 +1,3 @@
# Docker dev volume
container_data/
data/
+25 -25
View File
@@ -1,27 +1,27 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
extends: ["plugin:svelte/recommended"],
plugins: ["@typescript-eslint"],
ignorePatterns: ["*.cjs", "*.config.js"],
overrides: [
{
files: ["*.svelte"],
parser: "svelte-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser"
}
}
],
parserOptions: {
project: "./tsconfig.json",
extraFileExtensions: [".svelte"],
sourceType: "module",
ecmaVersion: 2020
},
env: {
browser: true,
es2017: true,
node: false
}
root: true,
parser: "@typescript-eslint/parser",
extends: ["plugin:svelte/recommended"],
plugins: ["@typescript-eslint"],
ignorePatterns: ["*.cjs", "*.config.js"],
overrides: [
{
files: ["*.svelte"],
parser: "svelte-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
},
},
],
parserOptions: {
project: "./tsconfig.json",
extraFileExtensions: [".svelte"],
sourceType: "module",
ecmaVersion: 2020,
},
env: {
browser: true,
es2017: true,
node: false,
},
};
+35
View File
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: bug
assignees: ""
---
<!-- It's harder to track bugs when multiple are reported in one issue. If you have more than one (unrelated) bugs to report, please make one issue per bug. -->
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Platform (please complete the following information):**
- OS: [e.g. Linux, Windows, Android, iOS]
- Browser (latest version): [e.g. chrome, safari, firefox]
- Watcharr Version: [e.g. v1.45.0]
**Additional context**
Add any other context about the problem here.
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: enhancement
assignees: ""
---
<!-- Feature requests can be hard to track when two or more unrelated ideas are included in one issue. Please make a new issue for each idea (make as many as you need to). -->
**Idea Overview**
A quick overview of the idea you are proposing.
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**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.
+15
View File
@@ -0,0 +1,15 @@
---
name: Documentation
about: Help us with our documentation. Is something important missing?
title: ""
labels: documentation
assignees: IRHM
---
<!-- Did you know: You can click `Edit this page` at the bottom of any page on the docs to propose exact changes? If this doesn't apply to you, continue below and fill out the issue. -->
**What is missing or needs updating on the documentation site?**
Please describe in detail what is missing or needs updating on the documentation site.
**(optional) How would you write/update this doc?**
How would you write out this documentation?
+25 -5
View File
@@ -1,10 +1,13 @@
# Multi arch support doc/guide:
# https://docs.docker.com/build/ci/github-actions/multi-platform/
name: Development Watcharr Image Release
on:
workflow_dispatch:
env:
image: ghcr.io/sbondco/watcharr
image: sbondco/watcharr
jobs:
release-dev-image:
@@ -18,18 +21,35 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Log in to the Container registry
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: sbondco
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.image }}:dev
labels: ${{ env.image }}:${{ github.sha }}
tags: |
${{ env.image }}:dev
ghcr.io/${{ env.image }}:dev
labels: |
${{ env.image }}:${{ github.sha }}
ghcr.io/${{ env.image }}:${{ github.sha }}
+25 -6
View File
@@ -6,7 +6,7 @@ on:
- v*
env:
image: ghcr.io/sbondco/watcharr
image: sbondco/watcharr
jobs:
release-images:
@@ -20,24 +20,43 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Log in to the Container registry
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: sbondco
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.image }}
images: |
${{ env.image }}
ghcr.io/${{ env.image }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: |
${{ steps.meta.outputs.tags }}
ghcr.io/${{ steps.meta.outputs.tags }}
labels: |
${{ steps.meta.outputs.labels }}
ghcr.io/${{ steps.meta.outputs.labels }}
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
+31
View File
@@ -0,0 +1,31 @@
name: Test PR (server)
on:
pull_request:
branches:
- "**"
tags-ignore:
- v*
paths:
- ".github/workflows/test-pr-server.yml"
- "server/**"
jobs:
format_check_go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- name: gofmt test
run: |
outp=$(gofmt -l .)
if [ -n "$outp" ]; then
echo "Need to fix formatting!"
echo "$outp"
exit 1
else
echo "Everything looks formatted"
exit 0
fi
@@ -1,4 +1,4 @@
name: Test PR Changes
name: Test PR (web)
on:
pull_request:
@@ -6,6 +6,14 @@ on:
- "**"
tags-ignore:
- v*
paths:
- ".github/workflows/test-pr-web.yml"
- "package*.json"
- "svelte.config.json"
- "vite.config.json"
- "tsconfig.json"
- ".prettier*"
- "src/**"
jobs:
linter_check:
+5
View File
@@ -40,3 +40,8 @@ vite.config.ts.timestamp-*
# Docker dev volume
container_data/
data/
# Build artifacts
server/ui
server/watcharr
+4
View File
@@ -6,6 +6,10 @@ node_modules
.env
.env.*
!.env.example
/.vscode
doc/.docusaurus/
doc/build/
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
+16 -16
View File
@@ -1,18 +1,18 @@
{
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"printWidth": 100,
"useTabs": false,
"trailingComma": "none",
"arrowParens": "always",
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"printWidth": 80,
"useTabs": true,
"trailingComma": "all",
"arrowParens": "always",
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
+13 -13
View File
@@ -1,15 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}"
}
]
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}"
}
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"editor.insertSpaces": false
}
+28
View File
@@ -0,0 +1,28 @@
# Attribution
We haven't rebuilt the wheel from scratch, here are the tools that have helped this project come to fruition.
(I am creating this file a bit late, some tools may be missing, hopefully over time I can get everything listed here).
## Web Client
Look at our [package.json](./package.json) for the packages we directly use.
- [Ionicons](https://ionic.io/ionicons) When looking for high quality icons, I go here first. Most of the icons in Watcharr are from here.
- [Wikimedia Commons](https://commons.wikimedia.org) For [Streaming provider icons](https://commons.wikimedia.org/wiki/Category:SVG_logos_of_video_streaming_services).
- [Penpot](https://github.com/penpot/penpot) For initial UI design and creating the logo.
- [Google Fonts](https://fonts.google.com/) For custom fonts and for a few icons too. Don't worry though, fonts/icons are included in the Watcharr download, there are **no** requests made to google.
## Server
Look at our [go.mod](./server/go.mod) for the packages we use.
- [TMDB](https://developer.themoviedb.org) Movie/show data.
- [IGDB](https://www.igdb.com/api) Game data.
## README.md
The tools I have used to create the projects README.
- [deviceframes](https://deviceframes.com)
Created the devices mockup preview image with this tool (and GIMP).
+13 -2
View File
@@ -1,9 +1,12 @@
#
# Backend
FROM golang:1.21-alpine AS server
#
FROM golang:1.22-alpine AS server
WORKDIR /server
COPY server/*.go server/go.* ./
COPY server/arr/*.go ./arr/
COPY server/game/*.go ./game/
# Required so we can build with cgo
RUN apk update && apk add --no-cache musl-dev gcc build-base
@@ -11,7 +14,9 @@ RUN apk update && apk add --no-cache musl-dev gcc build-base
# CGO_CFLAGS: https://github.com/mattn/go-sqlite3/issues/1164#issuecomment-1635253695
RUN go mod download && GOOS=linux CGO_ENABLED=1 CGO_CFLAGS="-D_LARGEFILE64_SOURCE" go build -o ./watcharr
#
# Frontend
#
FROM node:20-alpine AS ui
WORKDIR /app
@@ -21,13 +26,19 @@ COPY ./static ./static
RUN npm install && npm run build
#
# Production
#
FROM node:20-alpine AS runner
COPY --from=server /server/watcharr /
COPY --from=ui /app/build /ui
COPY --from=ui /app/package.json /app/package-lock.json /ui
RUN cd /ui && npm ci --omit=dev
# Install just the prod dependencies for final step.
# We --ignore-scripts, to stop the `prepare` script from auto-
# running, which is only meant for development (will error).
RUN cd /ui && npm ci --omit=dev --ignore-scripts=true
EXPOSE 3080
+39 -17
View File
@@ -7,49 +7,71 @@
<a href="https://watcharr.app"><img src="https://img.shields.io/website?label=DOCS&style=for-the-badge&url=https%3A%2F%2Fwatcharr.app" /></a>
<a href="https://github.com/sbondCo/Watcharr/issues"><img src="https://img.shields.io/github/issues-raw/sbondCo/Watcharr?label=ISSUES&style=for-the-badge" /></a>
<a href="/LICENSE"><img src="https://img.shields.io/github/license/sbondCo/Watcharr?style=for-the-badge" /></a>
<a href="https://matrix.to/#/#watcharr:matrix.org"><img src="https://img.shields.io/matrix/watcharr%3Amatrix.org?style=for-the-badge&logo=matrix" /></a>
</p>
I'm your new easily self-hosted content watched list. The place you store your watched (or watching, planned, etc) movies and tv shows, rate them and track their status.
I'm your new easily self-hosted content watched list. The place you store your watched (or watching, planned, etc) **movies** and **tv shows** (and **anime**), rate them and track their status.
With [some extra configuration](https://watcharr.app/docs/server_config/game-support-igdb) I can also track your **video games**.
I am built with Go and Svelte(Kit).
Feel free to abuse this demo instance (nicely), which runs on the latest `dev` build (there may be bugs, as new features are tested on here too): [https://beta.watcharr.app/](https://beta.watcharr.app/)
[Track Progress Until Next Version](https://github.com/orgs/sbondCo/projects/9/views/3)
[Track progress for the next version](https://github.com/orgs/sbondCo/projects/9/views/3).
### Contents
- [Screenshots](#screenshots)
- [Setup](#set-up)
- [Contributing](CONTRIBUTING.md)
- [Set Up](#set-up)
- [Community Made Tools](#community-made-tools)
- [Getting Help](#getting-help)
- [Contributing](#contributing)
# Screenshots
<p align="center">
| Homepage | Watched Show Hover |
| ---------------------------------------------------------- | ----------------------------------------------------------------------- |
| <img src="./screenshot/homepage.png" alt="Watched List" /> | <img src="./screenshot/homepage-poster-hover.png" alt="Watched List" /> |
<img src="./screenshot/devices-mock.png" alt="Overview" />
| Watched Show Status Change | Movie Details |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| <img src="./screenshot/homepage-poster-change-status.png" alt="Changing Show Status" /> | <img src="./screenshot/content-details-page.png" alt="Content Details Page" /> |
| Homepage | Watched Show Hover |
| -------------------------------------------------------------- | --------------------------------------------------------------------------- |
| <img src="./screenshot/homepage.png?v=2" alt="Watched List" /> | <img src="./screenshot/homepage-poster-hover.png?v=2" alt="Watched List" /> |
| User Profile | Discover |
| ------------------------------------------------------------------- | ---------------------------------------------------------------- |
| <img src="./screenshot/user-profile.png" alt="User Profile Page" /> | <img src="./screenshot/discover-page.png" alt="Discover Page" /> |
| Watched Show Status Change | Movie Details |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| <img src="./screenshot/homepage-poster-change-status.png?v=2" alt="Changing Show Status" /> | <img src="./screenshot/content-details-page.png?v=2" alt="Content Details Page" /> |
| Dark Homepage | Dark Content Details |
| ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| <img src="./screenshot/homepage-dark.png" alt="Dark Theme Homepage" /> | <img src="./screenshot/content-details-page-dark.png" alt="Dark Theme Content Page" /> |
| User Profile | Discover |
| ----------------------------------------------------------------------- | -------------------------------------------------------------------- |
| <img src="./screenshot/user-profile.png?v=2" alt="User Profile Page" /> | <img src="./screenshot/discover-page.png?v=2" alt="Discover Page" /> |
| Dark Homepage | Dark Content Details |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| <img src="./screenshot/homepage-dark.png?v=2" alt="Dark Theme Homepage" /> | <img src="./screenshot/content-details-page-dark.png?v=2" alt="Dark Theme Content Page" /> |
</p>
# Set Up
[Checkout our documentation](https://watcharr.app/docs/category/installation) for an up to date guide on setup! If you hate manuals, but love docker, this [docker-compose.yml](./docker-compose.yml) file is your friend.
[Checkout our documentation](https://watcharr.app/docs/category/installation) for an up to date guide on setup! If you hate manuals, but love docker, this [compose.yml](./compose.yml) file is your friend.
# Community Made Tools
Third-party tools made by the community for enhancing your Watcharr experience!
- [Kodi Plugin](https://github.com/airdogvan/watcharr_kodi) by [airdogvan](https://github.com/airdogvan) for automatically tracking your watched shows/movies.
Thanks to anyone that has made a script or tool for Watcharr. Feel free to add your own to the list if you have one!
**Note:** I cannot provide any assurances for these tools or stay on top of them (code review, etc), if you have any problems please open an issue in the project for the tool so that they can stay organized.
# Getting Help
If something isn't working for you or you are stuck, [creating an issue](https://github.com/sbondCo/Watcharr/issues/new) is the best way to get help! Every type of issue is accepted, so don't be afraid to ask anything!
You can also [join our space on Matrix](https://matrix.to/#/#watcharr:matrix.org) for support.
# Contributing
Please continue to our [contributing guide](CONTRIBUTING.md).
+7
View File
@@ -0,0 +1,7 @@
# Security Policy
## Reporting a Vulnerability
**Please do not report security vulnerabilities through public GitHub issues.**
You can reach out directly to [@irhm:matrix.org](https://matrix.to/#/@irhm:matrix.org) on matrix to discuss the vulnerability or you may [draft a new security advisory on this repository](https://github.com/sbondCo/Watcharr/security/advisories/new).
+24
View File
@@ -0,0 +1,24 @@
# This compose file will replace watcharrs
# built in UI with a custom one provided in
# a named volume (for use with ui-build image).
services:
watcharr:
# We dont need to build here too for testing if
# a custom ui works, so using latest prod image.
image: ghcr.io/sbondco/watcharr:latest
container_name: watcharr
ports:
- 3080:3080
volumes:
- ./container_data:/data
- type: volume
source: watcharr-ui
target: /ui
volume:
nocopy: true
subpath: build
volumes:
watcharr-ui:
external: true
@@ -1,5 +1,3 @@
version: "3"
# To test prod
services:
watcharr:
+12
View File
@@ -0,0 +1,12 @@
services:
watcharr:
# The :latest tag is used for simplicity, it is recommended
# to use an actual version, then when updating check the releases for changelogs.
image: ghcr.io/sbondco/watcharr:latest
container_name: watcharr
ports:
- 3080:3080
volumes:
# Contains all of watcharr data (database & cache)
- ./data:/data
restart: unless-stopped
+3 -1
View File
@@ -1,4 +1,6 @@
# Website
# Watcharr Docs
View the live site at [watcharr.app](https://watcharr.app/).
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
+1 -1
View File
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")]
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
+8
View File
@@ -0,0 +1,8 @@
{
"label": "Importing",
"position": 3,
"link": {
"type": "generated-index",
"description": "Guides for importing your data from other services."
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

+17
View File
@@ -0,0 +1,17 @@
---
sidebar_position: 1
---
# MyAnimeList
:::info Backup?
You may consider a backup of your server before starting any import. They are not easily reversible, though we do our best to ensure they are accurate and bug free!
:::
1. Export your list from MyAnimeList at: https://myanimelist.net/panel.php?go=export
![Hovering over poster](./img/mal/export.png)
2. Save the export anywhere and extract it to get your export `.xml` file.
3. Drag and drop your `.xml` file into Watcharr.
+6 -6
View File
@@ -1,8 +1,8 @@
{
"label": "Installation",
"position": 2,
"link": {
"type": "generated-index",
"description": "Choose how you would like to install Watcharr."
}
"label": "Installation",
"position": 2,
"link": {
"type": "generated-index",
"description": "Choose how you would like to install Watcharr."
}
}
@@ -0,0 +1,104 @@
---
sidebar_position: 2
description: Install and setup with Docker Compose for access through a subpath.
---
# Docker Compose (subpath)
Install and setup with Docker Compose for access through a subpath.
:::info Not a great experience at the moment!
Currently, hosting Watcharr via a subpath on your server is not very easy (unlike hosting under a subdomain). Hopefully this will change in the future, but as a temporary measure to at least allow hosting under a subpath, this method has been provided.
The following issue will continue to track this: https://github.com/sbondCo/Watcharr/issues/312
:::
## Installing
### Build UI
First we have to build the frontend with our subpath provided as an environment variable.
If you don't want to use `/watcharr` as your subpath, replace the value of `WATCHARR_BASE` before running the command.
```bash
docker run -e WATCHARR_BASE=/watcharr -v watcharr-ui:/ui --rm ghcr.io/sbondco/watcharr-ui-build:latest
```
Once the container has finished running the build script, it will exit and remove itself. The `watcharr-ui` volume will contain the built files.
### Install Watcharr
Now we can install Watcharr. You can copy the example below to get started:
```yaml title="compose.yml"
services:
watcharr:
# The :latest tag is used for simplicity, it is recommended
# to use an actual version, then when updating check the releases for changelogs.
image: ghcr.io/sbondco/watcharr:latest
container_name: watcharr
ports:
- 3080:3080
volumes:
# Contains all of watcharr data (database & cache)
- ./data:/data
# Use our volume containing built ui files
# instead of default ui included in image.
- type: volume
source: watcharr-ui
target: /ui
volume:
nocopy: true
subpath: build
restart: unless-stopped
volumes:
watcharr-ui:
external: true
```
:::danger first account
When **first** running Watcharr, make sure only you have access. The first user created will become admin.
:::
You can now start `Watcharr` like so:
```bash
docker compose up -d
```
If you didn't change the ports in the example, the server will be available at [http://localhost:3080/](http://localhost:3080/).
## Updating
:::danger Take care
We try taking care as to not release breaking changes, however it is still recommended that
you lookover changelogs before updating!
Breaking changes are marked at the top of releases: https://github.com/sbondCo/Watcharr/releases
:::
1. Update your built ui files by following the [Build UI](#build-ui) step again.
2. Update the `image` version in your `compose.yml` file.
Skip this step if you are using the `latest` tag.
```yaml
# eg. update v1.19.0 to v1.20.0 (or whatever version you are updating to)
image: ghcr.io/sbondco/watcharr:v1.19.0
```
3. Pull the new changes and re-create your container:
```bash
docker compose pull && docker compose down && docker compose up -d
```
And that is it!
+4 -4
View File
@@ -1,5 +1,6 @@
---
sidebar_position: 1
description: Install and setup with Docker Compose.
---
# Docker Compose
@@ -8,9 +9,7 @@ sidebar_position: 1
Installing Watcharr with a docker compose file is easy. You can copy the example below to get started:
```yaml title="docker-compose.yml"
version: "3"
```yaml title="compose.yml"
services:
watcharr:
# The :latest tag is used for simplicity, it is recommended
@@ -22,6 +21,7 @@ services:
volumes:
# Contains all of watcharr data (database & cache)
- ./data:/data
restart: unless-stopped
```
:::danger first account
@@ -51,7 +51,7 @@ Breaking changes are marked at the top of releases: https://github.com/sbondCo/W
Updating your server can be done in two steps:
1. Update the `image` version in your `docker-compose.yml` file.
1. Update the `image` version in your `compose.yml` file.
Skip this step if you are using the `latest` tag.
```yaml
+77
View File
@@ -0,0 +1,77 @@
---
sidebar_position: 11
description: Building from source for developing upon Watcharr.
---
# For Development
This guide will help you setup Watcharr for development in your local environment.
## Setup
This section assumes you will be forking the repo on Github, of course you can alter this section to work with your workflow, but if you intend to create a pull request with your work, it may be difficult if you're not also using Github (I don't know :()).
1. Fork the repository
On GitHub you can fork the repository with the 'Fork' button at the top.
![Fork button](./img/forking-repo.png)
2. Get the code by cloning your fork
```bash
git clone https://github.com/<your username>/Watcharr.git && \
cd Watcharr
```
## Setting Up Dependencies
You only need to do this once after pulling the codebase for the first time, and again every time the dependencies are changed/updated.
1. Install frontend dependencies (in the project root folder)
```
npm i
```
2. Install server dependencies (in the `server` folder)
```
go get .
```
## Running The Code
To run the code, you will need to open up two terminals, one for the frontend and the other for the backend.
1. Run the frontend (first terminal, in the project root folder)
```bash
npm run dev
```
2. Run the server (second terminal, in the project root folder)
```bash
npm run server
```
**Note:** If you're using Windows, running the server can be a little more complicated. You can follow this: https://github.com/sbondCo/Watcharr/discussions/430#discussioncomment-8894110 which amounts to these steps (the first 3 steps only need to be done once):
1. Set CGO_ENABLED environment variable with go
```
go env -w CGO_ENABLED=1
```
2. Install `gcc` (if you don't already have it installed) from https://jmeubank.github.io/tdm-gcc/ (found from this answer on stackoverflow: https://stackoverflow.com/a/43588236).
3. Install server dependencies again with `go get .` in the `server` folder.
4. Manually run the server, setting the MODE environment variable in powershell (from the `server` folder)
```
cmd /V /C "set MODE=DEV&& go run ."
```
3. Visit [http://localhost:5173/](http://localhost:5173/) and setup Watcharr.
+1
View File
@@ -1,5 +1,6 @@
---
sidebar_position: 10
description: Building and installing from source.
---
# From Source
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

+8
View File
@@ -0,0 +1,8 @@
{
"label": "Server Configuration",
"position": 2,
"link": {
"type": "generated-index",
"description": "Learn how to configure your server."
}
}
+41
View File
@@ -0,0 +1,41 @@
---
sidebar_position: 100
description: Backing up your server.
---
# Backing Up
Watcharr cannot handle backing up for you, but its simple structure should make it easy to slide it into your existing backup routine.
Once you have created your first backup, it's recommended that you try restoring from that backup to make sure everything is correct and will work in case you need to restore from it in the future.
:::danger Shutdown your server!
Always shutdown Watcharr before backing up its data, otherwise you run the risk of corrupting files (mainly your database).
:::
## Simple Steps
:::success Recommended
This is the recommended way to backup.
:::
Here are the steps that are run daily for the `beta.watcharr.app` instance.
1. Shutdown Watcharr.
2. Copy and backup the entire `data` folder (default location is `./data`, backup whichever folder your server is configured to store its data in).
3. Start Watcharr.
I call these the simple steps because they simply backup your entire server, if you ever need to restore your server, it will start up from its exact state at backup.
## Advanced Steps
:::danger Discouraged
Backing up this way is discouraged because new important files could be added later and missed.
:::
If you don't care about the warning not to backup this way, here are the "important" files that you can single out for backup:
- `watcharr.db` Your database, holds all users, their watchlists, etc.
- `watcharr.json` Server config.
- `img/up` Profile picture uploads.
- `img/games` Game posters (not exactly important, but scenarios in which this folder is not backed up have not been tested, only relevant for servers with game support enabled).
@@ -0,0 +1,14 @@
---
sidebar_position: 11
description: All environment variables you can use to start your server in a specific way.
---
# Environment Variables
Currently there is only one, and maybe it will stay that way forever (because the admin interface can handle most settings). A very lonely page right now ;(.
## `WATCHARR_DATA`
Make Watcharr use a custom directory for all of its data.
Defaults to `./data`.
@@ -0,0 +1,46 @@
---
sidebar_position: 1
description: Setting up video game support.
---
# Games Support (via IGDB/Twitch)
Game support in Watcharr, currently, must be enabled by you.
This involves setting up a Twitch developer account (phone number needed for 2FA which is required) and entering application credentials into Watcharr, that can then be used for looking up game info via IGDB.
P.S. These steps are stolen from [igdb api docs](https://api-docs.igdb.com/#account-creation), I've tried to make it easier to follow with screenshots.
## Setup Steps
### Setup On Twitch
1. Sign up for a [Twitch](https://dev.twitch.tv/login) account.
Click login with twitch, then create an account in the Sign Up tab.
2. Enable two factor authentication in your [account Security settings](https://www.twitch.tv/settings/security) (currently requires a phone number).
3. [Register a new Application in the Twitch Developer Console](https://dev.twitch.tv/console/apps/create).
These settings will do (name can be anything, we don't use OAuth, but a redirect url is required; localhost will do):
![Registering twitch application](./img/twitch-register-app.png)
4. [Click manage](https://dev.twitch.tv/console/apps) on your newly created application.
5. Click 'New Secret' to generate a new Client Secret.
6. Take a note of your Client ID and new Client Secret (by leaving this tab open, until we are ready to copy the values into Watcharr).
### Setup On Watcharr
1. Login to Watcharr with an Admin account and navigate to server settings.
![Navigating to server settings in Watcharr](./img/watcharr-settings-dropdown.png)
2. Scroll down and click on the Twitch service.
![Twitch service config button](./img/watcharr-twitch-service.png)
3. Enter your Client ID and Client Secret (from Twitch Application page, step 6 on twitch setup steps)
![Twitch service config](./img/watcharr-twitch-config.png)
4. Click save, and start searching for your favourite games!
![Watcharr game details page](./img/watcharr-game-details.png)
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

+28
View File
@@ -0,0 +1,28 @@
---
sidebar_position: 9
description: Enabling Jellyfin as an authentication provider.
---
# Jellyfin Authentication
Watcharr can use your Jellyfin server as an authentication provider. There is just one simple step to set this up.
:::danger Take care
It is not recommended that this value is changed once it has been set and users have signed up.
Changing this setting can cause users to be unable to login to the correct account.
:::
## Setup Steps
1. Login to Watcharr with an Admin account and navigate to server settings.
![Navigating to server settings in Watcharr](./img/watcharr-settings-dropdown.png)
2. Scroll down to find the Jellyfin Host setting and enter the URL to your Jellyfin server.
![Entering Jellyfin server URL into input](./img/watcharr-jellyfin-host-setting.png)
3. Jellyfin authentication has now been enabled! Go back to the login screen and you will be able to login via Jellyfin.
+24
View File
@@ -0,0 +1,24 @@
---
sidebar_position: 10
description: Enabling Plex as an authentication provider.
---
# Plex Authentication
Watcharr can use Plex as an authentication provider. There is just one simple step to set this up.
## Setup Steps
1. Login to Watcharr with an Admin account and navigate to server settings.
![Navigating to server settings in Watcharr](./img/watcharr-settings-dropdown.png)
2. Scroll down and find the Plex Host setting.
![Plex host setting input](./img/watcharr-plex-host-setting.png)
3. Enter the URL to your home Plex server.
You will see your Plex machine identifier popup below the input after it's saved, if it worked.
Only users with access to your library will be able to signup via Plex.
![Entering home Plex server URL into input](./img/watcharr-plex-host-setting-filled.png)
+28
View File
@@ -0,0 +1,28 @@
---
sidebar_position: 10
description: Getting admin privileges for your account without already having access to an account with admin.
---
# Restoring Admin Priviliges
This guide will help you restore/give admin access to any account without needing an account with admin. If you ever accidentally remove your permissions, this is the easiest way to get them back.
All you will need is access to the `watcharr.log` file.
## Steps
1. Login with the account you'd like to give admin to.
2. Navigate to the `/request_admin` page manually (ex: `127.0.0.1:3080/request_admin`) and click the `request` button.
![requesting an admin token](./img/request-admin/request-admin-btn.png)
3. Check your `watcharr.log` file (or simply check `docker compose logs` if using docker compose) and look for the generated admin token (highlighted in the image below).
![finding admin token in log](./img/request-admin/admin-token-generated-log-example.png)
4. Enter the code from the log (you should have been taken here after clicking the request button in step 2).
![redeeming admin token](./img/request-admin/redeeming-admin-token.png)
5. Click `Check Token`, if it is correct and still valid (they expire after ~2 minutes or once used), your account will now have admin.
+6 -6
View File
@@ -1,8 +1,8 @@
{
"label": "Usage",
"position": 3,
"link": {
"type": "generated-index",
"description": "Hopefully Watcharr is easy enough to get started with and use, but incase you are stuck, one of these usage guides may help."
}
"label": "Usage",
"position": 3,
"link": {
"type": "generated-index",
"description": "Hopefully Watcharr is easy enough to get started with and use, but incase you are stuck, one of these usage guides may help."
}
}
+91 -85
View File
@@ -1,101 +1,107 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const { themes } = require("prism-react-renderer");
const lightTheme = themes.github;
const darkTheme = themes.dracula;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Watcharr Docs",
tagline:
"Open source, self-hostable watched list for all your content with user authentication, modern and clean UI and a very simple setup. ",
favicon: "img/favicon.png",
title: "Watcharr Docs",
tagline:
"Open source, self-hostable watched list for all your content with user authentication, modern and clean UI and a very simple setup. ",
favicon: "img/favicon.png",
// Set the production url of your site here
url: "https://watcharr.app",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",
// Set the production url of your site here
url: "https://watcharr.app",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "sbondCo", // Usually your GitHub org/user name.
projectName: "Watcharr", // Usually your repo name.
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "sbondCo", // Usually your GitHub org/user name.
projectName: "Watcharr", // Usually your repo name.
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
trailingSlash: false,
trailingSlash: false,
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "en",
locales: ["en"]
},
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "en",
locales: ["en"],
},
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/sbondCo/Watcharr/tree/dev/doc"
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/sbondCo/Watcharr/tree/dev/doc"
},
theme: {
customCss: require.resolve("./src/css/custom.css")
}
})
]
],
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/sbondCo/Watcharr/tree/dev/doc",
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/sbondCo/Watcharr/tree/dev/doc",
},
theme: {
customCss: [
"./node_modules/viewerjs/dist/viewer.css",
require.resolve("./src/css/custom.css"),
],
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: "img/social-card.png",
navbar: {
title: "Watcharr",
logo: {
alt: "Watcharr Logo",
src: "img/favicon.png"
},
items: [
{
type: "docSidebar",
sidebarId: "tutorialSidebar",
position: "left",
label: "Docs"
},
{
type: "docsVersionDropdown"
},
{
href: "https://github.com/sbondCo/Watcharr",
label: "GitHub",
position: "right"
}
]
},
prism: {
theme: lightCodeTheme
// darkTheme: darkCodeTheme
},
colorMode: {
defaultMode: "light",
// Dark theme currently disabled.. no time to fix the icons etc.
disableSwitch: true
}
})
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: "img/social-card.png",
navbar: {
title: "Watcharr",
logo: {
alt: "Watcharr Logo",
src: "img/favicon.png",
},
items: [
{
type: "docSidebar",
sidebarId: "tutorialSidebar",
position: "left",
label: "Docs",
},
{
href: "https://beta.watcharr.app",
label: "Demo",
position: "right",
},
{
href: "https://github.com/sbondCo/Watcharr",
label: "GitHub",
position: "right",
},
],
},
prism: {
theme: lightTheme,
darkTheme: darkTheme,
},
colorMode: {
defaultMode: "light",
// Dark theme currently disabled.. no time to fix the icons etc.
disableSwitch: true,
},
}),
};
module.exports = config;
+4822 -2949
View File
File diff suppressed because it is too large Load Diff
+42 -41
View File
@@ -1,43 +1,44 @@
{
"name": "watcharr-doc",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.4.3",
"@docusaurus/preset-classic": "2.4.3",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.3"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": ">=16.14"
}
"name": "watcharr-doc",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "3.1.1",
"@docusaurus/preset-classic": "3.1.1",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.1.0",
"prism-react-renderer": "^2.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viewerjs": "^1.11.6"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.1.1"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": ">=18.0"
}
}
+4 -4
View File
@@ -13,11 +13,11 @@
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{ type: "autogenerated", dirName: "." }]
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{ type: "autogenerated", dirName: "." }],
// But you can create a sidebar manually
/*
// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
+52 -49
View File
@@ -3,59 +3,62 @@ import clsx from "clsx";
import styles from "./styles.module.css";
const FeatureList = [
{
title: "Free and Open",
Svg: require("@site/static/img/icon/code-slash.svg").default,
description: (
<>
Watcharr is free and open source software distributed under the MIT license. Feel free to
browse, modify or contribute!
</>
)
},
{
title: "Simple",
Svg: require("@site/static/img/icon/happy.svg").default,
description: (
<>
Watcharr is incredibly easy to dive into. Install without hassle and get started with the
seamless and intuitive user experience.
</>
)
},
{
title: "Built With Go and Svelte",
Svg: require("@site/static/img/icon/go.svg").default,
description: (
<>Don't know what else to add here, so now you know Watcharr is built with Go and Svelte.</>
)
}
{
title: "Free and Open",
Svg: require("@site/static/img/icon/code-slash.svg").default,
description: (
<>
Watcharr is free and open source software distributed under the MIT
license. Feel free to browse, modify or contribute!
</>
),
},
{
title: "Simple",
Svg: require("@site/static/img/icon/happy.svg").default,
description: (
<>
Watcharr is incredibly easy to dive into. Install without hassle and get
started with the seamless and intuitive user experience.
</>
),
},
{
title: "Built With Go and Svelte",
Svg: require("@site/static/img/icon/go.svg").default,
description: (
<>
Don't know what else to add here, so now you know Watcharr is built with
Go and Svelte.
</>
),
},
];
function Feature({ Svg, title, description }) {
return (
<div className={clsx("col col--4")}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
<p>{description}</p>
</div>
</div>
);
return (
<div className={clsx("col col--4")}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
<p>{description}</p>
</div>
</div>
);
}
export default function HomepageFeatures() {
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
);
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
);
}
@@ -1,11 +1,11 @@
.features {
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
}
.featureSvg {
height: 200px;
width: 200px;
height: 200px;
width: 200px;
}
+71
View File
@@ -0,0 +1,71 @@
import React, { useEffect } from "react";
import styles from "./styles.module.css";
import clsx from "clsx";
import Viewer from "viewerjs";
function TwoColFeat({ title, description, imgSrc }) {
return (
<div className={clsx(styles.twoCol)}>
<div>
<h2>{title}</h2>
<p>{description}</p>
</div>
<div>
<img src={imgSrc} alt="" loading="lazy" />
</div>
</div>
);
}
export function HomepageTwoColFeats() {
useEffect(() => {
const ctr = document.getElementById("homepage-two-col-feats");
console.debug("Starting image viewer", ctr);
new Viewer(ctr, {
navbar: 0,
toolbar: {
zoomIn: 2,
zoomOut: 2,
next: 2,
prev: 2,
},
title: 0,
className: "twoColViewer",
});
}, []);
return (
<section id="homepage-two-col-feats" className={styles.twoColFeats}>
<TwoColFeat
title="Neat UI"
description="We just look lightweight."
imgSrc="https://github.com/sbondCo/Watcharr/raw/dev/screenshot/homepage.png?v=2"
/>
<TwoColFeat
title="Easy To Use"
description="Not much to it, other than ease of use."
imgSrc="https://github.com/sbondCo/Watcharr/raw/dev/screenshot/homepage-poster-change-status.png?v=2"
/>
<TwoColFeat
title="In-Depth Details"
description="About your favourite content."
imgSrc="https://github.com/sbondCo/Watcharr/raw/dev/screenshot/content-details-page.png?v=2"
/>
<TwoColFeat
title="Personal Stats and Configuration"
description="Make it how you like."
imgSrc="https://github.com/sbondCo/Watcharr/raw/dev/screenshot/user-profile.png?v=2"
/>
<TwoColFeat
title="Discovery"
description="Find the latest trending content."
imgSrc="https://github.com/sbondCo/Watcharr/raw/dev/screenshot/discover-page.png?v=2"
/>
<TwoColFeat
title="Dark Theme"
description="For you who are still unsatisfied. ;("
imgSrc="https://github.com/sbondCo/Watcharr/raw/dev/screenshot/content-details-page-dark.png?v=2"
/>
</section>
);
}
@@ -0,0 +1,53 @@
.twoColFeats {
display: flex;
align-items: center;
margin-left: auto;
margin-right: auto;
flex-flow: column;
width: 100%;
max-width: 1300px;
}
.twoCol {
display: flex;
flex-flow: row;
width: 100%;
padding: 2.5rem 5rem;
gap: 50px;
background-color: rgb(236, 236, 236);
}
.twoCol:nth-child(even) {
flex-flow: row-reverse;
background-color: transparent;
}
.twoCol > div {
width: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-flow: column;
}
.twoCol > div > img {
width: 100%;
border-radius: 12px;
box-shadow: 0px 0px 5px rgb(121, 121, 121);
cursor: pointer;
}
@media screen and (max-width: 850px) {
.twoCol,
.twoCol:nth-child(even) {
flex-flow: column;
}
.twoCol > div {
width: 100%;
}
.twoCol > div > img {
max-width: 500px;
}
}
+31 -17
View File
@@ -6,25 +6,39 @@
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}
/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme="dark"] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}
.twoColViewer .viewer-close {
right: 10px;
top: 10px;
width: 50px;
height: 50px;
}
/* Stupid poopin fix for viewerjs because whatever is bundling the css
isn't keeping the order of this correctly. All this time wasted and it
was just opaque ;( BUT ONLY IN THE BUILD AAAAAAAAAAAAAAAAAAAAAA */
.viewer-in {
opacity: 1 !important;
}
+41 -36
View File
@@ -7,45 +7,50 @@ import LogoCol from "@site/static/img/logo-col.png";
import styles from "./index.module.css";
import clsx from "clsx";
import { HomepageTwoColFeats } from "../components/TwoColFeat";
function HomepageHeader() {
const { siteConfig } = useDocusaurusContext();
return (
<header className="hero shadow--lw">
<div className={styles.heroContainer}>
<div className={styles.heroWrapper}>
<img src={LogoCol} />
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link className="button button--secondary button--lg" to="/docs/introduction">
Get Started
</Link>
<Link
className="button button--secondary button--outline button--lg"
to="https://beta.watcharr.app"
target="_blank"
>
Demo
</Link>
</div>
</div>
</div>
</header>
);
const { siteConfig } = useDocusaurusContext();
return (
<header className="hero shadow--lw">
<div className={styles.heroContainer}>
<div className={styles.heroWrapper}>
<img src={LogoCol} />
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/introduction"
>
Get Started
</Link>
<Link
className="button button--secondary button--outline button--lg"
to="https://beta.watcharr.app"
target="_blank"
>
Demo
</Link>
</div>
</div>
</div>
</header>
);
}
export default function Home() {
const { siteConfig } = useDocusaurusContext();
return (
<Layout
title={`${siteConfig.title}`}
description="Description will go into a meta tag in <head />"
>
<HomepageHeader />
<main>
<HomepageFeatures />
</main>
</Layout>
);
const { siteConfig } = useDocusaurusContext();
return (
<Layout
title={`${siteConfig.title}`}
description="Description will go into a meta tag in <head />"
>
<HomepageHeader />
<main>
<HomepageFeatures />
<HomepageTwoColFeats />
</main>
</Layout>
);
}
+18 -18
View File
@@ -4,31 +4,31 @@
*/
.heroContainer {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
.heroWrapper {
display: flex;
align-items: center;
justify-content: center;
flex-flow: column;
max-width: 600px;
padding-left: 2rem;
padding-right: 2rem;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
flex-flow: column;
max-width: 600px;
padding-left: 2rem;
padding-right: 2rem;
text-align: center;
}
.heroWrapper img {
width: 30vh;
max-width: 250px;
width: 30vh;
max-width: 250px;
}
.buttons {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
}
-10
View File
@@ -1,10 +0,0 @@
version: "3"
services:
watcharr:
image: ghcr.io/sbondco/watcharr:latest
container_name: watcharr
ports:
- 3080:3080
volumes:
- ./container_data:/data
+3
View File
@@ -0,0 +1,3 @@
This folder is for any _extra_ images that we produce.
The main watcharr Dockerfile remains in project root.
+16
View File
@@ -0,0 +1,16 @@
#
# Frontend
#
FROM node:20-alpine AS ui
COPY ./docker/ui-build/entrypoint.sh /entrypoint.sh
RUN ["chmod", "+x", "/entrypoint.sh"]
WORKDIR /app
COPY package*.json vite.config.ts svelte.config.js tsconfig.json ./
COPY ./src ./src
COPY ./static ./static
VOLUME /ui
ENTRYPOINT ["/entrypoint.sh"]
+7
View File
@@ -0,0 +1,7 @@
Image for building watcharr ui.
Accepts environment variables:
- `WATCHARR_BASE`
https://watcharr.app/docs/installation/docker-compose-subpath
+15
View File
@@ -0,0 +1,15 @@
# To test prod
services:
watcharr-ui-build:
build:
context: ../../
dockerfile: ./docker/ui-build/Dockerfile
container_name: watcharr-ui-build
volumes:
- watcharr-ui:/ui
environment:
WATCHARR_BASE: "/sp"
volumes:
watcharr-ui:
name: "watcharr-ui"
+25
View File
@@ -0,0 +1,25 @@
#!/bin/sh
# This is loosely based on the main containers Dockerfile commands.
# Just everything needed to get ui built and ready and nothing else.
set -x
echo "wuib: Starting build"
# Install all deps
/usr/local/bin/npm install
# Run build
/usr/local/bin/npm run build
# Remove any existing build files from volume
rm -rf /ui/build
# Move build folder to /ui
mv /app/build /ui
# Move package.json and lock file to /ui/build for final npm ci call
mv /app/package.json /app/package-lock.json /ui/build
# cd to build files final destination and install dependencies for production
cd /ui/build && /usr/local/bin/npm ci --omit=dev --ignore-scripts=true
+8409 -8028
View File
File diff suppressed because it is too large Load Diff
+40 -39
View File
@@ -1,41 +1,42 @@
{
"name": "watcharr",
"version": "1.29.0",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"server": "cd ./server && MODE=DEV go run ."
},
"devDependencies": {
"@sveltejs/adapter-node": "^2.0.2",
"@sveltejs/kit": "^2.0.6",
"@types/papaparse": "^5.3.14",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"@vite-pwa/sveltekit": "^0.3.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"svelte": "^4.2.8",
"svelte-check": "^3.6.2",
"svelte-eslint-parser": "^0.33.1",
"svelte-preprocess": "^5.1.3",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
"vite": "^5.0.10"
},
"type": "module",
"dependencies": {
"axios": "^1.6.2",
"blurhash": "^2.0.5",
"papaparse": "^5.4.1"
}
"name": "watcharr",
"version": "2.0.2",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"prepare": "svelte-kit sync",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"server": "cd ./server && MODE=DEV go run ."
},
"devDependencies": {
"@sveltejs/adapter-node": "^5.2.12",
"@sveltejs/kit": "^2.16.0",
"@types/papaparse": "^5.3.15",
"@typescript-eslint/eslint-plugin": "^8.18.2",
"@typescript-eslint/parser": "^8.18.2",
"@vite-pwa/sveltekit": "^0.6.6",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.45.1",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.2.6",
"sass": "^1.83.0",
"svelte": "^5.17.3",
"svelte-check": "^4.1.3",
"svelte-eslint-parser": "^0.42.0",
"svelte-preprocess": "^6.0.3",
"typescript": "^5.7.2",
"vite": "^6.0.7"
},
"type": "module",
"dependencies": {
"axios": "^1.7.4",
"blurhash": "^2.0.5",
"papaparse": "^5.4.1"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 430 KiB

After

Width:  |  Height:  |  Size: 488 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 KiB

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 661 KiB

After

Width:  |  Height:  |  Size: 900 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 820 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 743 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 816 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

+1
View File
@@ -0,0 +1 @@
These screenshots were first uploaded Dec 10, 2023. They were retired on Jan 19, 2025.
Binary file not shown.

After

Width:  |  Height:  |  Size: 430 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 75 KiB

+69 -12
View File
@@ -10,19 +10,36 @@ import (
type ActivityType string
// _AUTO activities are for when logic updates something for the user (automations basically).
var (
ADDED_WATCHED ActivityType = "ADDED_WATCHED"
REMOVED_WATCHED ActivityType = "REMOVED_WATCHED"
RATING_CHANGED ActivityType = "RATING_CHANGED"
STATUS_CHANGED ActivityType = "STATUS_CHANGED"
THOUGHTS_CHANGED ActivityType = "THOUGHTS_CHANGED"
THOUGHTS_REMOVED ActivityType = "THOUGHTS_REMOVED"
IMPORTED_WATCHED ActivityType = "IMPORTED_WATCHED"
IMPORTED_RATING ActivityType = "IMPORTED_RATING" // Imported rating, but with no rating acts as original import of content to old platform (where they are importing from) activity
SEASON_ADDED ActivityType = "SEASON_ADDED"
SEASON_REMOVED ActivityType = "SEASON_REMOVED"
SEASON_RATING_CHANGED ActivityType = "SEASON_RATING_CHANGED"
SEASON_STATUS_CHANGED ActivityType = "SEASON_STATUS_CHANGED"
ADDED_WATCHED ActivityType = "ADDED_WATCHED"
REMOVED_WATCHED ActivityType = "REMOVED_WATCHED"
RATING_CHANGED ActivityType = "RATING_CHANGED"
STATUS_CHANGED ActivityType = "STATUS_CHANGED"
STATUS_CHANGED_AUTO ActivityType = "STATUS_CHANGED_AUTO"
THOUGHTS_CHANGED ActivityType = "THOUGHTS_CHANGED"
THOUGHTS_REMOVED ActivityType = "THOUGHTS_REMOVED"
IMPORTED_WATCHED ActivityType = "IMPORTED_WATCHED"
IMPORTED_WATCHED_JF ActivityType = "IMPORTED_WATCHED_JF"
IMPORTED_WATCHED_PLEX ActivityType = "IMPORTED_WATCHED_PLEX"
IMPORTED_RATING ActivityType = "IMPORTED_RATING" // Imported rating, but with no rating acts as original import of content to old platform (where they are importing from) activity
IMPORTED_ADDED_WATCHED ActivityType = "IMPORTED_ADDED_WATCHED" // Imported watched date, so we can save the original watch dates of content from users old platform (where they are importing from).
IMPORTED_ADDED_WATCHED_JF ActivityType = "IMPORTED_ADDED_WATCHED_JF"
IMPORTED_ADDED_WATCHED_PLEX ActivityType = "IMPORTED_ADDED_WATCHED_PLEX"
SEASON_ADDED ActivityType = "SEASON_ADDED"
SEASON_ADDED_AUTO ActivityType = "SEASON_ADDED_AUTO"
SEASON_ADDED_JF ActivityType = "SEASON_ADDED_JF"
SEASON_ADDED_PLEX ActivityType = "SEASON_ADDED_PLEX"
SEASON_REMOVED ActivityType = "SEASON_REMOVED"
SEASON_RATING_CHANGED ActivityType = "SEASON_RATING_CHANGED"
SEASON_STATUS_CHANGED ActivityType = "SEASON_STATUS_CHANGED"
SEASON_STATUS_CHANGED_AUTO ActivityType = "SEASON_STATUS_CHANGED_AUTO"
EPISODE_ADDED ActivityType = "EPISODE_ADDED"
EPISODE_ADDED_JF ActivityType = "EPISODE_ADDED_JF"
EPISODE_ADDED_PLEX ActivityType = "EPISODE_ADDED_PLEX"
EPISODE_REMOVED ActivityType = "EPISODE_REMOVED"
EPISODE_RATING_CHANGED ActivityType = "EPISODE_RATING_CHANGED"
EPISODE_STATUS_CHANGED ActivityType = "EPISODE_STATUS_CHANGED"
)
type Activity struct {
@@ -48,6 +65,10 @@ type ActivityAddRequest struct {
CustomDate *time.Time `json:"customDate,omitempty"`
}
type ActivityUpdateRequest struct {
CustomDate time.Time `json:"customDate" binding:"required"`
}
func getActivity(db *gorm.DB, userId uint, watchedId uint) ([]Activity, error) {
activity := new([]Activity)
res := db.Model(&Activity{}).Where("user_id = ? AND watched_id = ?", userId, watchedId).Find(&activity)
@@ -71,3 +92,39 @@ func addActivity(db *gorm.DB, userId uint, ar ActivityAddRequest) (Activity, err
slog.Debug("Adding activity", "added_activity", activity)
return activity, nil
}
func updateActivity(db *gorm.DB, userId uint, id uint, activityUpdateRequest ActivityUpdateRequest) error {
if id == 0 {
return errors.New("id must be set to update an activity")
}
if activityUpdateRequest.CustomDate.IsZero() {
return errors.New("customDate must be set to update an activity")
}
res := db.Model(&Activity{}).Where("user_id = ? AND id = ?", userId, id).Update("custom_date", activityUpdateRequest.CustomDate)
if res.Error != nil {
slog.Error("Error updating activity in database", "error", res.Error.Error())
return errors.New("failed updating activity in database")
}
if res.RowsAffected < 1 {
slog.Error("No activities were updated. This may be because the activity doesn't exist or is not owned by the calling user.")
return errors.New("failed updating activity in database")
}
slog.Debug("Updating activity", "updated_activity", id)
return nil
}
func deleteActivity(db *gorm.DB, userId uint, id uint) error {
if id == 0 {
return errors.New("an id must be provided to delete an activity")
}
res := db.Where("user_id = ?", userId).Delete(&Activity{}, id)
if res.Error != nil {
slog.Error("Error deleting activity in database", "error", res.Error.Error())
return errors.New("failed deleting activity in database")
}
if res.RowsAffected < 1 {
slog.Error("No activities were deleted. This may be because the activity doesn't exist or is not owned by the calling user.")
return errors.New("failed deleting activity from database")
}
return nil
}
+2
View File
@@ -56,6 +56,7 @@ type RadarrTestResponse struct {
LanguageProfiles []arr.LanguageProfile `json:"languageProfiles"`
}
// Response given to users with PERM_REQUEST_CONTENT - should never include sensitive info
func testSonarr(p ArrTestParams) (SonarrTestResponse, error) {
sonarr := arr.New(arr.SONARR, &p.Host, &p.Key)
qps, err := sonarr.GetQualityProfiles()
@@ -76,6 +77,7 @@ func testSonarr(p ArrTestParams) (SonarrTestResponse, error) {
return SonarrTestResponse{QualityProfiles: qps, RootFolders: rfs, LanguageProfiles: lps}, nil
}
// Response given to users with PERM_REQUEST_CONTENT - should never include sensitive info
func testRadarr(p ArrTestParams) (RadarrTestResponse, error) {
radarr := arr.New(arr.RADARR, &p.Host, &p.Key)
qps, err := radarr.GetQualityProfiles()
+88 -20
View File
@@ -10,6 +10,7 @@ import (
"log/slog"
"net/http"
"net/url"
"strconv"
)
type ArrType string
@@ -37,6 +38,7 @@ type ArrRequest struct {
AutomaticSearch bool `json:"automaticSearch"`
Title string `json:"title"` // content name
Year int `json:"year"` // content year
TMDBID int `json:"tmdbId"`
}
type SonarrRequest struct {
@@ -49,7 +51,6 @@ type SonarrRequest struct {
type RadarrRequest struct {
ArrRequest
TMDBID int `json:"tmdbId"`
}
type SonarrSeasons struct {
@@ -66,9 +67,9 @@ func New(t ArrType, host *string, key *string) *Arr {
}
func (a *Arr) GetQualityProfiles() ([]QualityProfile, error) {
slog.Info("GetQualityProfiles", "type", a.Type, "host", *a.Host, "key", *a.Key)
slog.Debug("GetQualityProfiles", "type", a.Type, "host", *a.Host, "key", *a.Key)
var resp []QualityProfile
err := request(*a.Host, "/qualityprofile", map[string]string{"apikey": *a.Key}, &resp)
_, err := request(*a.Host, "/qualityprofile", map[string]string{"apikey": *a.Key}, &resp)
if err != nil {
slog.Error("GetQualityProfiles request failed", "service", a.Type, "error", err)
return []QualityProfile{}, errors.New("request to service failed")
@@ -77,9 +78,9 @@ func (a *Arr) GetQualityProfiles() ([]QualityProfile, error) {
}
func (a *Arr) GetRootFolders() ([]RootFolder, error) {
slog.Info("GetRootFolders", "type", a.Type, "host", *a.Host, "key", *a.Key)
slog.Debug("GetRootFolders", "type", a.Type, "host", *a.Host, "key", *a.Key)
var resp []RootFolder
err := request(*a.Host, "/rootfolder", map[string]string{"apikey": *a.Key}, &resp)
_, err := request(*a.Host, "/rootfolder", map[string]string{"apikey": *a.Key}, &resp)
if err != nil {
slog.Error("GetRootFolders request failed", "service", a.Type, "error", err)
return []RootFolder{}, errors.New("request to service failed")
@@ -88,10 +89,11 @@ func (a *Arr) GetRootFolders() ([]RootFolder, error) {
}
func (a *Arr) GetLangaugeProfiles() ([]LanguageProfile, error) {
slog.Info("GetLangaugeProfiles", "type", a.Type, "host", *a.Host, "key", *a.Key)
slog.Debug("GetLangaugeProfiles", "type", a.Type, "host", *a.Host, "key", *a.Key)
var resp []LanguageProfile
// languageprofile supposedly deprecated.. but new language endpoint doesnt seem to work.. note probs to switch soon
err := request(*a.Host, "/languageprofile", map[string]string{"apikey": *a.Key}, &resp)
// TODO languages are handled diffferently in Sonarr now, I think we can remove all language stuff, now controlled per profile.
_, err := request(*a.Host, "/languageprofile", map[string]string{"apikey": *a.Key}, &resp)
if err != nil {
slog.Error("GetLangaugeProfiles request failed", "service", a.Type, "error", err)
return []LanguageProfile{}, errors.New("request to service failed")
@@ -99,7 +101,69 @@ func (a *Arr) GetLangaugeProfiles() ([]LanguageProfile, error) {
return resp, nil
}
// TODO do title! and year?
func (a *Arr) RunCommand(name string) (CommandResponse, error) {
slog.Debug("RunCommand", "name", name, "type", a.Type, "host", *a.Host, "key", *a.Key)
var resp CommandResponse
err := requestPost(*a.Host, "/command", *a.Key, map[string]interface{}{"name": name}, &resp)
if err != nil {
slog.Error("RunCommand request failed", "name", name, "service", a.Type, "error", err)
return CommandResponse{}, errors.New("request to service failed")
}
return resp, nil
}
// arrId = movieId/seriesId on radarr/sonarr
func (a *Arr) GetQueueDetails(arrId string, resp interface{}) error {
slog.Debug("GetQueueDetails", "arrId", arrId, "type", a.Type, "host", *a.Host, "key", *a.Key)
p := map[string]string{"apikey": *a.Key}
if a.Type == RADARR {
p["movieId"] = arrId
} else if a.Type == SONARR {
p["seriesId"] = arrId
} else {
return errors.New("invalid arr type")
}
_, err := request(*a.Host, "/queue/details", p, resp)
if err != nil {
slog.Error("GetQueueDetails request failed", "arrId", arrId, "service", a.Type, "error", err)
return errors.New("request to service failed")
}
return nil
}
// Get movie/show
func (a *Arr) GetContent(arrId int) (MovieSerie, int, error) {
slog.Debug("GetContent", "arrId", arrId, "type", a.Type, "host", *a.Host, "key", *a.Key)
e := "movie"
if a.Type == SONARR {
e = "series"
}
arrIdStr := strconv.Itoa(arrId)
var resp MovieSerie
respStatusCode, err := request(*a.Host, "/"+e+"/"+arrIdStr, map[string]string{"apikey": *a.Key}, &resp)
if err != nil {
slog.Error("GetContent request failed", "arrId", arrId, "service", a.Type, "error", err)
return MovieSerie{}, respStatusCode, errors.New("request to service failed")
}
return resp, respStatusCode, nil
}
func (a *Arr) LookupByTmdbId(tmdbId int) ([]MovieSerie, error) {
slog.Debug("LookupByTmdbId", "tmdbId", tmdbId, "type", a.Type, "host", *a.Host, "key", *a.Key)
e := "movie"
if a.Type == SONARR {
e = "series"
}
var resp []MovieSerie
tmdbIdStr := strconv.Itoa(tmdbId)
_, err := request(*a.Host, "/"+e+"/lookup", map[string]string{"apikey": *a.Key, "term": "tmdb:" + tmdbIdStr}, &resp)
if err != nil {
slog.Error("LookupByTmdbId request failed", "tmdbId", tmdbId, "service", a.Type, "error", err)
return []MovieSerie{}, errors.New("request to service failed")
}
return resp, nil
}
func (a *Arr) BuildAddShowBody(r SonarrRequest) map[string]interface{} {
req := map[string]interface{}{
"title": r.Title,
@@ -135,26 +199,27 @@ func (a *Arr) BuildAddMovieBody(r RadarrRequest) map[string]interface{} {
return req
}
func (a *Arr) AddContent(b map[string]interface{}) error {
func (a *Arr) AddContent(b map[string]interface{}) (map[string]interface{}, error) {
ep := "series"
if a.Type == RADARR {
ep = "movie"
}
slog.Debug("AddContent", "type", ep, "body", b)
var resp interface{}
var resp map[string]interface{}
err := requestPost(*a.Host, "/"+ep, *a.Key, b, &resp)
if err != nil {
slog.Error("AddContent request failed", "service", a.Type, "error", err)
return errors.New("request to service failed")
return map[string]interface{}{}, errors.New("request to service failed")
}
return nil
slog.Debug("AddContent", "type", ep, "created_id", resp["id"])
return resp, nil
}
func request(host string, ep string, p map[string]string, resp interface{}) error {
slog.Debug("tmdbAPIRequest", "endpoint", ep, "params", p)
func request(host string, ep string, p map[string]string, resp interface{}) (int, error) {
slog.Debug("arrAPIRequest", "endpoint", ep, "params", p)
base, err := url.Parse(host)
if err != nil {
return errors.New("failed to parse api uri")
return 0, errors.New("failed to parse api uri")
}
// Path params
@@ -172,23 +237,26 @@ func request(host string, ep string, p map[string]string, resp interface{}) erro
// Run get request
res, err := http.Get(base.String())
if err != nil {
return err
if res != nil {
return res.StatusCode, err
}
return 0, err
}
body, err := io.ReadAll(res.Body)
res.Body.Close()
if err != nil {
return err
return res.StatusCode, err
}
if res.StatusCode != 200 {
slog.Error("arr non 200 status code:", "status_code", res.StatusCode)
return errors.New(string(body))
return res.StatusCode, errors.New(string(body))
}
// slog.Info("", "body", body)
err = json.Unmarshal([]byte(body), &resp)
if err != nil {
return err
return res.StatusCode, err
}
return nil
return res.StatusCode, nil
}
func requestPost(host string, ep string, key string, p map[string]interface{}, resp interface{}) error {
+98
View File
@@ -1,5 +1,7 @@
package arr
import "time"
type QualityProfile struct {
Name string `json:"name"`
UpgradeAllowed bool `json:"upgradeAllowed"`
@@ -43,3 +45,99 @@ type LanguageProfile struct {
} `json:"languages"`
ID int `json:"id"`
}
type ArrCommandRequest struct {
Name string `json:"name"`
}
type CommandResponse struct {
ID int `json:"id"`
Name string `json:"name"`
CommandName string `json:"commandName"`
Message string `json:"message"`
Body struct {
SendUpdatesToClient bool `json:"sendUpdatesToClient"`
LastExecutionTime time.Time `json:"lastExecutionTime"`
LastStartTime time.Time `json:"lastStartTime"`
Trigger string `json:"trigger"`
SuppressMessages bool `json:"suppressMessages"`
ClientUserAgent string `json:"clientUserAgent"`
} `json:"body"`
Priority string `json:"priority"`
Status string `json:"status"`
Result string `json:"result"`
Queued time.Time `json:"queued"`
Started time.Time `json:"started"`
Ended time.Time `json:"ended"`
Duration struct {
Ticks int `json:"ticks"`
} `json:"duration"`
Exception string `json:"exception"`
Trigger string `json:"trigger"`
ClientUserAgent string `json:"clientUserAgent"`
StateChangeTime time.Time `json:"stateChangeTime"`
SendUpdatesToClient bool `json:"sendUpdatesToClient"`
UpdateScheduledTask bool `json:"updateScheduledTask"`
LastExecutionTime time.Time `json:"lastExecutionTime"`
}
type QueueDetail struct {
Languages []struct {
ID int `json:"id"`
Name string `json:"name"`
} `json:"languages"`
Quality struct {
Quality struct {
ID int `json:"id"`
Name string `json:"name"`
Source string `json:"source"`
Resolution int `json:"resolution"`
Modifier string `json:"modifier"`
} `json:"quality"`
Revision struct {
Version int `json:"version"`
Real int `json:"real"`
IsRepack bool `json:"isRepack"`
} `json:"revision"`
} `json:"quality"`
Size float64 `json:"size"`
Title string `json:"title"`
SizeLeft float64 `json:"sizeleft"`
TimeLeft string `json:"timeleft"`
EstimatedCompletionTime time.Time `json:"estimatedCompletionTime"`
Added time.Time `json:"added"`
Status string `json:"status"`
TrackedDownloadStatus string `json:"trackedDownloadStatus"`
TrackedDownloadState string `json:"trackedDownloadState"`
StatusMessages []interface{} `json:"statusMessages"`
DownloadID string `json:"downloadId"`
Protocol string `json:"protocol"`
DownloadClient string `json:"downloadClient"`
DownloadClientHasPostImportCategory bool `json:"downloadClientHasPostImportCategory"`
Indexer string `json:"indexer"`
ID int `json:"id"`
}
type RadarrQueueDetails []struct {
QueueDetail
MovieID int `json:"movieId"`
}
type SonarrQueueDetails []struct {
QueueDetail
SeriesID int `json:"seriesId"`
EpisodeID int `json:"episodeId"`
SeasonNumber int `json:"seasonNumber"`
EpisodeHasFile bool `json:"episodeHasFile"`
}
// From `GET /movie/{id}` or `GET /series/{id}`.
// Not all fields described here, just the wanted ones.
type MovieSerie struct {
Title string `json:"title"`
OriginalTitle string `json:"originalTitle"`
ID int `json:"id"`
HasFile bool `json:"hasFile"`
IsAvailable bool `json:"isAvailable"`
Added time.Time `json:"added"`
}
+133
View File
@@ -0,0 +1,133 @@
package main
import (
"errors"
"log/slog"
"math"
"time"
"github.com/sbondCo/Watcharr/arr"
)
type ArrDetailsResponse struct {
Progress int `json:"progress"`
EstimatedCompletionTime time.Time `json:"estimatedCompletionTime"`
Status string `json:"status"`
TrackedDownloadStatus string `json:"trackedDownloadStatus"`
TrackedDownloadState string `json:"trackedDownloadState"`
}
type SonarrDetailsResponseItem struct {
ArrDetailsResponse
Title string `json:"title"`
}
type SonarrDetailsResponse struct {
// Overall progress
Progress int `json:"progress"`
// Overall status
Status string `json:"status"`
// Each downloading episode
Items []SonarrDetailsResponseItem `json:"items"`
}
func getRadarrQueueDetails(serverName string, arrId string) (*ArrDetailsResponse, error) {
server, err := getRadarr(serverName)
if err != nil {
slog.Error("getRadarrQueueDetails: Failed to get server", "error", err)
return &ArrDetailsResponse{}, errors.New("failed to get server")
}
radarr := arr.New(arr.RADARR, &server.Host, &server.Key)
// Run refresh downloads, likely won't be refreshed in time before we run GetQueueDetails below,
// but if the user calls this again, it should be, which is better than waiting a whole minute for
// refresh task to run automatically. This exists until a better solution is thought of.
_, err = radarr.RunCommand("RefreshMonitoredDownloads")
if err != nil {
slog.Error("getRadarrQueueDetails: Failed to refresh monitored downloads.", "error", err)
}
resp := arr.RadarrQueueDetails{}
err = radarr.GetQueueDetails(arrId, &resp)
if err != nil {
slog.Error("getRadarrQueueDetails: Failed to add content", "error", err)
return &ArrDetailsResponse{}, errors.New("failed to add content")
}
if len(resp) <= 0 {
slog.Error("getRadarrQueueDetails: No results in response")
return &ArrDetailsResponse{}, errors.New("no details found")
}
adr := ArrDetailsResponse{}
adr.Progress = int(math.Round((1 - (resp[0].SizeLeft / resp[0].Size)) * 100))
adr.EstimatedCompletionTime = resp[0].EstimatedCompletionTime
adr.TrackedDownloadStatus = resp[0].TrackedDownloadStatus
adr.TrackedDownloadState = resp[0].TrackedDownloadState
adr.Status = resp[0].Status
return &adr, nil
}
func getSonarrQueueDetails(serverName string, arrId string) (*SonarrDetailsResponse, error) {
server, err := getSonarr(serverName)
if err != nil {
slog.Error("getSonarrQueueDetails: Failed to get server", "error", err)
return &SonarrDetailsResponse{}, errors.New("failed to get server")
}
sonarr := arr.New(arr.SONARR, &server.Host, &server.Key)
// Run refresh downloads, likely won't be refreshed in time before we run GetQueueDetails below,
// but if the user calls this again, it should be, which is better than waiting a whole minute for
// refresh task to run automatically. This exists until a better solution is thought of.
_, err = sonarr.RunCommand("RefreshMonitoredDownloads")
if err != nil {
slog.Error("getSonarrQueueDetails: Failed to refresh monitored downloads.", "error", err)
}
resp := arr.SonarrQueueDetails{}
err = sonarr.GetQueueDetails(arrId, &resp)
if err != nil {
slog.Error("getSonarrQueueDetails: Failed to add content", "error", err)
return &SonarrDetailsResponse{}, errors.New("failed to add content")
}
if len(resp) <= 0 {
slog.Error("getSonarrQueueDetails: No results in response")
return &SonarrDetailsResponse{}, errors.New("no details found")
}
dr := SonarrDetailsResponse{}
totalSize := 0.0
totalSizeLeft := 0.0
for _, v := range resp {
dr.Items = append(dr.Items, SonarrDetailsResponseItem{
Title: "TODO :(", // TODO: Will need to do another request to get all episodes so we can get real episode names from EpisodeID
ArrDetailsResponse: ArrDetailsResponse{
Progress: int(math.Round((1 - (v.SizeLeft / v.Size)) * 100)),
EstimatedCompletionTime: v.EstimatedCompletionTime,
TrackedDownloadStatus: v.TrackedDownloadStatus,
TrackedDownloadState: v.TrackedDownloadState,
Status: v.Status,
},
})
totalSize += v.Size
totalSizeLeft += v.SizeLeft
}
dr.Progress = int(math.Round((1 - (totalSizeLeft / totalSize)) * 100))
// HACK: Statuses are not great, no easy way to get a good status, since there are multiple items to consider.
// At some point, we could add extra checks (ex. if all items (episodes) are paused, overall status can be set to paused).
// For now, this is good enough.
dr.Status = "requested"
if dr.Progress > 0 {
dr.Status = "downloading"
}
return &dr, nil
}
// Refresh download queues for our sonarr/radarr servers.
// If the queues don't refresh regularly, our queue detail
// calls will just always return the same info.
func refreshArrQueues() {
slog.Debug("refreshArrQueues: Refreshing queues for all configured arr servers.")
// We don't care about responses, errors will be logged by the RunCommand func.
for _, v := range Config.RADARR {
radarr := arr.New(arr.RADARR, &v.Host, &v.Key)
radarr.RunCommand("RefreshMonitoredDownloads")
}
for _, v := range Config.SONARR {
sonarr := arr.New(arr.SONARR, &v.Host, &v.Key)
sonarr.RunCommand("RefreshMonitoredDownloads")
}
}
+294
View File
@@ -0,0 +1,294 @@
package main
import (
"encoding/json"
"errors"
"log/slog"
"time"
"github.com/sbondCo/Watcharr/arr"
"gorm.io/gorm"
)
type ArrRequestStatus string
const (
// Pending approval from an admin.
ARR_REQUEST_PENDING ArrRequestStatus = "PENDING"
// Request has been approved and should be added to sonarr/radarr.
ARR_REQUEST_APPROVED ArrRequestStatus = "APPROVED"
ARR_REQUEST_AUTO_APPROVED ArrRequestStatus = "AUTO_APPROVED"
// Request has been denied, not adding content.
ARR_REQUEST_DENIED ArrRequestStatus = "DENIED"
// Content was found on sonarr/radarr already, nothing needs to be done.
ARR_REQUEST_FOUND ArrRequestStatus = "FOUND"
)
type ArrRequest struct {
ID uint `gorm:"primarykey" json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
UserID uint `json:"-" gorm:"not null"`
User User `json:"-"`
// Username of `User`.
// We don't want to send back the entire user object, just their name.
// Not stored in DB, only used for our response from api.
Username string `json:"username" gorm:"-"`
ContentID *int `json:"-" gorm:"uniqueIndex:sn_to_cid;not null"`
Content *Content `json:"content,omitempty"`
// Server names are used as an identifier
ServerName string `json:"serverName" gorm:"uniqueIndex:sn_to_cid;not null"`
// Sonarr/Radarrs seriesId/movieId
ArrID int `json:"arrId"`
// Tracked request status
Status ArrRequestStatus `json:"status" gorm:"default:PENDING"`
// Full request made by user (arr.SonarrRequest / arr.RadarrRequest)
// so we know how to fulfil the request if approved.
RequestJson string `json:"requestJson"`
}
func deleteArrRequest(db *gorm.DB, id uint) error {
resp := db.Delete(&ArrRequest{ID: id})
if resp.Error != nil {
slog.Error("deleteArrRequest: Failed to remove from db", "error", resp.Error)
return errors.New("failed when removing request")
}
return nil
}
// Gets all requests.
func getArrRequests(db *gorm.DB) ([]ArrRequest, error) {
var req []ArrRequest
resp := db.Preload("Content").Preload("User").Find(&req)
if resp.Error != nil {
slog.Error("getArrRequests: Failed to search for requests in db", "error", resp.Error)
return []ArrRequest{}, errors.New("failed to find requests")
}
for i := range req {
req[i].Username = req[i].User.Username
}
return req, nil
}
func getArrRequest(db *gorm.DB, requestId uint) (ArrRequest, error) {
var req ArrRequest
resp := db.Where("id = ?", requestId).Take(&req)
if resp.Error != nil {
slog.Error("getArrRequest: Failed to search for request in db", "error", resp.Error)
return ArrRequest{}, errors.New("failed to find request")
}
return req, nil
}
func getArrRequestByTmdbId(db *gorm.DB, contentType ContentType, tmdbId int) (ArrRequest, error) {
var req ArrRequest
resp := db.Joins("JOIN contents ON contents.id = arr_requests.content_id AND contents.tmdb_id = ? AND contents.type = ?", tmdbId, contentType).Find(&req)
if resp.Error != nil {
slog.Error("getArrRequestByTmdbId: Failed to search for request in db", "error", resp.Error)
return ArrRequest{}, errors.New("failed to find request")
}
return req, nil
}
func createArrRequest(db *gorm.DB, userId uint, serverName string, contentType ContentType, tmdbId int, reqJson string) (*ArrRequest, error) {
content, err := getOrCacheContent(db, contentType, tmdbId)
if err != nil {
slog.Error("createArrRequest: getOrCacheContent errored.")
return &ArrRequest{}, err
}
req := ArrRequest{UserID: userId, ServerName: serverName, ContentID: &content.ID, RequestJson: reqJson}
resp := db.Create(&req)
if resp.Error != nil {
slog.Error("createArrRequest: Failed when inserting request into db.", "error", err)
return &ArrRequest{}, errors.New("failed when adding request")
}
return &req, nil
}
func createSonarrRequest(db *gorm.DB, userId uint, userPerms int, ur arr.SonarrRequest) (*ArrRequest, error) {
server, err := getSonarr(ur.ServerName)
if err != nil {
slog.Error("createSonarrRequest: Failed to get server", "error", err)
return &ArrRequest{}, errors.New("failed to get server")
}
reqJson, err := json.Marshal(ur)
if err != nil {
slog.Error("createRadarrRequest: Failed when marshalling json request", "error", err)
return &ArrRequest{}, errors.New("failed when processing request")
}
// Since we create the request in the db now, we don't have to check for duplicates, a unique constraint will error us here if hit.
arrReq, err := createArrRequest(db, userId, ur.ServerName, SHOW, ur.TMDBID, string(reqJson[:]))
if err != nil {
slog.Error("createSonarrRequest: Failed when creating arr request", "error", err)
return &ArrRequest{}, errors.New("failed when creating request")
}
sonarr := arr.New(arr.SONARR, &server.Host, &server.Key)
// 1. Lookup on Sonarr to check if the show has already been added (via method other than watcharr).
lookupRes, err := sonarr.LookupByTmdbId(ur.TMDBID)
if err == nil && len(lookupRes) == 1 {
slog.Debug("createSonarrRequest: Lookup returned results.")
found := lookupRes[0] // There should only be one result when looking up by id.
// If it has an ID, then it will have already been added to Sonarr.
if found.ID != 0 {
dbResp := db.Model(&ArrRequest{}).Where("id = ?", arrReq.ID).Update("arr_id", found.ID).Update("status", ARR_REQUEST_FOUND)
if dbResp.Error != nil {
slog.Error("createSonarrRequest: Failed to update request in db", "error", err)
return &ArrRequest{}, errors.New("content was requested, but we failed to update the db")
} else {
slog.Debug("createSonarrRequest: Result from lookup had an ID. Request in database has been updated with it.", "arr_id", found.ID)
arrReq.ArrID = found.ID
return arrReq, nil
}
}
}
// 2. If user has auto approve perms, add movie to sonarr.
if hasPermission(userPerms, PERM_REQUEST_CONTENT_AUTO_APPROVE) {
slog.Debug("createSonarrRequest: User has auto approve permission.. sending request to Sonarr.")
ur.AutomaticSearch = server.AutomaticSearch
resp, err := sonarr.AddContent(sonarr.BuildAddShowBody(ur))
if err != nil {
slog.Error("createSonarrRequest: Failed to add content", "error", err)
return &ArrRequest{}, errors.New("failed to add content")
}
dbResp := db.Model(&ArrRequest{}).Where("id = ?", arrReq.ID).Update("arr_id", resp["id"]).Update("status", ARR_REQUEST_AUTO_APPROVED)
if dbResp.Error != nil {
slog.Error("createSonarrRequest: Failed to update request in db", "error", err)
return &ArrRequest{}, errors.New("content was requested, but we failed to update the db")
}
arrId, ok := resp["id"].(float64)
if !ok {
slog.Error("createSonarrRequest: Failed to cast arr id as an int", "id", resp["id"])
return &ArrRequest{}, errors.New("failed to get arr id")
}
arrReq.ArrID = int(arrId)
arrReq.Status = ARR_REQUEST_AUTO_APPROVED
}
return arrReq, nil
}
func createRadarrRequest(db *gorm.DB, userId uint, userPerms int, ur arr.RadarrRequest) (*ArrRequest, error) {
server, err := getRadarr(ur.ServerName)
if err != nil {
slog.Error("createRadarrRequest: Failed to get server", "error", err)
return &ArrRequest{}, errors.New("failed to get server")
}
reqJson, err := json.Marshal(ur)
if err != nil {
slog.Error("createRadarrRequest: Failed when marshalling json request", "error", err)
return &ArrRequest{}, errors.New("failed when processing request")
}
// Since we create the request in the db now, we don't have to check for duplicates, a unique constraint will error us here if hit.
arrReq, err := createArrRequest(db, userId, ur.ServerName, MOVIE, ur.TMDBID, string(reqJson[:]))
if err != nil {
slog.Error("createRadarrRequest: Failed when creating arr request", "error", err)
return &ArrRequest{}, errors.New("failed when creating request")
}
radarr := arr.New(arr.RADARR, &server.Host, &server.Key)
// 1. Lookup on Radarr to check if the movie has already been added (via method other than watcharr).
lookupRes, err := radarr.LookupByTmdbId(ur.TMDBID)
if err == nil && len(lookupRes) == 1 {
slog.Debug("createRadarrRequest: Lookup returned results.")
found := lookupRes[0] // There should only be one result when looking up by id.
// If it has an ID, then it will have already been added to Radarr.
if found.ID != 0 {
dbResp := db.Model(&ArrRequest{}).Where("id = ?", arrReq.ID).Update("arr_id", found.ID).Update("status", ARR_REQUEST_FOUND)
if dbResp.Error != nil {
slog.Error("createRadarrRequest: Failed to update request in db", "error", err)
return &ArrRequest{}, errors.New("content was requested, but we failed to update the db")
} else {
slog.Debug("createRadarrRequest: Result from lookup had an ID. Request in database has been updated with it.", "arr_id", found.ID)
arrReq.ArrID = found.ID
return arrReq, nil
}
}
}
// 2. If user has auto approve perms, add movie to radarr.
if hasPermission(userPerms, PERM_REQUEST_CONTENT_AUTO_APPROVE) {
slog.Debug("createRadarrRequest: User has auto approve permission.. sending request to Radarr.")
ur.AutomaticSearch = server.AutomaticSearch
resp, err := radarr.AddContent(radarr.BuildAddMovieBody(ur))
if err != nil {
slog.Error("createRadarrRequest: Failed to add content", "error", err)
return &ArrRequest{}, errors.New("failed to add content")
}
dbResp := db.Model(&ArrRequest{}).Where("id = ?", arrReq.ID).Update("arr_id", resp["id"]).Update("status", ARR_REQUEST_AUTO_APPROVED)
if dbResp.Error != nil {
slog.Error("createRadarrRequest: Failed to update request in db", "error", err)
return &ArrRequest{}, errors.New("content was requested, but we failed to update the db")
}
arrId, ok := resp["id"].(float64)
if !ok {
slog.Error("createRadarrRequest: Failed to cast arr id as an int", "id", resp["id"])
return &ArrRequest{}, errors.New("failed to get arr id")
}
arrReq.ArrID = int(arrId)
arrReq.Status = ARR_REQUEST_AUTO_APPROVED
}
return arrReq, nil
}
func getRadarrRequestInfo(db *gorm.DB, requestId uint) (arr.MovieSerie, error) {
if requestId == 0 {
slog.Error("sonarr info: No request id provided")
return arr.MovieSerie{}, errors.New("no request id provided")
}
arrRequest, err := getArrRequest(db, requestId)
if err != nil {
slog.Error("radarr info: Failed to get server", "error", err)
return arr.MovieSerie{}, errors.New("failed to get server")
}
server, err := getRadarr(arrRequest.ServerName)
if err != nil {
slog.Error("radarr info: Failed to get server", "error", err)
return arr.MovieSerie{}, errors.New("failed to get server")
}
radarr := arr.New(arr.RADARR, &server.Host, &server.Key)
resp, respStatusCode, err := radarr.GetContent(arrRequest.ArrID)
if err != nil {
slog.Error("radarr info: Failed to get info", "error", err)
if (arrRequest.Status == ARR_REQUEST_APPROVED || arrRequest.Status == ARR_REQUEST_AUTO_APPROVED) && respStatusCode == 404 {
slog.Error("radarr info: 404 returned.. content must've been removed.. removing request.")
err := deleteArrRequest(db, arrRequest.ID)
if err != nil {
return arr.MovieSerie{}, errors.New("failed to delete request for removed content")
} else {
return arr.MovieSerie{}, errors.New("request deleted")
}
}
return arr.MovieSerie{}, errors.New("failed to get info")
}
return resp, nil
}
func getSonarrRequestInfo(db *gorm.DB, requestId uint) (arr.MovieSerie, error) {
if requestId == 0 {
slog.Error("sonarr info: No request id provided")
return arr.MovieSerie{}, errors.New("no request id provided")
}
arrRequest, err := getArrRequest(db, requestId)
if err != nil {
slog.Error("sonarr info: Failed to get server", "error", err)
return arr.MovieSerie{}, errors.New("failed to get server")
}
server, err := getSonarr(arrRequest.ServerName)
if err != nil {
slog.Error("sonarr info: Failed to get server", "error", err)
return arr.MovieSerie{}, errors.New("failed to get server")
}
sonarr := arr.New(arr.SONARR, &server.Host, &server.Key)
resp, respStatusCode, err := sonarr.GetContent(arrRequest.ArrID)
if err != nil {
slog.Error("sonarr info: Failed to get info", "error", err)
if (arrRequest.Status == ARR_REQUEST_APPROVED || arrRequest.Status == ARR_REQUEST_AUTO_APPROVED) && respStatusCode == 404 {
slog.Error("sonarr info: 404 returned.. content must've been removed.. removing request.")
err := deleteArrRequest(db, arrRequest.ID)
if err != nil {
return arr.MovieSerie{}, errors.New("failed to delete request for removed content")
} else {
return arr.MovieSerie{}, errors.New("request deleted")
}
}
return arr.MovieSerie{}, errors.New("failed to get info")
}
return resp, nil
}
+85
View File
@@ -0,0 +1,85 @@
package main
import (
"errors"
"log/slog"
"github.com/sbondCo/Watcharr/arr"
"gorm.io/gorm"
)
// Deny an arr request
func denyArrRequest(db *gorm.DB, id uint) error {
resp := db.Model(&ArrRequest{}).Where("id = ?", id).Update("status", ARR_REQUEST_DENIED)
if resp.Error != nil {
slog.Error("denyArrRequest: Failed to update status to denied", "error", resp.Error)
return errors.New("failed when updating request status")
}
return nil
}
// Approve radarr movie
func approveRadarrRequest(db *gorm.DB, reqId uint, ur arr.RadarrRequest) (int, error) {
_, err := getArrRequest(db, reqId)
if err != nil {
slog.Error("approveRadarrRequest: Failed to get request from db", "error", err)
return 0, errors.New("failed to get request")
}
// Get server in request
server, err := getRadarr(ur.ServerName)
if err != nil {
slog.Error("approveRadarrRequest: Failed to get server", "error", err)
return 0, errors.New("failed to get server")
}
radarr := arr.New(arr.RADARR, &server.Host, &server.Key)
ur.AutomaticSearch = server.AutomaticSearch
resp, err := radarr.AddContent(radarr.BuildAddMovieBody(ur))
if err != nil {
slog.Error("approveRadarrRequest: Failed to add content", "error", err)
return 0, errors.New("failed to add content")
}
dbResp := db.Model(&ArrRequest{}).Where("id = ?", reqId).Update("arr_id", resp["id"]).Update("status", ARR_REQUEST_APPROVED)
if dbResp.Error != nil {
slog.Error("approveRadarrRequest: Failed to update request in db", "error", err)
return 0, errors.New("content was requested, but we failed to update the db")
}
arrId, ok := resp["id"].(float64)
if !ok {
slog.Error("approveRadarrRequest: Failed to cast arr id as an int", "id", resp["id"])
return 0, errors.New("content added, but failed to get arr id")
}
return int(arrId), nil
}
// Approve sonarr movie
func approveSonarrRequest(db *gorm.DB, reqId uint, ur arr.SonarrRequest) (int, error) {
_, err := getArrRequest(db, reqId)
if err != nil {
slog.Error("approveSonarrRequest: Failed to get request from db", "error", err)
return 0, errors.New("failed to get request")
}
// Get server in request
server, err := getSonarr(ur.ServerName)
if err != nil {
slog.Error("approveSonarrRequest: Failed to get server", "error", err)
return 0, errors.New("failed to get server")
}
sonarr := arr.New(arr.SONARR, &server.Host, &server.Key)
ur.AutomaticSearch = server.AutomaticSearch
resp, err := sonarr.AddContent(sonarr.BuildAddShowBody(ur))
if err != nil {
slog.Error("approveSonarrRequest: Failed to add content", "error", err)
return 0, errors.New("failed to add content")
}
dbResp := db.Model(&ArrRequest{}).Where("id = ?", reqId).Update("arr_id", resp["id"]).Update("status", ARR_REQUEST_APPROVED)
if dbResp.Error != nil {
slog.Error("approveSonarrRequest: Failed to update request in db", "error", err)
return 0, errors.New("content was requested, but we failed to update the db")
}
arrId, ok := resp["id"].(float64)
if !ok {
slog.Error("approveSonarrRequest: Failed to cast arr id as an int", "id", resp["id"])
return 0, errors.New("failed to get arr id")
}
return int(arrId), nil
}
+193 -14
View File
@@ -13,7 +13,7 @@ import (
"log/slog"
"net/http"
"net/url"
"os"
"strconv"
"strings"
"time"
@@ -26,8 +26,11 @@ import (
type UserType uint8
var (
// Assume watcharr user if none of these...
WATCHARR_USER UserType = 0
JELLYFIN_USER UserType = 1
PLEX_USER UserType = 2
// Registered via trusted header auth
PROXY_USER UserType = 3
)
// User Perms
@@ -38,6 +41,7 @@ const (
PERM_NONE int = 1 << iota
PERM_ADMIN
PERM_REQUEST_CONTENT
PERM_REQUEST_CONTENT_AUTO_APPROVE
)
// uniqueIndex applied between Username and UserType, so same usernames can exist, but only with different types.
@@ -56,8 +60,13 @@ type User struct {
ThirdPartyID string `json:"-"`
// Auth token from third party (jellyfin)
ThirdPartyAuth string `json:"-"`
Watched []Watched
Permissions int `gorm:"default:1" json:"-"`
// Users third party integrations (minus jellyfin for now)
UserServices []UserServices `json:"-"`
Watched []Watched
// All Tags
Tags []Tag `json:"-"`
// Users permissions
Permissions int `gorm:"default:1" json:"-"`
// All user settings cols, in another struct for reusability
UserSettings
}
@@ -80,6 +89,43 @@ type UserSettings struct {
PrivateThoughts *bool `gorm:"default:false" json:"privateThoughts"`
// If ui 'spoilers' should be shown
HideSpoilers *bool `gorm:"default:false" json:"hideSpoilers"`
// If user wants previously watched items to show in 'Finished' filter,
// even if the watched item state has since been changed.
// Also if user wants to show in watched stats.
IncludePreviouslyWatched *bool `gorm:"default:false" json:"includePreviouslyWatched"`
// User's country to get correct content streaming providers.
Country *string `gorm:"default:'US'" json:"country"`
// Does the user want show, season and episode automations enabled.
AutomateShowStatuses *bool `gorm:"default:true" json:"automateShowStatuses"`
// Rating system user wants to use (frontend only).
// RatingSystem enum in frontend maxes out at 3, so just max=3 on this and we should be gut.
RatingSystem *int `json:"ratingSystem" binding:"omitempty,max=3"`
// Rating step for supported rating systems (frontend only, enum goes up to 2).
RatingStep *int `json:"ratingStep" binding:"omitempty,max=2"`
}
// Holds third party service auth tokens for users.
// Each service may use the fields in their own way.
// Unique index applied between service name and clientID
// to ensure no duplicates (no need to apply it against
// user_id, no accounts should share an integration).
//
// Plex:
// - AuthToken : Used for requests against plex.tv
// - AuthToken2 : Used for requests against home plex server.
type UserServices struct {
ID uint `gorm:"primarykey" json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
// Service/integration name
Name string `gorm:"uniqueIndex:svc_name_to_cltid;not null;" json:"-"`
// The users id on the third party service
ClientID string `gorm:"uniqueIndex:svc_name_to_cltid;not null;" json:"-"`
AuthToken string `gorm:"not null;" json:"-"`
// Second auth token, generic name so future services can use it without extra confusion.
// Ex: We require a second auth token for use with our local server for Plex.
AuthToken2 string `json:"-"`
UserID uint `gorm:"not null;" json:"-"`
}
// We use a separate struct for registration to avoid confusion
@@ -115,6 +161,8 @@ type AvailableAuthProvidersResponse struct {
AvailableAuthProviders []string `json:"available"`
SignupEnabled bool `json:"signupEnabled"`
IsInSetup bool `json:"isInSetup"`
UseEmby bool `json:"useEmby"`
HeaderAuthAutoLogin bool `json:"headerAuthAutoLogin"`
}
type ArgonParams struct {
@@ -125,6 +173,16 @@ type ArgonParams struct {
keyLength uint32
}
func GetPassArgonParams() *ArgonParams {
return &ArgonParams{
memory: 64 * 1024,
iterations: 3,
parallelism: 2,
saltLength: 16,
keyLength: 32,
}
}
type TokenClaims struct {
UserID uint `json:"userId"`
Username string `json:"username"`
@@ -132,6 +190,11 @@ type TokenClaims struct {
jwt.RegisteredClaims
}
type UserPasswordUpdateRequest struct {
OldPassword string `json:"oldPassword" binding:"required"`
NewPassword string `json:"newPassword" binding:"required"`
}
// Auth middleware
// If db is passed, extra user info from the database will be fetched.
func AuthRequired(db *gorm.DB) gin.HandlerFunc {
@@ -146,7 +209,7 @@ func AuthRequired(db *gorm.DB) gin.HandlerFunc {
}
// Parse token
token, err := jwt.ParseWithClaims(atoken, &TokenClaims{}, func(token *jwt.Token) (interface{}, error) {
return []byte(os.Getenv("JWT_SECRET")), nil
return []byte(Config.JWT_SECRET), nil
})
if err != nil {
slog.Error("AuthRequired failed to parse token", "error", err)
@@ -207,6 +270,21 @@ func AdminRequired() gin.HandlerFunc {
}
}
// Specific perm only middleware (use after AuthRequired with extra info!)
func PermRequired(perm int) gin.HandlerFunc {
return func(c *gin.Context) {
userId := c.GetUint("userId")
perms := c.GetInt("userPermissions")
if hasPermission(perms, perm) {
slog.Debug("PermRequired: User has permission to access perm only route", "user_id", userId, "required_perm", perm)
c.Next()
return
}
slog.Info("PermRequired: User denied permission to access perm only route", "user_id", userId, "required_perm", perm)
c.AbortWithStatus(401)
}
}
func register(ur *UserRegisterRequest, initialPerm int, db *gorm.DB) (AuthResponse, error) {
if !Config.SIGNUP_ENABLED {
slog.Warn("Register called, but signing up is disabled.")
@@ -214,13 +292,7 @@ func register(ur *UserRegisterRequest, initialPerm int, db *gorm.DB) (AuthRespon
}
var user User = User{Username: ur.Username, Password: ur.Password}
slog.Info("A user is registering", "username", user.Username)
hash, err := hashPassword(user.Password, &ArgonParams{
memory: 64 * 1024,
iterations: 3,
parallelism: 2,
saltLength: 16,
keyLength: 32,
})
hash, err := hashPassword(user.Password, GetPassArgonParams())
if err != nil {
log.Fatal(err)
}
@@ -234,6 +306,8 @@ func register(ur *UserRegisterRequest, initialPerm int, db *gorm.DB) (AuthRespon
user.Permissions = initialPerm
}
user.Country = &Config.DEFAULT_COUNTRY
res := db.Create(&user)
if res.Error != nil {
// If error is because unique contraint failed.. user already exists
@@ -356,7 +430,7 @@ func loginJellyfin(user *User, db *gorm.DB) (AuthResponse, error) {
}
dbUser := new(User)
dbRes := db.Where("third_party_id = ?", resp.User.ID).Take(&dbUser)
dbRes := db.Where("third_party_id = ? AND type = ?", resp.User.ID, JELLYFIN_USER).Take(&dbUser)
if dbRes.Error != nil {
if errors.Is(dbRes.Error, gorm.ErrRecordNotFound) {
// Record not found, so we should create the user
@@ -365,6 +439,7 @@ func loginJellyfin(user *User, db *gorm.DB) (AuthResponse, error) {
dbUser.ThirdPartyAuth = resp.AccessToken
dbUser.Username = resp.User.Name
dbUser.Type = JELLYFIN_USER
dbUser.Country = &Config.DEFAULT_COUNTRY
dbRes = db.Create(&dbUser)
if dbRes.Error != nil {
@@ -390,6 +465,75 @@ func loginJellyfin(user *User, db *gorm.DB) (AuthResponse, error) {
return AuthResponse{Token: token}, nil
}
// Login via Plex.
func loginPlex(lr *PlexLoginRequest, db *gorm.DB) (AuthResponse, error) {
if Config.PLEX_HOST == "" || Config.PLEX_MACHINE_ID == "" {
slog.Error("Request made to login via Plex, but Plex authentication is disabled")
return AuthResponse{}, errors.New("plex login not enabled")
}
slog.Debug("A Plex User Is Logging In")
account, err := fetchPlexAccountFromToken(lr.AuthToken)
if err != nil {
slog.Error("loginPlex: Could not fetch Plex account", "error", err)
return AuthResponse{}, errors.New("could not fetch plex acount")
}
if account.Username == "" || account.Id == 0 {
slog.Error("loginPlex: Username or id missing from account response:", "username", account.Username, "id", account.Id)
return AuthResponse{}, errors.New("data is missing from the plex account response")
}
// Get users auth token against our home plex server.
// If no auth token, assume they don't have access to our plex server.
homeAuthToken, err := getPlexHomeServerAuthToken(lr.AuthToken, lr.ClientIdentifier)
if err != nil || homeAuthToken == "" {
slog.Error("loginPlex: Failed to get home server auth token for user! If not because the request failed, then ensure the user has access to our home servers library.", "error", err)
return AuthResponse{}, errors.New("failed to verify plex access")
}
dbUser := new(User)
userIdQ := db.Select("user_id").Where("name = ? AND client_id = ?", "plex", account.Id).Table("user_services")
dbRes := db.Where("type = ?", PLEX_USER).Where("id = (?)", userIdQ).Preload("UserServices").Take(&dbUser)
if dbRes.Error != nil {
if errors.Is(dbRes.Error, gorm.ErrRecordNotFound) {
slog.Debug("loginPlex: New plex user attempted login.. creating Watcharr account now.")
dbUser.Username = account.Username
dbUser.Type = PLEX_USER
dbUser.UserServices = append(dbUser.UserServices, UserServices{
Name: "plex",
ClientID: strconv.FormatUint(account.Id, 10),
AuthToken: lr.AuthToken,
AuthToken2: homeAuthToken,
})
dbUser.Country = &Config.DEFAULT_COUNTRY
dbRes = db.Create(&dbUser)
if dbRes.Error != nil {
slog.Error("loginPlex: Failed to create new user in db from plex response", "error", dbRes.Error)
return AuthResponse{}, errors.New("failed to create new user from plex")
}
} else {
slog.Error("loginPlex: Failed to select user from database for login", "error", dbRes.Error)
return AuthResponse{}, errors.New("failed to locate user")
}
} else {
// If user exists.. update their access tokens in db
for i, v := range dbUser.UserServices {
if v.Name == "plex" {
slog.Info("loginPlex: Found plex user service.. attemping to update")
dbUser.UserServices[i].AuthToken = lr.AuthToken
if homeAuthToken != "" {
dbUser.UserServices[i].AuthToken2 = homeAuthToken
}
break
}
}
db.Save(&dbUser.UserServices)
}
token, err := signJWT(dbUser)
if err != nil {
slog.Error("loginPlex: Failed to sign new jwt", "error", err)
return AuthResponse{}, errors.New("failed to get auth token")
}
return AuthResponse{Token: token}, nil
}
func useAdminToken(req *UseAdminTokenRequest, db *gorm.DB, userId uint) error {
var dbToken Token
resp := db.Where("value = ?", req.Token).Take(&dbToken)
@@ -445,7 +589,7 @@ func signJWT(user *User) (token string, err error) {
})
// Sign and get the complete encoded token as a string using the secret
return jwt.SignedString([]byte(os.Getenv("JWT_SECRET")))
return jwt.SignedString([]byte(Config.JWT_SECRET))
}
func hashPassword(password string, p *ArgonParams) (encodedHash string, err error) {
@@ -539,3 +683,38 @@ func hasPermission(perms int, reqPerm int) bool {
}
return (perms & reqPerm) == reqPerm
}
func userChangePassword(db *gorm.DB, pwds UserPasswordUpdateRequest, userId uint) error {
slog.Debug("userChangePassword request running", "user_id", userId)
user := new(User)
res := db.Where("id = ?", userId).Select("password").Take(&user)
if res.Error != nil {
slog.Error("userChangePassword failed - failed to retrieve user from database", "user_id", userId, "error", res.Error)
return errors.New("failed to retrieve user")
}
slog.Debug("userChangePassword user found", "user_id", userId)
match, err := compareHash(pwds.OldPassword, user.Password)
if err != nil {
slog.Error("userChangePassword failed - failed to compare passwords", "user_id", userId, "error", err)
return errors.New("failed to compare passwords")
}
if !match {
slog.Error("userChangePassword failed - current password hash doesn't match password hash in database", "user_id", userId, "error", err)
return errors.New("current password provided doesn't match password in database")
}
slog.Debug("userChangePassword hash for current password matches hash in the database", "user_id", userId)
slog.Debug("userChangePassword hashing new password", "user_id", userId)
hash, err := hashPassword(pwds.NewPassword, GetPassArgonParams())
if err != nil {
slog.Error("userChangePassword failed - failed to hash new password", "user_id", userId, "error", err)
return errors.New("failed to hash new password")
}
slog.Debug("userChangePassword new password hashed", "user_id", userId)
if err := db.Model(&User{}).Where("id = ?", userId).Update("password", hash).Error; err != nil {
slog.Error("userChangePassword failed - failed to update password in database", "user_id", userId, "error", err)
return errors.New("failed to update password")
} else {
slog.Debug("userChangePassword password updated", "user_id", userId)
}
return nil
}
+93
View File
@@ -0,0 +1,93 @@
// auth_proxy contains the logic for Trusted Header Authentication/SSO.
//
// This code is inherently dangerous since we are implicitly trusting
// a header for auth, so this should only be configured if you are
// certain your watcharr instance is only available behind your proxy.
package main
import (
"errors"
"log/slog"
"gorm.io/gorm"
)
type TrustedHeaderAuthSetting struct {
// Required: Should header auth be enabled?
// This bool exists so header auth can be toggled
// easily without having to remove configuration.
// To be actually enabled, HEADER_NAME must also
// be set.
Enabled bool `json:"enabled"`
// Required: What is the name of the trusted header
// that will contain the logged in users username?
HeaderName string `json:"headerName"`
// Should the frontend attempt auto login if
// trusted header auth is enabled.
AutoLogin bool `json:"autoLogin"`
// Where can we redirect the user to logout
// of the auth service?
LogoutUrl string `json:"logoutUrl"`
}
type TrustedHeaderAuthLogoutDetailsResponse struct {
LogoutUrl string `json:"logoutUrl,omitempty"`
}
// Is trusted header auth configured on this server?
func trustedHeaderAuthIsEnabled() bool {
return Config.HEADER_AUTH.Enabled && Config.HEADER_AUTH.HeaderName != ""
}
func setTrustedHeaderAuthSetting(has TrustedHeaderAuthSetting) error {
slog.Debug("setTrustedHeaderAuthSetting: Attempting to update to new provided value", "new_value", has)
Config.HEADER_AUTH = has
err := writeConfig()
if err != nil {
slog.Error("setTrustedHeaderAuthSetting: Failed to write updated config!", "error", err)
return errors.New("failed to write config")
}
return nil
}
// Gets proxy logout details.
// Details are accessible to any user for the logout flow.
// If proxy configured should be checked before using this.
func getTrustedHeaderAuthLogoutDetails() *TrustedHeaderAuthLogoutDetailsResponse {
return &TrustedHeaderAuthLogoutDetailsResponse{
LogoutUrl: Config.HEADER_AUTH.LogoutUrl,
}
}
// Login via header sso
func loginTrustedHeaderAuth(user *User, db *gorm.DB) (AuthResponse, error) {
slog.Debug("loginTrustedHeaderAuth: A user is logging in", "username_from_header", user.Username)
dbUser := new(User)
res := db.Where("username = ? AND type = ?", user.Username, PROXY_USER).Take(&dbUser)
if res.Error != nil {
if errors.Is(res.Error, gorm.ErrRecordNotFound) {
slog.Info("loginTrustedHeaderAuth: Creating new User from authentication header", "username_from_header", user.Username)
// Record not found, so we should create the user (if configured to do so)
// dbUser will be empty, so we can just reuse it for this purpose.
dbUser.Username = user.Username
dbUser.Type = PROXY_USER
dbUser.Country = &Config.DEFAULT_COUNTRY
res = db.Create(&dbUser)
if res.Error != nil {
slog.Error("loginTrustedHeaderAuth: Failed to create new user in db", "error", res.Error)
return AuthResponse{}, errors.New("failed to create new user")
}
} else {
slog.Error("loginTrustedHeaderAuth: An error occurred when looking up user in db", "error", res.Error)
return AuthResponse{}, errors.New("error locating user in db")
}
}
token, err := signJWT(dbUser)
if err != nil {
slog.Error("loginTrustedHeaderAuth: Failed to sign new jwt", "error", err)
return AuthResponse{}, errors.New("failed to get auth token")
}
return AuthResponse{Token: token}, nil
}
+139 -32
View File
@@ -6,31 +6,64 @@ import (
"log"
"log/slog"
"os"
"path"
"time"
"github.com/sbondCo/Watcharr/game"
"gorm.io/gorm"
)
var DataPath = "./data"
var DataPath = func() string {
path := os.Getenv("WATCHARR_DATA")
if path == "" {
path = "./data"
}
return path
}()
type ServerConfig struct {
// Used to sign JWT tokens. Make sure to make
// it strong, just like a very long, complicated password.
JWT_SECRET string `json:",omitempty"`
// Default country for new users. This is used to set the default
// region to get correct content streaming providers.
DEFAULT_COUNTRY string `json:",omitempty"`
// Optional: Point to your Jellyfin install
// to enable it as an auth provider.
JELLYFIN_HOST string `json:",omitempty"`
// Optional: Use Emby instead of Jellyfin branding in the ui.
USE_EMBY bool
// Enable/disable signup functionality.
// Set to `false` to disable registering an account.
SIGNUP_ENABLED bool `json:",omitempty"`
SIGNUP_ENABLED bool
// Optional: Provide your own TMDB API Key.
// If unprovided, the default Watcharr API key will be used.
TMDB_KEY string `json:",omitempty"`
// Optional: Point to Plex install to enable plex features.
PLEX_HOST string `json:",omitempty"`
// Optional: Machine identifier of your Plex server.
// This is used to ensure only users of your Plex server
// can use this Watcharr instance.
// Will be fetched automatically when PLEX_HOST is provided via web ui.
PLEX_MACHINE_ID string `json:",omitempty"`
// Optional: Trusted header authentication configuration.
// VERY DANGEROUS if access is not controlled correctly!
HEADER_AUTH TrustedHeaderAuthSetting `json:",omitempty"`
SONARR []SonarrSettings `json:",omitempty"`
RADARR []RadarrSettings `json:",omitempty"`
TWITCH game.IGDB `json:",omitempty"`
// Optional: Schedule for tasks.
TASK_SCHEDULE map[string]int `json:",omitempty"`
// Enable/disable debug logging. Useful for when trying
// to figure out exactly what the server is doing at a point
@@ -47,27 +80,61 @@ type ServerConfig struct {
// not editable on frontend, so not needed).
func (c *ServerConfig) GetSafe() ServerConfig {
return ServerConfig{
SIGNUP_ENABLED: c.SIGNUP_ENABLED,
JELLYFIN_HOST: c.JELLYFIN_HOST,
TMDB_KEY: c.TMDB_KEY,
DEBUG: c.DEBUG,
SONARR: c.SONARR, // Dont act safe, this contains sonarr api key, needed for config
RADARR: c.RADARR, // Dont act safe, this contains radarr api key, needed for config
SIGNUP_ENABLED: c.SIGNUP_ENABLED,
DEFAULT_COUNTRY: c.DEFAULT_COUNTRY,
JELLYFIN_HOST: c.JELLYFIN_HOST,
USE_EMBY: c.USE_EMBY,
TMDB_KEY: c.TMDB_KEY,
PLEX_HOST: c.PLEX_HOST,
PLEX_MACHINE_ID: c.PLEX_MACHINE_ID,
DEBUG: c.DEBUG,
SONARR: c.SONARR, // Dont act safe, this contains sonarr api key, needed for config
RADARR: c.RADARR, // Dont act safe, this contains radarr api key, needed for config
TWITCH: game.IGDB{
ClientID: c.TWITCH.ClientID,
ClientSecret: c.TWITCH.ClientSecret,
}, // Dont act safe, this contains twitch secrets, needed for config
}
}
var (
// Our server config.. set defaults here, then `readConfig`
// will overwrite if provided in watcharr.json cfg file.
Config = ServerConfig{
SIGNUP_ENABLED: true,
type ServerConfigGetByName struct {
Value any `json:"value"`
}
// Get config item by name.
func (c *ServerConfig) Get(s string) (ServerConfigGetByName, error) {
switch s {
case "DEFAULT_COUNTRY":
return ServerConfigGetByName{Value: c.DEFAULT_COUNTRY}, nil
case "JELLYFIN_HOST":
return ServerConfigGetByName{Value: c.JELLYFIN_HOST}, nil
case "USE_EMBY":
return ServerConfigGetByName{Value: c.USE_EMBY}, nil
case "SIGNUP_ENABLED":
return ServerConfigGetByName{Value: c.SIGNUP_ENABLED}, nil
case "TMDB_KEY":
return ServerConfigGetByName{Value: c.TMDB_KEY}, nil
case "PLEX_HOST":
return ServerConfigGetByName{Value: c.PLEX_HOST}, nil
case "PLEX_MACHINE_ID":
return ServerConfigGetByName{Value: c.PLEX_MACHINE_ID}, nil
case "HEADER_AUTH":
return ServerConfigGetByName{Value: c.HEADER_AUTH}, nil
case "DEBUG":
return ServerConfigGetByName{Value: c.DEBUG}, nil
}
return ServerConfigGetByName{}, errors.New("invalid setting")
}
var (
// Our server config.. `readConfig` will overwrite from watcharr.json cfg file.
Config = ServerConfig{}
)
// Read config file
// Calls generateConfig if file doesn't exist
func readConfig() error {
cfg, err := os.Open("./data/watcharr.json")
cfg, err := os.Open(path.Join(DataPath, "watcharr.json"))
if err != nil {
if os.IsNotExist(err) {
slog.Info("Config file doesn't exist... generating.")
@@ -95,20 +162,24 @@ func initFromConfig() error {
}
// Generate new barebones watcharr.json config file.
// Currently only JWT_SECRET is required, so this method
// generates a secret.
// Generates a JWT_SECRET and set default config.
func generateConfig() error {
key, err := generateString(64)
if err != nil {
return err
}
cfg := ServerConfig{JWT_SECRET: key}
cfg := ServerConfig{
JWT_SECRET: key,
// Other defaults..
DEFAULT_COUNTRY: "US",
SIGNUP_ENABLED: true,
}
barej, err := json.MarshalIndent(cfg, "", "\t")
if err != nil {
return err
}
Config.JWT_SECRET = cfg.JWT_SECRET
return os.WriteFile("./data/watcharr.json", barej, 0755)
Config = cfg
return os.WriteFile(path.Join(DataPath, "watcharr.json"), barej, 0755)
}
// Update server config property
@@ -119,6 +190,8 @@ func updateConfig(k string, v any) error {
}
if k == "JELLYFIN_HOST" {
Config.JELLYFIN_HOST = v.(string)
} else if k == "USE_EMBY" {
Config.USE_EMBY = v.(bool)
} else if k == "SIGNUP_ENABLED" {
Config.SIGNUP_ENABLED = v.(bool)
} else if k == "TMDB_KEY" {
@@ -126,10 +199,17 @@ func updateConfig(k string, v any) error {
} else if k == "DEBUG" {
Config.DEBUG = v.(bool)
setLoggingLevel()
} else if k == "DEFAULT_COUNTRY" {
Config.DEFAULT_COUNTRY = v.(string)
} else {
return errors.New("invalid setting")
}
return writeConfig()
err := writeConfig()
if err != nil {
slog.Error("updateConfig: Failed to write updated config!", "error", err)
return errors.New("failed to write config")
}
return nil
}
// Write current Config to file
@@ -138,12 +218,13 @@ func writeConfig() error {
if err != nil {
return err
}
return os.WriteFile("./data/watcharr.json", barej, 0755)
return os.WriteFile(path.Join(DataPath, "watcharr.json"), barej, 0755)
}
type ServerFeatures struct {
Sonarr bool `json:"sonarr"`
Radarr bool `json:"radarr"`
Games bool `json:"games"`
}
// Get enabled server functionality from Config.
@@ -151,20 +232,46 @@ type ServerFeatures struct {
// which btns should be shown, etc.
func getEnabledFeatures(userPerms int) ServerFeatures {
var f ServerFeatures
// https://github.com/sbondCo/Watcharr/issues/211
// Currently requesting permissions have not been setup, only admins for now.
if !hasPermission(userPerms, PERM_ADMIN) {
return f
if Config.TWITCH.ClientID != nil && Config.TWITCH.ClientSecret != nil {
f.Games = true
}
if len(Config.SONARR) > 0 {
f.Sonarr = true
}
if len(Config.RADARR) > 0 {
f.Radarr = true
if hasPermission(userPerms, PERM_REQUEST_CONTENT) {
if len(Config.SONARR) > 0 {
f.Sonarr = true
}
if len(Config.RADARR) > 0 {
f.Radarr = true
}
}
return f
}
func saveTwitchConfig(c game.IGDB) error {
// If existing client id and secret are same.. just return here
if (Config.TWITCH.ClientID != nil && c.ClientID != nil && Config.TWITCH.ClientSecret != nil && c.ClientSecret != nil) &&
*Config.TWITCH.ClientID == *c.ClientID && *Config.TWITCH.ClientSecret == *c.ClientSecret {
slog.Info("saveTwitchConfig: New ClientID and ClientSecret match old ClientID and ClientSecret.. ignoring request to update.")
return nil
}
// Update our config
Config.TWITCH.ClientID = c.ClientID
Config.TWITCH.ClientSecret = c.ClientSecret
Config.TWITCH.AccessToken = ""
Config.TWITCH.AccessTokenExpires = time.Time{}
// Try to init again
err := Config.TWITCH.Init()
if err != nil {
slog.Error("saveTwitchConfig failed to initialize TWITCH", "error", err)
return errors.New("initialization with credentials failed")
}
err = writeConfig()
if err != nil {
slog.Error("saveTwitchConfig failed to write config", "error", err)
return errors.New("failed to save config")
}
return nil
}
type ServerStats struct {
Users int64 `json:"users"`
PrivateUsers int64 `json:"privateUsers"`
@@ -206,13 +313,13 @@ func getServerStats(db *gorm.DB) ServerStats {
if resp.Error != nil {
slog.Error("getServerStats - MostWatchedShow query failed", "error", resp.Error)
} else {
stats.MostWatchedShow = w.Content
stats.MostWatchedShow = *w.Content
}
resp = db.Model(&Watched{}).Select("content_id, COUNT(*) AS mag").Joins("JOIN contents ON contents.type = ? AND contents.id = watcheds.content_id", "movie").Group("content_id").Order("mag DESC").Preload("Content").First(&w)
if resp.Error != nil {
slog.Error("getServerStats - MostWatchedMovie query failed", "error", resp.Error)
} else {
stats.MostWatchedMovie = w.Content
stats.MostWatchedMovie = *w.Content
}
return stats
}
+298 -8
View File
@@ -1,9 +1,16 @@
package main
import (
"encoding/json"
"errors"
"log/slog"
"path"
"strconv"
"time"
"github.com/gin-contrib/cache/persistence"
"gorm.io/gorm"
"gorm.io/gorm/clause"
)
type ContentType string
@@ -11,8 +18,12 @@ type ContentType string
const (
MOVIE ContentType = "movie"
SHOW ContentType = "tv"
// Show episode
SHOW_EPISODE ContentType = "tv_episode"
)
var ContentStore = persistence.NewInMemoryStore(time.Hour * 24)
// For storing cached content, so we can serve the basic local data for watched list to work
type Content struct {
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
@@ -34,6 +45,182 @@ type Content struct {
NumberOfSeasons uint32 `json:"numberOfSeasons"`
}
// onlyUpdate - If we should only update existing row if exists, or false to create/update if not exist.
func saveContent(db *gorm.DB, c *Content, onlyUpdate bool) error {
slog.Info("Saving content to db", "id", c.TmdbID, "title", c.Title)
if c.TmdbID == 0 || c.Title == "" || c.Type == "" {
slog.Error("saveContent: content missing id, title or type!", "id", c.TmdbID, "title", c.Title, "type", c.Type)
return errors.New("content missing id or title")
}
var res *gorm.DB
if onlyUpdate {
// We only want to update an existing row, if it exists.
res = db.Model(&Content{}).Where("type = ? AND tmdb_id = ?", c.Type, c.TmdbID).Updates(c)
if res.Error != nil {
slog.Error("saveContent: Error updating content in database", "error", res.Error.Error())
return errors.New("failed to update cached content in database")
}
} else {
// On conflict, update existing row with details incase any were updated/missing.
res = db.Clauses(clause.OnConflict{
Columns: []clause.Column{{Name: "tmdb_id"}, {Name: "type"}},
DoUpdates: clause.AssignmentColumns([]string{
"title",
"poster_path",
"overview",
"release_date",
"popularity",
"vote_average",
"vote_count",
"imdb_id",
"status",
"budget",
"revenue",
"runtime",
"number_of_episodes",
"number_of_seasons",
}),
}).Create(&c)
if res.Error != nil {
// Error if anything but unique contraint error
if res.Error != gorm.ErrDuplicatedKey {
slog.Error("saveContent: Error creating content in database", "error", res.Error.Error())
return errors.New("failed to cache content in database")
}
}
}
// If row created, download the image
if res.RowsAffected > 0 {
slog.Debug("saveContent: Downloading poster.")
err := download("https://image.tmdb.org/t/p/w500"+c.PosterPath, path.Join(DataPath, "img", c.PosterPath), false)
if err != nil {
slog.Error("saveContent: Failed to download content image!", "error", err.Error())
}
}
return nil
}
func cacheContentTv(db *gorm.DB, content TMDBShowDetails, onlyUpdate bool) (Content, error) {
slog.Debug("cacheContentTv", "content", content)
var (
releaseDate time.Time
runtime uint32
)
var dateFormat = "2006-01-02"
releaseDate, err := time.Parse(dateFormat, content.FirstAirDate)
if err != nil {
slog.Error("Failed to parse tv release date", "error", err)
}
if len(content.EpisodeRunTime) > 0 {
runtime = uint32(content.EpisodeRunTime[0])
}
c := Content{
TmdbID: content.ID,
Title: content.Name,
Overview: content.Overview,
PosterPath: content.PosterPath,
Type: SHOW,
ReleaseDate: &releaseDate,
Popularity: content.Popularity,
VoteAverage: content.VoteAverage,
VoteCount: content.VoteCount,
Status: content.Status,
Runtime: runtime,
NumberOfEpisodes: content.NumberOfEpisodes,
NumberOfSeasons: content.NumberOfSeasons,
}
err = saveContent(db, &c, onlyUpdate)
if err != nil {
slog.Error("cacheContentTv: Failed to save content!", "error", err)
return Content{}, errors.New("failed to save content")
}
return c, nil
}
func cacheContentMovie(db *gorm.DB, content TMDBMovieDetails, onlyUpdate bool) (Content, error) {
var (
releaseDate time.Time
)
var dateFormat = "2006-01-02"
// Get details from movie/show response and fill out needed vars
releaseDate, err := time.Parse(dateFormat, content.ReleaseDate)
if err != nil {
slog.Error("Failed to parse movie release date", "error", err)
}
c := Content{
TmdbID: content.ID,
Title: content.Title,
Overview: content.Overview,
PosterPath: content.PosterPath,
Type: MOVIE,
ReleaseDate: &releaseDate,
Popularity: content.Popularity,
VoteAverage: content.VoteAverage,
VoteCount: content.VoteCount,
ImdbID: content.ImdbID,
Status: content.Status,
Budget: content.Budget,
Revenue: content.Revenue,
Runtime: content.Runtime,
}
err = saveContent(db, &c, onlyUpdate)
if err != nil {
slog.Error("cacheContentMovie: Failed to save content!", "error", err)
return Content{}, errors.New("failed to save content")
}
return c, nil
}
// Get content from our cache, or cache it if it doesn't exist.
func getOrCacheContent(db *gorm.DB, contentType ContentType, tmdbId int) (Content, error) {
var content Content
// Look in db for content.
db.Where("type = ? AND tmdb_id = ?", contentType, tmdbId).Find(&content)
// Create content if not found from our db.
if content == (Content{}) {
slog.Debug("Content not in db, fetching...", "type", contentType, "tmdbId", tmdbId)
resp, err := tmdbAPIRequest("/"+string(contentType)+"/"+strconv.Itoa(tmdbId), map[string]string{})
if err != nil {
slog.Error("getOrCacheContent: content tmdb api request failed", "error", err)
return Content{}, errors.New("failed to find requested media")
}
if contentType == "movie" {
c := new(TMDBMovieDetails)
err := json.Unmarshal([]byte(resp), &c)
if err != nil {
slog.Error("Failed to unmarshal movie details", "error", err)
return Content{}, errors.New("failed to process movie details response")
}
content, err = cacheContentMovie(db, *c, false)
if err != nil {
slog.Error("getOrCacheContent: failed to cache movie content", "type", contentType, "content_id", tmdbId, "err", err)
return Content{}, errors.New("failed to cache content")
}
} else {
c := new(TMDBShowDetails)
err := json.Unmarshal(resp, &c)
if err != nil {
slog.Error("Failed to unmarshal tv details", "error", err)
return Content{}, errors.New("failed to process tv details response")
}
content, err = cacheContentTv(db, *c, false)
if err != nil {
slog.Error("getOrCacheContent: failed to cache tv content", "type", contentType, "content_id", tmdbId, "err", err)
return Content{}, errors.New("failed to cache content")
}
}
}
return content, nil
}
// Getting only region needed from api is not a feature yet
// https://trello.com/c/75tR4cpF/106-add-watch-provider-region-filtering
// When it is, this can be removed for that instead.
@@ -58,9 +245,12 @@ func transformProviders(c *interface{}, country string) {
}
}
func searchContent(query string) (TMDBSearchMultiResponse, error) {
func searchContent(query string, pageNum int) (TMDBSearchMultiResponse, error) {
resp := new(TMDBSearchMultiResponse)
err := tmdbRequest("/search/multi", map[string]string{"query": query, "page": "1"}, &resp)
if pageNum == 0 {
pageNum = 1
}
err := tmdbRequest("/search/multi", map[string]string{"query": query, "page": strconv.Itoa(pageNum)}, &resp)
if err != nil {
slog.Error("Failed to complete multi search request!", "error", err.Error())
return TMDBSearchMultiResponse{}, errors.New("failed to complete multi search request")
@@ -68,7 +258,82 @@ func searchContent(query string) (TMDBSearchMultiResponse, error) {
return *resp, nil
}
func movieDetails(id string, country string, rParams map[string]string) (TMDBMovieDetails, error) {
func searchMovies(query string, pageNum int) (TMDBSearchMoviesResponse, error) {
resp := new(TMDBSearchMoviesResponse)
if pageNum == 0 {
pageNum = 1
}
err := tmdbRequest("/search/movie", map[string]string{"query": query, "page": strconv.Itoa(pageNum)}, &resp)
if err != nil {
slog.Error("Failed to complete movie search request!", "error", err.Error())
return TMDBSearchMoviesResponse{}, errors.New("failed to complete movie search request")
}
for i := range resp.Results {
resp.Results[i].MediaType = "movie"
}
return *resp, nil
}
func searchTv(query string, pageNum int) (TMDBSearchShowsResponse, error) {
resp := new(TMDBSearchShowsResponse)
if pageNum == 0 {
pageNum = 1
}
err := tmdbRequest("/search/tv", map[string]string{"query": query, "page": strconv.Itoa(pageNum)}, &resp)
if err != nil {
slog.Error("Failed to complete tv search request!", "error", err.Error())
return TMDBSearchShowsResponse{}, errors.New("failed to complete tv search request")
}
for i := range resp.Results {
resp.Results[i].MediaType = "tv"
}
return *resp, nil
}
func searchPeople(query string, pageNum int) (TMDBSearchPeopleResponse, error) {
resp := new(TMDBSearchPeopleResponse)
if pageNum == 0 {
pageNum = 1
}
err := tmdbRequest("/search/person", map[string]string{"query": query, "page": strconv.Itoa(pageNum)}, &resp)
if err != nil {
slog.Error("Failed to complete people search request!", "error", err.Error())
return TMDBSearchPeopleResponse{}, errors.New("failed to complete people search request")
}
for i := range resp.Results {
resp.Results[i].MediaType = "person"
}
return *resp, nil
}
// Search for content by an external id (imdb, etc).
// Defaults to imdb if no source if provided (probably most common).
func searchByExternalId(id string, source string) (TMDBSearchMultiResponse, error) {
resp := new(TMDBFindByExternalIdResponse)
if source == "" {
source = "imdb"
}
err := tmdbRequest("/find/"+id, map[string]string{"external_source": source + "_id"}, &resp)
if err != nil {
slog.Error("Failed to complete find/external_id request!", "error", err.Error())
return TMDBSearchMultiResponse{}, errors.New("failed to complete find/external_id request")
}
comb := []TMDBSearchMultiResults{}
comb = append(comb, resp.MovieResults...)
comb = append(comb, resp.TvResults...)
comb = append(comb, resp.PersonResults...)
comb = append(comb, resp.TvSeasonResults...)
comb = append(comb, resp.TvEpisodeResults...)
return TMDBSearchMultiResponse{TMDBSearchResponse: TMDBSearchResponse[TMDBSearchMultiResults]{
Results: comb,
TotalResults: len(comb),
// Just providing these so we don't break frontend pagination logic.
TotalPages: 1,
Page: 1,
}}, nil
}
func movieDetails(db *gorm.DB, id string, country string, rParams map[string]string) (TMDBMovieDetails, error) {
resp := new(TMDBMovieDetails)
err := tmdbRequest("/movie/"+id, rParams, &resp)
if err != nil {
@@ -76,6 +341,7 @@ func movieDetails(id string, country string, rParams map[string]string) (TMDBMov
return TMDBMovieDetails{}, errors.New("failed to complete movie details request")
}
transformProviders(&resp.WatchProviders, country)
go cacheContentMovie(db, *resp, true)
return *resp, nil
}
@@ -89,7 +355,7 @@ func movieCredits(id string) (TMDBContentCredits, error) {
return *resp, nil
}
func tvDetails(id string, country string, rParams map[string]string) (TMDBShowDetails, error) {
func tvDetails(db *gorm.DB, id string, country string, rParams map[string]string) (TMDBShowDetails, error) {
resp := new(TMDBShowDetails)
err := tmdbRequest("/tv/"+id, rParams, &resp)
if err != nil {
@@ -97,6 +363,7 @@ func tvDetails(id string, country string, rParams map[string]string) (TMDBShowDe
return TMDBShowDetails{}, errors.New("failed to complete tv details request")
}
transformProviders(&resp.WatchProviders, country)
go cacheContentTv(db, *resp, true)
return *resp, nil
}
@@ -104,19 +371,32 @@ func tvCredits(id string) (TMDBContentCredits, error) {
resp := new(TMDBContentCredits)
err := tmdbRequest("/tv/"+id+"/credits", map[string]string{}, &resp)
if err != nil {
slog.Error("Failed to complete tv cast request!", err.Error())
slog.Error("Failed to complete tv cast request!", "error", err.Error())
return TMDBContentCredits{}, errors.New("failed to complete tv cast request")
}
return *resp, nil
}
// This method is manually cached, so it can be easily used in other places (on the server) with cache benefits
func seasonDetails(tvId string, seasonNumber string) (TMDBSeasonDetails, error) {
var cacheKey = "contentstore-seasondetails-" + tvId + "-" + seasonNumber
resp := new(TMDBSeasonDetails)
if err := ContentStore.Get(cacheKey, &resp); err != nil {
if err != persistence.ErrCacheMiss {
slog.Error("seasonDetails: Cache failed for some reason", "error", err)
}
} else {
slog.Debug("seasonDetails: Returning cache.")
return *resp, nil
}
err := tmdbRequest("/tv/"+tvId+"/season/"+seasonNumber, map[string]string{}, &resp)
if err != nil {
slog.Error("Failed to complete season details request!", "error", err.Error())
slog.Error("seasonDetails: Failed to complete season details request!", "error", err.Error())
return TMDBSeasonDetails{}, errors.New("failed to complete season details request")
}
if err := ContentStore.Set(cacheKey, resp, time.Hour*24); err != nil {
slog.Error("seasonDetails: Failed to set cache!", "error", err)
}
return *resp, nil
}
@@ -142,7 +422,7 @@ func personCredits(id string) (TMDBPersonCombinedCredits, error) {
func discoverMovies() (TMDBDiscoverMovies, error) {
resp := new(TMDBDiscoverMovies)
err := tmdbRequest("/discover/movie/", map[string]string{"page": "1"}, &resp)
err := tmdbRequest("/discover/movie", map[string]string{"page": "1"}, &resp)
if err != nil {
slog.Error("Failed to complete discover movies request!", "error", err.Error())
return TMDBDiscoverMovies{}, errors.New("failed to complete discover movies request")
@@ -152,7 +432,7 @@ func discoverMovies() (TMDBDiscoverMovies, error) {
func discoverTv() (TMDBDiscoverShows, error) {
resp := new(TMDBDiscoverShows)
err := tmdbRequest("/discover/tv/", map[string]string{"page": "1"}, &resp)
err := tmdbRequest("/discover/tv", map[string]string{"page": "1"}, &resp)
if err != nil {
slog.Error("Failed to complete discover tv request!", "error", err.Error())
return TMDBDiscoverShows{}, errors.New("failed to complete discover tv request")
@@ -193,3 +473,13 @@ func upcomingTv() (TMDBUpcomingShows, error) {
}
return *resp, nil
}
func regions() (TMDBRegions, error) {
resp := new(TMDBRegions)
err := tmdbRequest("/watch/providers/regions", map[string]string{}, &resp)
if err != nil {
slog.Error("Failed to complete regions request!", "error", err.Error())
return TMDBRegions{}, errors.New("failed to complete regions request")
}
return *resp, nil
}

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