forked from DebaucheryLibrarian/traxxx
Added S3 support for media files. Fixed MindGeek scraper for new poster data structure.
This commit is contained in:
@@ -24,6 +24,17 @@ async function init() {
|
||||
const app = createApp(Container);
|
||||
const events = mitt();
|
||||
|
||||
function getPath(media, type, options) {
|
||||
const path = (store.state.ui.sfw && media.assetPath)
|
||||
|| (media.isS3 && config.media.s3Path)
|
||||
|| (options?.local && config.media.assetPath)
|
||||
|| config.media.mediaPath;
|
||||
|
||||
const filename = type && !options?.original ? media[type] : media.path;
|
||||
|
||||
return `${path}/${filename}`;
|
||||
}
|
||||
|
||||
initUiObservers(store, router);
|
||||
|
||||
if (window.env.sfw) {
|
||||
@@ -64,6 +75,8 @@ async function init() {
|
||||
formatDuration,
|
||||
isAfter: (dateA, dateB) => dayjs(dateA).isAfter(dateB),
|
||||
isBefore: (dateA, dateB) => dayjs(dateA).isBefore(dateB),
|
||||
getPath,
|
||||
getBgPath: (media, type) => `url(${getPath(media, type)})`,
|
||||
},
|
||||
beforeCreate() {
|
||||
this.uid = uid;
|
||||
|
||||
Reference in New Issue
Block a user