-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (27 loc) · 728 Bytes
/
main.cpp
File metadata and controls
35 lines (27 loc) · 728 Bytes
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
#include "mainwindow.h"
#include <QApplication>
#include <QTextCodec>
#include <vector>
#include <mpd/client.h>
#include <mpd/status.h>
#include <mpd/entity.h>
#include <mpd/search.h>
#include <mpd/tag.h>
#include "wrapper.h"
#include "song.h"
#include "songQueue.h"
int main(int argc, char *argv[])
{
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf8"));
QApplication a(argc, argv);
MainWindow w;
//MPD::Connection mpd;
MPD::mpdSongList v;
Mpd.Connect();
Mpd.GetDirectoryRecursive("", v);
for (MPD::mpdSongList::const_iterator it = v.begin(); it != v.end(); ++it) {
w.addPlaylistItem((*it)->GetArtist(), (*it)->GetTitle());
}
w.show();
return a.exec();
}