feat: vod display (#686)
* feat: preview for html5 supported videos * fix: handle out of limit tags * feat: support preview on the donwload screen * refactor: rework meta and preview handling to be more general * fix: missing meta * fix: do not allow maybe or probably types * fix: make the media check more strict --------- Co-authored-by: Levente Kiss <levente.kiss@solarpunk.bzz>
This commit is contained in:
@@ -50,14 +50,20 @@ export class ManifestJs {
|
||||
/**
|
||||
* Retrieves all paths with the associated hashes from a Swarm manifest
|
||||
*/
|
||||
public async getHashes(hash: string): Promise<Record<string, string>> {
|
||||
public async getHashes(hash: string, options?: { exclude: string[] }): Promise<Record<string, string>> {
|
||||
const data = await this.bee.downloadData(hash)
|
||||
const node = new MantarayNode()
|
||||
node.deserialize(data)
|
||||
await loadAllNodes(this.load.bind(this), node)
|
||||
const result = {}
|
||||
const result: Record<string, string> = {}
|
||||
this.extractHashes(result, node)
|
||||
|
||||
if (options?.exclude) {
|
||||
for (const path of options.exclude) {
|
||||
delete result[path]
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user