Skip to content

Commit

Permalink
v1.3 better scraper manager
Browse files Browse the repository at this point in the history
  • Loading branch information
philpw99 committed Oct 22, 2021
1 parent 7635b80 commit 714fbaa
Show file tree
Hide file tree
Showing 7 changed files with 397 additions and 158 deletions.
22 changes: 18 additions & 4 deletions Forms/CustomForm.au3
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ Func CustomList($sCategory, ByRef $aCategory)
; aCategory is the array that contains Item_Handle, Item_Title, Item_Link
; Global Enum $ITEM_HANDLE, $ITEM_TITLE, $ITEM_LINK
; Global $iMaxSubItems


; Disable the tray clicks
TraySetClick(0)

$Custom = GUICreate("Customize " & $sCategory,1060,800,-1,-1,-1,-1)
$guiCustom = GUICreate("Customize " & $sCategory,1060,800,-1,-1,-1,-1)
GUISetIcon("helper2.ico")

GUICtrlCreateLabel("Customize the list of " & $sCategory & _
". This is like bookmarks or favorites for Stash. You paste the link from the address bar, then put a title for it, as the examples you see below." _
Expand Down Expand Up @@ -57,14 +62,21 @@ Func CustomList($sCategory, ByRef $aCategory)
_GUICtrlListView_AddSubItem($customList, $i, $aCategory[$i][$ITEM_LINK], 2)
Next

GUISetState(@SW_SHOW, $Custom)
GUISetState(@SW_SHOW, $guiCustom)
; Make list view editable
$iLV_Index = _GUIListViewEx_Init($customList, $aList, 0, 0, True, 2)
_GUIListViewEx_SetEditStatus($iLV_Index, "1;2", 1, Default)
_GUIListViewEx_MsgRegister(True, False, False)

; Now do the loop
While True
While True
; if click on tray icon, activate the current GUI
$nTrayMsg = TrayGetMsg()
Switch $nTrayMsg
Case $TRAY_EVENT_PRIMARYDOWN, $TRAY_EVENT_SECONDARYDOWN
WinActivate($guiCustom)
EndSwitch

$nMsg = GUIGetMsg()
Switch $nMsg
Case 0
Expand All @@ -88,7 +100,9 @@ Func CustomList($sCategory, ByRef $aCategory)

_GUIListViewEx_EventMonitor()
Wend
GUIDelete($Custom)
GUIDelete($guiCustom)
$customList = 0
; restore the tray icon functions.
TraySetClick(9)
EndFunc

2 changes: 2 additions & 0 deletions Forms/InitialSettingsForm.au3
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Func InitialSettingsForm()

; Create the whole initial setting's GUI
$Initial_Settings = GUICreate("Initial Settings",1326,809,-1,-1,-1,-1)
GUISetIcon("helper2.ico")

$tab = GUICtrlCreatetab(41,70,1232,661,-1,-1)
GuiCtrlSetState(-1,2048)
GUICtrlSetFont(-1,12,400,0,"Tahoma")
Expand Down
103 changes: 84 additions & 19 deletions Forms/Scrapers.isf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
#include <WindowsConstants.au3>
#Include <GuiButton.au3>
#include <GuiListView.au3>
#include <EditConstants.au3>

If Not (@Compiled ) Then DllCall("User32.dll","bool","SetProcessDPIAware")

$Scrapers = GUICreate("Scrapers Management",1703,1434,-1,-1,$WS_SIZEBOX,-1)
$scraperList = GUICtrlCreatelistview("Website|Scraper|Scene|Gallery|Movie|Performers|Installed|ExtraReq|Contents",40,330,1621,1056,-1,BitOr($LVS_EX_FULLROWSELECT,$LVS_EX_GRIDLINES,$LVS_EX_CHECKBOXES,$LVS_EX_DOUBLEBUFFER,$WS_EX_CLIENTEDGE))
$Scrapers = GUICreate("Scrapers Management",1703,1438,-1,-1,$WS_SIZEBOX,-1)
$scraperList = GUICtrlCreatelistview("Website|Scraper|Scene|Gallery|Movie|Performers|Installed|ExtraReq|Contents",40,290,1621,1056,-1,BitOr($LVS_EX_FULLROWSELECT,$LVS_EX_GRIDLINES,$LVS_EX_CHECKBOXES,$LVS_EX_DOUBLEBUFFER,$WS_EX_CLIENTEDGE))
GUICtrlSetFont(-1,10,400,0,"Tahoma")
GUICtrlSetResizing(-1,102)
; Website
Expand All @@ -32,18 +33,24 @@ _GUICtrlListView_SetColumnWidth($scraperList, 6, 130)
_GUICtrlListView_JustifyColumn($scraperList, 6, 2)

GUICtrlCreateListViewItem("1000facials.com|GammaEntertainment.yml|√|x|x|x|No", $scraperList)
GUICtrlCreateLabel("Scrapers can fetch information about your scenes, studios, performers, tags...etc."&@crlf&"With scrapers, you don't need to type in the information manually any more."&@crlf&" * For performers, you can fetch the info by her/his name."&@crlf&" * For scenes, you put in the URL for that scene, and the scraper can get all the details, including performers, tags, front cover... for that scene."&@crlf&"Therefore, managing scrapers are important for Stash. You don't want too many scrapers, yet you need them to categorize and label your videos quickly."&@crlf&"Here I am trying to give you an easy way to manage the plugins.",240,30,1040,233,-1,-1)
GUICtrlCreateLabel("Scrapers can fetch information about your scenes, studios, performers, tags...etc. With scrapers, you don't need to type in the information manually any more."&@crlf&" * For performers, you can fetch the info by her/his name."&@crlf&" * For scenes, you put in the URL for that scene, and the scraper can get all the details, including performers, tags, front cover... for that scene."&@crlf&"Therefore, managing scrapers are important for Stash. You don't want too many scrapers, yet you need them to categorize and label your videos quickly.",54,30,1597,205,-1,-1)
GUICtrlSetFont(-1,10,400,0,"Tahoma")
GUICtrlSetBkColor(-1,"-2")
GUICtrlSetResizing(-1,928)
GUICtrlCreateButton("Install",1065,252,167,49,-1,-1)
GUICtrlSetResizing(-1,38)
GUICtrlCreateButton("Install",1065,212,167,49,-1,-1)
GUICtrlSetFont(-1,12,400,0,"Tahoma")
GUICtrlSetTip(-1,"Install the scrapers with check marks.")
GUICtrlSetResizing(-1,804)
GUICtrlCreateButton("Remove",1298,252,167,49,-1,-1)
GUICtrlCreateButton("Remove",1298,212,167,49,-1,-1)
GUICtrlSetFont(-1,12,400,0,"Tahoma")
GUICtrlSetTip(-1,"Remove the scrapers with check marks.")
GUICtrlSetResizing(-1,804)
$inputFilter = GUICtrlCreateInput("",42,218,570,35,-1,$WS_EX_CLIENTEDGE)
GUICtrlSetFont(-1,10,400,0,"Tahoma")
GUICtrlSetResizing(-1,550)
$btnFilter = GUICtrlCreateButton("Find",640,220,148,33,-1,-1)
GUICtrlSetFont(-1,10,400,0,"Tahoma")
GUICtrlSetResizing(-1,804)



Expand All @@ -53,7 +60,7 @@ Handle_deklaration=default
Handle_deklaration_const=false
title=Scrapers Management
breite=1703
hoehe=1434
hoehe=1438
style=$WS_SIZEBOX
exstyle=-1
bgcolour=0xF0F0F0
Expand Down Expand Up @@ -84,13 +91,13 @@ gui_event_resized=
gui_event_dropped=
defaultfont=MS Sans Serif
defaultfontsize=8
[0x0016221A]
[0x002B20DA]
type=listview
handle=432
locked=0
resize=102
x=40
y=330
y=290
width=1621
height=1056
func=
Expand All @@ -113,15 +120,15 @@ tabpage=-1
iconindex=
iconlarge=0
textmode=text
[0x000E20CA]
[0x00232366]
type=label
handle=433
locked=0
resize=928
x=240
resize=38
x=54
y=30
width=1040
height=233
width=1597
height=205
func=
font=Tahoma
fontsize=10
Expand All @@ -131,7 +138,7 @@ tooltip=
bgimage=
textcolour=0x000000
id=
text=Scrapers can fetch information about your scenes, studios, performers, tags...etc.[BREAK]With scrapers, you don't need to type in the information manually any more.[BREAK] * For performers, you can fetch the info by her/his name.[BREAK] * For scenes, you put in the URL for that scene, and the scraper can get all the details, including performers, tags, front cover... for that scene.[BREAK]Therefore, managing scrapers are important for Stash. You don't want too many scrapers, yet you need them to categorize and label your videos quickly.[BREAK]Here I am trying to give you an easy way to manage the plugins.
text=Scrapers can fetch information about your scenes, studios, performers, tags...etc. With scrapers, you don't need to type in the information manually any more.[BREAK] * For performers, you can fetch the info by her/his name.[BREAK] * For scenes, you put in the URL for that scene, and the scraper can get all the details, including performers, tags, front cover... for that scene.[BREAK]Therefore, managing scrapers are important for Stash. You don't want too many scrapers, yet you need them to categorize and label your videos quickly.
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
Expand All @@ -142,13 +149,13 @@ tabpage=-1
iconindex=
iconlarge=0
textmode=text
[0x005621FC]
[0x00722260]
type=button
handle=434
locked=0
resize=804
x=1065
y=252
y=212
width=167
height=49
func=
Expand All @@ -171,13 +178,13 @@ tabpage=-1
iconindex=
iconlarge=0
textmode=text
[0x003A21D2]
[0x001C1838]
type=button
handle=435
locked=0
resize=804
x=1298
y=252
y=212
width=167
height=49
func=
Expand All @@ -200,4 +207,62 @@ order=4
iconindex=
iconlarge=0
textmode=text
[0x001F242E]
type=input
handle=436
locked=0
resize=550
x=42
y=218
width=570
height=35
func=
font=Tahoma
fontsize=10
fontstyle=400
fontattribute=0
tooltip=
bgimage=
textcolour=0x000000
id=$inputFilter
text=
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=$WS_EX_CLIENTEDGE
bgcolour=
code=
order=5
tabpage=-1
iconindex=
iconlarge=0
textmode=text
[0x002F233A]
type=button
handle=437
locked=0
resize=804
x=640
y=220
width=148
height=33
func=
font=Tahoma
fontsize=10
fontstyle=400
fontattribute=0
tooltip=
bgimage=
textcolour=0x000000
id=$btnFilter
text=Find
state=$GUI_SHOW+$GUI_ENABLE
style=
exstyle=
bgcolour=
code=
order=6
tabpage=-1
iconindex=
iconlarge=0
textmode=text
#ce
Loading

0 comments on commit 714fbaa

Please sign in to comment.