2
* This file is part of the Ubuntu TV Media Scanner
3
* Copyright (C) 2012-2013 Canonical Ltd.
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU Lesser General Public License version 3 as
7
* published by the Free Software Foundation.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU Lesser General Public License for more details.
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
* Contact: Jim Hodapp <jim.hodapp@canonical.com>
18
* Authored by: Jussi Pakkanen <jussi.pakkanen@canonical.com>
21
#ifndef MEDIAARTCACHE_H
22
#define MEDIAARTCACHE_H
26
namespace mediascanner {
29
* A class to store thumbnails for files according to
30
* https://wiki.gnome.org/MediaArtStorageSpec
32
* As this class deals mostly with the filesystem, all
33
* errors are reported with runtime_error exceptions.
41
std::string compute_base_name(const std::string &artist, const std::string &album) const;
42
std::string get_full_filename(const std::string &artist, const std::string & album) const;
45
static const unsigned int MAX_SIZE = 200;
48
bool has_art(const std::string &artist, const std::string &album) const;
49
void add_art(const std::string &artist, const std::string &album,
50
char *data, unsigned int datalen);
51
std::string get_art_file(const std::string &artist, const std::string &album) const;
54
std::string get_cache_dir() const { return root_dir; }