~quadrispro/cmus/trunk

« back to all changes in this revision

Viewing changes to cache.h

  • Committer: Gregory Petrosyan
  • Author(s): Siim Salonen
  • Date: 2012-09-29 08:01:59 UTC
  • Revision ID: git-v1:151c330a881d666e4256d4c953e3f5f1fc6e89fa
Add option to skip initial metadata loading

When I use network filesystems and trying to add many tracks then it
takes hours to complete.
In my case ~45GB mp3 collection mounted with sshfs over 3G network.
skip_track_info false: worker job: 9586.65 (2.6h), 8531 tracks
skip_track_info true : worker job: 266.30, 9448 tracks (includes .jpg etc.)

When I have time and bandwith, I can reload track(s) metadata using
'update-cache' or 'win-update-cache' commands.

TODO: fetch tags when file starts playing

[gp: formatting + extra is_http_url() check]
Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
int cache_init(void);
31
31
int cache_close(void);
32
 
struct track_info *cache_get_ti(const char *filename);
 
32
struct track_info *cache_get_ti(const char *filename, int force);
33
33
void cache_remove_ti(struct track_info *ti);
34
34
struct track_info **cache_refresh(int *count, int force);
 
35
struct track_info *lookup_cache_entry(const char *filename, unsigned int hash);
35
36
 
36
37
#endif