@@ -25,10 +25,6 @@ class ContentDirectory extends Service {
2525 this . SCPDURL = '/xml/ContentDirectory1.xml'
2626 }
2727
28- async Browse ( options ) { return this . _request ( 'Browse' , options ) }
29-
30- async DestroyObject ( options ) { return this . _request ( 'DestroyObject' , options ) }
31-
3228 async _parseResult ( input ) {
3329 input . Result = await Helpers . ParseXml ( input . Result )
3430 return input
@@ -66,6 +62,105 @@ class ContentDirectory extends Service {
6662 }
6763 } )
6864 }
65+
66+ async Browse ( options ) {
67+ return this . _request ( 'Browse' , options )
68+ }
69+
70+ async DestroyObject ( options ) {
71+ return this . _request ( 'DestroyObject' , options )
72+ }
73+
74+ /**
75+ * See: http://docs.python-soco.com/en/latest/api/soco.music_library.html#soco.music_library.MusicLibrary.album_artist_display_option
76+ *
77+ * Possible values are:
78+ * 'WMP' - use Album Artists
79+ * 'ITUNES' - use iTunes® Compilations
80+ * 'NONE' - do not group compilations
81+ */
82+ async GetSearchCapabilities ( ) {
83+ return this . _request ( 'GetSearchCapabilities' , { } ) . then (
84+ ( r ) => r . SearchCaps
85+ )
86+ }
87+
88+ async GetSortCapabilities ( ) {
89+ return this . _request ( 'GetSortCapabilities' , { } ) . then ( ( r ) => r . SortCaps )
90+ }
91+
92+ async GetSystemUpdateID ( ) {
93+ return this . _request ( 'GetSystemUpdateID' , { } ) . then ( ( r ) => r . Id )
94+ }
95+
96+ async GetAlbumArtistDisplayOption ( ) {
97+ return this . _request ( 'GetAlbumArtistDisplayOption' , { } ) . then (
98+ ( r ) => r . AlbumArtistDisplayOption
99+ )
100+ }
101+
102+ async GetLastIndexChange ( ) {
103+ return this . _request ( 'GetLastIndexChange' , { } ) . then (
104+ ( r ) => r . LastIndexChange
105+ )
106+ }
107+
108+ async FindPrefix ( ObjectID , Prefix ) {
109+ return this . _request ( 'FindPrefix' , {
110+ ObjectID,
111+ Prefix
112+ } )
113+ }
114+
115+ async GetAllPrefixLocations ( ObjectID ) {
116+ return this . _request ( 'GetAllPrefixLocations' , {
117+ ObjectID
118+ } )
119+ }
120+
121+ async CreateObject ( ContainerID , Elements ) {
122+ return this . _request ( 'CreateObject' , {
123+ ContainerID,
124+ Elements
125+ } )
126+ }
127+
128+ async UpdateObject ( ObjectID , CurrentTagValue ) {
129+ return this . _request ( 'UpdateObject' , {
130+ ObjectID,
131+ CurrentTagValue
132+ } )
133+ }
134+
135+ async RefreshShareIndex ( AlbumArtistDisplayOption = '' ) {
136+ return this . _request ( 'RefreshShareIndex' , {
137+ AlbumArtistDisplayOption
138+ } )
139+ }
140+
141+ async RequestResort ( SortOrder ) {
142+ return this . _request ( 'RequestResort' , {
143+ SortOrder
144+ } )
145+ }
146+
147+ async GetShareIndexInProgress ( ) {
148+ return this . _request ( 'GetShareIndexInProgress' , { } ) . then (
149+ ( r ) => r . IsIndexing !== '0'
150+ )
151+ }
152+
153+ async GetBrowseable ( ) {
154+ return this . _request ( 'GetBrowseable' , { } ) . then (
155+ ( r ) => r . IsBrowseable !== '0'
156+ )
157+ }
158+
159+ async SetBrowseable ( Browseable ) {
160+ return this . _request ( 'SetBrowseable' , {
161+ Browseable
162+ } )
163+ }
69164}
70165
71166module . exports = ContentDirectory
0 commit comments