Skip to content

Commit

Permalink
feat: improved frontend ui (#195)
Browse files Browse the repository at this point in the history
* rework in progress.

* fix: correct limits for orionoid

* fix: switch to comprehensions

* fix: disable plex logging for id mismatches

* time for sleep. rework still wip.

* feat: parser works. needs more work. language needs a rewrite. disabled for now.

* fix: overseerr bug on using external ids

* fix: remove plex debug line for users

* disable tvdb checks from listrr, overseerr, plex. needs reworked.

* set torrentio to disabled by default. removed parse logs. raised torrentio limit slightly.

* Set all default settings to disabled by default for onboarding

* add extra logging attr. for debugging large groups of data.

* feat: started status page rewrite

* add dev branch builds with :dev tag (#165)

* fix: listrr validation

* rework in progress.

* fix: correct limits for orionoid

* fix: switch to comprehensions

* fix: disable plex logging for id mismatches

* time for sleep. rework still wip.

* feat: parser works. needs more work. language needs a rewrite. disabled for now.

* feat: frontend improvements (#158)

* feat: added global debug for settings

* feat: added dev to formDebug so it's always true in development but false in production

* feat: added DEBUG & LOG to general settings

* deps: switched svelte-sonner to shadcn customized toast component

* refactor: renamed PlexDebridItem to IcebergItem and added changes made to /items

* fix: fixed the wrong relative date in status page

* docs: readme improvements

* docs: readme improvements

* docs: readme improvements

* chore(deps): bump lucide-svelte from 0.303.0 to 0.307.0 in /frontend (#124)

* refactor: componentized forms, soon will do same for fields too

* Parse rewrite (#128)

* Move parser to its own module

* Add ORIGIN to env vars

* Fix overseerr, watchlist, jackett validation.

* Added more refined logic to parser module.

* Set stage for testing

* Add methods for individual checks

* Update sort logic

* Update default settings

* Fix jackett. Begin to add title support for jackett.

---------

Co-authored-by: Spoked <Spoked@localhost>
Co-authored-by: Dreu LaVelle <dreu.lavelle@localhost>

* feat: onboarding on the way ;), major refactoring of form related code

* Simplified downloading logic and modified state matchine

* fix typo in state machine and handle movie pathing correctly

* Remove useless method

* Temporary fix to test

* Remove uncached stream hashes from item to avoid loop, some blacklisting logic could also be good

* chore(deps-dev): bump @typescript-eslint/eslint-plugin in /frontend (#134)

* chore(deps): bump lucide-svelte from 0.307.0 to 0.309.0 in /frontend (#133)

* chore(deps-dev): bump @sveltejs/kit from 2.0.1 to 2.3.2 in /frontend (#132)

* chore(deps): bump bits-ui from 0.13.0 to 0.14.0 in /frontend (#130)

* chore(deps-dev): bump @sveltejs/adapter-node in /frontend (#138)

* feat: some more onboarding and form improvements

* Dev startup to disabling pickling

* feat: Listrr Support Added (#136)

* Start Listrr Feature
* feat: Listrr ready for review.
* small tweaks. rewrite coming later.

---------

Co-authored-by: Spoked <Spoked@localhost>

* Jackett rewrite (#139)

* Add TorBox scraper

* Add is_anime attribute to item

* Rework Jackett to Keyword Queries. Added categories. Removed Torbox

* Remove audio from parsing, it removed alot of good hits

* fix movie scraping and modify response parsing logic to be more readable

* fix: remove torbox module

* remove audio from being parsed

* remove more audio from parser

* fix typo

* fix: tidy audio and networks

* small tweaks

---------

Co-authored-by: Spoked <Spoked@localhost>
Co-authored-by: Gaisberg <None>

* Avoid [None] if empty content service

* fix: handle bad quality manually in parser (#145)

Co-authored-by: Spoked <Spoked@localhost>

* deps: updated deps due to security updateS

* feat: added more onboarding steps, some bugs also introduced

* chore(deps-dev): bump @sveltejs/kit from 2.3.2 to 2.4.2 in /frontend (#156)

* chore(deps-dev): bump prettier from 3.1.1 to 3.2.4 in /frontend (#155)

* chore(deps): bump lucide-svelte from 0.309.0 to 0.314.0 in /frontend (#154)

* chore(deps): bump bits-ui from 0.14.0 to 0.15.1 in /frontend (#153)

* feat: minor changes

* feat: deps change

* feat: deps change

* feat: onboarding MVP done

---------

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Spoked <5782630+dreulavelle@users.noreply.github.com>
Co-authored-by: Spoked <Spoked@localhost>
Co-authored-by: Dreu LaVelle <dreu.lavelle@localhost>
Co-authored-by: Gaisberg <None>

* feat: frontend improvements (#159)

* feat: added global debug for settings

* feat: added dev to formDebug so it's always true in development but false in production

* feat: added DEBUG & LOG to general settings

* deps: switched svelte-sonner to shadcn customized toast component

* refactor: renamed PlexDebridItem to IcebergItem and added changes made to /items

* fix: fixed the wrong relative date in status page

* docs: readme improvements

* docs: readme improvements

* docs: readme improvements

* chore(deps): bump lucide-svelte from 0.303.0 to 0.307.0 in /frontend (#124)

* refactor: componentized forms, soon will do same for fields too

* Parse rewrite (#128)

* Move parser to its own module

* Add ORIGIN to env vars

* Fix overseerr, watchlist, jackett validation.

* Added more refined logic to parser module.

* Set stage for testing

* Add methods for individual checks

* Update sort logic

* Update default settings

* Fix jackett. Begin to add title support for jackett.

---------

Co-authored-by: Spoked <Spoked@localhost>
Co-authored-by: Dreu LaVelle <dreu.lavelle@localhost>

* feat: onboarding on the way ;), major refactoring of form related code

* Simplified downloading logic and modified state matchine

* fix typo in state machine and handle movie pathing correctly

* Remove useless method

* Temporary fix to test

* Remove uncached stream hashes from item to avoid loop, some blacklisting logic could also be good

* chore(deps-dev): bump @typescript-eslint/eslint-plugin in /frontend (#134)

* chore(deps): bump lucide-svelte from 0.307.0 to 0.309.0 in /frontend (#133)

* chore(deps-dev): bump @sveltejs/kit from 2.0.1 to 2.3.2 in /frontend (#132)

* chore(deps): bump bits-ui from 0.13.0 to 0.14.0 in /frontend (#130)

* chore(deps-dev): bump @sveltejs/adapter-node in /frontend (#138)

* feat: some more onboarding and form improvements

* Dev startup to disabling pickling

* feat: Listrr Support Added (#136)

* Start Listrr Feature
* feat: Listrr ready for review.
* small tweaks. rewrite coming later.

---------

Co-authored-by: Spoked <Spoked@localhost>

* Jackett rewrite (#139)

* Add TorBox scraper

* Add is_anime attribute to item

* Rework Jackett to Keyword Queries. Added categories. Removed Torbox

* Remove audio from parsing, it removed alot of good hits

* fix movie scraping and modify response parsing logic to be more readable

* fix: remove torbox module

* remove audio from being parsed

* remove more audio from parser

* fix typo

* fix: tidy audio and networks

* small tweaks

---------

Co-authored-by: Spoked <Spoked@localhost>
Co-authored-by: Gaisberg <None>

* Avoid [None] if empty content service

* fix: handle bad quality manually in parser (#145)

Co-authored-by: Spoked <Spoked@localhost>

* deps: updated deps due to security updateS

* feat: added more onboarding steps, some bugs also introduced

* chore(deps-dev): bump @sveltejs/kit from 2.3.2 to 2.4.2 in /frontend (#156)

* chore(deps-dev): bump prettier from 3.1.1 to 3.2.4 in /frontend (#155)

* chore(deps): bump lucide-svelte from 0.309.0 to 0.314.0 in /frontend (#154)

* chore(deps): bump bits-ui from 0.14.0 to 0.15.1 in /frontend (#153)

* feat: minor changes

* feat: deps change

* feat: deps change

* feat: onboarding MVP done

* refactor: moved schemes into forms/helpers.ts and command menu improvements

* refactor: switched to new font, changes made to all except status page

* refactor: minor change, didn't get commit

* fix: minor fix

* feat: fixed git merge conflicts issue

* feat: fixed status page font too

---------

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Spoked <5782630+dreulavelle@users.noreply.github.com>
Co-authored-by: Spoked <Spoked@localhost>
Co-authored-by: Dreu LaVelle <dreu.lavelle@localhost>
Co-authored-by: Gaisberg <None>

* docs: minor improvements (#160)

* docs: readme improvements

* docs: readme improvements

* docs: minor improvements (#161)

* docs: readme improvements

* docs: readme improvements

* docs: readme improvements

* docs: minor improvements (#162)

* fix: correct parsing of external id's (#163)

Co-authored-by: Dreu LaVelle <dreu.lavelle@dajac.com>

* fix: overseerr bug on using external ids

* fix: remove plex debug line for users

* disable tvdb checks from listrr, overseerr, plex. needs reworked.

* set torrentio to disabled by default. removed parse logs. raised torrentio limit slightly.

* Set all default settings to disabled by default for onboarding

* add extra logging attr. for debugging large groups of data.

* fix: listrr validation

* feat: rewrite of status page almost done

* add verbose logging in plex to debug looping

* revert debug logging for plex. figured out looping issue.

* add back plex log. add boilerplate for trakt content service. wip

* add back plex log. add boilerplate for trakt content service. wip

* feat: status page improvements (#169)

* Feat/better status page (#170)

* feat: status page improvements

* feat: status page improvements

* feat: status page improvements

* feat: new settings (#176)

* added more validation and logging

* changed name of test_items module

* refactor: edited minor things in settings (#177)

* remove tzdata

* refactor: edited minor things in settings (#177)

* remove tzdata

* fix typo on parser

* increase ratelimits on second_limiters

* Fix/parser/add attribute (#179)

* increase ratelimits on second_limiters

* Iceberg works. All scrapers working together. Symlinking works.

---------

Co-authored-by: Spoked <Spoked@localhost>

* add extra attrs to extended api endpoint

* feat: status page improvements (#182)

* [DEV] feat: frontend improvements (#193)

* feat: switched to new theme!
refactor: componentized most of form except tag inputs

* feat: completely refactored form and added many improvements in ui

* fix: fixed the mobile select issue

* feat: some more frontend improvements and bug fixes

* fix: shows not being downloaded

---------

Co-authored-by: Spoked <Spoked@localhost>
Co-authored-by: KingPin <KingPin@users.noreply.github.com>
Co-authored-by: Dreu LaVelle <dreu.lavelle@dajac.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Spoked <5782630+dreulavelle@users.noreply.github.com>
Co-authored-by: Dreu LaVelle <dreu.lavelle@localhost>
  • Loading branch information
7 people authored Feb 2, 2024
1 parent 22e309f commit 77e7ad7
Show file tree
Hide file tree
Showing 38 changed files with 710 additions and 729 deletions.
5 changes: 2 additions & 3 deletions backend/program/media/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ def sort(self, by, reverse):
"""Sort container by given attribute"""
try:
self.items.sort(key=lambda item: item.get(by), reverse=reverse)
except AttributeError as e:
logger.error("Failed to sort container: %s", e)
pass
except AttributeError:
pass # Fixes: 'NoneType' object has no attribute 'get' - caused by Trakt not able to create an item

def __len__(self):
"""Get length of container"""
Expand Down
2 changes: 1 addition & 1 deletion backend/program/scrapers/jackett.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, _):
if not self.initialized and not self.api_key:
return
self.minute_limiter = RateLimiter(max_calls=60, period=60, raise_on_limit=True)
self.second_limiter = RateLimiter(max_calls=1, period=10)
self.second_limiter = RateLimiter(max_calls=1, period=5)
self.parse_logging = False
logger.info("Jackett initialized!")

Expand Down
2 changes: 1 addition & 1 deletion backend/program/scrapers/orionoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, _):
self.max_calls = 100 if not self.is_premium else 60
self.period = 86400 if not self.is_premium else 60
self.minute_limiter = RateLimiter(max_calls=self.max_calls, period=self.period, raise_on_limit=True)
self.second_limiter = RateLimiter(max_calls=1, period=10)
self.second_limiter = RateLimiter(max_calls=1, period=5)
logger.info("Orionoid initialized!")

def validate_settings(self) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion backend/program/scrapers/torrentio.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, _):
self.key = "torrentio"
self.settings = TorrentioConfig(**settings_manager.get(f"scraping.{self.key}"))
self.minute_limiter = RateLimiter(max_calls=60, period=60, raise_on_limit=True)
self.second_limiter = RateLimiter(max_calls=1, period=10)
self.second_limiter = RateLimiter(max_calls=1, period=5)
self.initialized = self.validate_settings()
if not self.initialized:
return
Expand Down
1 change: 0 additions & 1 deletion backend/program/symlink.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Symlinking module"""
import os
from pathlib import Path
from typing import Optional
from pydantic import BaseModel
from utils.settings import settings_manager as settings
from utils.logger import logger
Expand Down
10 changes: 7 additions & 3 deletions backend/utils/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def _parse(self, item, string) -> dict:
else:
episodes.append(int(episode))

title_match = self.check_for_title_match(item, parsed_title)
if item is not None:
title_match = self.check_for_title_match(item, parsed_title)
is_4k = parse.get("resolution", False) in ["2160p", "4K", "UHD"]
is_complete = self._is_complete_series(string)
is_dual_audio = self._is_dual_audio(string)
Expand All @@ -56,7 +57,6 @@ def _parse(self, item, string) -> dict:
parsed_data = {
"string": string,
"parsed_title": parsed_title,
"title_match": title_match,
"fetch": False,
"is_4k": is_4k,
"is_dual_audio": is_dual_audio,
Expand All @@ -80,6 +80,10 @@ def _parse(self, item, string) -> dict:
"extended": parse.get("extended", False)
}

# bandaid for now, this needs to be refactored to make less calls to _parse
if item is not None:
parsed_data["title_match"] = title_match

parsed_data["fetch"] = self._should_fetch(parsed_data)
return parsed_data

Expand All @@ -90,7 +94,7 @@ def episodes(self, string) -> List[int]:

def episodes_in_season(self, season, string) -> List[int]:
"""Return a list of episodes in the given season."""
parse = self._parse(string=string)
parse = self._parse(item=None, string=string)
if parse["season"] == season:
return parse["episodes"]
return []
Expand Down
125 changes: 53 additions & 72 deletions frontend/src/app.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -3,78 +3,59 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;

--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;

--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;

--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;

--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;

--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;

--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;

--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;

--destructive: 0 72.2% 50.6%;
--destructive-foreground: 210 40% 98%;

--ring: 222.2 84% 4.9%;

--radius: 0.5rem;
}

.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;

--muted: 217.2 32.6% 17.5%;
--muted-foreground: 215 20.2% 65.1%;

--popover: 222.2 84% 4.9%;
--popover-foreground: 210 40% 98%;

--card: 222.2 84% 4.9%;
--card-foreground: 210 40% 98%;

--border: 217.2 32.6% 17.5%;
--input: 217.2 32.6% 17.5%;

--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 11.2%;

--secondary: 217.2 32.6% 17.5%;
--secondary-foreground: 210 40% 98%;

--accent: 217.2 32.6% 17.5%;
--accent-foreground: 210 40% 98%;

--destructive: 0 62.8% 30.6%;
--destructive-foreground: 210 40% 98%;

--ring: hsl(212.7,26.8%,83.9);
}
:root {
--background: 171 0% 96.92%;
--foreground: 171 52% 4%;
--card: 171 0% 97.69%;
--card-foreground: 171 52% 3%;
--popover: 171 45% 99%;
--popover-foreground: 171 52% 4%;
--primary: 171 46.56% 72.65%;
--primary-foreground: 171 0% 0%;
--secondary: 171 10% 90%;
--secondary-foreground: 171 10% 30%;
--accent: 171 10% 90%;
--accent-foreground: 171 10% 30%;
--destructive: 14 97% 36%;
--destructive-foreground: 0 0% 100%;
--muted: 171 14% 89%;
--muted-foreground: 171 13% 36%;
--border: 171 7% 91%;
--input: 171 7% 91%;
--ring: 171 0% 0%;
--radius: 0.5rem;
}

.dark {
--background: 171 3.64% 11.13%;
--foreground: 171 0% 100%;
--card: 171 16.62% 9.23%;
--card-foreground: 171 37% 99%;
--popover: 171 55% 2%;
--popover-foreground: 171 37% 98%;
--primary: 171 63.07% 77.09%;
--primary-foreground: 228.68 0% 0%;
--secondary: 171 14% 13%;
--secondary-foreground: 171 14% 73%;
--accent: 171 14% 13%;
--accent-foreground: 171 14% 73%;
--destructive: 0 65.22% 47.49%;
--destructive-foreground: 0 0% 100%;
--muted: 171 14% 11%;
--muted-foreground: 171 13% 64%;
--border: 171 7% 13%;
--input: 171 1.11% 31.95%;
--ring: 171 73% 71%;
}
}

@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
16 changes: 10 additions & 6 deletions frontend/src/lib/components/header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,21 @@
</script>

<header class="flex items-center justify-between w-full p-8 md:px-24 lg:px-32">
<a href="/" class="flex items-center gap-2">
<Mountain class="size-6 md:size-8" />
<h1 class="text-xl md:text-2xl font-semibold">Iceberg</h1>
<div class="ml-2 hidden lg:flex items-center p-2 px-4 bg-slate-100 dark:bg-slate-900 rounded-md text-sm font-medium">
<div class="flex items-center gap-2">
<a href="/" class="flex items-center gap-2">
<Mountain class="size-6 md:size-8" />
<h1 class="text-xl md:text-2xl font-semibold">Iceberg</h1>
</a>
<div
class="ml-2 hidden lg:flex items-center p-2 px-4 bg-secondary rounded-md text-sm font-medium"
>
<div class="flex items-center">
<Command class="h-4 w-4" />
<span>K</span>
</div>
<span class="ml-2">to open command palette</span>
</div>
</a>
</div>
<nav class="items-center gap-6 tracking-wider hidden md:flex">
<div class="flex items-center gap-3">
{#each navItems as navItem}
Expand All @@ -62,7 +66,7 @@
class:h-[100dvh]={showMenu}
class="h-0 w-screen fixed z-[99] top-0 left-0 bg-background overflow-x-hidden flex flex-col items-center md:hidden"
>
<div class="flex p-10 w-full items-end justify-end transition-all ease-in-out duration-300">
<div class="flex p-8 w-full items-end justify-end transition-all ease-in-out duration-300">
<Button on:click={toggleNavbar} type="button" size="sm" class="max-w-max">
<X class="h-4 w-4" />
</Button>
Expand Down
48 changes: 24 additions & 24 deletions frontend/src/lib/components/service-status.svelte
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<script lang=ts>
import { Check, X } from 'lucide-svelte';
import { formatWords } from '$lib/helpers';
export let statusData: Record<string, boolean> = {};
<script lang="ts">
import { Check, X } from 'lucide-svelte';
import { formatWords } from '$lib/helpers';
export let statusData: Record<string, boolean> = {};
</script>

<div class="flex flex-col gap-2 items-start mt-2">
{#each Object.keys(statusData) as serviceStatus}
<div class="flex gap-1 items-center">
{#if statusData[serviceStatus]}
<div class="p-1 bg-green-500 rounded-full">
<Check class="w-4 h-4 text-white" />
</div>
<p class="text-muted-foreground">
<span class="font-semibold">{formatWords(serviceStatus)}</span> is configured
</p>
{:else}
<div class="p-1 bg-red-500 rounded-full">
<X class="w-4 h-4 text-white" />
</div>
<p class="text-muted-foreground">
<span class="font-semibold">{formatWords(serviceStatus)}</span> is not configured
</p>
{/if}
</div>
{/each}
</div>
{#each Object.keys(statusData) as serviceStatus}
<div class="flex gap-1 items-center">
{#if statusData[serviceStatus]}
<div class="p-1 bg-green-500 rounded-full">
<Check class="w-4 h-4 text-white" />
</div>
<p class="text-muted-foreground">
<span class="font-semibold text-foreground">{formatWords(serviceStatus)}</span> is configured
</p>
{:else}
<div class="p-1 bg-red-500 rounded-full">
<X class="w-4 h-4 text-white" />
</div>
<p class="text-muted-foreground">
<span class="font-semibold text-foreground">{formatWords(serviceStatus)}</span> is not configured
</p>
{/if}
</div>
{/each}
</div>
25 changes: 0 additions & 25 deletions frontend/src/lib/components/ui/accordion/accordion-content.svelte

This file was deleted.

14 changes: 0 additions & 14 deletions frontend/src/lib/components/ui/accordion/accordion-item.svelte

This file was deleted.

26 changes: 0 additions & 26 deletions frontend/src/lib/components/ui/accordion/accordion-trigger.svelte

This file was deleted.

17 changes: 0 additions & 17 deletions frontend/src/lib/components/ui/accordion/index.ts

This file was deleted.

Loading

0 comments on commit 77e7ad7

Please sign in to comment.