diff --git a/src/lib/ae_archives/ae_archives__archive.ts b/src/lib/ae_archives/ae_archives__archive.ts
index 11e80697..7d1fb6f7 100644
--- a/src/lib/ae_archives/ae_archives__archive.ts
+++ b/src/lib/ae_archives/ae_archives__archive.ts
@@ -69,7 +69,7 @@ export async function load_ae_obj_id__archive(
api_cfg: api_cfg,
for_obj_type: 'archive',
for_obj_id: archive_id,
- params: {qry__enabled: 'all', qry__limit: 25},
+ params: {qry__enabled: 'all', qry__limit: 99},
try_cache: try_cache,
log_lvl: log_lvl
})
diff --git a/src/lib/ae_archives/ae_archives__archive_content.ts b/src/lib/ae_archives/ae_archives__archive_content.ts
index c9ea7128..ccb6ef3d 100644
--- a/src/lib/ae_archives/ae_archives__archive_content.ts
+++ b/src/lib/ae_archives/ae_archives__archive_content.ts
@@ -63,7 +63,7 @@ export async function load_ae_obj_li__archive_content(
api_cfg,
for_obj_type = 'archive',
for_obj_id,
- order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'},
+ order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'original_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'},
params = {},
try_cache = true,
log_lvl = 0
@@ -280,7 +280,7 @@ export function db_save_ae_obj_li__archive_content(
url: obj.url,
url_text: obj.url_text,
- hosted_file_id: obj.hosted_file_id,
+ hosted_file_id: obj.hosted_file_id_random,
file_path: obj.file_path,
@@ -309,6 +309,8 @@ export function db_save_ae_obj_li__archive_content(
// From SQL view
archive_code: obj.archive_code,
archive_name: obj.archive_name,
+
+ hash_sha256: obj.hosted_file_hash_sha256
});
// console.log(`Put obj with ID: ${obj.archive_content_id_random} or ${id_random}`);
} catch (error) {
diff --git a/src/lib/db_archives.ts b/src/lib/db_archives.ts
index ebd24cca..73974232 100644
--- a/src/lib/db_archives.ts
+++ b/src/lib/db_archives.ts
@@ -112,6 +112,8 @@ export interface Archive_Content {
// Additional fields for convenience (database views)
archive_code?: null|string;
archive_name?: null|string;
+
+ hash_sha256?: null|string;
}
@@ -137,12 +139,13 @@ export class MySubClassedDexie extends Dexie {
archive_content_type,
name,
hosted_file_id,
- file_path,
- filename, file_extension,
- original_datetime, original_timezone, original_location, original_url, original_url_text,
- enable_for_public,
enable, hide, priority, sort, group, notes, created_on, updated_on`,
});
+
+ // file_path,
+ // filename, file_extension,
+ // original_datetime, original_timezone, original_location, original_url, original_url_text,
+ // enable_for_public,
}
}
diff --git a/src/routes/idaa/(idaa)/archives/+layout.svelte b/src/routes/idaa/(idaa)/archives/+layout.svelte
index bb46e5a7..c627d36d 100644
--- a/src/routes/idaa/(idaa)/archives/+layout.svelte
+++ b/src/routes/idaa/(idaa)/archives/+layout.svelte
@@ -2,7 +2,7 @@
/** @type {import('./$types').LayoutData} */
export let data: any;
let log_lvl = 2;
-console.log(`ae_idaa_archives +layout.svelte data:`, data);
+console.log(`ae_idaa_archives +layout.svelte data:`, data);
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores';
@@ -13,7 +13,7 @@ $slct.account_id = data.account_id;
let ae_acct = data[$slct.account_id];
console.log(`ae_acct = `, ae_acct);
-$idaa_slct.post_obj_li = ae_acct.slct.post_obj_li;
+$idaa_slct.archive_obj_li = ae_acct.slct.archive_obj_li;
diff --git a/src/routes/idaa/(idaa)/archives/+page.svelte b/src/routes/idaa/(idaa)/archives/+page.svelte
index f216f075..10f35b1b 100644
--- a/src/routes/idaa/(idaa)/archives/+page.svelte
+++ b/src/routes/idaa/(idaa)/archives/+page.svelte
@@ -44,9 +44,9 @@ $: lq__archive_obj = liveQuery(async () => {
});
$: lq__archive_content_obj_li = liveQuery(async () => {
- let results = await db_posts.comment
- .where('post_id')
- .equals($idaa_slct.post_id)
+ let results = await db_archives.content
+ .where('archive_id')
+ .equals($idaa_slct.archive_id)
.reverse()
.sortBy('updated_on');
// .sortBy('title');
@@ -55,7 +55,7 @@ $: lq__archive_content_obj_li = liveQuery(async () => {
});
$: lq__archive_content_obj = liveQuery(async () => {
- let results = await db_posts.comment
+ let results = await db_archives.content
.get($idaa_slct.archive_content_id);
return results;
diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/+layout.ts b/src/routes/idaa/(idaa)/archives/[archive_id]/+layout.ts
new file mode 100644
index 00000000..7cf70ad3
--- /dev/null
+++ b/src/routes/idaa/(idaa)/archives/[archive_id]/+layout.ts
@@ -0,0 +1,48 @@
+/** @type {import('./$types').LayoutLoad} */
+console.log(`IDAA Archives - [archive_id] +layout.ts start`);
+
+import { error } from '@sveltejs/kit';
+import { browser } from '$app/environment';
+import { archives_func } from '$lib/ae_archives/ae_archives_functions';
+
+export async function load({ params, parent }) { // route
+ // let log_lvl = 0;
+
+ // let data = await parent();
+ // data.log_lvl = log_lvl;
+
+ // let account_id = data.account_id;
+ // let ae_acct = data[account_id];
+ // console.log(`ae_acct = `, ae_acct);
+
+ // let archive_id = params.archive_id;
+ // if (!archive_id) {
+ // console.log(`ae IDAA Archives - [archive_id] +layout.ts: The archive_id was not found!!!`);
+ // error(404, {
+ // message: 'IDAA Archives - Archive ID not found'
+ // });
+ // }
+
+ // ae_acct.slct.archive_id = archive_id;
+
+ // if (browser) {
+ // if (log_lvl) {
+ // console.log(`ae_idaa_archives archives [archive_id] +layout.ts: archive_id = `, archive_id);
+ // }
+ // // Load event archive object
+ // let load_archive_obj = archives_func.load_ae_obj_id__archive({
+ // api_cfg: ae_acct.api,
+ // archive_id: archive_id,
+ // inc_content_li: true,
+ // try_cache: true
+ // });
+
+ // console.log(`load_archive_obj = `, load_archive_obj);
+ // ae_acct.slct.archive_obj = load_archive_obj;
+ // }
+
+ // WARNING: Precaution against shared data between sites and sessions.
+ // data[account_id] = ae_acct;
+
+ // return data;
+}
diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/+page.svelte b/src/routes/idaa/(idaa)/archives/[archive_id]/+page.svelte
new file mode 100644
index 00000000..cd87dfcd
--- /dev/null
+++ b/src/routes/idaa/(idaa)/archives/[archive_id]/+page.svelte
@@ -0,0 +1,110 @@
+
+
+
+ No archive content available to show.
+ {@html idaa_archive_content_obj.name}
+
+
+ {#if idaa_archive_content_obj.original_location}
+ —
+
+
+ {idaa_archive_content_obj.original_location}
+
+ {/if}
+ {@html idaa_archive_content_obj.description}{/if}
+
+
+
+
+ {#if idaa_archive_content_obj.archive_content_id == $idaa_sess.archives.show_view__archive_content_media}
+
+ Player Goes Here
+ {/if}
+
+
+ {@html $lq__archive_obj?.name} - {$lq__archive_content_obj_li?.length}
+
{@html idaa_archive_obj.description}{/if}