{#each movie.genres as g, i}
diff --git a/src/routes/(app)/profile/+page.svelte b/src/routes/(app)/profile/+page.svelte
index 58bc47da..4d83b570 100644
--- a/src/routes/(app)/profile/+page.svelte
+++ b/src/routes/(app)/profile/+page.svelte
@@ -134,12 +134,28 @@
/**
* Takes in number of minutes and converts to readable.
- * eg into hours and minutes.
+ * eg into months, weeks, days, hours and minutes.
*/
- function toFormattedMinutes(m: number) {
- const hours = Math.floor(m / 60);
- const minutes = m % 60;
- return `${hours ? `${hours}h ` : ""}${minutes}m`;
+ function toFormattedTimeLong(m: number) {
+ // Considers a 30 days long month
+ const countInMinutes = [
+ ["month", 43200],
+ ["week", 10080],
+ ["day", 1440],
+ ["hour", 60]
+ ];
+
+ let ansString = "";
+ let tmp;
+ for (const c of countInMinutes) {
+ tmp = Math.floor(m / (c[1] as number));
+
+ // Ignore fields with fewer than 1 unit
+ if (tmp) ansString += `${tmp} ${c[0]}${tmp >= 2 ? "s, " : ", "}`;
+ m -= tmp * (c[1] as number);
+ }
+
+ return ansString.slice(0, -2);
}
@@ -163,10 +179,10 @@
-
+
{:catch err}
diff --git a/src/routes/(app)/tv/[id]/+page.svelte b/src/routes/(app)/tv/[id]/+page.svelte
index d7f53986..d927bbf5 100644
--- a/src/routes/(app)/tv/[id]/+page.svelte
+++ b/src/routes/(app)/tv/[id]/+page.svelte
@@ -145,7 +145,7 @@
{#if show?.episode_run_time?.length > 0}
- {show.episode_run_time.join(",")}m
+ {show.episode_run_time.join(",")} min
{/if}
diff --git a/src/store.ts b/src/store.ts
index f812332b..e188fa9d 100644
--- a/src/store.ts
+++ b/src/store.ts
@@ -24,7 +24,8 @@ export const activeSort = writable(defaultSort);
export const activeFilters = writable({ type: [], status: [] });
export const appTheme = writable();
export const importedList = writable<
- { data: string; type: "text-list" | "tmdb" | "movary" | "watcharr" | "myanimelist" } | undefined
+ | { data: string; type: "text-list" | "tmdb" | "movary" | "watcharr" | "myanimelist" | "ryot" }
+ | undefined
>();
export const parsedImportedList = writable();
export const searchQuery = writable("");
diff --git a/src/types.ts b/src/types.ts
index 2548b0e0..7c046896 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -34,6 +34,7 @@ export type Icon =
| "eye"
| "star"
| "movary"
+ | "ryot"
| "refresh"
| "gamepad"
| "film"