aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-07-12 18:53:08 +0200
committerMax Kellermann <max@duempel.org>2014-07-12 18:54:20 +0200
commit5ca6e2910ae0a8a2d1fa7b16f56130d533251ff9 (patch)
treeae1ec5b9077c273029e1959a163eeba32ba4c1e8
parent071d05465a109afa0781ce829bec3ff5ed3150e9 (diff)
downloadmpd-5ca6e2910ae0a8a2d1fa7b16f56130d533251ff9.tar.gz
mpd-5ca6e2910ae0a8a2d1fa7b16f56130d533251ff9.tar.xz
mpd-5ca6e2910ae0a8a2d1fa7b16f56130d533251ff9.zip
PlaylistSong, CueParser: don't override Tag::time
Now that Song::GetDuration() is used (which considers start_ms and end_ms), we don't need to override the Tag's duration value.
-rw-r--r--src/playlist/PlaylistSong.cxx9
-rw-r--r--src/playlist/cue/CueParser.cxx2
2 files changed, 0 insertions, 11 deletions
diff --git a/src/playlist/PlaylistSong.cxx b/src/playlist/PlaylistSong.cxx
index 3e3b40949..d5adbdc14 100644
--- a/src/playlist/PlaylistSong.cxx
+++ b/src/playlist/PlaylistSong.cxx
@@ -50,15 +50,6 @@ apply_song_metadata(DetachedSong &dest, const DetachedSong &src)
return;
merge_song_metadata(dest, src);
-
- if (dest.GetTag().IsDefined() && dest.GetTag().time > 0 &&
- src.GetStartMS() > 0 && src.GetEndMS() == 0 &&
- src.GetStartMS() / 1000 < (unsigned)dest.GetTag().time)
- /* the range is open-ended, and the playlist plugin
- did not know the total length of the song file
- (e.g. last track on a CUE file); fix it up here */
- dest.WritableTag().time =
- dest.GetTag().time - src.GetStartMS() / 1000;
}
static bool
diff --git a/src/playlist/cue/CueParser.cxx b/src/playlist/cue/CueParser.cxx
index dc96218f4..fd467dbc0 100644
--- a/src/playlist/cue/CueParser.cxx
+++ b/src/playlist/cue/CueParser.cxx
@@ -270,8 +270,6 @@ CueParser::Feed2(char *p)
previous->GetStartMS() < (unsigned)position_ms) {
last_updated = true;
previous->SetEndMS(position_ms);
- previous->WritableTag().time =
- (previous->GetEndMS() - previous->GetStartMS() + 500) / 1000;
}
current->SetStartMS(position_ms);