Compare commits
1 Commits
3.30
...
videotags-
| Author | SHA1 | Date | |
|---|---|---|---|
|
6b9038b15a
|
@@ -284,11 +284,6 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
|
||||
VideoFilepath := A_LoopFileFullPath
|
||||
SplitPath, A_LoopFileFullPath,,,, VideoFileNameNoExt
|
||||
FileGetSize, VideoFileSizeInMB, %A_LoopFileFullPath%, M
|
||||
|
||||
VideoInfoObj := Filexpro(VideoFilepath,
|
||||
, "System.Video.TotalBitrate" )
|
||||
VideoTotalBitrate := VideoInfoObj["System.Video.TotalBitrate"]
|
||||
|
||||
}
|
||||
|
||||
if(FileExt = "png" OR FileExt = "jpg"){
|
||||
@@ -335,11 +330,9 @@ Loop, files, %VideoFolderDir%\*.mp3, F ; loop through the files in the direct
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
;---Read Info From Previous Run And Set Upload Options---
|
||||
;--------------------------------------------------------
|
||||
;---Read Info From Previous Run (If Any)---
|
||||
;------------------------------------------------
|
||||
; @todo: Figure out a way to do this with an array
|
||||
VideoLinksIniFile = %VideoFolderDir%\VideoLinks.ini
|
||||
|
||||
if(FileExist(VideoLinksIniFile)){
|
||||
@@ -376,10 +369,6 @@ if(FileExist(VideoLinksIniFile)){
|
||||
|
||||
; MISC
|
||||
IniRead, ErrorLoggingFilePath, %VideoLinksIniFile%, Misc, ErrorLoggingFilePath, %A_Space%
|
||||
IniRead, TempVideoThumbFilepath, %VideoLinksIniFile%, Misc, VideoThumbFilepath, %A_Space%
|
||||
if(TempVideoThumbFilepath){ ; if Video Thumbnail was saved in last run, overwrite variable path that was grabbed in the file loop above
|
||||
VideoThumbFilepath := TempVideoThumbFilepath
|
||||
}
|
||||
|
||||
if(VideoFileSizeInMB < 50){
|
||||
IniRead, Telegram, %VideoLinksIniFile%, Misc, Telegram, %A_Space%
|
||||
@@ -431,9 +420,6 @@ if(VideoFileSizeInMB > 6144){
|
||||
FacebookCheckStatus := 0
|
||||
TelegramCheckStatus := 0
|
||||
|
||||
;---/Read Info From Previous Run And Set Upload Options---
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
;---Testing Mode Overrides---
|
||||
@@ -568,6 +554,9 @@ else, {
|
||||
}
|
||||
|
||||
|
||||
; @ TODO REMOVE
|
||||
; LocalsGrabURL := 0
|
||||
; Locals := 0
|
||||
|
||||
|
||||
|
||||
@@ -591,8 +580,8 @@ Gui, Add, Edit, yp+0 x+%Marginspace% w%PodcastNumberEditWidth% h%EditBoxHeight%
|
||||
|
||||
; LBRY URL
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Text, x%Marginspace%,Video Tags (Comma Seperated)
|
||||
Gui, Add, Text,x%ColumnOneHalfWidthXPos% yp+0,Podcast Tags (Comma Seperated)
|
||||
Gui, Add, Text, x%Marginspace%,Video Tags
|
||||
Gui, Add, Text,x%ColumnOneHalfWidthXPos% yp+0,Podcast Tags
|
||||
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x%Marginspace% Y+5 w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTags, %VideoTags%
|
||||
@@ -786,12 +775,7 @@ Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeAudio Checked%
|
||||
|
||||
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vRumble Checked%RumbleCheckStatus% gUpdateVars, Rumble
|
||||
|
||||
if(VideoTotalBitrate > 300000)
|
||||
Gui, Add, Checkbox, vBrighteon y+%MarginSpace% Checked%BrighteonCheckStatus% gUpdateVars, Brighteon
|
||||
else,{
|
||||
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSpace% Checked0 gUpdateVars, Brighteon (Bitrate Below 300kbps)
|
||||
}
|
||||
|
||||
Gui, Add, Checkbox, vDailyMotion y+%MarginSpace% Checked%DailyMotionCheckStatus% gUpdateVars, DailyMotion
|
||||
; Gui, Add, Checkbox, vStreamanity Checked%StreamanityCheckStatus%, Streamanity
|
||||
|
||||
@@ -1125,7 +1109,6 @@ LBRYURLSlug := LBRYCMDTextReplacement(LBRYURLSlug)
|
||||
IniWrite, %LBRYURLSlug%, %VideoLinksIniFile%, Misc, LBRYUrlSlug
|
||||
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
||||
IniWrite, %PodcastNumber%, %VideoLinksIniFile%, Misc, PodcastNumber
|
||||
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
||||
|
||||
|
||||
|
||||
@@ -1171,45 +1154,34 @@ JSVideoDescription := FormatTextToJSText(VideoDescription)
|
||||
|
||||
; -------------------------------/Log Info To Text-------------------------------
|
||||
|
||||
; @todo: note: it would be better to replace accented chars w/ their pure latin equivalents but that seems a bit
|
||||
; beyond the scope of this change. here's a link talking about how to do that tho
|
||||
; https://www.autohotkey.com/boards/viewtopic.php?t=61626
|
||||
|
||||
; This should go somewhere appropriate
|
||||
; fwiw this function comes straight from the docs: https://www.autohotkey.com/docs/v2/Functions.htm#Variadic
|
||||
Join(sep, params*) {
|
||||
For index, param in params
|
||||
str .= param . sep
|
||||
return SubStr(str, 1, -StrLen(sep))
|
||||
}
|
||||
|
||||
|
||||
; Create an array out of the keywords to be used in different places
|
||||
VideoTagsArray := []
|
||||
PodcastTagsArray := []
|
||||
|
||||
; VIDEO Tags
|
||||
For index, val in StrSplit(VideoTags, ",") {
|
||||
KeywordsArray := Array()
|
||||
For idx, val in StrSplit(VideoTags, ",") {
|
||||
; for each element in the split videotags array, trim leading & trailing spaces
|
||||
val := Trim(val)
|
||||
|
||||
; and remove any chars that are not a letter, number, or space (i = case-insensitive)
|
||||
; note: it would be better to replace accented chars w/ their pure latin equivalents but that seems a bit
|
||||
; beyond the scope of this change. here's a link talking about how to do that tho
|
||||
; https://www.autohotkey.com/boards/viewtopic.php?t=61626
|
||||
val := RegexReplace(val, "i)[^a-z0-9 ]", "")
|
||||
VideoTagsArray.InsertAt(index, val)
|
||||
KeywordsArray.InsertAt(idx, val)
|
||||
}
|
||||
|
||||
; PODCAST Tags
|
||||
For index, val in StrSplit(PodcastTags, ",") {
|
||||
; for each element in the split videotags array, trim leading & trailing spaces
|
||||
val := Trim(val)
|
||||
|
||||
; and remove any chars that are not a letter, number, or space (i = case-insensitive)
|
||||
val := RegexReplace(val, "i)[^a-z0-9 ]", "")
|
||||
PodcastTagsArray.InsertAt(index, val)
|
||||
}
|
||||
|
||||
|
||||
; update VideoTags with sanitized keywords list
|
||||
VideoTags := Join(",", VideoTagsArray*)
|
||||
VideoTags := Join(",", KeywordsArray*)
|
||||
|
||||
; update PodcastTags with sanitized keywords list
|
||||
PodcastTags := Join(",", PodcastTagsArray*)
|
||||
; Call each sub one by one, if errors occur then an upload will be stopped and the next upload will then proceed
|
||||
|
||||
|
||||
; Call each submodule one by one
|
||||
; if errors occur then an upload for that site will be stopped and the next upload will then proceed
|
||||
|
||||
if(Telegram)
|
||||
gosub, TelegramVideoUpload
|
||||
|
||||
|
||||
@@ -235,19 +235,11 @@ if(VideoThumbFilepath != "") {
|
||||
}
|
||||
|
||||
|
||||
; Brighteon has a max of 25 for tags.
|
||||
if(VideoTagsArray.Length() > 25){
|
||||
Loop % 24 {
|
||||
BrighteonKeywords := VideoTagsArray[A_Index]
|
||||
}
|
||||
}
|
||||
else,
|
||||
BrighteonKeywords := VideoTags
|
||||
|
||||
; DevModeMsgBox(VideoTags)
|
||||
TooltipThis("Inputting Keywords")
|
||||
Loop, 5 {
|
||||
XPath = //input[@id='keywords']
|
||||
try driver.FindElementByXPath(Xpath).SendKeys(BrighteonKeywords) ;Sends Variable to an Xpath Item
|
||||
try driver.FindElementByXPath(Xpath).SendKeys(VideoTags) ;Sends Variable to an Xpath Item
|
||||
catch e {
|
||||
Message = Error (E#2312)`nVideo Uploaded but Unable to Input Video Tags
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
|
||||
; -------------------------------Functions-------------------------------
|
||||
; https://www.autohotkey.com/docs/v2/Functions.htm#Variadic
|
||||
Join(sep, params*) {
|
||||
For index, param in params
|
||||
str .= param . sep
|
||||
return SubStr(str, 1, -StrLen(sep))
|
||||
}
|
||||
|
||||
|
||||
CheckLBRYProcess(){
|
||||
; Check if LBRY Process exists
|
||||
Process, Exist,LBRY.exe
|
||||
|
||||
21
README.md
21
README.md
@@ -37,13 +37,11 @@ The Uploader will check for a portable version of Chrome first, before defaultin
|
||||
|
||||
2. Download the `win64` chromedriver for the same version and move it to `C:\Program Files\SeleniumBasic\chromedriver.exe`
|
||||
|
||||
# Settings File
|
||||
The Uploader reads & saves its settings to a `settings.ini` file, All customization, including custom profile URLs are stored here.
|
||||
On first run, if this file does not exist it will be automatically downloaded from the git repo.
|
||||
Before running for the first time you should set the following settings in the file:
|
||||
# Settings
|
||||
The Video Uploader reads & saves its settings to a `settings.ini` file located in the same directory as itself. All customization, including custom profile URLs for websites are stored here. The required fields are:
|
||||
````
|
||||
[General]
|
||||
RootDirToStartIn= Parent Folder with your Video Projects
|
||||
RootDirToStartIn=ParentFolderForAllYourVideoProjects
|
||||
ShowTooltipProgress=1
|
||||
DiscordWebhookBotURL=
|
||||
DiscordVideosWebhookURL=
|
||||
@@ -59,19 +57,6 @@ LocalsPostPageURL=
|
||||
- [How to get Telegram bot token + chat-id](https://tutorial.cytron.io/2021/09/01/how-to-create-a-telegram-bot-get-the-api-key-and-chat-id/)
|
||||
- All other settings will automatically get written to the `settings.ini` file as you check/uncheck the setting boxes while running the Poster.
|
||||
|
||||
# Project Files
|
||||
When you start the Uploader, it will ask you to select a project folder that contains the files that will be used for the upload.
|
||||
The program will then loop through that project folder and look for the following files and automatically select them.
|
||||
You can select a different file in the main window if the auto selection does not select the correct file.
|
||||
`title.txt` which should contain the Title of your video/podcast
|
||||
`body.txt` which should contain the body text of your video/podcast
|
||||
`keywords.txt` which contains the tags/keywords that will be used in the video uploads
|
||||
`keywords_podcast.txt` (Optional) which contains the tags/keywords that will be used in the podcast upload. `keywords.txt` will be used for podcast tags if this does not exist.
|
||||
`*.mp4` an mp4 file which is the video file that you are going to upload
|
||||
`*.jpg` or `*.png` file which will be the thumbnail for your video/podcast
|
||||
|
||||
|
||||
|
||||
|
||||
# Uncaught Errors
|
||||
I have done my best to catch any possible errors that might pop up and write functionality to handle them. But If an error happens that i haven't written resolves for, it will pop up a message box that looks like this. Please send me a screenshot so I can write a patch for the bug.
|
||||
|
||||
Reference in New Issue
Block a user