PHP Класс 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.
Автор: ben
Наследование: extends SSLStruct
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$added
$album
$artist
$deck
$end_time
$fields
$filename
$fullpath
$length
$played
$playtime
$row
$start_time
$title
$updated_at

Открытые методы

Метод Описание
__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 ( )

Защищенные методы

Метод Описание
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.

Описание методов

__toString() публичный Метод

public __toString ( )

file_exists() защищенный Метод

protected file_exists ( $filename )

getAlbum() публичный Метод

public getAlbum ( )

getArtist() публичный Метод

public getArtist ( )

getDeck() публичный Метод

public getDeck ( )

getEndTime() публичный Метод

public getEndTime ( )

getFilename() публичный Метод

public getFilename ( )

getFullEndTime() публичный Метод

public getFullEndTime ( )

getFullStartTime() публичный Метод

public getFullStartTime ( )

getFullTitle() публичный Метод

public getFullTitle ( )

getFullpath() публичный Метод

public getFullpath ( )

getLength() публичный Метод

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() публичный Метод

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 getPlayTime ( )

getPlayed() публичный Метод

public getPlayed ( )

getRow() публичный Метод

public getRow ( )

getStartTime() публичный Метод

public getStartTime ( )

getStatus() публичный Метод

public getStatus ( )

getTitle() публичный Метод

public getTitle ( )

getUnpacker() публичный Метод

public getUnpacker ( )

getUpdatedAt() публичный Метод

public getUpdatedAt ( )

guessLengthFromFile() защищенный Метод

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 isPlayed ( )

populateFrom() публичный Метод

public populateFrom ( array $fields )
$fields array

renderTime() защищенный Метод

protected renderTime ( $timestamp )

setLengthIfUnknown() защищенный Метод

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

toArray() публичный Метод

public toArray ( )

Описание свойств

$added защищенное свойство

protected $added

$album защищенное свойство

protected $album

$artist защищенное свойство

protected $artist

$deck защищенное свойство

protected $deck

$end_time защищенное свойство

protected $end_time

$fields защищенное свойство

protected $fields

$filename защищенное свойство

protected $filename

$fullpath защищенное свойство

protected $fullpath

$length защищенное свойство

protected $length

$played защищенное свойство

protected $played

$playtime защищенное свойство

protected $playtime

$row защищенное свойство

protected $row

$start_time защищенное свойство

protected $start_time

$title защищенное свойство

protected $title

$updated_at защищенное свойство

protected $updated_at