svrooij / node-sonos-ts

:speaker: Sonos control library, use this library in your own appliction.
https://sonos-ts.svrooij.io/
MIT License
84 stars 18 forks source link

feat: Hostname support #158

Closed svrooij closed 2 years ago

svrooij commented 2 years ago

New feature allows starting with a hostname, will resolve automatically

Description

This PR implements support for hostnames.

It's recommended to resolve the IP yourself, because that way it will only happen once. And not several times per device (as in once per each called service).

const IpHelper = require('@svrooij/sonos').IpHelper;

const ip = await IpHelper.ResolveHostname('some-sonos-host');

Related to: https://github.com/hklages/node-red-contrib-sonos-plus/issues/175

Your checklist for this pull request

🚨 Please review the guidelines for contributing to this repository.

💔 Thank you!

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 1841048842


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/helpers/ip-helper.ts 11 13 84.62%
src/index.ts 0 2 0.0%
<!-- Total: 27 31 87.1% -->
Totals Coverage Status
Change from base Build 1699413240: 0.03%
Covered Lines: 1646
Relevant Lines: 1980

💛 - Coveralls
github-actions[bot] commented 2 years ago

:tada: This PR is included in version 2.5.0-beta.8 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 2.5.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: