2 Commits

Author SHA1 Message Date
0d2237d09a fix(Netflix): correct video range and codec validation logic
- Adjust condition order in video range and codec compatibility check
- Change range membership check from object to name string in profile loop
- Remove redundant error logging and sys.exit call in profile handling
- Improve consistency of video profile retrieval based on codec and range
2025-08-30 11:37:31 +07:00
33ceed0016 fix(proxy_providers): update SurfsharkVPN service credentials
- Changed username for SurfsharkVPN in unshackle.yaml
- Changed password for SurfsharkVPN in unshackle.yaml
2025-08-30 11:37:16 +07:00
2 changed files with 4 additions and 7 deletions

View File

@@ -395,7 +395,7 @@ class Netflix(Service):
if self.vcodec.extension.upper() not in self.config["profiles"]["video"]: if self.vcodec.extension.upper() not in self.config["profiles"]["video"]:
raise ValueError(f"Video Codec {self.vcodec} is not supported by Netflix") raise ValueError(f"Video Codec {self.vcodec} is not supported by Netflix")
if self.range[0].name not in list(self.config["profiles"]["video"][self.vcodec.extension.upper()].keys()) and self.vcodec != Video.Codec.AVC and self.vcodec != Video.Codec.VP9 and self.range[0] != Video.Range.HYBRID: if self.range[0].name not in list(self.config["profiles"]["video"][self.vcodec.extension.upper()].keys()) and self.range[0] != Video.Range.HYBRID and self.vcodec != Video.Codec.AVC and self.vcodec != Video.Codec.VP9:
self.log.error(f"Video range {self.range[0].name} is not supported by Video Codec: {self.vcodec}") self.log.error(f"Video range {self.range[0].name} is not supported by Video Codec: {self.vcodec}")
sys.exit(1) sys.exit(1)
@@ -464,13 +464,10 @@ class Netflix(Service):
return result_profiles return result_profiles
for profiles in self.config["profiles"]["video"][self.vcodec.extension.upper()]: for profiles in self.config["profiles"]["video"][self.vcodec.extension.upper()]:
for range in self.range: for range in self.range:
if range in profiles: if range.name in profiles:
result_profiles.extend(self.config["profiles"]["video"][self.vcodec.extension.upper()][range.name]) result_profiles.extend(self.config["profiles"]["video"][self.vcodec.extension.upper()][range.name])
elif range == Video.Range.HYBRID: elif range == Video.Range.HYBRID:
result_profiles.extend(self.config["profiles"]["video"][self.vcodec.extension.upper()]["HDR10"]) result_profiles.extend(self.config["profiles"]["video"][self.vcodec.extension.upper()]["HDR10"])
else:
self.log.error(f" - {range} is not supported by {self.vcodec}")
sys.exit(1)
self.log.debug(f"Result_profiles: {result_profiles}") self.log.debug(f"Result_profiles: {result_profiles}")
return result_profiles return result_profiles

View File

@@ -249,5 +249,5 @@ services:
proxy_providers: proxy_providers:
surfsharkvpn: surfsharkvpn:
username: wqKD6vru8vXxUtkXJbvx4HAL # Service credentials from https://my.surfshark.com/vpn/manual-setup/main/openvpn username: GyDrhk88nC53gA72EKkHBZBP # Service credentials from https://my.surfshark.com/vpn/manual-setup/main/openvpn
password: zyFnwsYFMNxqbzpf3asu36m6 # Service credentials (not your login password) password: 2DDwZWTfeH6XbjVxQtKJdump # Service credentials (not your login password)