Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit41ee63b

Browse files
authored
feat: Add Rescrape Scene button (#1748)
* Added a tooltip to the Alternate Sites availableon the Scene Details page.* Added a tooltip to the Alternate Sites availableon SceneCard* Added Rescrape Scene Buttom
1 parentf0d92c8 commit41ee63b

File tree

3 files changed

+88
-9
lines changed

3 files changed

+88
-9
lines changed

‎ui/src/components/RescrapeButton.vue

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<template>
2+
<aclass="button is-dark is-outlined is-small"
3+
@click="rescrapeSingleScene()"
4+
:title="'Rescrape scene'">
5+
<b-iconpack="mdi"icon="web-refresh"size="is-small"/>
6+
</a>
7+
</template>
8+
9+
<script>
10+
importkyfrom'ky'
11+
exportdefault {
12+
name:'RescrapeButton',
13+
props: { item:Object },
14+
methods: {
15+
asyncrescrapeSingleScene () {
16+
let site=""
17+
18+
if (this.item.scene_url.toLowerCase().includes("dmm.co.jp")) {
19+
ky.post('/api/task/scrape-javr', { json: { s:"r18d", q:this.item.scene_id } })
20+
}else {
21+
22+
constsites=awaitky.get('/api/options/sites').json()
23+
console.info(sites)
24+
25+
for (constelementof sites) {
26+
if (this.item.scene_url.toLowerCase().includes(element.id)) {
27+
site=element.id
28+
}
29+
}
30+
31+
if (this.item.scene_url.toLowerCase().includes("sexlikereal.com")) {
32+
site="slr-single_scene"
33+
}
34+
if (this.item.scene_url.toLowerCase().includes("czechvrnetwork.com")) {
35+
site="czechvr-single_scene"
36+
}
37+
if (this.item.scene_url.toLowerCase().includes("povr.com")) {
38+
site="povr-single_scene"
39+
}
40+
if (this.item.scene_url.toLowerCase().includes("vrporn.com")) {
41+
site="vrporn-single_scene"
42+
}
43+
if (this.item.scene_url.toLowerCase().includes("vrphub.com")) {
44+
site="vrphub-single_scene"
45+
}
46+
if (site=="") {
47+
this.$buefy.toast.open({message:`No scrapers exist for this domain`, type:'is-danger', duration:5000})
48+
return
49+
}
50+
ky.post(`/api/task/singlescrape`, {timeout:false, json: { site: site, sceneurl:this.item.scene_url, additionalinfo:[] }})
51+
}
52+
}
53+
}
54+
}
55+
</script>

‎ui/src/views/scenes/Details.vue

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,18 @@
125125
<watched-button:item="item"v-if="!displayingAlternateSource"/>
126126
<edit-button:item="item"/>
127127
<refresh-button:item="item"v-if="!displayingAlternateSource"/>
128+
<rescrape-button:item="item"v-if="!displayingAlternateSource"/>
128129
</div>
129130
</div>
130131
</div>
131132
<divclass="image-row is-flex is-pulled-right"v-if="getAlternateSceneSources != 0">
132-
<divv-for="(altsrc, idx) in this.alternateSources":key="idx"class="altsrc-image-wrapper"@click="showExtRefScene(altsrc)">
133+
<divv-for="(altsrc, idx) in alternateSourcesWithTitles":key="idx"class="altsrc-image-wrapper"@click="showExtRefScene(altsrc)">
134+
<b-tooltiptype="is-light":label="altsrc.title":delay="100"append-to-body>
133135
<vue-load-image>
134136
<imgslot="image":src="getImageURL(altsrc.site_icon)"alt="Image"width="28px" />
135137
<b-iconslot="error"pack="mdi"icon="link"size="is-small" />
136138
</vue-load-image>
139+
</b-tooltip>
137140
</div>
138141
</div>
139142
</div>
@@ -402,12 +405,13 @@ import WishlistButton from '../../components/WishlistButton'
402405
importWatchedButtonfrom'../../components/WatchedButton'
403406
importEditButtonfrom'../../components/EditButton'
404407
importRefreshButtonfrom'../../components/RefreshButton'
408+
importRescrapeButtonfrom'../../components/RescrapeButton'
405409
importTrailerlistButtonfrom'../../components/TrailerlistButton'
406410
importHiddenButtonfrom'../../components/HiddenButton'
407411
408412
exportdefault {
409413
name:'Details',
410-
components: { VueLoadImage, GlobalEvents, StarRating, WatchlistButton, FavouriteButton, WishlistButton, WatchedButton, EditButton, RefreshButton, TrailerlistButton, HiddenButton },
414+
components: { VueLoadImage, GlobalEvents, StarRating, WatchlistButton, FavouriteButton, WishlistButton, WatchedButton, EditButton, RefreshButton,RescrapeButton,TrailerlistButton, HiddenButton },
411415
data () {
412416
return {
413417
index:1,
@@ -576,6 +580,15 @@ export default {
576580
},
577581
quickFindOverlayState() {
578582
returnthis.$store.state.overlay.quickFind.show
583+
},
584+
alternateSourcesWithTitles() {
585+
returnthis.alternateSources.map(altsrc=> {
586+
constextdata=JSON.parse(altsrc.external_data);
587+
return {
588+
...altsrc,
589+
title:extdata.scene?.title||'No Title'
590+
};
591+
});
579592
}
580593
},
581594
mounted () {

‎ui/src/views/scenes/SceneCard.vue

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@
6969
</span>
7070
</span>
7171
<divclass="image-row"v-if="getAlternateSceneSources != 0">
72-
<divv-for="(altsrc, idx) in this.alternateSources":key="idx"class="altsrc-image-wrapper">
73-
<a:href="altsrc.url"target="_blank">
74-
<vue-load-image>
75-
<imgslot="image":src="getImageURL(altsrc.site_icon)"alt="Image"class="thumbnail"width="20" />
76-
<b-iconslot="error"pack="mdi"icon="link"size="is-small" />
77-
</vue-load-image>
78-
</a>
72+
<divv-for="(altsrc, idx) in alternateSourcesWithTitles":key="idx"class="altsrc-image-wrapper">
73+
<b-tooltiptype="is-light":label="altsrc.title":delay="100">
74+
<a:href="altsrc.url"target="_blank">
75+
<vue-load-image>
76+
<imgslot="image":src="getImageURL(altsrc.site_icon)"alt="Image"class="thumbnail"width="20" />
77+
<b-iconslot="error"pack="mdi"icon="link"size="is-small" />
78+
</vue-load-image>
79+
</a>
80+
</b-tooltip>
7981
</div>
8082
</div>
8183
</div>
@@ -170,6 +172,15 @@ export default {
170172
return0;// Return 0 or handle error as needed
171173
}
172174
},
175+
alternateSourcesWithTitles() {
176+
returnthis.alternateSources.map(altsrc=> {
177+
constextdata=JSON.parse(altsrc.external_data);
178+
return {
179+
...altsrc,
180+
title:extdata.scene?.title||'No Title'
181+
};
182+
});
183+
}
173184
},
174185
methods: {
175186
getImageURL (u) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp