Skip to content

Commit

Permalink
Fix media paths
Browse files Browse the repository at this point in the history
  • Loading branch information
dgreif committed Dec 21, 2024
1 parent 619b27c commit b9a35d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/homebridge-ring/camera-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ import { OpusRepacketizer } from './opus-repacketizer.ts'
import path from 'node:path'

const __dirname = new URL('.', import.meta.url).pathname,
mediaDirectory = path.join(__dirname.replace('/lib', ''), 'media'),
readFileAsync = promisify(readFile),
cameraOfflinePath = path.join(__dirname, '../media/camera-offline.jpg'),
snapshotsBlockedPath = path.join(__dirname, '../media/snapshots-blocked.jpg')
cameraOfflinePath = path.join(mediaDirectory, 'camera-offline.jpg'),
snapshotsBlockedPath = path.join(mediaDirectory, 'snapshots-blocked.jpg')

function getDurationSeconds(start: number) {
return (Date.now() - start) / 1000
Expand Down

0 comments on commit b9a35d7

Please sign in to comment.