Generating and using URL slugs for releases, improver slugify module. Added 'extract' parameter to MindGeek scraper to get scenes not associate with a channel (see Digital Playground). Added various high res logos.

This commit is contained in:
2020-02-04 03:12:09 +01:00
parent ca33704f51
commit f921bb4ae9
30 changed files with 132 additions and 22 deletions

View File

@@ -60,7 +60,7 @@ function destructConfigNetworks(networks = []) {
}
async function findSiteByUrl(url) {
const { origin, pathname } = new URL(url);
const { origin, hostname, pathname } = new URL(url);
// const domain = hostname.replace(/www.|tour./, '');
const dirUrl = `${origin}${pathname.split('/').slice(0, 2).join('/')}`; // allow for sites on URI directory
@@ -72,6 +72,9 @@ async function findSiteByUrl(url) {
)
.where('sites.url', url)
.orWhere('sites.url', origin)
.orWhere('sites.url', origin.replace(/www\.|tour\./, ''))
.orWhere('sites.url', `https://www.${hostname}`)
.orWhere('sites.url', `http://www.${hostname}`)
.orWhere('sites.url', dirUrl)
// .orWhere('sites.url', 'like', `%${domain}`)
.first();