From 83002a823465fe03a8d82833cb2e073a383405a8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 22 May 2023 17:04:39 +0200 Subject: Update server dependencies --- server/lib/activitypub/videos/shared/object-to-model-attributes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/lib/activitypub') diff --git a/server/lib/activitypub/videos/shared/object-to-model-attributes.ts b/server/lib/activitypub/videos/shared/object-to-model-attributes.ts index 86699c5b8..8fd0a816c 100644 --- a/server/lib/activitypub/videos/shared/object-to-model-attributes.ts +++ b/server/lib/activitypub/videos/shared/object-to-model-attributes.ts @@ -1,5 +1,5 @@ import { maxBy, minBy } from 'lodash' -import magnetUtil from 'magnet-uri' +import { decode as magnetUriDecode } from 'magnet-uri' import { basename } from 'path' import { isAPVideoFileUrlMetadataObject } from '@server/helpers/custom-validators/activitypub/videos' import { isVideoFileInfoHashValid } from '@server/helpers/custom-validators/videos' @@ -62,7 +62,7 @@ function getFileAttributesFromUrl ( if (!magnet) throw new Error('Cannot find associated magnet uri for file ' + fileUrl.href) - const parsed = magnetUtil.decode(magnet.href) + const parsed = magnetUriDecode(magnet.href) if (!parsed || isVideoFileInfoHashValid(parsed.infoHash) === false) { throw new Error('Cannot parse magnet URI ' + magnet.href) } -- cgit v1.2.3