submit(artist,
track,
time,
source='P',
rating='',
length='',
album='',
trackno='',
mbid='',
autoflush=False)
Append a song to the submission cache. Use 'flush()' to send the
cache to AS. You can also set "autoflush" to True.
From the Audioscrobbler protocol docs:
---------------------------------------------------------------------------
The client should monitor the user's interaction with the music
playing service to whatever extent the service allows. In order to
qualify for submission all of the following criteria must be met:
-
The track must be submitted once it has finished playing.
Whether it has finished playing naturally or has been manually
stopped by the user is irrelevant.
-
The track must have been played for a duration of at least 240
seconds or half the track's total length, whichever comes first.
Skipping or pausing the track is irrelevant as long as the
appropriate amount has been played.
-
The total playback time for the track must be more than 30
seconds. Do not submit tracks shorter than this.
-
Unless the client has been specially configured, it should not
attempt to interpret filename information to obtain metadata
instead of tags (ID3, etc).
-
- Parameters:
artist -
Artist name
track -
Track name
time -
Time the track *started* playing in the UTC timezone (see
datetime.utcnow()). Example:
>>> time = int(time.mktime(datetime.utcnow()))
source -
Source of the track. One of:
-
'P': Chosen by the user
-
'R': Non-personalised broadcast (e.g. Shoutcast, BBC Radio
1)
-
'E': Personalised recommendation except Last.fm (e.g.
Pandora, Launchcast)
-
'L': Last.fm (any mode). In this case, the 5-digit Last.fm
recommendation key must be appended to this source ID to
prove the validity of the submission (for example,
"L1b48a").
-
'U': Source unknown
rating -
The rating of the song. One of:
-
'L': Love (on any mode if the user has manually loved the
track)
-
'B': Ban (only if source='L')
-
'S': Skip (only if source='L')
-
'': Not applicable
length -
The song length in seconds
album -
The album name
trackno -
The track number
mbid -
MusicBrainz Track ID
autoflush -
Automatically flush the cache to AS?
|