[library/filescanner/spotify] Add library source abstraction and new

"library" thread

- Implement filescanner as a library_source
- Add library source implementation for spotify
- Move process_media_info to library with small adjustments:
  - Remove dependency to F_SCAN_TYPE defines
  - Pass data_kind as parameter
  - Pass media_kind and compilation as parameter if a source forces a
specific value for these
- Move declaration of scan_ffmpeg to library; add
library_add_playlist_info to library
This commit is contained in:
chme
2016-12-31 07:28:18 +01:00
parent ca6836f638
commit 56ce3f9cba
14 changed files with 1018 additions and 674 deletions

View File

@@ -38,6 +38,7 @@
#include "db.h"
#include "filescanner.h"
#include "misc.h"
#include "library.h"
/* Formats we can read so far */
#define PLAYLIST_PLS 1
@@ -238,7 +239,7 @@ scan_playlist(char *file, time_t mtime, int dir_id)
if (extinf)
DPRINTF(E_INFO, L_SCAN, "Playlist has EXTINF metadata, artist is '%s', title is '%s'\n", mfi.artist, mfi.title);
filescanner_process_media(filename, mtime, 0, F_SCAN_TYPE_URL, &mfi, DIR_HTTP);
library_process_media(filename, mtime, 0, DATA_KIND_HTTP, 0, false, &mfi, DIR_HTTP);
}
/* Regular file, should already be in library */
else