File src/search.c

This file contains code used by the search engine in the UBS, which is not altogether functional. The search engine is intended to be used by the UBS frontend to find filenames based on a search query, which would be useful for song requests and such. It is important to note that the UBS can only search music that is normally visible and able to be played during regular shows. It reads the schedule of shows to determine where to look for music, so any shows in there will have their directories searched.


Included Files


Global Variable PROCNAME

char PROCNAME[128]
Included from include/ubs.h

Global Variable CUR_TIME

struct tm* CUR_TIME
Included from include/ubs.h

Global Variable GLOBAL

ubs_table GLOBAL
Included from include/ubs.h

Global Variable LOGLEVEL

int LOGLEVEL
Included from include/ubs.h

Global Variable WEEK

An array that holds all of the half-hour slots for an entire week, which is the period of time that the ubs runs off of. This array contains integers which correspond to show ID's

int WEEK[7][48]
Included from include/ubs-sched.h


Global Variable ALLSHOWS

All the known shows

struct show* ALLSHOWS
Included from include/ubs-sched.h


Global Variable SCHED

ubs_table SCHED
Included from include/ubs-sched.h

Global Function recache()

Rereads all the songs for every known show, and adds them into a big file which is read by the search engine.

int recache ( void )

int recache
Returns OK on success, NO_FILE if the tmpcache file can't be created, NO_FILE if the searchcache file can't be created
Prototyped in: include/ubs-main.h
Calls: chomp_line()lib/parse_line.c
  get_media_tag()lib/music_info.c
  log_error_msg()lib/logging.c
  log_event()lib/logging.c
  parse_dir()lib/get_song.c
  ubs_table_data()lib/table.c
  atoi(), fclose(), fgets(), fopen()
Called by: cmd_search()src/cmd_search.c