Add a SongLoaderInserter that loads a list of URLs and inserts them into a playlist when it's done. Wire up everything in the GUI that loads URLs or filenames to use the new SongLoader.

This commit is contained in:
David Sansome 2010-06-15 18:24:08 +00:00
parent 02d01b1314
commit f162d9d620
40 changed files with 528 additions and 223 deletions

View File

@ -71,6 +71,7 @@ set(SOURCES
playlist/playlisttabbar.cpp
playlist/playlistundocommands.cpp
playlist/playlistview.cpp
playlist/songloaderinserter.cpp
playlist/songplaylistitem.cpp
playlistparsers/asxparser.cpp
@ -176,6 +177,7 @@ set(HEADERS
playlist/playlistsequence.h
playlist/playlisttabbar.h
playlist/playlistview.h
playlist/songloaderinserter.h
playlist/songmimedata.h
playlistparsers/asxparser.h

View File

@ -8,7 +8,7 @@ class PlatformInterface {
public:
// Called when the application should show itself.
virtual void Activate() = 0;
virtual bool LoadUrl(const QString& url) = 0;
//virtual bool LoadUrl(const QString& url) = 0;
virtual ~PlatformInterface() {}
};

View File

@ -513,23 +513,8 @@ void Player::VolumeSet(int volume) {
}
int Player::AddTrack(const QString& track, bool play_now) {
QUrl url(track);
QList<QUrl> list;
list << url;
QModelIndex index;
if (url.scheme() == "file") {
index = playlists_->active()->InsertPaths(list, play_now ? playlists_->active()->current_index() + 1 : -1);
} else {
index = playlists_->active()->InsertStreamUrls(list, play_now ? playlists_->active()->current_index() + 1: -1);
}
if (index.isValid()) {
if (play_now) {
PlayAt(index.row(), Engine::First, true);
}
return 0; // Success.
}
return -1; // Anything else for failure.
playlists_->active()->InsertUrls(QList<QUrl>() << QUrl(track), play_now);
return 0;
}
void Player::DelTrack(int index) {

View File

@ -41,6 +41,13 @@ SongLoader::SongLoader(QObject *parent)
connect(timeout_timer_, SIGNAL(timeout()), SLOT(Timeout()));
}
SongLoader::~SongLoader() {
if (pipeline_) {
state_ = Finished;
gst_element_set_state(pipeline_.get(), GST_STATE_NULL);
}
}
SongLoader::Result SongLoader::Load(const QUrl& url, int timeout_msec) {
url_ = url;
@ -53,6 +60,8 @@ SongLoader::Result SongLoader::Load(const QUrl& url, int timeout_msec) {
}
SongLoader::Result SongLoader::LoadLocal() {
qDebug() << "Loading local file" << url_;
// First check to see if it's a directory - if so we can load all the songs
// inside right away.
QString filename = url_.toLocalFile();
@ -70,6 +79,8 @@ SongLoader::Result SongLoader::LoadLocal() {
ParserBase* parser = playlist_parser_->MaybeGetParserForMagic(data);
if (parser) {
qDebug() << "Parsing using" << parser->name();
// It's a playlist!
file.reset();
songs_ = parser->Load(&file, QFileInfo(filename).path());
@ -84,6 +95,17 @@ SongLoader::Result SongLoader::LoadLocal() {
return Success;
}
static bool CompareSongs(const Song& left, const Song& right) {
// Order by artist, album, disc, trac
if (left.artist() < right.artist()) return true;
if (left.artist() > right.artist()) return true;
if (left.album() < right.album()) return true;
if (left.album() > right.album()) return true;
if (left.disc() < right.disc()) return true;
if (left.disc() > right.disc()) return true;
return left.track() < right.track();
}
void SongLoader::LoadLocalDirectory(const QString& filename) {
QDirIterator it(filename, QDir::Files | QDir::NoDotAndDotDot | QDir::Readable,
QDirIterator::Subdirectories);
@ -96,10 +118,14 @@ void SongLoader::LoadLocalDirectory(const QString& filename) {
songs_ << song;
}
qStableSort(songs_.begin(), songs_.end(), CompareSongs);
emit LoadFinished(true);
}
SongLoader::Result SongLoader::LoadRemote() {
qDebug() << "Loading remote file" << url_;
// It's not a local file so we have to fetch it to see what it is. We use
// gstreamer to do this since it handles funky URLs for us (http://, ssh://,
// etc) and also has typefinder plugins.
@ -154,6 +180,7 @@ void SongLoader::TypeFound(GstElement*, uint, GstCaps* caps, void* self) {
// Check the mimetype
instance->mime_type_ = gst_structure_get_name(gst_caps_get_structure(caps, 0));
qDebug() << "Mime type is" << instance->mime_type_;
if (instance->mime_type_ == "text/plain" ||
instance->mime_type_ == "text/uri-list") {
// Yeah it might be a playlist, let's get some data and have a better look
@ -174,6 +201,7 @@ void SongLoader::DataReady(GstPad *, GstBuffer *buf, void *self) {
// Append the data to the buffer
instance->buffer_.append(reinterpret_cast<const char*>(GST_BUFFER_DATA(buf)),
GST_BUFFER_SIZE(buf));
qDebug() << "Received total" << instance->buffer_.size() << "bytes";
if (instance->state_ == WaitingForMagic &&
instance->buffer_.size() >= PlaylistParser::kMagicSize) {
@ -260,6 +288,7 @@ void SongLoader::MagicReady() {
parser_ = playlist_parser_->MaybeGetParserForMagic(buffer_, mime_type_);
if (!parser_) {
qWarning() << url_.toString() << "is text, but not a recognised playlist";
// It doesn't look like a playlist, so just finish
StopTypefindAsync(false);
return;
@ -267,6 +296,7 @@ void SongLoader::MagicReady() {
// It is a playlist - we'll get more data and parse the whole thing in
// EndOfStreamReached
qDebug() << "Magic says" << parser_->name();
state_ = WaitingForData;
}
@ -286,11 +316,15 @@ void SongLoader::StopTypefind() {
timeout_timer_->stop();
if (success_ && parser_) {
qDebug() << "Parsing" << url_ << "with" << parser_->name();
// Parse the playlist
QBuffer buf(&buffer_);
buf.open(QIODevice::ReadOnly);
songs_ = parser_->Load(&buf);
} else if (success_) {
qDebug() << "Loading" << url_ << "as raw stream";
// It wasn't a playlist - just put the URL in as a stream
Song song;
song.set_valid(true);

View File

@ -32,6 +32,7 @@ class SongLoader : public QObject {
Q_OBJECT
public:
SongLoader(QObject* parent = 0);
~SongLoader();
enum Result {
Success,

View File

@ -18,6 +18,7 @@
#include "playlistbackend.h"
#include "playlistfilter.h"
#include "playlistundocommands.h"
#include "songloaderinserter.h"
#include "songmimedata.h"
#include "songplaylistitem.h"
#include "library/library.h"
@ -470,12 +471,22 @@ bool Playlist::dropMimeData(const QMimeData* data, Qt::DropAction action, int ro
undo_stack_->push(new PlaylistUndoCommands::MoveItems(this, source_rows, row));
} else if (data->hasUrls()) {
// URL list dragged from the file list or some other app
InsertPaths(data->urls(), row);
InsertUrls(data->urls(), false, row);
}
return true;
}
void Playlist::InsertUrls(const QList<QUrl> &urls, bool play_now, int pos) {
SongLoaderInserter* inserter = new SongLoaderInserter(this);
connect(inserter, SIGNAL(AsyncLoadStarted()), SIGNAL(LoadTracksStarted()));
connect(inserter, SIGNAL(AsyncLoadFinished()), SIGNAL(LoadTracksFinished()));
connect(inserter, SIGNAL(Error(QString)), SIGNAL(LoadTracksError(QString)));
connect(inserter, SIGNAL(PlayRequested(QModelIndex)), SIGNAL(PlayRequested(QModelIndex)));
inserter->Load(this, pos, play_now, urls);
}
void Playlist::MoveItemsWithoutUndo(const QList<int> &source_rows, int pos) {
layoutAboutToBeChanged();
PlaylistItemList moved_items;
@ -564,45 +575,6 @@ void Playlist::MoveItemsWithoutUndo(int start, const QList<int>& dest_rows) {
Save();
}
QModelIndex Playlist::InsertPaths(QList<QUrl> urls, int pos) {
SongList songs;
for (int i=0 ; i<urls.count() ; ++i) {
QUrl url(urls[i]);
if (url.scheme() != "file")
continue;
QString filename(url.toLocalFile());
QFileInfo info(filename);
if (!info.exists())
continue;
if (info.isDir()) {
// Add all the songs in the directory
QDirIterator it(filename,
QDir::Files | QDir::NoDotAndDotDot | QDir::Readable,
QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
QList<QUrl> new_urls;
while (it.hasNext()) {
QString path(it.next());
new_urls << QUrl::fromLocalFile(path);
}
qSort(new_urls);
urls << new_urls;
} else {
Song song;
song.InitFromFile(filename, -1);
if (!song.is_valid())
continue;
songs << song;
}
}
return InsertSongs(songs, pos);
}
QModelIndex Playlist::InsertItems(const PlaylistItemList& items, int pos) {
if (items.isEmpty())
return QModelIndex();
@ -677,15 +649,6 @@ QModelIndex Playlist::InsertRadioStations(const QList<RadioItem*>& items, int po
return InsertItems(playlist_items, pos);
}
QModelIndex Playlist::InsertStreamUrls(const QList<QUrl>& urls, int pos) {
PlaylistItemList playlist_items;
foreach (const QUrl& url, urls) {
playlist_items << shared_ptr<PlaylistItem>(new RadioPlaylistItem(
RadioModel::ServiceByName(SavedRadio::kServiceName), url.toString(), url.toString(), QString()));
}
return InsertItems(playlist_items, pos);
}
QMimeData* Playlist::mimeData(const QModelIndexList& indexes) const {
QMimeData* data = new QMimeData;

View File

@ -131,8 +131,7 @@ class Playlist : public QAbstractListModel {
QModelIndex InsertMagnatuneItems(const SongList& items, int pos = -1);
QModelIndex InsertSongs(const SongList& items, int pos = -1);
QModelIndex InsertRadioStations(const QList<RadioItem*>& items, int pos = -1);
QModelIndex InsertStreamUrls(const QList<QUrl>& urls, int pos = -1);
QModelIndex InsertPaths(QList<QUrl> urls, int pos = -1);
void InsertUrls(const QList<QUrl>& urls, bool play_now, int pos = -1);
void StopAfter(int row);
void ReloadItems(const QList<int>& rows);
@ -169,9 +168,14 @@ class Playlist : public QAbstractListModel {
signals:
void CurrentSongChanged(const Song& metadata);
void EditingFinished(const QModelIndex& index);
void PlayRequested(const QModelIndex& index);
void PlaylistChanged();
void LoadTracksStarted();
void LoadTracksFinished();
void LoadTracksError(const QString& message);
private:
void SetCurrentIsPaused(bool paused);
void UpdateScrobblePoint();

View File

@ -64,6 +64,10 @@ Playlist* PlaylistManager::AddPlaylist(int id, const QString& name) {
connect(ret, SIGNAL(PlaylistChanged()), SIGNAL(PlaylistChanged()));
connect(ret, SIGNAL(PlaylistChanged()), SLOT(UpdateSummaryText()));
connect(ret, SIGNAL(EditingFinished(QModelIndex)), SIGNAL(EditingFinished(QModelIndex)));
connect(ret, SIGNAL(LoadTracksStarted()), SIGNAL(LoadTracksStarted()));
connect(ret, SIGNAL(LoadTracksFinished()), SIGNAL(LoadTracksFinished()));
connect(ret, SIGNAL(LoadTracksError(QString)), SIGNAL(Error(QString)));
connect(ret, SIGNAL(PlayRequested(QModelIndex)), SIGNAL(PlayRequested(QModelIndex)));
playlists_[id] = Data(ret, name);

View File

@ -92,6 +92,9 @@ signals:
void CurrentSongChanged(const Song& song);
void PlaylistChanged();
void EditingFinished(const QModelIndex& index);
void PlayRequested(const QModelIndex& index);
void LoadTracksStarted();
void LoadTracksFinished();
private slots:
void UpdateSummaryText();

View File

@ -0,0 +1,87 @@
/* This file is part of Clementine.
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Clementine is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#include "playlist.h"
#include "songloaderinserter.h"
#include "core/songloader.h"
SongLoaderInserter::SongLoaderInserter(QObject *parent)
: QObject(parent),
destination_(NULL),
row_(-1),
play_now_(true)
{
}
SongLoaderInserter::~SongLoaderInserter() {
qDeleteAll(pending_);
}
void SongLoaderInserter::Load(Playlist *destination, int row, bool play_now,
const QList<QUrl> &urls) {
destination_ = destination;
row_ = row;
play_now_ = play_now;
foreach (const QUrl& url, urls) {
SongLoader* loader = new SongLoader(this);
SongLoader::Result ret = loader->Load(url);
if (ret == SongLoader::WillLoadAsync) {
pending_.insert(loader);
connect(loader, SIGNAL(LoadFinished(bool)), SLOT(PendingLoadFinished(bool)));
continue;
}
if (ret == SongLoader::Success)
songs_ << loader->songs();
else
emit Error(tr("Error loading %1").arg(url.toString()));
delete loader;
}
if (pending_.isEmpty())
Finished();
else
emit AsyncLoadStarted();
}
void SongLoaderInserter::PendingLoadFinished(bool success) {
SongLoader* loader = qobject_cast<SongLoader*>(sender());
if (!loader || !pending_.contains(loader))
return;
pending_.remove(loader);
if (success)
songs_ << loader->songs();
else
emit Error(tr("Error loading %1").arg(loader->url().toString()));
loader->deleteLater();
if (pending_.isEmpty()) {
emit AsyncLoadFinished();
Finished();
}
}
void SongLoaderInserter::Finished() {
QModelIndex index = destination_->InsertSongs(songs_, row_);
if (play_now_)
emit PlayRequested(index);
deleteLater();
}

View File

@ -0,0 +1,61 @@
/* This file is part of Clementine.
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Clementine is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SONGLOADERINSERTER_H
#define SONGLOADERINSERTER_H
#include <QObject>
#include <QSet>
#include <QUrl>
#include "core/song.h"
class Playlist;
class SongLoader;
class QModelIndex;
class SongLoaderInserter : public QObject {
Q_OBJECT
public:
SongLoaderInserter(QObject* parent = 0);
~SongLoaderInserter();
void Load(Playlist* destination, int row, bool play_now, const QList<QUrl>& urls);
signals:
void Error(const QString& message);
void AsyncLoadStarted();
void AsyncLoadFinished();
void PlayRequested(const QModelIndex& index);
private slots:
void PendingLoadFinished(bool success);
private:
void Finished();
private:
Playlist* destination_;
int row_;
bool play_now_;
SongList songs_;
QSet<SongLoader*> pending_;
};
#endif // SONGLOADERINSERTER_H

View File

@ -347,6 +347,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -731,10 +735,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -793,6 +794,9 @@ msgstr ""
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr ""

View File

@ -348,6 +348,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -733,10 +737,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -795,6 +796,9 @@ msgstr "Načítám rádio Last.fm"
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "disk %1"

View File

@ -350,6 +350,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -736,10 +740,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -798,6 +799,9 @@ msgstr "Indlæser Last.fm-radio"
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "disk %1"

View File

@ -348,6 +348,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr "%1 Wiedergabelisten (%2)"
@ -735,11 +739,8 @@ msgstr "Tastenkürzel für %1"
msgid "The \"%1\" command could not be started."
msgstr "Der \"%1\" Befehl konnte nicht genutzt werden"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr "Musik (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgid "Playlists (*.m3u *.xspf *.xml)"
msgstr "Wiedergabelisten (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
msgstr "Alle Dateien (*)"
@ -797,6 +798,9 @@ msgstr "Last.fm Radio wird geladen"
msgid "Downloading Magnatune catalogue"
msgstr "Magnatune Katalog wird geladen"
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "CD %1"
@ -1473,6 +1477,12 @@ msgstr ""
msgid "Delay between visualisations"
msgstr ""
#~ msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgstr "Musik (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgid "Playlists (*.m3u *.xspf *.xml)"
#~ msgstr "Wiedergabelisten (*.m3u *.xspf *.xml)"
#~ msgid "Choose manual cover..."
#~ msgstr "Cover selbst auswählen..."

View File

@ -351,6 +351,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr "%1 λίστες αναπαραγωγής (%2)"
@ -738,11 +742,8 @@ msgstr "Συντόμευση για %1"
msgid "The \"%1\" command could not be started."
msgstr "Η εντολή \"%1\" δεν μπόρεσε να ξεκινήσει"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr "Μουσική (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgid "Playlists (*.m3u *.xspf *.xml)"
msgstr "Λίστα αναπαραγωγής (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
msgstr "Όλα τα αρχεία (*)"
@ -800,6 +801,9 @@ msgstr "Φόρτωμα Last.fm"
msgid "Downloading Magnatune catalogue"
msgstr "Μεταφόρτωση καταλόγου του Magnatune"
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "δίσκος %1"
@ -1475,6 +1479,12 @@ msgstr ""
msgid "Delay between visualisations"
msgstr ""
#~ msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgstr "Μουσική (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgid "Playlists (*.m3u *.xspf *.xml)"
#~ msgstr "Λίστα αναπαραγωγής (*.m3u *.xspf *.xml)"
#~ msgid "Choose manual cover..."
#~ msgstr "Επιλογή εξώφυλλου χειροκίνητα..."

View File

@ -348,6 +348,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr "%1 playlists (%2)"
@ -735,11 +739,8 @@ msgstr "Shortcut for %1"
msgid "The \"%1\" command could not be started."
msgstr "The \"%1\" command could not be started."
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgid "Playlists (*.m3u *.xspf *.xml)"
msgstr "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
msgstr "All Files (*)"
@ -797,6 +798,9 @@ msgstr "Loading Last.fm radio"
msgid "Downloading Magnatune catalogue"
msgstr "Downloading Magnatune catalogue"
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "disc %1"
@ -1470,6 +1474,12 @@ msgstr ""
msgid "Delay between visualisations"
msgstr ""
#~ msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgstr "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgid "Playlists (*.m3u *.xspf *.xml)"
#~ msgstr "Playlists (*.m3u *.xspf *.xml)"
#~ msgid "Choose manual cover..."
#~ msgstr "Choose manual cover..."

View File

@ -347,6 +347,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -732,10 +736,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -794,6 +795,9 @@ msgstr "Loading Last.fm radio"
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "disc %1"

View File

@ -350,6 +350,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr "%1 listas de reproducción (%2)"
@ -738,11 +742,8 @@ msgstr "Combinación de teclas para %1"
msgid "The \"%1\" command could not be started."
msgstr "El comando \"%1\" no pudo ser iniciado."
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr "Música (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgid "Playlists (*.m3u *.xspf *.xml)"
msgstr "Listas de reproducción (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
msgstr "Todos los Archivos"
@ -800,6 +801,9 @@ msgstr "Cargando radio de Last.fm"
msgid "Downloading Magnatune catalogue"
msgstr "Descargando el catálogo de Magnatune"
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "Disco %1"
@ -1481,6 +1485,12 @@ msgstr ""
msgid "Delay between visualisations"
msgstr ""
#~ msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgstr "Música (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgid "Playlists (*.m3u *.xspf *.xml)"
#~ msgstr "Listas de reproducción (*.m3u *.xspf *.xml)"
#~ msgid "Choose manual cover..."
#~ msgstr "Establecer carátula personalizada..."

View File

@ -347,6 +347,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -731,10 +735,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -793,6 +794,9 @@ msgstr ""
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr ""

View File

@ -348,6 +348,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -735,10 +739,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -797,6 +798,9 @@ msgstr "Chargement de la radio Last.fm"
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "CD %1"

View File

@ -347,6 +347,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -733,10 +737,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -795,6 +796,9 @@ msgstr "Carregando a rádio da Last.fm"
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "disco %1"

View File

@ -350,6 +350,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr "%1 scalette (%2)"
@ -738,11 +742,8 @@ msgstr "Scorciatoia per %1"
msgid "The \"%1\" command could not be started."
msgstr "Il comando \"%1\" non può essere avviato."
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr "Musica (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgid "Playlists (*.m3u *.xspf *.xml)"
msgstr "Scalette (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
msgstr "Tutti i file (*)"
@ -800,6 +801,9 @@ msgstr "Caricamento radio Last.fm"
msgid "Downloading Magnatune catalogue"
msgstr "Scaricamento catalogo Magnatune"
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "disco %1"
@ -1478,6 +1482,12 @@ msgstr ""
msgid "Delay between visualisations"
msgstr ""
#~ msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgstr "Musica (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgid "Playlists (*.m3u *.xspf *.xml)"
#~ msgstr "Scalette (*.m3u *.xspf *.xml)"
#~ msgid "Choose manual cover..."
#~ msgstr "Scelta manuale copertina..."

View File

@ -347,6 +347,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -733,10 +737,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -795,6 +796,9 @@ msgstr ""
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr ""

View File

@ -347,6 +347,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -733,10 +737,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -795,6 +796,9 @@ msgstr "Laster inn Last.fm radio"
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "disk %1"

View File

@ -347,6 +347,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -731,10 +735,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -793,6 +794,9 @@ msgstr "Cargament de la ràdio Last.fm"
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "CD %1"

View File

@ -348,6 +348,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -733,10 +737,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -795,6 +796,9 @@ msgstr "Ładowanie radia Last.fm"
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "dysk %1"

View File

@ -349,6 +349,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr "%1 listas de reprodução (%2)"
@ -736,11 +740,8 @@ msgstr "Atalho para %1"
msgid "The \"%1\" command could not be started."
msgstr "O comando \"%1\" não pode ser iniciado."
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr "Música (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgid "Playlists (*.m3u *.xspf *.xml)"
msgstr "Listas (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
msgstr "Todos os Ficheiros (*)"
@ -798,6 +799,9 @@ msgstr "Carregando a rádio Last.fm"
msgid "Downloading Magnatune catalogue"
msgstr "Transferindi Catálogo Magnatune"
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "disco %1"
@ -1472,6 +1476,12 @@ msgstr ""
msgid "Delay between visualisations"
msgstr ""
#~ msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgstr "Música (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgid "Playlists (*.m3u *.xspf *.xml)"
#~ msgstr "Listas (*.m3u *.xspf *.xml)"
#~ msgid "Choose manual cover..."
#~ msgstr "Escolher uma capa manualmente..."

View File

@ -349,6 +349,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr "%1 listas de reprodução (%2)"
@ -738,11 +742,8 @@ msgstr "Atalho para %1"
msgid "The \"%1\" command could not be started."
msgstr "O comando \"%1\" não pôde ser iniciado."
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr "Música (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgid "Playlists (*.m3u *.xspf *.xml)"
msgstr "Listas de reprodução (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
msgstr "Todos os Arquivos (*)"
@ -800,6 +801,9 @@ msgstr "Carregando rádio Last.fm"
msgid "Downloading Magnatune catalogue"
msgstr "Baixando catálogo da Magnatune"
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "disco %1"
@ -1475,6 +1479,12 @@ msgstr ""
msgid "Delay between visualisations"
msgstr ""
#~ msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgstr "Música (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgid "Playlists (*.m3u *.xspf *.xml)"
#~ msgstr "Listas de reprodução (*.m3u *.xspf *.xml)"
#~ msgid "Choose manual cover..."
#~ msgstr "Escolher capa manualmente"

View File

@ -347,6 +347,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -732,10 +736,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -794,6 +795,9 @@ msgstr "Se încarcă radio Last.fm"
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "disc %1"

View File

@ -348,6 +348,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr "%1 списков воспроизведения (%2)"
@ -736,11 +740,8 @@ msgstr "Ярлык для %1"
msgid "The \"%1\" command could not be started."
msgstr "Команда \"%1\" не может быть выполнена"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr "Композиции (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgid "Playlists (*.m3u *.xspf *.xml)"
msgstr "Плейлисты (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
msgstr "Все файлы (*)"
@ -798,6 +799,9 @@ msgstr "Загрузка радио Last.fm"
msgid "Downloading Magnatune catalogue"
msgstr "Скачать каталог Magnatune"
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "диск %1"
@ -1472,6 +1476,12 @@ msgstr ""
msgid "Delay between visualisations"
msgstr ""
#~ msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgstr "Композиции (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgid "Playlists (*.m3u *.xspf *.xml)"
#~ msgstr "Плейлисты (*.m3u *.xspf *.xml)"
#~ msgid "Choose manual cover..."
#~ msgstr "Укажите обложку вручную..."

View File

@ -349,6 +349,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr "%1 playlisty (%2)"
@ -736,11 +740,8 @@ msgstr "Skratka pre %1"
msgid "The \"%1\" command could not be started."
msgstr "Príkaz \"%1\" nemohol začať."
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr "Hudba (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgid "Playlists (*.m3u *.xspf *.xml)"
msgstr "Playlisty (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
msgstr "Všetky súbory (*)"
@ -798,6 +799,9 @@ msgstr "Načítava sa Last.fm rádio"
msgid "Downloading Magnatune catalogue"
msgstr "Stiahnuť Magnatune katalóg"
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "disk %1"
@ -1472,6 +1476,12 @@ msgstr ""
msgid "Delay between visualisations"
msgstr ""
#~ msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgstr "Hudba (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgid "Playlists (*.m3u *.xspf *.xml)"
#~ msgstr "Playlisty (*.m3u *.xspf *.xml)"
#~ msgid "Choose manual cover..."
#~ msgstr "Vybrať obal ručne..."

View File

@ -347,6 +347,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -734,11 +738,8 @@ msgstr "Genväg för %1"
msgid "The \"%1\" command could not be started."
msgstr "Kommandot \"%1\" kunde inte starta"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr "Musik (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgid "Playlists (*.m3u *.xspf *.xml)"
msgstr "Spellistor (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
msgstr "Alla filer (*)"
@ -796,6 +797,9 @@ msgstr "Laddar Last.fm radio"
msgid "Downloading Magnatune catalogue"
msgstr "Hämtar katalog från Magnatune"
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr "skiva %1"
@ -1472,6 +1476,12 @@ msgstr ""
msgid "Delay between visualisations"
msgstr ""
#~ msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgstr "Musik (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgid "Playlists (*.m3u *.xspf *.xml)"
#~ msgstr "Spellistor (*.m3u *.xspf *.xml)"
#~ msgid "Choose manual cover..."
#~ msgstr "Välj manuellt omslag..."

View File

@ -347,6 +347,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -731,10 +735,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr "Müzik (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -793,6 +794,9 @@ msgstr ""
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr ""
@ -1465,5 +1469,8 @@ msgstr ""
msgid "Delay between visualisations"
msgstr ""
#~ msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgstr "Müzik (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
#~ msgid "Options"
#~ msgstr "Seçenekler"

View File

@ -347,6 +347,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -731,10 +735,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -793,6 +794,9 @@ msgstr ""
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr ""

View File

@ -347,6 +347,10 @@ msgstr ""
msgid "kbps"
msgstr ""
#, qt-format
msgid "Error loading %1"
msgstr ""
#, qt-format
msgid "%1 playlists (%2)"
msgstr ""
@ -731,10 +735,7 @@ msgstr ""
msgid "The \"%1\" command could not be started."
msgstr ""
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)"
msgstr ""
msgid "Playlists (*.m3u *.xspf *.xml)"
msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)"
msgstr ""
msgid "All Files (*)"
@ -793,6 +794,9 @@ msgstr ""
msgid "Downloading Magnatune catalogue"
msgstr ""
msgid "Loading tracks"
msgstr ""
#, qt-format
msgid "disc %1"
msgstr ""

View File

@ -22,6 +22,7 @@
#include "core/mac_startup.h"
#include "core/mergedproxymodel.h"
#include "core/player.h"
#include "core/songloader.h"
#include "core/stylesheetloader.h"
#include "engines/enginebase.h"
#include "library/groupbydialog.h"
@ -32,6 +33,7 @@
#include "playlist/playlistmanager.h"
#include "playlist/playlistsequence.h"
#include "playlist/playlistview.h"
#include "playlist/songloaderinserter.h"
#include "playlist/songplaylistitem.h"
#include "playlistparsers/playlistparser.h"
#include "radio/lastfmservice.h"
@ -89,9 +91,7 @@ void qt_mac_set_dock_menu(QMenu*);
const char* MainWindow::kSettingsGroup = "MainWindow";
const char* MainWindow::kMusicFilterSpec =
QT_TR_NOOP("Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)");
const char* MainWindow::kPlaylistFilterSpec =
QT_TR_NOOP("Playlists (*.m3u *.xspf *.xml)");
QT_TR_NOOP("Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma *.mp4 *.spx *.wav)");
const char* MainWindow::kAllFilesFilterSpec =
QT_TR_NOOP("All Files (*)");
@ -315,6 +315,9 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
connect(playlists_, SIGNAL(EditingFinished(QModelIndex)), SLOT(PlaylistEditFinished(QModelIndex)));
connect(playlists_, SIGNAL(Error(QString)), error_dialog_.get(), SLOT(ShowMessage(QString)));
connect(playlists_, SIGNAL(SummaryTextChanged(QString)), playlist_summary_, SLOT(setText(QString)));
connect(playlists_, SIGNAL(LoadTracksStarted()), SLOT(LoadTracksStarted()));
connect(playlists_, SIGNAL(LoadTracksFinished()), SLOT(LoadTracksFinished()));
connect(playlists_, SIGNAL(PlayRequested(QModelIndex)), SLOT(PlayIndex(QModelIndex)));
connect(ui_->playlist->view(), SIGNAL(doubleClicked(QModelIndex)), SLOT(PlayIndex(QModelIndex)));
connect(ui_->playlist->view(), SIGNAL(PlayPauseItem(QModelIndex)), SLOT(PlayIndex(QModelIndex)));
@ -546,12 +549,25 @@ void MainWindow::AddFilesToPlaylist(bool clear_first, const QList<QUrl>& urls) {
if (clear_first)
playlists_->ClearCurrent();
QModelIndex playlist_index = playlists_->current()->InsertPaths(urls);
AddUrls(player_->GetState() != Engine::Playing, urls);
}
if (playlist_index.isValid() && player_->GetState() != Engine::Playing) {
playlists_->SetActiveToCurrent();
player_->PlayAt(playlist_index.row(), Engine::First, true);
}
void MainWindow::AddUrls(bool play_now, const QList<QUrl> &urls) {
SongLoaderInserter* inserter = new SongLoaderInserter(this);
connect(inserter, SIGNAL(AsyncLoadStarted()), SLOT(LoadTracksStarted()));
connect(inserter, SIGNAL(AsyncLoadFinished()), SLOT(LoadTracksFinished()));
connect(inserter, SIGNAL(Error(QString)), error_dialog_.get(), SLOT(ShowMessage(QString)));
connect(inserter, SIGNAL(PlayRequested(QModelIndex)), SLOT(PlayIndex(QModelIndex)));
inserter->Load(playlists_->current(), -1, play_now, urls);
}
void MainWindow::LoadTracksStarted() {
multi_loading_indicator_->TaskStarted(MultiLoadingIndicator::LoadingTracks);
}
void MainWindow::LoadTracksFinished() {
multi_loading_indicator_->TaskFinished(MultiLoadingIndicator::LoadingTracks);
}
void MainWindow::AddLibrarySongsToPlaylist(const SongList &songs) {
@ -1029,10 +1045,12 @@ void MainWindow::AddFile() {
// Last used directory
QString directory = settings_.value("add_media_path", QDir::currentPath()).toString();
PlaylistParser parser;
// Show dialog
QStringList file_names = QFileDialog::getOpenFileNames(
this, tr("Add media"), directory,
QString("%1;;%2;;%3").arg(tr(kMusicFilterSpec), tr(kPlaylistFilterSpec),
QString("%1;;%2;;%3").arg(tr(kMusicFilterSpec), parser.filters(),
tr(kAllFilesFilterSpec)));
if (file_names.isEmpty())
return;
@ -1040,20 +1058,12 @@ void MainWindow::AddFile() {
// Save last used directory
settings_.setValue("add_media_path", file_names[0]);
// Add media
/*QList<QUrl> urls;
// Convert to URLs
QList<QUrl> urls;
foreach (const QString& path, file_names) {
if (playlist_parser_->can_load(path)) {
playlists_->current()->InsertSongs(playlist_parser_->Load(path));
} else {
QUrl url(QUrl::fromLocalFile(path));
if (url.scheme().isEmpty())
url.setScheme("file");
urls << url;
}
urls << QUrl::fromLocalFile(path);
}
playlists_->current()->InsertPaths(urls);*/
// TODO: Fix
AddUrls(player_->GetState() != Engine::Playing, urls);
}
void MainWindow::AddFolder() {
@ -1069,10 +1079,8 @@ void MainWindow::AddFolder() {
settings_.setValue("add_folder_path", directory);
// Add media
QUrl url(QUrl::fromLocalFile(directory));
if (url.scheme().isEmpty())
url.setScheme("file");
playlists_->current()->InsertPaths(QList<QUrl>() << url);
AddUrls(player_->GetState() != Engine::Playing,
QList<QUrl>() << QUrl::fromLocalFile(directory));
}
void MainWindow::AddStream() {
@ -1080,10 +1088,8 @@ void MainWindow::AddStream() {
}
void MainWindow::AddStreamAccepted() {
QList<QUrl> urls;
urls << add_stream_dialog_->url();
playlists_->current()->InsertStreamUrls(urls);
AddUrls(player_->GetState() != Engine::Playing,
QList<QUrl>() << add_stream_dialog_->url());
}
void MainWindow::PlaylistRemoveCurrent() {
@ -1145,7 +1151,7 @@ void MainWindow::CommandlineOptionsReceived(const CommandlineOptions &options) {
// fallthrough
case CommandlineOptions::UrlList_Append:
playlists_->current()->InsertPaths(options.urls(), -1);
AddUrls(player_->GetState() != Engine::Playing, options.urls());
break;
}
@ -1176,18 +1182,6 @@ void MainWindow::Activate() {
show();
}
bool MainWindow::LoadUrl(const QString& path) {
// Currently this is only local files.
QFileInfo info(path);
if (info.exists()) {
QList<QUrl> urls;
urls << QUrl::fromLocalFile(path);
AddFilesToPlaylist(urls);
return true;
}
return false;
}
void MainWindow::CheckForUpdates() {
#ifdef Q_OS_DARWIN
mac::CheckForUpdates();

View File

@ -71,7 +71,6 @@ class MainWindow : public QMainWindow, public PlatformInterface {
static const char* kSettingsGroup;
static const char* kMusicFilterSpec;
static const char* kPlaylistFilterSpec;
static const char* kAllFilesFilterSpec;
// Don't change the values
@ -89,7 +88,6 @@ class MainWindow : public QMainWindow, public PlatformInterface {
void closeEvent(QCloseEvent* event);
void Activate();
bool LoadUrl(const QString& url);
private slots:
void FilePathChanged(const QString& path);
@ -140,6 +138,9 @@ class MainWindow : public QMainWindow, public PlatformInterface {
void LibraryScanStarted();
void LibraryScanFinished();
void LoadTracksStarted();
void LoadTracksFinished();
void ShowLibraryConfig();
void ReloadSettings();
@ -157,6 +158,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
void AddFilesToPlaylist(bool clear_first, const QList<QUrl>& urls);
void AddLibraryItemToPlaylist(bool clear_first, const QModelIndexList& indexes);
void AddLibrarySongsToPlaylist(bool clear_first, const SongList& songs);
void AddUrls(bool play_now, const QList<QUrl>& urls);
private:
Ui_MainWindow* ui_;

View File

@ -70,6 +70,7 @@ QString MultiLoadingIndicator::TaskTypeToString(TaskType type) {
case LoadingStream: return tr("Loading stream");
case LoadingLastFM: return tr("Loading Last.fm radio");
case LoadingMagnatune: return tr("Downloading Magnatune catalogue");
case LoadingTracks: return tr("Loading tracks");
default: return QString::null;
}

View File

@ -35,6 +35,7 @@ class MultiLoadingIndicator : public QWidget {
LoadingStream,
LoadingLastFM,
LoadingMagnatune,
LoadingTracks,
};
public slots: