Originally posted by skavan
View Post
Announcement
Collapse
No announcement yet.
Getting Track #, Track Count and Music Source
Collapse
X
-
Originally posted by skavan View PostIt is sent with a Last Change Event (subscribed to with AVTranport). here's an example extracted from Device SPY. It is directly after the r:NextTrackMetaData entry.
<r:EnqueuedTransportURI val="x-sonosapi-radio:custom_radio.f559_54d7dbbae992798d9c084b0d?sid=6&f lags=8300&sn=4"/>
Comment
-
Originally posted by dcorsus View PostThat's the typo I referred to, try latest attachment
Still errors...I think it doesn't like sending an array. Maybe just send the one field I need? Although the belligerent bugger in me is now curious why one can't send back an array. Perhaps if you make it an object?
As for "ZoneThirdPartyMediaServicesX" -- I have figured out howto decrypt this...so the encrypted string is exactly what I am looking for.
s.
Comment
-
Originally posted by skavan View PostListAvailableServices:
Still errors...I think it doesn't like sending an array. Maybe just send the one field I need? Although the belligerent bugger in me is now curious why one can't send back an array. Perhaps if you make it an object?
As for "ZoneThirdPartyMediaServicesX" -- I have figured out howto decrypt this...so the encrypted string is exactly what I am looking for.
s.
dim Ret as string ()
or try
Dim Ret as Object
See if it makes a difference
2/ ZoneThirdPartyMediaServicesX should now be readable via ZoneZoneThirdPartyMediaServices property
Just finished re-coding ListAvailableServices
Was now looking at your EnqueuedTransportURI and I assume you also need that metaData?
Care to email me in private how to decrypt?
Dirk
Comment
-
Originally posted by dcorsus View Postso it should be part of your metadata, no?
HSPI.CurrentTrackMetaData As String doesn't return the CurrentTrackMetaData. It returns what looks like the insides of the EnqueuedTransportURIMetaData tag!
I think there are two ways to go:
1. Either have three properties/methods:
- CurrentTrackMetaData which contains the insides of <CurrentTrcakmetaData>
- NextTrackMetaData (ditto)
- EnqueuedTransportURi (the insides of that) OR:
2. Have a single property: "LastChange" and stuff the whole LastChange Event String in that, and I'll take it from there.
s.
Comment
-
Originally posted by dcorsus View PostFor ListAvailableServices ... try
dim Ret as string ()
or try
Dim Ret as Object
See if it makes a difference
2/ ZoneThirdPartyMediaServicesX should now be readable via ZoneZoneThirdPartyMediaServices property
Just finished re-coding ListAvailableServices
Was now looking at your EnqueuedTransportURI and I assume you also need that metaData?
Care to email me in private how to decrypt?
Dirk
ListAvailable still fails:
"ERROR in ListAvailableServices for zoneplayer = Family Room with UPNP Error = Read only tag / Transport is locked / Access denied. Error = MyUPnPService.InvokeAction for ServiceID = http://192.168.1.57:1400/xml/DeviceProperties1.xml while sending Action = ListAvailableServices for URI = http://192.168.1.57:1400/DeviceProperties/Control and Request = UPNP Error = faultcode = s:Client, faultstring = UPnPError, detail = 401 with error = The remote server returned an error: (500) Internal Server Error."
Comment
-
Originally posted by skavan View PostThirdPartyMediaServers returns the encypted String! YEAH!
ListAvailable still fails:
"ERROR in ListAvailableServices for zoneplayer = Family Room with UPNP Error = Read only tag / Transport is locked / Access denied. Error = MyUPnPService.InvokeAction for ServiceID = http://192.168.1.57:1400/xml/DeviceProperties1.xml while sending Action = ListAvailableServices for URI = http://192.168.1.57:1400/DeviceProperties/Control and Request = UPNP Error = faultcode = s:Client, faultstring = UPnPError, detail = 401 with error = The remote server returned an error: (500) Internal Server Error."
Added properties EnqueuedTransportURI and EnqueuedTransportURIMetaData
DirkLast edited by dcorsus; November 19, 2015, 01:18 AM.
Comment
-
OK:
1. GetHouseholdID : works
2. ZoneThirdPartyMediaServicesX : works
3. CurrentTrackMetaData ;; returns EnqueuedTransportURIMetaData when stopped and "" when playing!
4. NextTrackmetaData :: works (I think)
5. EnqueuedURITransportMetaData... :: works.
6. ListAvailableMusicServices :: Still errors....but a new error:
"ERROR in ListAvailableServices for zoneplayer = Family Room with UPNP Error = Restricted parent object. Error = Unable to cast object of type 'System.Object[]' to type 'System.String[]'."
Comment
-
Originally posted by skavan View Post3. CurrentTrackMetaData ;; returns EnqueuedTransportURIMetaData when stopped and "" when playing!
6. ListAvailableMusicServices :: Still errors....but a new error:
"ERROR in ListAvailableServices for zoneplayer = Family Room with UPNP Error = Restricted parent object. Error = Unable to cast object of type 'System.Object[]' to type 'System.String[]'."
Made a definition change for ListAvailableServices, see if it works now
Dirk
Comment
-
Originally posted by dcorsus View PostMade some changes not to overwrite EnqueuedTransportURIMetaData, CurrentTrackMetaData
Made a definition change for ListAvailableServices, see if it works now
Dirk
1. GetHouseholdID : works -- but arrives late. Needs to be one of the first commands issued (even before event subscriptions)
2. ZoneThirdPartyMediaServicesX : works
3. CurrentTrackMetaData ;; returns EnqueuedTransportURIMetaData when stopped and "" when playing!
4. NextTrackmetaData :: works (I think)
5. EnqueuedURITransportMetaData... :: works.
6. ListAvailableMusicServices :: WORKS!!!!
So - #1 needs to happen earlier and #3 still is wonky!
s.
Comment
-
Originally posted by skavan View Post1. GetHouseholdID : works -- but arrives late. Needs to be one of the first commands issued (even before event subscriptions)
Originally posted by skavan View Post3. CurrentTrackMetaData ;; returns EnqueuedTransportURIMetaData when stopped and "" when playing!
I'm out until next week, good luck
DirkLast edited by dcorsus; November 21, 2015, 07:03 PM.
Comment
-
Originally posted by dcorsus View Post?? When you call this procedure, it goes straight to the player, so you can only call it when the player is fully discovered which takes at least 30 sec at start-up. We're reading this, how does it make a difference to read this before any event subscriptions. The latter starts as soon as the players come on-line, I can't rewrite the PI for that whilst not understanding the difference.
To answer your question above...let' say you are playing an Amazon Cloud Player stream. Metadata starts to flow. One needs the HouseholdID to decrypt the ThirdPartyServicesX data (it is, in fact, the password) and therefore, one can't get "protected" AlbumArt without it. So in the case that metadata starts to flow without knowing the HouseholdID, there will be no AlbumArt.
In my little UpnP app, once I get a DeviceAdded response to a device subscription....I immediately get the HouseholdID, Music Services and ZoneGRoupTolpology encrypted data (synchronously) -- and only then do I subscribe to AVTransport.
That said, the reality is that HouseholdID is a constant. It doesn't change. It doesn't need to be read on each session...and could be stored as you do with other "Globals"?
I hope that all made sense.
It comes from doing a GetMediaInfo and has always been the most reliable information for any media. I make this call each time I receive an Avtransport event, even if that event has MetaData in it, it wasn't always reliable. NextMetaData does come from the event itself. I have a check built in to not overwrite it with an empty string. Are you sure there is nothing wrong on your side? I can check for empty and blanks .... (new version attached).
I'm out until next week, good luck
Dirk
Comment
-
OK - checked out latest drop and CurrentTrackMetaData still returns "".
Do you mean GetmediaInfo or GetPositionInfo? I think you mean the latter.
In any event (pun intended!) - the data isn't coming through!
As a backup - perhaps you could just stuff the LastChange metadata (in full) in a GetLastChange method?
Comment
-
Back in town ....
Originally posted by skavan View PostOK - checked out latest drop and CurrentTrackMetaData still returns "".
Do you mean GetmediaInfo or GetPositionInfo? I think you mean the latter.
Originally posted by skavan View PostIn any event (pun intended!) - the data isn't coming through!
As a backup - perhaps you could just stuff the LastChange metadata (in full) in a GetLastChange method?
I'll have another look why it is empty because I have a check to prevent it but it doesn't seem to work or something not kosher in your side of the fence.
Did you get the HouseholdID to work?
Comment
Comment