diff --git a/assets/components/releases/tile-details.vue b/assets/components/releases/tile-details.vue index 16a8c2f2..2cf98091 100644 --- a/assets/components/releases/tile-details.vue +++ b/assets/components/releases/tile-details.vue @@ -95,7 +95,6 @@ export default { background: var(--profile); font-size: 0; font-weight: bold; - box-shadow: 0 0 3px var(--darken); .favicon { width: 2rem; diff --git a/assets/js/ui/actions.js b/assets/js/ui/actions.js index e1b98dc2..20c570b6 100644 --- a/assets/js/ui/actions.js +++ b/assets/js/ui/actions.js @@ -34,62 +34,65 @@ function initUiActions(_store, _router) { $query: String! $limit: Int = 20 ) { - releases: searchReleases( + results: searchReleases( query: $query first: $limit minimumRank: "0.025" ) { - id - title - slug - date - url - isNew - entity { - id - slug - name - url - type - independent - parent { - id - slug - name - url + release: releaseById { + id + title + slug + date + url + isNew + entity { + id + slug + name + url type - } - } - actors: releasesActors { - actor { - id - slug - name - } - } - tags: releasesTags(orderBy: TAG_BY_TAG_ID__PRIORITY_DESC) { - tag { - id - name - slug - } - } - poster: releasesPosterByReleaseId { - media { - id - thumbnail - lazy - isS3 - } - } - covers: releasesCovers { - media { - id - thumbnail - lazy - isS3 - } - } + independent + parent { + id + slug + name + url + type + } + } + actors: releasesActors { + actor { + id + slug + name + } + } + tags: releasesTags(orderBy: TAG_BY_TAG_ID__PRIORITY_DESC) { + tag { + id + name + slug + } + } + poster: releasesPosterByReleaseId { + media { + id + thumbnail + lazy + isS3 + } + } + covers: releasesCovers { + media { + id + thumbnail + lazy + isS3 + } + } + } + rank } actors: searchActors( search: $query, @@ -157,7 +160,7 @@ function initUiActions(_store, _router) { }); return { - releases: res.releases.map(release => curateRelease(release)), + releases: res.results.map(result => curateRelease(result.release)), actors: res.actors.map(actor => curateActor(actor)), }; } diff --git a/migrations/20190325001339_releases.js b/migrations/20190325001339_releases.js index 8bcb2605..b18fdd43 100644 --- a/migrations/20190325001339_releases.js +++ b/migrations/20190325001339_releases.js @@ -1020,8 +1020,13 @@ exports.up = knex => Promise.resolve() ); $$ LANGUAGE SQL STABLE; - CREATE FUNCTION search_releases(query text, minimum_rank numeric DEFAULT 0) RETURNS SETOF releases AS $$ - SELECT releases.* FROM ( + /* We need both the release entries and their search ranking, and PostGraphile does not seem to allow virtual foreign keys on function results. + * Using a view as a proxy for the search results allows us to get both a reference to the releases table, and the ranking */ + CREATE VIEW releases_search_results AS + SELECT NULL::integer as id, NULL::real as rank; + + CREATE FUNCTION search_releases(query text, minimum_rank numeric DEFAULT 0) RETURNS SETOF releases_search_results AS $$ + SELECT releases.id, ranks.rank FROM ( SELECT releases_search.release_id, ts_rank(releases_search.document, to_tsquery('english', regexp_replace(query, '[\\s._-]+', '|', 'gi'))) AS rank @@ -1196,6 +1201,8 @@ exports.up = knex => Promise.resolve() COMMENT ON FUNCTION actors_scenes IS E'@sortable'; COMMENT ON FUNCTION tags_scenes IS E'@sortable'; + + COMMENT ON VIEW releases_search_results is E'@foreignKey (id) REFERENCES releases (id)'; `); }); @@ -1257,6 +1264,8 @@ exports.down = (knex) => { // eslint-disable-line arrow-body-style DROP TABLE IF EXISTS entities_types CASCADE; DROP TABLE IF EXISTS entities CASCADE; + DROP FUNCTION IF EXISTS search_releases_legacy; + DROP FUNCTION IF EXISTS search_releases; DROP FUNCTION IF EXISTS search_sites; DROP FUNCTION IF EXISTS search_entities; DROP FUNCTION IF EXISTS search_actors; @@ -1272,6 +1281,8 @@ exports.down = (knex) => { // eslint-disable-line arrow-body-style DROP FUNCTION IF EXISTS movies_tags; DROP FUNCTION IF EXISTS movies_photos; + DROP VIEW IF EXISTS releases_search_results; + DROP TEXT SEARCH CONFIGURATION IF EXISTS traxxx; DROP TEXT SEARCH DICTIONARY IF EXISTS traxxx_dict; `); diff --git a/public/img/tags/titty-fucking/3.jpeg b/public/img/tags/titty-fucking/3.jpeg new file mode 100644 index 00000000..16ecdf22 Binary files /dev/null and b/public/img/tags/titty-fucking/3.jpeg differ diff --git a/public/img/tags/titty-fucking/lazy/3.jpeg b/public/img/tags/titty-fucking/lazy/3.jpeg new file mode 100644 index 00000000..52551a5d Binary files /dev/null and b/public/img/tags/titty-fucking/lazy/3.jpeg differ diff --git a/public/img/tags/titty-fucking/original/3.jpeg b/public/img/tags/titty-fucking/original/3.jpeg new file mode 100644 index 00000000..7d9ca10f Binary files /dev/null and b/public/img/tags/titty-fucking/original/3.jpeg differ diff --git a/public/img/tags/titty-fucking/thumbs/3.jpeg b/public/img/tags/titty-fucking/thumbs/3.jpeg new file mode 100644 index 00000000..35fb8651 Binary files /dev/null and b/public/img/tags/titty-fucking/thumbs/3.jpeg differ diff --git a/seeds/04_media.js b/seeds/04_media.js index 421fe3bc..547a44fd 100644 --- a/seeds/04_media.js +++ b/seeds/04_media.js @@ -658,7 +658,7 @@ const tagPosters = [ ['squirting', 0, 'Veronica Rodriguez in "Hot Latina Squirting" for Jules Jordan'], ['schoolgirl', 2, 'Cindy Shine in "Schoolgirl Stars in Interracial DP Threesome" for Private'], ['swallowing', 'poster'], - ['tattoos', 1, 'Joanna Angel for Joanna Angel'], + ['tattoos', 0, 'Tigerlilly in "Wrapped In Blue" for Suicide Girls'], ['teen', 0, 'Alexa Flexy for Sensual Girl'], ['titty-fucking', 2, 'Layla London in "Touch Me" for Big Naturals'], ['toys', 1, 'Chloe Lamour in "Curives In All The Right Places" for Wet and Puffy'], @@ -894,13 +894,14 @@ const tagPhotos = [ ['redhead', 0, 'Penny Pax in "The Submission of Emma Marx: Boundaries" for New Sensations'], ['schoolgirl', 1, 'Eliza Ibarra for Brazzers'], ['squirting', 1, 'Abella Danger and Karma Rx in "Neon Dreaming" for Brazzers'], - ['tattoos', 0, 'Tigerlilly in "Wrapped In Blue" for Suicide Girls'], + ['tattoos', 1, 'Joanna Angel for Joanna Angel'], ['teen', 1, 'Stalfra aka Precious for Nubiles'], ['trainbang', 1, 'Ria Sunn for Private'], ['trainbang', 0, 'Nicole Black in GIO971 for LegalPorno'], ['tap', 1, 'Natasha Teen in SZ2098 for LegalPorno'], ['tap', 2, 'Kira Thorn in GIO1018 for LegalPorno'], ['titty-fucking', 0, 'Kylie Page in "Stepsis Gives Soapy Handjob In Shower" for Spy Fam'], + ['titty-fucking', 3, 'Anna Bell Peaks in "Ringing Her Bell" for MilfVR'], ['titty-fucking', 1, 'Chloe Lamour for DDF Busty'], ['toy-anal', 3, 'Kelly and Leona in "Sleeping Over" for Lez Cuties'], ['toy-anal', 2, 'Denise, Irina and Laki in "Sexy Slumber" for Lez Cuties'],