1
1
<template >
2
- <div class =" content" >
3
- <h3 class =" title" >{{$t('Import Japanese Adult VR (JAVR) Scene')}}</h3 >
4
- <div class =" card" >
5
- <div class =" card-content content" >
6
- <b-field grouped >
7
- <b-select placeholder =" Select scraper" v-model =" javrScraper" >
8
- <option value =" javdatabase" >javdatabase.com</option >
9
- <option value =" r18d" >r18.dev</option >
10
- <option value =" javlibrary" >javlibrary.com</option >
11
- <option value =" javland" >jav.land</option >
12
- </b-select >
13
- <b-input v-model =" javrQuery" placeholder =" ID (xxxx-001)" type =" search" ></b-input >
14
- <b-button class =" button is-primary" v-on:click =" scrapeJAVR()" >{{$t('Go')}}</b-button >
15
- </b-field >
16
- <span >R18.dev scraper works best with FANZA content ID, e.g. 84vrkm00139, but DVD-ID works too when maintained.</span >
2
+ <div class =" container" >
3
+ <b-loading :is-full-page =" false" :active.sync =" isLoading" ></b-loading >
4
+ <div class =" content" >
5
+ <h3 class =" title" >{{$t('Import Japanese Adult VR (JAVR) Scene')}}</h3 >
6
+ <div class =" card" >
7
+ <div class =" card-content content" >
8
+ <b-field grouped >
9
+ <b-select placeholder =" Select scraper" v-model =" javrScraper" >
10
+ <option value =" javdatabase" >javdatabase.com</option >
11
+ <option value =" r18d" >r18.dev</option >
12
+ <option value =" javlibrary" >javlibrary.com</option >
13
+ <option value =" javland" >jav.land</option >
14
+ </b-select >
15
+ <b-input v-model =" javrQuery" placeholder =" ID (xxxx-001)" type =" search" ></b-input >
16
+ <b-button class =" button is-primary" v-on:click =" scrapeJAVR()" >{{$t('Go')}}</b-button >
17
+ </b-field >
18
+ <span >R18.dev scraper works best with FANZA content ID, e.g. 84vrkm00139, but DVD-ID works too when maintained.</span >
19
+ </div >
17
20
</div >
18
- </div >
19
21
20
- <h3 class =" title" >{{$t('Import scene from TPDB')}}</h3 >
21
- <div class =" card" >
22
- <div class =" card-content content" >
23
- <h5 class =" title" >API Token</h5 >
24
- <b-field label =" TPDB API Token" label-position =" on-border" grouped >
25
- <b-input v-model =" tpdbApiToken" placeholder =" TPDB API Token" type =" search" ></b-input >
26
- </b-field >
27
- <br >
28
- <b-field label =" TPDB Scene URL" label-position =" on-border" grouped >
29
- <b-input v-model =" tpdbSceneUrl" placeholder =" TPDB URL" type =" search" ></b-input >
30
- <b-button class =" button is-primary" v-on:click =" scrapeTPDB()" >{{$t('Go')}}</b-button >
31
- </b-field >
22
+ <h3 class =" title" >{{$t('Import scene from TPDB')}}</h3 >
23
+ <div class =" card" >
24
+ <div class =" card-content content" >
25
+ <h5 class =" title" >API Token</h5 >
26
+ <b-field label =" TPDB API Token" label-position =" on-border" grouped >
27
+ <b-input v-model =" tpdbApiToken" placeholder =" TPDB API Token" type =" search" ></b-input >
28
+ </b-field >
29
+ <br >
30
+ <b-field label =" TPDB Scene URL" label-position =" on-border" grouped >
31
+ <b-input v-model =" tpdbSceneUrl" placeholder =" TPDB URL" type =" search" ></b-input >
32
+ <b-button class =" button is-primary" v-on:click =" scrapeTPDB()" >{{$t('Go')}}</b-button >
33
+ </b-field >
34
+ </div >
32
35
</div >
33
- </div >
34
36
35
- <h3 class =" title" >{{$t('Create custom scene')}}</h3 >
36
- <div class =" card" >
37
- <div class =" card-content content" >
38
- <b-field label =" Scene title" label-position =" on-border" >
39
- <b-input v-model =" customSceneTitle" placeholder =" Stepsis stuck in washing machine" type =" search" ></b-input >
40
- </b-field >
41
- <b-field label =" Scene ID" label-position =" on-border" grouped >
42
- <b-input v-model =" customSceneID" placeholder =" Can be empty" type =" search" ></b-input >
43
- <b-button class =" button is-primary" v-on:click =" addScene(false)" >{{$t('Create')}}</b-button >
44
- <b-button class =" button is-primary" v-on:click =" addScene(true)" style =" margin-left :0.2em " >{{$t('Create and Edit')}}</b-button >
45
- </b-field >
46
- </div >
47
- </div >
48
-
49
- <h3 class =" title" >{{$t('Scrape a scene')}}</h3 >
50
- <div class =" card" >
51
- <div class =" card-content content" >
52
- <b-field label =" Scene URL" label-position =" on-border" >
53
- <b-input v-model =" scrapeUrl" placeholder =" Scene Url - do not use links requiring a login" type =" url" ></b-input >
54
- </b-field >
55
- <b-tooltip :label =" $t(`Warning: Ensure you are entering a link to a scene (best taken from viewing the scene). Links to something like a Category or Studio list may result in a corrupt scene you cannot delete. DO NOT USE links requiring logons. Use with caution`)" :delay =" 50" multilined type =" is-danger" >
56
- <b-button class =" button is-primary" v-on:click =" scrapeSingleScene()" >{{$t('Scrape')}}</b-button >
57
- </b-tooltip >
37
+ <h3 class =" title" >{{$t('Create custom scene')}}</h3 >
38
+ <div class =" card" >
39
+ <div class =" card-content content" >
40
+ <b-field label =" Scene title" label-position =" on-border" >
41
+ <b-input v-model =" customSceneTitle" placeholder =" Stepsis stuck in washing machine" type =" search" ></b-input >
42
+ </b-field >
43
+ <b-field label =" Scene ID" label-position =" on-border" grouped >
44
+ <b-input v-model =" customSceneID" placeholder =" Can be empty" type =" search" ></b-input >
45
+ <b-button class =" button is-primary" v-on:click =" addScene(false)" >{{$t('Create')}}</b-button >
46
+ <b-button class =" button is-primary" v-on:click =" addScene(true)" style =" margin-left :0.2em " >{{$t('Create and Edit')}}</b-button >
47
+ </b-field >
48
+ </div >
58
49
</div >
59
- </div >
60
50
61
- <b-modal :active.sync =" isSingleScrapeModalActive"
62
- has-modal-card
63
- trap-focus
64
- aria-role =" dialog"
65
- aria-modal >
66
- <div class =" modal-card" style =" width :auto " >
67
- <header class =" modal-card-head" >
68
- <p class =" modal-card-title" >{{$t('Scene Id Required')}}</p >
69
- </header >
70
- <section class =" modal-card-body" >
71
- <b-field label =" Scene Id" >
72
- <b-input
73
- v-model =' singleScrapeId'
74
- placeholder =" eg 12345 (excl site prefix)"
75
- >
76
- </b-input >
51
+ <h3 class =" title" >{{$t('Scrape a scene')}}</h3 >
52
+ <div class =" card" >
53
+ <div class =" card-content content" >
54
+ <b-field label =" Scene URL" label-position =" on-border" >
55
+ <b-input v-model =" scrapeUrl" placeholder =" Scene Url - do not use links requiring a login" type =" url" ></b-input >
77
56
</b-field >
78
- </ section >
79
- < footer class =" modal-card-foot " >
80
- <button class = " button is-primary " :disabled = " this.singleScrapeId == '' " @click = " scrapeSingleScene() " >Continue</ button >
81
- </footer >
57
+ < b-tooltip :label = " $t(`Warning: Ensure you are entering a link to a scene (best taken from viewing the scene). Links to something like a Category or Studio list may result in a corrupt scene you cannot delete. DO NOT USE links requiring logons. Use with caution`) " :delay = " 50 " multilined type = " is-danger " >
58
+ < b-button class =" button is-primary " v-on:click = " scrapeSingleScene() " >{{$t('Scrape')}}</ b-button >
59
+ </ b-tooltip >
60
+ </div >
82
61
</div >
83
- </b-modal >
84
-
62
+
63
+ <b-modal :active.sync =" isSingleScrapeModalActive"
64
+ has-modal-card
65
+ trap-focus
66
+ aria-role =" dialog"
67
+ aria-modal >
68
+ <div class =" modal-card" style =" width :auto " >
69
+ <header class =" modal-card-head" >
70
+ <p class =" modal-card-title" >{{$t('Scene Id Required')}}</p >
71
+ </header >
72
+ <section class =" modal-card-body" >
73
+ <b-field label =" Scene Id" >
74
+ <b-input
75
+ v-model =' singleScrapeId'
76
+ placeholder =" eg 12345 (excl site prefix)"
77
+ >
78
+ </b-input >
79
+ </b-field >
80
+ </section >
81
+ <footer class =" modal-card-foot" >
82
+ <button class =" button is-primary" :disabled =" this.singleScrapeId == ''" @click =" scrapeSingleScene()" >Continue</button >
83
+ </footer >
84
+ </div >
85
+ </b-modal >
86
+ </div >
85
87
</div >
86
88
</template >
87
89
@@ -92,6 +94,7 @@ export default {
92
94
name: ' OptionsCreateScene' ,
93
95
data () {
94
96
return {
97
+ isLoading: true ,
95
98
javrScraper: ' javdatabase' ,
96
99
javrQuery: ' ' ,
97
100
tpdbSceneUrl: ' ' ,
@@ -103,7 +106,8 @@ export default {
103
106
additionalInfo: [],
104
107
}
105
108
},
106
- mounted () {
109
+ async mounted () {
110
+ await this .loadState ()
107
111
this .$store .dispatch (' optionsVendor/load' )
108
112
109
113
if (this .$store .state .optionsSceneCreate .scrapeScene != ' ' ) {
@@ -113,6 +117,15 @@ export default {
113
117
}
114
118
},
115
119
methods: {
120
+ async loadState () {
121
+ this .isLoading = true
122
+ await ky .get (' /api/options/state' )
123
+ .json ()
124
+ .then (data => {
125
+ this .javrScraper = data .config .scraper_settings .javr .javrScraper
126
+ this .isLoading = false
127
+ })
128
+ },
116
129
addScene (showEdit ) {
117
130
if (this .customSceneTitle !== ' ' ) {
118
131
ky .post (' /api/scene/create' , { json: { title: this .customSceneTitle , id: this .customSceneID } })