diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e104d9726..a9dcd028b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 diff --git a/src/core/mac_startup.h b/src/core/mac_startup.h index 5a99646f9..d9c731d52 100644 --- a/src/core/mac_startup.h +++ b/src/core/mac_startup.h @@ -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() {} }; diff --git a/src/core/player.cpp b/src/core/player.cpp index ece6fd7a0..52cfa57eb 100644 --- a/src/core/player.cpp +++ b/src/core/player.cpp @@ -513,23 +513,8 @@ void Player::VolumeSet(int volume) { } int Player::AddTrack(const QString& track, bool play_now) { - QUrl url(track); - QList 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(track), play_now); + return 0; } void Player::DelTrack(int index) { diff --git a/src/core/songloader.cpp b/src/core/songloader.cpp index 5ff046a6d..575c85ace 100644 --- a/src/core/songloader.cpp +++ b/src/core/songloader.cpp @@ -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(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); diff --git a/src/core/songloader.h b/src/core/songloader.h index 5fa6e4100..ff8d87e1a 100644 --- a/src/core/songloader.h +++ b/src/core/songloader.h @@ -32,6 +32,7 @@ class SongLoader : public QObject { Q_OBJECT public: SongLoader(QObject* parent = 0); + ~SongLoader(); enum Result { Success, diff --git a/src/playlist/playlist.cpp b/src/playlist/playlist.cpp index b6139b742..8a27a8f11 100644 --- a/src/playlist/playlist.cpp +++ b/src/playlist/playlist.cpp @@ -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 &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 &source_rows, int pos) { layoutAboutToBeChanged(); PlaylistItemList moved_items; @@ -564,45 +575,6 @@ void Playlist::MoveItemsWithoutUndo(int start, const QList& dest_rows) { Save(); } -QModelIndex Playlist::InsertPaths(QList urls, int pos) { - SongList songs; - for (int i=0 ; i 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& items, int po return InsertItems(playlist_items, pos); } -QModelIndex Playlist::InsertStreamUrls(const QList& urls, int pos) { - PlaylistItemList playlist_items; - foreach (const QUrl& url, urls) { - playlist_items << shared_ptr(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; diff --git a/src/playlist/playlist.h b/src/playlist/playlist.h index d2b676900..475d4b5b9 100644 --- a/src/playlist/playlist.h +++ b/src/playlist/playlist.h @@ -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& items, int pos = -1); - QModelIndex InsertStreamUrls(const QList& urls, int pos = -1); - QModelIndex InsertPaths(QList urls, int pos = -1); + void InsertUrls(const QList& urls, bool play_now, int pos = -1); void StopAfter(int row); void ReloadItems(const QList& 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(); diff --git a/src/playlist/playlistmanager.cpp b/src/playlist/playlistmanager.cpp index 987d0c8d7..ed5d1de59 100644 --- a/src/playlist/playlistmanager.cpp +++ b/src/playlist/playlistmanager.cpp @@ -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); diff --git a/src/playlist/playlistmanager.h b/src/playlist/playlistmanager.h index 9dae80e76..566b7c433 100644 --- a/src/playlist/playlistmanager.h +++ b/src/playlist/playlistmanager.h @@ -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(); diff --git a/src/playlist/songloaderinserter.cpp b/src/playlist/songloaderinserter.cpp new file mode 100644 index 000000000..01ed3d7c2 --- /dev/null +++ b/src/playlist/songloaderinserter.cpp @@ -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 . +*/ + +#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 &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(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(); +} diff --git a/src/playlist/songloaderinserter.h b/src/playlist/songloaderinserter.h new file mode 100644 index 000000000..d229356d4 --- /dev/null +++ b/src/playlist/songloaderinserter.h @@ -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 . +*/ + +#ifndef SONGLOADERINSERTER_H +#define SONGLOADERINSERTER_H + +#include +#include +#include + +#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& 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 pending_; +}; + +#endif // SONGLOADERINSERTER_H diff --git a/src/translations/ar.po b/src/translations/ar.po index 2a852b97c..cfee9d6ff 100644 --- a/src/translations/ar.po +++ b/src/translations/ar.po @@ -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 "" diff --git a/src/translations/cs.po b/src/translations/cs.po index 3b10529f1..c4c05687c 100644 --- a/src/translations/cs.po +++ b/src/translations/cs.po @@ -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" diff --git a/src/translations/da.po b/src/translations/da.po index 4628926e3..bf44c6a76 100644 --- a/src/translations/da.po +++ b/src/translations/da.po @@ -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" diff --git a/src/translations/de.po b/src/translations/de.po index 911f04245..a2ecb1ddc 100644 --- a/src/translations/de.po +++ b/src/translations/de.po @@ -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..." diff --git a/src/translations/el.po b/src/translations/el.po index 05fe93e0e..4121b227c 100644 --- a/src/translations/el.po +++ b/src/translations/el.po @@ -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 "Επιλογή εξώφυλλου χειροκίνητα..." diff --git a/src/translations/en_CA.po b/src/translations/en_CA.po index 43b682081..fff21f188 100644 --- a/src/translations/en_CA.po +++ b/src/translations/en_CA.po @@ -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..." diff --git a/src/translations/en_GB.po b/src/translations/en_GB.po index 5743d70f9..8de38f70d 100644 --- a/src/translations/en_GB.po +++ b/src/translations/en_GB.po @@ -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" diff --git a/src/translations/es.po b/src/translations/es.po index f80d71c9d..75c9b14f0 100644 --- a/src/translations/es.po +++ b/src/translations/es.po @@ -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..." diff --git a/src/translations/fi.po b/src/translations/fi.po index 571641280..c2b9b4d00 100644 --- a/src/translations/fi.po +++ b/src/translations/fi.po @@ -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 "" diff --git a/src/translations/fr.po b/src/translations/fr.po index a6651b6f7..8c2efa1a5 100644 --- a/src/translations/fr.po +++ b/src/translations/fr.po @@ -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" diff --git a/src/translations/gl.po b/src/translations/gl.po index 884b2fae9..103cf2744 100644 --- a/src/translations/gl.po +++ b/src/translations/gl.po @@ -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" diff --git a/src/translations/it.po b/src/translations/it.po index c036445b5..6f53ccd22 100644 --- a/src/translations/it.po +++ b/src/translations/it.po @@ -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..." diff --git a/src/translations/kk.po b/src/translations/kk.po index 760ee0bbc..73ff573c5 100644 --- a/src/translations/kk.po +++ b/src/translations/kk.po @@ -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 "" diff --git a/src/translations/nb.po b/src/translations/nb.po index fd3722de6..22d1530fd 100644 --- a/src/translations/nb.po +++ b/src/translations/nb.po @@ -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" diff --git a/src/translations/oc.po b/src/translations/oc.po index d1f3518cd..18b81a555 100644 --- a/src/translations/oc.po +++ b/src/translations/oc.po @@ -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" diff --git a/src/translations/pl.po b/src/translations/pl.po index fcf0c6e87..629207ede 100644 --- a/src/translations/pl.po +++ b/src/translations/pl.po @@ -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" diff --git a/src/translations/pt.po b/src/translations/pt.po index 54bfd8b3e..5f17db304 100644 --- a/src/translations/pt.po +++ b/src/translations/pt.po @@ -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..." diff --git a/src/translations/pt_BR.po b/src/translations/pt_BR.po index 26ffcf5e4..b9e2728ef 100644 --- a/src/translations/pt_BR.po +++ b/src/translations/pt_BR.po @@ -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" diff --git a/src/translations/ro.po b/src/translations/ro.po index 1b867e432..c11037989 100644 --- a/src/translations/ro.po +++ b/src/translations/ro.po @@ -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" diff --git a/src/translations/ru.po b/src/translations/ru.po index 69002deed..54c466bf7 100644 --- a/src/translations/ru.po +++ b/src/translations/ru.po @@ -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 "Укажите обложку вручную..." diff --git a/src/translations/sk.po b/src/translations/sk.po index 47707fd2b..b5ad52146 100644 --- a/src/translations/sk.po +++ b/src/translations/sk.po @@ -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..." diff --git a/src/translations/sv.po b/src/translations/sv.po index 86e41e447..7368a6aae 100644 --- a/src/translations/sv.po +++ b/src/translations/sv.po @@ -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..." diff --git a/src/translations/tr.po b/src/translations/tr.po index bd584e9a4..6af26e3e8 100644 --- a/src/translations/tr.po +++ b/src/translations/tr.po @@ -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" diff --git a/src/translations/zh_CN.po b/src/translations/zh_CN.po index b9dc86054..fc9d0643e 100644 --- a/src/translations/zh_CN.po +++ b/src/translations/zh_CN.po @@ -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 "" diff --git a/src/translations/zh_TW.po b/src/translations/zh_TW.po index f076401c3..078e529a8 100644 --- a/src/translations/zh_TW.po +++ b/src/translations/zh_TW.po @@ -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 "" diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 54189d6ad..97e2b89c3 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -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& 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 &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 urls; + // Convert to URLs + QList 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() << url); + AddUrls(player_->GetState() != Engine::Playing, + QList() << QUrl::fromLocalFile(directory)); } void MainWindow::AddStream() { @@ -1080,10 +1088,8 @@ void MainWindow::AddStream() { } void MainWindow::AddStreamAccepted() { - QList urls; - urls << add_stream_dialog_->url(); - - playlists_->current()->InsertStreamUrls(urls); + AddUrls(player_->GetState() != Engine::Playing, + QList() << 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 urls; - urls << QUrl::fromLocalFile(path); - AddFilesToPlaylist(urls); - return true; - } - return false; -} - void MainWindow::CheckForUpdates() { #ifdef Q_OS_DARWIN mac::CheckForUpdates(); diff --git a/src/ui/mainwindow.h b/src/ui/mainwindow.h index 2640b1599..519440a7a 100644 --- a/src/ui/mainwindow.h +++ b/src/ui/mainwindow.h @@ -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& urls); void AddLibraryItemToPlaylist(bool clear_first, const QModelIndexList& indexes); void AddLibrarySongsToPlaylist(bool clear_first, const SongList& songs); + void AddUrls(bool play_now, const QList& urls); private: Ui_MainWindow* ui_; diff --git a/src/widgets/multiloadingindicator.cpp b/src/widgets/multiloadingindicator.cpp index 95ace2a4e..c8e0afaff 100644 --- a/src/widgets/multiloadingindicator.cpp +++ b/src/widgets/multiloadingindicator.cpp @@ -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; } diff --git a/src/widgets/multiloadingindicator.h b/src/widgets/multiloadingindicator.h index d652a3e9b..de53907b8 100644 --- a/src/widgets/multiloadingindicator.h +++ b/src/widgets/multiloadingindicator.h @@ -35,6 +35,7 @@ class MultiLoadingIndicator : public QWidget { LoadingStream, LoadingLastFM, LoadingMagnatune, + LoadingTracks, }; public slots: