From 6114c31c612e21f6efe88514724cab637100fd36 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Sun, 22 Nov 2009 11:17:33 +0100 Subject: [PATCH] Hook up iTunes library scanner --- src/filescanner.c | 16 ++++++++++------ src/filescanner.h | 5 +++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/filescanner.c b/src/filescanner.c index 57a24869..42041a13 100644 --- a/src/filescanner.c +++ b/src/filescanner.c @@ -276,11 +276,11 @@ process_playlist(char *file) if (ext) { if (strcmp(ext, ".m3u") == 0) - { - scan_m3u_playlist(file); - - return; - } + scan_m3u_playlist(file); +#ifdef ITUNES + else if (strcmp(ext, ".xml") == 0) + scan_itunes_itml(file); +#endif } } @@ -347,7 +347,11 @@ process_file(char *file, time_t mtime, off_t size, int compilation, int flags) ext = strrchr(file, '.'); if (ext) { - if (strcmp(ext, ".m3u") == 0) + if ((strcmp(ext, ".m3u") == 0) +#ifdef ITUNES + || (strcmp(ext, ".xml") == 0) +#endif + ) { if (flags & F_SCAN_BULK) defer_playlist(file); diff --git a/src/filescanner.h b/src/filescanner.h index 5e2f1d03..a1a835d3 100644 --- a/src/filescanner.h +++ b/src/filescanner.h @@ -20,4 +20,9 @@ scan_url_file(char *file, struct media_file_info *mfi); void scan_m3u_playlist(char *file); +#ifdef ITUNES +void +scan_itunes_itml(char *file); +#endif + #endif /* !__FILESCANNER_H__ */