]>
Commit | Line | Data |
---|---|---|
d1cfe028 PS |
1 | --- amarok-1.3.6/amarok/src/ktrm.cpp.orig 2005-11-07 23:19:18.000000000 +0100 |
2 | +++ amarok-1.3.6/amarok/src/ktrm.cpp 2005-11-17 12:24:43.006638250 +0100 | |
3 | @@ -42,7 +42,7 @@ | |
4 | ||
5 | extern "C" | |
6 | { | |
7 | - static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum type, int fileId); | |
8 | + static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum type, int fileId, TPFileStatus); | |
9 | } | |
10 | ||
11 | /** | |
12 | @@ -66,7 +66,7 @@ | |
13 | int id; | |
14 | ||
15 | if(!m_fileMap.contains(lookup->file())) { | |
16 | - id = tp_AddFile(m_pimp, QFile::encodeName(lookup->file())); | |
17 | + id = tp_AddFile(m_pimp, QFile::encodeName(lookup->file()), 1); | |
18 | m_fileMap.insert(lookup->file(), id); | |
19 | } | |
20 | else { | |
21 | @@ -121,7 +121,7 @@ | |
22 | tp_SetAutoSaveThreshold(m_pimp, -1); | |
23 | tp_SetMoveFiles(m_pimp, false); | |
24 | tp_SetRenameFiles(m_pimp, false); | |
25 | - tp_SetUseUTF8(m_pimp, true); | |
26 | + tp_SetID3Encoding(m_pimp, eUTF8); | |
27 | tp_SetNotifyCallback(m_pimp, TRMNotifyCallback, 0); | |
28 | ||
29 | if(KProtocolManager::useProxy()) { | |
30 | @@ -245,7 +245,7 @@ | |
31 | * Callback fuction for TunePimp lookup events. | |
32 | */ | |
33 | ||
34 | -static void TRMNotifyCallback(tunepimp_t pimp, void *, TPCallbackEnum type, int fileId) | |
35 | +static void TRMNotifyCallback(tunepimp_t pimp, void *, TPCallbackEnum type, int fileId, TPFileStatus) | |
36 | { | |
37 | if(type != tpFileChanged) | |
38 | return; | |
39 | @@ -556,10 +556,10 @@ | |
40 | KTRMResult result; | |
41 | ||
42 | result.d->title = QString::fromUtf8(tracks[i]->name); | |
43 | - result.d->artist = QString::fromUtf8(tracks[i]->artist->name); | |
44 | - result.d->album = QString::fromUtf8(tracks[i]->album->name); | |
45 | + result.d->artist = QString::fromUtf8(tracks[i]->artist.name); | |
46 | + result.d->album = QString::fromUtf8(tracks[i]->album.name); | |
47 | result.d->track = tracks[i]->trackNum; | |
48 | - result.d->year = tracks[i]->album->releaseYear; | |
49 | + result.d->year = tracks[i]->album.releaseYear; | |
50 | result.d->relevance = | |
51 | 4 * stringSimilarity(strList,result.d->title) + | |
52 | 2 * stringSimilarity(strList,result.d->artist) + |