summaryrefslogtreecommitdiff
path: root/media-sound/id3ted/files/id3ted-1.0-fix-build-taglib2.patch
blob: 46437c6d10e560775f3351d0d08899df43d206de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
no upstream PR as repo is archive
--- a/fileio.cpp
+++ b/fileio.cpp
@@ -60,11 +60,11 @@ bool FileIO::isRegular(const char *path) {
 
 
 bool FileIO::isReadable(const char *path) {
-	return TagLib::File::isReadable(path);
+	return !access(path, R_OK);
 }
 
 bool FileIO::isWritable(const char *path) {
-	return TagLib::File::isWritable(path);
+	return !access(path, W_OK);
 }
 
 string FileIO::sizeHumanReadable(unsigned long size) {
--- a/id3ted.h
+++ b/id3ted.h
@@ -30,7 +30,6 @@
 
 using namespace std;
 using namespace TagLib;
-using TagLib::uint;
 
 void warn(const char* fmt, ...);
 
--- a/mp3file.cpp
+++ b/mp3file.cpp
@@ -343,7 +343,7 @@ bool MP3File::save() {
 	if (tags & 2 && id3v2Tag != NULL && id3v2Tag->isEmpty())
 		strip(2);
 
-	return file.save(tags, false);
+	return file.save();
 }
 
 bool MP3File::strip(int tags) {
@@ -391,7 +391,7 @@ void MP3File::showInfo() const {
 			break;
 	}
 
-	int length = properties->length();
+	int length = properties->lengthInSeconds();
 	printf("MPEG %s Layer %d %s\n", version, properties->layer(), channelMode);
 	printf("bitrate: %d kBit/s, sample rate: %d Hz, length: %02d:%02d:%02d\n",
 			properties->bitrate(), properties->sampleRate(),