Skip to content

Commit

Permalink
feat: overwrite storefront to download other region's songs
Browse files Browse the repository at this point in the history
  • Loading branch information
WorldObservationLog committed May 9, 2024
1 parent 075bc78 commit fee042f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ def callback(m3u8_url):
async def _get_available_device(self, storefront: str):
devices = self.storefront_device_mapping.get(storefront)
if not devices:
logger.error(f"No device is available to decrypt the specified region: {storefront}")
logger.warning(f"No device is available to decrypt the specified region: {storefront}. "
f"Overwriting storefront to {self.config.region.defaultStorefront}")
storefront = self.config.region.defaultStorefront
devices = self.storefront_device_mapping.get(storefront)
available_devices = [device for device in devices if not device.decryptLock.locked()]
if not available_devices:
available_device: Device = random.choice(devices)
Expand Down

0 comments on commit fee042f

Please sign in to comment.