aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-14 11:10:49 +0200
committerMax Kellermann <max@duempel.org>2008-10-14 11:10:49 +0200
commit5b71d5f6f707a35a7b7a47b33ef2e1417ea6bcc6 (patch)
tree5fd2efeb95e3412ac177434611770ca864325c0e /src/song.c
parenta52a9fc1fc2b385dd66edd45f602ac337399cc83 (diff)
downloadmpd-5b71d5f6f707a35a7b7a47b33ef2e1417ea6bcc6.tar.gz
mpd-5b71d5f6f707a35a7b7a47b33ef2e1417ea6bcc6.tar.xz
mpd-5b71d5f6f707a35a7b7a47b33ef2e1417ea6bcc6.zip
mapper: new song-to-filesystem mapper library
The mapper library maps directory and song objects to file system paths. With this central library, the code mixture in path.c should be cleaned up, and we will be able to add neat features like aliasing.
Diffstat (limited to 'src/song.c')
-rw-r--r--src/song.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/song.c b/src/song.c
index 2de9e52c7..b4ab28cab 100644
--- a/src/song.c
+++ b/src/song.c
@@ -21,6 +21,7 @@
#include "directory.h"
#include "utils.h"
#include "log.h"
+#include "mapper.h"
#include "path.h"
#include "playlist.h"
#include "decoder_list.h"
@@ -95,14 +96,12 @@ song_file_update(struct song *song)
{
struct decoder_plugin *plugin;
unsigned int next = 0;
- char path_max_tmp[MPD_PATH_MAX];
char abs_path[MPD_PATH_MAX];
struct stat st;
assert(song_is_file(song));
- utf8_to_fs_charset(abs_path, song_get_url(song, path_max_tmp));
- rmp2amp_r(abs_path, abs_path);
+ map_song_fs(song, abs_path);
if (song->tag != NULL) {
tag_free(song->tag);