Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 59301 | Differences between
and this patch

Collapse All | Expand All

(-)kdemultimedia-3.2.92.orig/juk/tag.cpp (-8 / +15 lines)
Lines 25-35 Link Here
25
#include <taglib/xiphcomment.h>
25
#include <taglib/xiphcomment.h>
26
#include <taglib/id3v2framefactory.h>
26
#include <taglib/id3v2framefactory.h>
27
27
28
#if (TAGLIB_MAJOR_VERSION>1) ||  \
28
#if (TAGLIB_MAJOR_VERSION > 1) || \
29
   ((TAGLIB_MAJOR_VERSION==1) && (TAGLIB_MINOR_VERSION>=2))
29
      ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 2))
30
#include <taglib/mpcfile.h>
31
#include <taglib/oggflacfile.h>
30
#include <taglib/oggflacfile.h>
32
#define TAGLIB_12
31
#define TAGLIB_1_2
32
#endif
33
#if (TAGLIB_MAJOR_VERSION > 1) || \
34
    ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 3))
35
#include <taglib/mpcfile.h>
36
#define TAGLIB_1_3
33
#endif
37
#endif
34
38
35
#include "cache.h"
39
#include "cache.h"
Lines 61-75 Link Here
61
        if(file.isOpen())
65
        if(file.isOpen())
62
	    setup(&file);
66
	    setup(&file);
63
    }
67
    }
64
#ifdef TAGLIB_12
68
#ifdef TAGLIB_1_3
65
    else if(MediaFiles::isMPC(fileName)) {
69
    else if(MediaFiles::isMPC(fileName)) {
66
	kdDebug(65432) << "Trying to resolve Musepack file" << endl;
70
	kdDebug(65432) << "Trying to resolve Musepack file" << endl;
67
        TagLib::MPC::File file(QFile::encodeName(fileName).data());
71
        TagLib::MPC::File file(QFile::encodeName(fileName).data());
68
        if(file.isOpen())
72
        if(file.isOpen())
69
            setup(&file);
73
            setup(&file);
70
    }
74
    }
75
#endif
76
#ifdef TAGLIB_1_2
71
    else if(MediaFiles::isOggFLAC(fileName)) {
77
    else if(MediaFiles::isOggFLAC(fileName)) {
72
	kdDebug(65432) << "Trying to resolve Ogg/FLAC file" << endl;
73
        TagLib::Ogg::FLAC::File file(QFile::encodeName(fileName).data());
78
        TagLib::Ogg::FLAC::File file(QFile::encodeName(fileName).data());
74
        if(file.isOpen())
79
        if(file.isOpen())
75
            setup(&file);
80
            setup(&file);
Lines 98-106 Link Here
98
        file = new TagLib::MPEG::File(QFile::encodeName(m_fileName).data());
103
        file = new TagLib::MPEG::File(QFile::encodeName(m_fileName).data());
99
    else if(MediaFiles::isFLAC(m_fileName))
104
    else if(MediaFiles::isFLAC(m_fileName))
100
        file = new TagLib::FLAC::File(QFile::encodeName(m_fileName).data());
105
        file = new TagLib::FLAC::File(QFile::encodeName(m_fileName).data());
101
#ifdef TAGLIB_12
106
#ifdef TAGLIB_1_3
102
    else if(MediaFiles::isMPC(m_fileName))
107
    else if(MediaFiles::isMPC(m_fileName))
103
        file = new TagLib::MPC::File(QFile::encodeName(m_fileName).data());
108
        file = new TagLib::MPC::File(QFile::encodeName(m_fileName).data());
109
#endif
110
#ifdef TAGLIB_1_2
104
    else if(MediaFiles::isOggFLAC(m_fileName))
111
    else if(MediaFiles::isOggFLAC(m_fileName))
105
        file = new TagLib::Ogg::FLAC::File(QFile::encodeName(m_fileName).data());
112
        file = new TagLib::Ogg::FLAC::File(QFile::encodeName(m_fileName).data());
106
#endif
113
#endif
Lines 115-121 Link Here
115
        file->tag()->setComment(QStringToTString(m_comment));
122
        file->tag()->setComment(QStringToTString(m_comment));
116
        file->tag()->setTrack(m_track);
123
        file->tag()->setTrack(m_track);
117
        file->tag()->setYear(m_year);
124
        file->tag()->setYear(m_year);
118
#ifdef TAGLIB_12
125
#ifdef TAGLIB_1_2
119
        result = file->save();
126
        result = file->save();
120
#else
127
#else
121
        file->save();
128
        file->save();

Return to bug 59301