Detailed Description
Browsing adds additional information to what an sp_album holds. It retrieves copyrights, reviews and tracks of the album.
Typedef Documentation
The type of a callback used in sp_albumbrowse_create()
When the callback is called, the metadata of all tracks belonging to it will have been loaded, so sp_track_is_loaded() will return non-zero. The sp_artist of the album will also have been fully loaded.
- Parameters:
-
Function Documentation
Increase the reference count of an album browse result
- Parameters:
-
[in] | alb | The album browse result object |
- Returns:
- One of the following errors, from sp_error SP_ERROR_OK
Given an album browse object, return the pointer to its album object
- Parameters:
-
[in] | alb | Album browse object |
- Returns:
- Album object
- Examples:
- browse.c.
Given an album browse object, return the pointer to its artist object
- Parameters:
-
[in] | alb | Album browse object |
- Returns:
- Artist object
Return the time (in ms) that was spent waiting for the Spotify backend to serve the request
- Parameters:
-
[in] | alb | Album browse object |
- Returns:
- -1 if the request was served from the local cache If the result is not yet loaded the return value is undefined
const char* sp_albumbrowse_copyright |
( |
sp_albumbrowse * |
alb, |
|
|
int |
index | |
|
) |
| | |
Given an album browse object, return one of its copyright strings
- Parameters:
-
- Returns:
- Copyright string in UTF-8 format, or NULL if the index is invalid. Returned string is valid as long as the album object stays allocated and no longer than the next call to sp_session_process_events()
- Examples:
- browse.c.
Initiate a request for browsing an album
The user is responsible for freeing the returned album browse using sp_albumbrowse_release(). This can be done in the callback.
- Parameters:
-
[in] | session | Session object |
[in] | album | Album to be browsed. The album metadata does not have to be loaded |
[in] | callback | Callback to be invoked when browsing has been completed. Pass NULL if you are not interested in this event. |
[in] | userdata | Userdata passed to callback. |
- Returns:
- Album browse object
- See also:
- albumbrowse_complete_cb
- Examples:
- browse.c.
Check if browsing returned an error code.
- Parameters:
-
[in] | alb | Album browse object |
- Returns:
- One of the following errors, from sp_error SP_ERROR_OK SP_ERROR_IS_LOADING SP_ERROR_OTHER_PERMANENT SP_ERROR_OTHER_TRANSIENT
- Examples:
- browse.c.
Check if an album browse request is completed
- Parameters:
-
[in] | alb | Album browse object |
- Returns:
- True if browsing is completed, false if not
Given an album browse object, return number of copyright strings
- Parameters:
-
[in] | alb | Album browse object |
- Returns:
- Number of copyright strings available, 0 if unknown
- Examples:
- browse.c.
Given an album browse object, return number of tracks
- Parameters:
-
[in] | alb | Album browse object |
- Returns:
- Number of tracks on album
- Examples:
- browse.c.
Decrease the reference count of an album browse result
- Parameters:
-
[in] | alb | The album browse result object |
- Returns:
- One of the following errors, from sp_error SP_ERROR_OK
- Examples:
- browse.c.
Given an album browse object, return its review
- Parameters:
-
[in] | alb | Album browse object |
- Returns:
- Review string in UTF-8 format. Returned string is valid as long as the album object stays allocated and no longer than the next call to sp_session_process_events()
- Examples:
- browse.c.
Given an album browse object, return a pointer to one of its tracks
- Parameters:
-
- Returns:
- A track.
- See also:
- Track subsystem
- Examples:
- browse.c.