PHP Class SSLTrack, sslscrobbler

SSL puts a lot of useful information into the history file, including the full path to the MP3, bpm, key, etc., as well as history-oriented data such as start and end time, which deck the track was played on, played or skipped, manually added, etc. There is also an incrementing integer primary key (which I've called 'row'). History file Tracks also have a concept of their own 'status', in the sense of 'NEW', 'PLAYING', 'PLAYED' or 'SKIPPED'. (@see SSLRealtimeModel for more detail). These states are derived from a combination of the 'played' field, which is either 0 or 1 corresponding to whether or not the row is 'green' in the SSL interface, and whether or not an 'endtime' is present.
Author: ben
Inheritance: extends SSLStruct
Afficher le fichier Open project: ben-xo/sslscrobbler Class Usage Examples

Protected Properties

Свойство Type Description
$added
$album
$artist
$deck
$end_time
$fields
$filename
$fullpath
$length
$played
$playtime
$row
$start_time
$title
$updated_at

Méthodes publiques

Méthode Description
__toString ( )
getAlbum ( )
getArtist ( )
getDeck ( )
getEndTime ( )
getFilename ( )
getFullEndTime ( )
getFullStartTime ( )
getFullTitle ( )
getFullpath ( )
getLength ( $flags ) Get the length of the file, as a string (e.g. "1:23.45" for 1 minute 23.45 seconds). This is how Serato returns it from the file.
getLengthInSeconds ( $flags ) Get the length of the file, as an integer number of seconds.
getPlayTime ( )
getPlayed ( )
getRow ( )
getStartTime ( )
getStatus ( )
getTitle ( )
getUnpacker ( )
getUpdatedAt ( )
isPlayed ( )
populateFrom ( array $fields )
toArray ( )

Méthodes protégées

Méthode Description
file_exists ( $filename )
guessLengthFromFile ( ) Sometimes ScratchLive doesn't supply the length, even when it knows the file.
renderTime ( $timestamp )
setLengthIfUnknown ( ) This will attempt to set the length via guess work, if it's not already set.

Method Details

__toString() public méthode

public __toString ( )

file_exists() protected méthode

protected file_exists ( $filename )

getAlbum() public méthode

public getAlbum ( )

getArtist() public méthode

public getArtist ( )

getDeck() public méthode

public getDeck ( )

getEndTime() public méthode

public getEndTime ( )

getFilename() public méthode

public getFilename ( )

getFullEndTime() public méthode

public getFullEndTime ( )

getFullStartTime() public méthode

public getFullStartTime ( )

getFullTitle() public méthode

public getFullTitle ( )

getFullpath() public méthode

public getFullpath ( )

getLength() public méthode

Pass SSLTrack::TRY_HARD if you would like the file length to be guessed from the file itself, if possible, and don't mind that this is possibly an expensive operation.
public getLength ( $flags )
$flags

getLengthInSeconds() public méthode

Pass SSLTrack::TRY_HARD if you would like the file length to be guessed from the file itself, if possible, and don't mind that this is possibly an expensive operation.
public getLengthInSeconds ( $flags )
$flags

getPlayTime() public méthode

public getPlayTime ( )

getPlayed() public méthode

public getPlayed ( )

getRow() public méthode

public getRow ( )

getStartTime() public méthode

public getStartTime ( )

getStatus() public méthode

public getStatus ( )

getTitle() public méthode

public getTitle ( )

getUnpacker() public méthode

public getUnpacker ( )

getUpdatedAt() public méthode

public getUpdatedAt ( )

guessLengthFromFile() protected méthode

Not sure why; perhaps files that have never been analysed. So, let's attempt to guess it by analysing the full file.
protected guessLengthFromFile ( )

isPlayed() public méthode

public isPlayed ( )

populateFrom() public méthode

public populateFrom ( array $fields )
$fields array

renderTime() protected méthode

protected renderTime ( $timestamp )

setLengthIfUnknown() protected méthode

This will attempt to set the length via guess work, if it's not already set.
protected setLengthIfUnknown ( )

toArray() public méthode

public toArray ( )

Property Details

$added protected_oe property

protected $added

$album protected_oe property

protected $album

$artist protected_oe property

protected $artist

$deck protected_oe property

protected $deck

$end_time protected_oe property

protected $end_time

$fields protected_oe property

protected $fields

$filename protected_oe property

protected $filename

$fullpath protected_oe property

protected $fullpath

$length protected_oe property

protected $length

$played protected_oe property

protected $played

$playtime protected_oe property

protected $playtime

$row protected_oe property

protected $row

$start_time protected_oe property

protected $start_time

$title protected_oe property

protected $title

$updated_at protected_oe property

protected $updated_at