Due to a series of colds in our team, we had to skip the release of the mod for GTA SA and announce generator playlists instead.
With the help of playlist generators, we want to implement two things: 1. Make listening to music from the web as convenient for the end user (in any player, on any OS). 2. Provide the ability to integrate a webcam into media devices and software.
')
Weblora playlists are lists of songs collected by a set of parameters passed to the generator. The transport is the HTTP protocol, which means that the generator is a CGI script that accepts parameters according to the HTTP rules, that is, via GET or POST.
More information about the parameters:
id is the content identifier for which data is being sampled. 0 - means that you need to generate a random playlist - therefore it is applicable only with type = playlist. When used with type = audio is the hash of the song, for type = playlist and type = album go.
type - the type of content to be generated. It can take 3 values: 'audio' - selection of a playlist with a single song, the ID of which is transmitted in the id parameter 'album' - selection of a playlist from the songs of a certain album, the identifier of which is given in the id parameter 'playlist' - selection of a playlist from songs of a specific user playlist, the identifier of which is passed in the id parameter. If id = 0, a random selection of songs occurs that satisfies the passed parameters (see below).
action - the type of adding content to the playlist. Utility optional parameter. With it, you can specify the actions that your handler should perform with the received data. For example, in order to add several entries to the player on the site, the click handler on the page sends a request with action = add.
mood - the mood of the user. It is an integer from 0 to 8, where 0 - sluggish-fun 1 - fun 2 - active-fun 3 - sluggish 4 - neutral 5 - active 6 - languid sad 7 - sad 8 - sad-active mood If the value of the user’s mood variable is outside the acceptable range (less than zero or greater than 8) or the parameter is not specified, then the default mood is 4.
filter - the filter for the generated content. A string in which all pairs of values (parameter_name: value) are separated by a semicolon, and in the pair itself the name of the parameter is separated from the value by a colon. There may be the following names 'userId' - user ID
'genreId' - genre identifier
Table genres:
Electronic - 24 Russian pops - 132 Alternative - 32 Soundtrack - 129 Jazz - 42 Russian rock - 131 Metal - 47 Retro - 130 Pop - 51 Punk - 54 Rhythm and Blues - 56 Rap - 57 Reggae - 59 Rock - 61 Classic - 128 Chanson - 133 Folk - 134
'sort' is the criterion by which the content will be selected 1) favorite - the user's favorite music 2) friends - his friends 3) uploaded - it loaded 4) used_count and used_last - the one that listened 5) all - all user music The default is set to `all` The sort parameter can only be passed with the userId parameter.
coverSize - cover size of the album.
limit - limit on the length of the returned result - if not specified or 0: modified in 10, except for cases when the filter by userId is set: in this case, the transmitted 0 means the need to return all records of the result. <./ li>
offset - indicates which song should be returned from the limit
If you want to generate and play a playlist, then only 2 parameters will be required: id = 0 and content type type = playlist. All other parameters (sort, mood, limit, action, offset and coverSize are optional) www.weborama.ru/modules/player/index_xspf.php?id=0&type=playlist&act=new&mood=1&limit=11&sort=friends&offset=3 This link generates a playlist, with 11 songs corresponding to a happy mood. It starts playing from the third song, and all songs are selected from those songs that are liked by the user's friends.
If you want to play a specific playlist from the beginning, you need to pass 2 parameters: the id of the playlist id and the content type type = playlist www.weborama.ru/modules/player/index_xspf.php?id=18260&type=playlist This link will start playing the playlist with the identifier 18260.
If you want to play a specific playlist from a specific composition number, you need to pass 3 parameters: the id of the playlist id and the content type type = playlist and the offset value offset www.weborama.ru/modules/player/index_xspf.php?id=2313&type=playlist&offset=3 This link will begin to play a playlist with the identifier 2313 c third song
If you want to play a specific album not from the beginning, but from a certain song number, you need to pass 3 parameters: album id and content type type = album and offset value offset. www.weborama.ru/modules/player/index_xspf.php?id=8060&type=album&offset=3 This link will begin to play an album with ID 8060 c third song