mirror of https://github.com/Qortal/q-tube
Browse Source
Deleted videos are not filtered out. They are now visible and show an image on the Home, Channel, and VideoContent pages that says "This video has been removed by the user". Fixed minification bug caused by store.ts titleFormatter and titleFormatterOnSave redone, only characters not allowed by Operating Systems are filtered out when saving as file.pull/30/head
Qortal Dev
2 months ago
8 changed files with 77 additions and 68 deletions
After Width: | Height: | Size: 22 KiB |
@ -1,6 +1,7 @@
|
||||
export const minPriceSuperlike = 1; |
||||
export const titleFormatter = /[^a-zA-Z0-9\s-_!?()&'",.;:|—~@#$%^*+=<>]/g; |
||||
export const titleFormatterOnSave = /[^a-zA-Z0-9\s-_!()&',.;—~@#$%^+=]/g; |
||||
|
||||
export const titleFormatter = /[\r\n]+/g; |
||||
export const titleFormatterOnSave = /[\r\n/<>:"'\\*|?]+/g; |
||||
|
||||
export const videoMaxSize = 400; // Size in Megabytes (decimal)
|
||||
export const maxSize = videoMaxSize *1024*1024 |
||||
export const maxSize = videoMaxSize * 1024 * 1024; |
||||
|
@ -1,36 +1,35 @@
|
||||
import { checkStructure } from './checkStructure' |
||||
import { checkStructure } from "./checkStructure"; |
||||
|
||||
export const fetchAndEvaluateVideos = async (data: any) => { |
||||
const getVideo = async () => { |
||||
const { user, videoId, content } = data |
||||
const { user, videoId, content } = data; |
||||
let obj: any = { |
||||
...content, |
||||
isValid: false |
||||
} |
||||
}; |
||||
|
||||
if (!user || !videoId) return obj |
||||
if (!user || !videoId) return obj; |
||||
|
||||
try { |
||||
|
||||
const responseData = await qortalRequest({ |
||||
action: 'FETCH_QDN_RESOURCE', |
||||
action: "FETCH_QDN_RESOURCE", |
||||
name: user, |
||||
service: content?.service || 'DOCUMENT', |
||||
identifier: videoId |
||||
}) |
||||
service: content?.service || "DOCUMENT", |
||||
identifier: videoId, |
||||
}); |
||||
if (responseData) { |
||||
obj = { |
||||
...content, |
||||
...responseData, |
||||
isValid: true |
||||
} |
||||
isValid: true, |
||||
isDeleted: false, |
||||
}; |
||||
} |
||||
return obj |
||||
return obj; |
||||
} catch (error: any) { |
||||
throw new Error(error?.message || 'error') |
||||
throw new Error(error?.message || "error"); |
||||
} |
||||
} |
||||
}; |
||||
|
||||
const res = await getVideo() |
||||
return res |
||||
} |
||||
const res = await getVideo(); |
||||
return res; |
||||
}; |
||||
|
Loading…
Reference in new issue