Comments (3)
Hi, yes startIndex is 0 based, so 1 would skip the first track. When I'm testing this using device spy, I get the expected result, also when I'm testing sonos-discovery I also get the same result, meaning that:
p.browse('A:TRACKS', 0, 1, function (status, result) {});
Will return the first track in your library, and
p.browse('A:TRACKS', 1, 1, function (status, result) {});
will return the second track from your library.
Your example should return the first 10, and the second example should return 11-20 as you expected. What is your observation? I only have 7 tracks in my own library, so it might not be representative of the common setup, but the amount of tracks shouldn't matter, unless the sorting becomes random.
from node-sonos-discovery.
I'll provide some examples of inputs/outputs given my current library:
p.browse('A:TRACKS', 0, 5, cb);
- Podcast - Track 1
- Podcast - Track 2
- Podcast - Track 3
- Song 1, Artist 1
- Song 2, Artist 1
Now this would assume the two top podcast tracks would not be included:
p.browse('A:TRACKS', 3, 5, cb);
- Podcast - Track 2
- Podcast - Track 3
- Voice memo - Track 1
- Voice memo - Track 2
- Voice memo - Track 3
So all of a sudden, introducing an offset while viewing the tracks list causes three new items to be shown and not the originally shown song tracks.
I did the same test with the A:ARTIST
id:
p.browse('A:ARTIST', 0, 5, cb);
- Artist 1
- Artist 2
- Artist 3
- Artist 4
- Artist 5
p.browse('A:ARTIST', 3, 5, cb);
- Artist 3
- Artist 4
- Artist 5
- Artist 6
- Artist 7
Which works as expected. So something appears to happen when your library consists of mixed types? Maybe A:TRACKS
sorts different in that case? Baffling.
from node-sonos-discovery.
Well, it's weird because I only relay the response that I receive from the players, so if this occurs here, you should see the same behavior from the players. Du you have any UPnP testing tool that would allow you to query the players directly? The intel tools has one called "Device Spy" which allows you to invoke the actions with your own values.
from node-sonos-discovery.
Related Issues (20)
- If local endpoint changes, subscribe will keep failing to reconnect. HOT 6
- HTTPS Support in lib/helpers/request.js HOT 5
- Question about code, half seconds HOT 3
- BTW: Great project!
- UnhandledPromiseRejectWarning HOT 5
- Implement same features in Java/Android app HOT 4
- npm test fails on spotify HOT 2
- Support switch to Line In and TV HOT 6
- No Metadata when browsing SQ:4 HOT 3
- setting incorrect volume HOT 7
- Uncaught (in promise) TypeError: Cannot read property 'baseUrl' of undefined HOT 1
- Request: Soundbar Input Information
- error: sonos.0 TypeError: Cannot read property '$text' of undefined HOT 5
- How to update libary
- Unable to get state of player
- Audio Delay
- What are all the possible state changes? HOT 2
- Spotify: "Wrong" album art when playing from playlist
- GetFavorites does not return all favorites HOT 3
- exception in recalculateGroupVolume HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-sonos-discovery.