static method check_album [line 1985]
static void check_album(
$album, [
$album_year = 0], [
$disk = ''], [
$readonly = ''])
|
|
check_album
Takes $album and checks if there then return id else insert and return id
Tags:
Parameters:
static method check_artist [line 1915]
static void check_artist(
$artist, [
$readonly = ''])
|
|
check_artist
$artist checks if there then return id else insert and return id If readonly is passed then don't create, return false on not found
Tags:
Parameters:
static method check_tag [line 2069]
static void check_tag(
$value,
$object_id, [
$object_type = 'song'])
|
|
check_tag
This checks the tag we've been passed (name) and sees if it exists, and if so if it's mapped to this object, this is only done for songs for now
Tags:
Parameters:
static method check_title [line 2083]
static void check_title(
$title, [
$file = 0])
|
|
check_title
this checks to make sure something is set on the title, if it isn't it looks at the filename and trys to set the title based on that
Tags:
Parameters:
static method clean [line 1877]
clean
This is a wrapper function for all of the different cleaning functions, it runs them in the correct order and takes a catalog_id
Tags:
static method clean_albums [line 1663]
static void clean_albums(
)
|
|
clean_albums
This function cleans out unused albums
Tags:
static method clean_artists [line 1695]
static void clean_artists(
)
|
|
clean_artists
This function cleans out unused artists
Tags:
static method clean_ext_info [line 1725]
static void clean_ext_info(
)
|
|
clean_ext_info
This function clears any ext_info that no longer has a parent
Tags:
static method clean_flagged [line 1683]
static void clean_flagged(
)
|
|
clean_flagged
This functions cleans ou unused flagged items
Tags:
static method clean_playlists [line 1707]
static void clean_playlists(
)
|
|
clean_playlists
cleans out dead files from playlists
Tags:
static method clean_shoutbox [line 1639]
static void clean_shoutbox(
)
|
|
clean_shoutbox
This cleans out any shoutbox items that are now orphaned
Tags:
static method clean_stats [line 1737]
static void clean_stats(
)
|
|
clean_stats
This functions removes stats for songs/albums that no longer exist
Tags:
static method clean_tags [line 1614]
static void clean_tags(
)
|
|
clean_tags
This cleans out tag_maps that are not assoicated with a 'living' object and then cleans the tags that have no maps
Tags:
static method clear_stats [line 230]
static void clear_stats(
)
|
|
clear_stats
This clears all stats for _everything_
Tags:
static method count_songs [line 340]
static void count_songs(
[
$catalog_id = ''])
|
|
count_songs
This returns the current # of songs, albums, artists, genres in this catalog
Tags:
Parameters:
static method count_users [line 375]
static void count_users(
[
$catalog_id = ''])
|
|
count_users
This returns the total number of users in the ampache instance
Tags:
Parameters:
static method create [line 249]
static void create(
$data)
|
|
create
This creates a new catalog entry and then returns the insert id it checks to make sure this path is not already used before creating the catalog
Tags:
Parameters:
static method delete [line 2398]
static void delete(
$catalog_id)
|
|
delete
Deletes the catalog and everything assoicated with it it takes the catalog id
Tags:
Parameters:
static method dump_album_art [line 910]
static void dump_album_art(
$catalog_id, [
$methods = array()])
|
|
dump_album_art (Added by Cucumber 20050216)
This runs through all of the albums and trys to dump the art for them into the 'folder.jpg' file in the appropriate dir
Tags:
Parameters:
static method get_catalogs [line 155]
static void get_catalogs(
)
|
|
get_catalogs
Pull all the current catalogs and return an array of ids of what you find
Tags:
static method get_catalog_albums [line 701]
static void get_catalog_albums(
$catalog_id)
|
|
get_catalog_albums()
Returns an array of the albums from a catalog
Tags:
Parameters:
static method get_catalog_ids [line 174]
static void get_catalog_ids(
)
|
|
get_catalog_ids
This returns an array of all catalog ids
Tags:
static method get_disabled [line 746]
static void get_disabled(
[
$count = 0])
|
|
get_disabled
Gets an array of the disabled songs for all catalogs and returns full song objects with them
Tags:
Parameters:
static method get_duplicate_info [line 878]
static void get_duplicate_info(
$item,
$search_type)
|
|
get_duplicate_info
This takes a song, search type and auto flag and returns the duplicate songs in the correct order, it sorts them by longest, higest bitrate, largest filesize, checking the last one as most likely bad
Tags:
Parameters:
static method get_duplicate_songs [line 834]
static void get_duplicate_songs(
$search_method)
|
|
get_duplicate_songs This function takes a search type and returns a list of all song_ids that are likely to be duplicates based on teh search method selected.
Tags:
Parameters:
static method get_from_path [line 106]
static void get_from_path(
$path)
|
|
get_from_path
Try to figure out which catalog path most closely resembles this one This is useful when creating a new catalog to make sure we're not doubling up here
Tags:
Parameters:
static method get_stats [line 193]
static void get_stats(
[
$catalog_id = 0])
|
|
get_stats
This returns an hash with the #'s for the different objects that are assoicated with this catalog. This is used to build the stats box, it also calculates time
Tags:
Parameters:
static method optimize_tables [line 1896]
static void optimize_tables(
)
|
|
optimize_tables
This runs an optomize on the tables and updates the stats to improve join speed this can be slow, but is a good idea to do from time to time. This is incase the dba isn't doing it... which we're going to assume they aren't
Tags:
static method update_settings [line 1016]
static void update_settings(
$data)
|
|
update_settings
This function updates the basic setting of the catalog
Tags:
Parameters:
static method update_single_item [line 1037]
static void update_single_item(
$type,
$id)
|
|
update_single_item
updates a single album,artist,song from the tag data this can be done by 75+
Tags:
Parameters:
static method update_song_from_tags [line 1086]
static void update_song_from_tags(
&$song, [
$sort_pattern = ''], [
$rename_pattern = ''])
|
|
update_song_from_tags
updates the song info based on tags, this is called from a bunch of different places and passes in a full fledged song object, so it's a static function FIXME: This is an ugly mess, this really needs to be consolidated and cleaned up
Tags:
Parameters:
constructor __construct [line 55]
Catalog __construct(
[
$catalog_id = ''])
|
|
Constructor
Catalog class constructor, pulls catalog information $catalog_id The ID of the catalog you want to build information from
Tags:
Parameters:
method add_files [line 405]
void add_files(
$path,
$options)
|
|
add_files Recurses throught $this->path and pulls out all mp3s and returns the full path in an array. Passes gather_type to determin if we need to check id3 information against the db.
Tags:
Parameters:
method add_to_catalog [line 1169]
add_to_catalog
this function adds new files to an existing catalog
Tags:
method check_local_mp3 [line 2249]
void check_local_mp3(
$full_file, [
$gather_type = ''])
|
|
check_local_mp3
Checks the song to see if it's there already returns true if found, false if not
Tags:
Parameters:
method check_remote_song [line 2230]
void check_remote_song(
$url)
|
|
check_remote_song
checks to see if a remote song exists in the database or not if it find a song it returns the UID
Tags:
Parameters:
method clean_catalog [line 1491]
clean_catalog
Cleans the Catalog of files that no longer exist grabs from $this->id or $id passed Doesn't actually delete anything, disables errored files, and returns them in an array
Tags:
method clean_single_song [line 1581]
void clean_single_song(
$song)
|
|
clean_single_song
This function takes the elements of a single song object And checks to see if those specific elements are now orphaned this is often used in flagging, and is a faster way then calling the normal clean functions. The assumption is made that this is an old song object whoes information has already been updated in the database
Parameters:
method export [line 2427]
exports the catalog it exports all songs in the database to the given export type.
Tags:
Parameters:
method format [line 140]
format
This makes the object human readable
Tags:
method get_albums [line 580]
void get_albums(
[
$songs = array()])
|
|
Parameters:
method get_album_art [line 619]
void get_album_art(
[
$catalog_id = 0], [
$all = ''])
|
|
get_album_art
This runs through all of the needs art albums and trys to find the art for them from the mp3s
Tags:
Parameters:
method get_album_ids [line 598]
get_album_ids
This returns an array of ids of albums that have songs in this catalog
Tags:
method get_catalog_files [line 721]
void get_catalog_files(
[
$catalog_id = 0])
|
|
get_catalog_files
Returns an array of song objects from a catalog, used by sort_files script
Tags:
Parameters:
method get_files [line 768]
method get_remote_album_images [line 1362]
void get_remote_album_images(
$client,
$token)
|
|
get_album_images
This function retrieves the album information from the remote server
Tags:
Parameters:
method get_remote_catalog [line 1239]
void get_remote_catalog(
[
$type = 0])
|
|
get_remote_catalog
get a remote catalog and runs update if needed this requires the XML RPC stuff and a key to be passed
Tags:
Parameters:
method get_remote_song [line 1325]
void get_remote_song(
$client,
$token,
$start,
$end)
|
|
get_remote_song
This functions takes a start and end point for gathering songs from a remote server. It is broken up in attempt to get around the problem of very large target catalogs
Tags:
Parameters:
method import_m3u [line 2276]
void import_m3u(
$filename)
|
|
import_m3u
this takes m3u filename and then attempts to create a Public Playlist based on the filenames listed in the m3u
Tags:
Parameters:
method insert_local_song [line 2098]
void insert_local_song(
$file,
$file_info)
|
|
insert_local_song
Insert a song that isn't already in the database this function is in here so we don't have to create a song object
Tags:
Parameters:
method insert_local_video [line 2192]
void insert_local_video(
$file,
$filesize)
|
|
insert_local_video
This inserts a video file into the video file table the tag information we can get is super sketchy so it's kind of a crap shoot here
Tags:
Parameters:
method insert_remote_song [line 2167]
void insert_remote_song(
$song)
|
|
insert_remote_song takes the information gotten from XML-RPC and inserts it into the local database. The filename ends up being the url.
Tags:
Parameters:
method merge_stats [line 2347]
void merge_stats(
$type,
$oldid,
$newid)
|
|
Parameters:
method run_add [line 303]
run_add
This runs the add to catalog function it includes the javascript refresh stuff and then starts rolling throught the path for this catalog
Tags:
Parameters:
method update_last_add [line 1004]
update_last_add
updates the last_add of the catalog
method update_remote_album_images [line 1434]
void update_remote_album_images(
$data,
$remote_server,
$auth)
|
|
Tags:
Parameters:
method update_remote_catalog [line 1397]
void update_remote_catalog(
$data,
$root_path)
|
|
update_remote_catalog
actually updates from the remote data, takes an array of songs that are base64 encoded and parses them
Tags:
Parameters:
method verify_catalog [line 1773]
void verify_catalog(
$catalog_id)
|
|
verify_catalog
This function compares the DB's information with the ID3 tags
Tags:
Parameters: