Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media file in subfolder fix #69

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function ({ db, config, logger }: { db: any; config: any; logger:
)

app.get(
'/media/info/:id',
'/media/info/:id(*)',
wrap(async (req, res) => {
const { mediainfo } = await db.get(req.params.id.toUpperCase())
res.set('content-type', 'application/json')
Expand All @@ -46,7 +46,7 @@ export default function ({ db, config, logger }: { db: any; config: any; logger:
)

app.get(
'/media/thumbnail/:id',
'/media/thumbnail/:id(*)',
wrap(async (req, res) => {
const { _attachments } = await db.get(req.params.id.toUpperCase(), { attachments: true, binary: true })

Expand Down Expand Up @@ -185,7 +185,7 @@ export default function ({ db, config, logger }: { db: any; config: any; logger:
)

app.get(
'/cinf/:id',
'/cinf/:id(*)',
wrap(async (req, res) => {
const { cinf } = await db.get(req.params.id.toUpperCase())
res.set('content-type', 'text/plain')
Expand All @@ -203,7 +203,7 @@ export default function ({ db, config, logger }: { db: any; config: any; logger:
)

app.get(
'/thumbnail/generate/:id',
'/thumbnail/generate/:id(*)',
wrap(async (_req, res) => {
// TODO (fix) Force scanner to scan and wait?
res.set('content-type', 'text/plain')
Expand All @@ -224,7 +224,7 @@ export default function ({ db, config, logger }: { db: any; config: any; logger:
)

app.get(
'/thumbnail/:id',
'/thumbnail/:id(*)',
wrap(async (req, res) => {
const { _attachments } = await db.get(req.params.id.toUpperCase(), { attachments: true })

Expand Down
Loading