Allow setting device name to custom string

This commit is contained in:
boltgolt
2023-10-17 17:55:36 +02:00
parent ace8f3564f
commit 4de056d2a8
3 changed files with 5 additions and 2 deletions

View File

@@ -12,10 +12,12 @@
"skip_count_tracking": true,
"mute_ads": true,
"skip_ads": true,
"device_name": "iSponsorBlockTV",
"apikey": "",
"channel_whitelist": [
{"id": "",
"name": ""
}
]
}
}

View File

@@ -38,6 +38,7 @@ class Config:
self.skip_count_tracking = True
self.mute_ads = False
self.skip_ads = False
self.device_name = "iSponsorBlockTV"
self.__load()
def validate(self):

View File

@@ -7,7 +7,7 @@ create_task = asyncio.create_task
class YtLoungeApi(pyytlounge.YtLoungeApi):
def __init__(self, screen_id, config=None, api_helper=None):
super().__init__("iSponsorBlockTV")
super().__init__(config.device_name if config else "iSponsorBlockTV")
self.auth.screen_id = screen_id
self.auth.lounge_id_token = None
self.api_helper = api_helper