#include "playlist.h"
#include "html.h"
Go to the source code of this file.
Functions | |
mu_ent * | new_ent (apr_pool_t *pool, mu_ent *head) |
Creates a new musical entry (mp3, ogg or directory). | |
short | mpg123_mp3_ext_check (char *filename) |
Checks for valid MP3 filename extension. | |
id3_utf8_t * | utf8_id3tag_findframe (struct id3_tag *tag, char const *frameid, unsigned short index) |
Converts an id3tag string in utf8. | |
mu_ent * | make_ogg_entry (apr_pool_t *pool, mu_ent *head, FILE *in, mu_config *conf, mu_ent_names *names, request_rec *r) |
Fills in the information fields about OGG data. | |
mu_ent * | make_mp3_entry (apr_pool_t *pool, mu_ent *head, FILE *in, mu_config *conf, mu_ent_names *names, request_rec *r) |
Fills in the information fields about MP3 data. | |
mu_ent * | make_music_entry (apr_pool_t *pool, request_rec *r, mu_ent *head, mu_config *conf, mu_ent_names *names) |
Add a file (and the content of the directory if requested) to the chain. | |
short | musicindex_directory (request_rec *r, mu_config *conf) |
Generates and sends a webpage listing the music files in the directory. | |
short | playlist_directory (request_rec *r, mu_config *conf) |
Creates and sends a playlist with the content of a directory. | |
short | playlist_selected (request_rec *r, mu_config *conf) |
Generates and sends a playlist with only selected items. | |
Variables | |
const char * | mpg123_id3_genres [GENRE_MAX] |
Reference table for digit coded genres. |
Thibaut Varene
Definition in file playlist.c.
|
Fills in the information fields about MP3 data. This function reads the id3 tags (using libid3tag0) from the MP3 file and fills in the struct mu_ent fields accordingly.
Definition at line 273 of file playlist.c. References mu_ent::album, mu_ent::artist, mu_ent::bitrate, mu_ent::date, mu_ent_names::filename, mu_ent::filetype, FT_MP3, mu_ent::genre, GENRE_MAX, INPUT_BUFFER_SIZE, mu_ent::length, MI_QUICKPL, mpg123_id3_genres, mpg123_mp3_ext_check(), new_ent(), mu_config::options, mu_ent::posn, mu_ent::size, mu_ent::title, mu_ent::track, and utf8_id3tag_findframe(). Referenced by make_music_entry(). |
|
Add a file (and the content of the directory if requested) to the chain. This function creates a new entry from a file. If the file is a directory and the recursive option is set, all its content is also added. If the file is an ogg vorbis or an mp3, it is simply added.
Definition at line 450 of file playlist.c. References mu_ent::album, mu_ent::artist, CA_CREATE, cache_check_dir(), cache_check_file(), mu_config::cache_path, cache_read_file(), cache_write_file(), mu_ent::file, mu_ent_names::filename, mu_ent::filetype, FT_DIR, make_mp3_entry(), make_ogg_entry(), MAX_STRING, MI_PLAYLIST, MI_RECURSIVE, MI_SEARCH, mu_cache_data::name, new_ent(), mu_config::options, mu_config::play_recursive, mu_config::search, mu_ent::title, mu_ent_names::uri, and mu_ent::uri. Referenced by musicindex_directory(), playlist_directory(), and playlist_selected(). |
|
Fills in the information fields about OGG data. This function reads the ogg tags (using libvorbisfile) from the ogg file and fills in the struct mu_ent fields accordingly. If the file is not an ogg one, the function returns p = head.
Definition at line 211 of file playlist.c. References mu_ent::album, mu_ent::artist, mu_ent::bitrate, mu_ent::date, mu_ent::filetype, FT_OGG, mu_ent::genre, mu_ent::length, MI_QUICKPL, new_ent(), mu_config::options, mu_ent::posn, mu_ent::title, and mu_ent::track. Referenced by make_music_entry(). |
|
Checks for valid MP3 filename extension.
Definition at line 154 of file playlist.c. Referenced by make_mp3_entry(). |
|
Generates and sends a webpage listing the music files in the directory.
Definition at line 592 of file playlist.c. References make_music_entry(), MI_SEARCH, mu_config::options, quicksort(), send_directories(), send_foot(), send_head(), and send_tracks(). Referenced by handle_musicindex(). |
|
Creates a new musical entry (mp3, ogg or directory).
Definition at line 46 of file playlist.c. References mu_ent::next. Referenced by cache_read_file(), make_mp3_entry(), make_music_entry(), and make_ogg_entry(). |
|
Creates and sends a playlist with the content of a directory. This function generates a playlist containing all the files in the current directory, either recursively or not.
Definition at line 643 of file playlist.c. References make_music_entry(), MI_PLAYLIST, mu_config::options, quicksort(), and send_playlist(). Referenced by handle_musicindex(). |
|
Generates and sends a playlist with only selected items. This function parses the requests, which is the form : http://...../?file=file1&file=file2&file=file3... Note that in FORM requests, arguments have ' ' replaced by '+', other "special" characters are changed to their URI equivalent. Here is the trick : ap_unescape_url doesn't change the '+' to its URI equivalent. So we first change ' ' to '+' and then call the apache function. Easy, isn't it ?
Definition at line 691 of file playlist.c. References mu_ent_names::filename, make_music_entry(), MAX_STRING, quicksort(), send_playlist(), and mu_ent_names::uri. Referenced by handle_musicindex(). |
|
Converts an id3tag string in utf8. This function reads the id3tag from an MP3 file (if any) and converts the result in the utf8 standard format.
Definition at line 176 of file playlist.c. Referenced by make_mp3_entry(). |
|
Reference table for digit coded genres.
Definition at line 101 of file playlist.c. Referenced by make_mp3_entry(). |