mirror of
				https://github.com/DerTyp7/obs-twitch-camera-frame.git
				synced 2025-10-31 13:47:12 +01:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 53555aad6a | ||
|   | a4f9697b6c | ||
|   | c0d72b8e43 | 
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1 +0,0 @@ | |||||||
| config.js |  | ||||||
| @@ -1,3 +1,4 @@ | |||||||
| const CONFIG = { | const CONFIG = { | ||||||
| 	apiKey: "", | 	apiKey: "", | ||||||
|  | 	twitchOAuth: "", | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -16,6 +16,7 @@ fetch("https://api.tipeeestream.com/v2.0/site/socket") | |||||||
| 				}); | 				}); | ||||||
| 			}); | 			}); | ||||||
| 			socket.on("new-event", (data) => { | 			socket.on("new-event", (data) => { | ||||||
|  | 				console.log(data); | ||||||
| 				if (data.event.type == "subscription") { | 				if (data.event.type == "subscription") { | ||||||
| 					sub(data.event.parameters.username); | 					sub(data.event.parameters.username); | ||||||
| 				} | 				} | ||||||
|   | |||||||
							
								
								
									
										11
									
								
								update.ps1
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								update.ps1
									
									
									
									
									
								
							| @@ -32,7 +32,16 @@ if ($newestVersionString -ne "") { | |||||||
|   else { |   else { | ||||||
|     Write-Output "Updating to newer version..." |     Write-Output "Updating to newer version..." | ||||||
|  |  | ||||||
|     Remove-Item * -Recurse -Force -Confirm |     if (Test-Path "./config.js") { | ||||||
|  |       if (Test-Path "./config-old.js") { | ||||||
|  |         Remove-Item config-old.js | ||||||
|  |       } | ||||||
|  |       Copy-Item "./config.js" -Destination "./config-old.js" | ||||||
|  |       Write-Output "config.js has been copied" | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |      | ||||||
|  |     Remove-Item *  -Recurse -Force -Exclude config-old.js | ||||||
|  |  | ||||||
|     mkdir ./temp |     mkdir ./temp | ||||||
|     attrib +h ./temp |     attrib +h ./temp | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								update_force.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								update_force.bat
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | |||||||
|  | powershell ./update_force.ps1 | ||||||
|  | pause | ||||||
							
								
								
									
										39
									
								
								update_force.ps1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								update_force.ps1
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | |||||||
|  | Write-Output "Starting update..." | ||||||
|  |  | ||||||
|  | $newestVersionString = "" | ||||||
|  | $req = Invoke-WebRequest https://github.com/DerTyp876/obs-twitch-camera-frame/releases/latest | ||||||
|  |  | ||||||
|  | foreach ($tag in $req.ParsedHtml.body.getElementsByTagName('h1')) { | ||||||
|  |   if ($tag.innerText[0] -eq "v") { | ||||||
|  |     $newestVersionString = $tag.innerText | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | Write-Output "Updating to newer version..." | ||||||
|  |  | ||||||
|  | if (Test-Path "./config.js") { | ||||||
|  |   if (Test-Path "./config-old.js") { | ||||||
|  |     Remove-Item config-old.js | ||||||
|  |   } | ||||||
|  |   Copy-Item "./config.js" -Destination "./config-old.js" | ||||||
|  |   Write-Output "config.js has been copied" | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | Remove-Item *  -Recurse -Force -Exclude config-old.js | ||||||
|  |  | ||||||
|  | mkdir ./temp | ||||||
|  | attrib +h ./temp | ||||||
|  | Write-Output "Downloading newer version..." | ||||||
|  | Invoke-WebRequest -Uri "https://github.com/DerTyp876/obs-twitch-camera-frame/archive/refs/tags/$newestVersionString.zip" -OutFile "./temp/$newestVersionString.zip" | ||||||
|  | Write-Output "Extracting archive..." | ||||||
|  | Expand-Archive -Path "./temp/$newestVersionString.zip" -DestinationPath "./temp/" | ||||||
|  |  | ||||||
|  | Get-ChildItem -Path "./temp/obs-twitch-camera-frame-$($newestVersionString -replace 'v')" -Recurse | Move-Item -Destination "./" | ||||||
|  |  | ||||||
|  | Remove-Item "./temp" -Recurse -Force -Confirm | ||||||
|  |  | ||||||
|  | Write-Output "You are now up to date again!" | ||||||
|  |  | ||||||
|  | Write-Output "You need to add your API-Key again to the config.js!" | ||||||
|  | pause | ||||||
		Reference in New Issue
	
	Block a user