Changeset View
Changeset View
Standalone View
Standalone View
src/playlistmanager/file/PlaylistFileProvider.cpp
Show All 14 Lines | |||||
15 | ****************************************************************************************/ | 15 | ****************************************************************************************/ | ||
16 | 16 | | |||
17 | #include "PlaylistFileProvider.h" | 17 | #include "PlaylistFileProvider.h" | ||
18 | #include "App.h" | 18 | #include "App.h" | ||
19 | #include "core-impl/playlists/types/file/PlaylistFileSupport.h" | 19 | #include "core-impl/playlists/types/file/PlaylistFileSupport.h" | ||
20 | #include "core/support/Amarok.h" | 20 | #include "core/support/Amarok.h" | ||
21 | #include "core/support/Debug.h" | 21 | #include "core/support/Debug.h" | ||
22 | #include "core/support/Components.h" | 22 | #include "core/support/Components.h" | ||
23 | #include "core/interfaces/Logger.h" | 23 | #include "core/logger/Logger.h" | ||
24 | #include "core-impl/playlists/types/file/asx/ASXPlaylist.h" | 24 | #include "core-impl/playlists/types/file/asx/ASXPlaylist.h" | ||
25 | #include "core-impl/playlists/types/file/m3u/M3UPlaylist.h" | 25 | #include "core-impl/playlists/types/file/m3u/M3UPlaylist.h" | ||
26 | #include "core-impl/playlists/types/file/pls/PLSPlaylist.h" | 26 | #include "core-impl/playlists/types/file/pls/PLSPlaylist.h" | ||
27 | #include "core-impl/playlists/types/file/xspf/XSPFPlaylist.h" | 27 | #include "core-impl/playlists/types/file/xspf/XSPFPlaylist.h" | ||
28 | #include "playlist/PlaylistModelStack.h" | 28 | #include "playlist/PlaylistModelStack.h" | ||
29 | #include "playlistmanager/PlaylistManager.h" | 29 | #include "playlistmanager/PlaylistManager.h" | ||
30 | 30 | | |||
31 | #include <QAction> | 31 | #include <QAction> | ||
▲ Show 20 Lines • Show All 248 Lines • ▼ Show 20 Line(s) | 276 | { | |||
280 | //arbitrary number of playlists to load during one mainloop run: 5 | 280 | //arbitrary number of playlists to load during one mainloop run: 5 | ||
281 | for( int i = 0; i < qMin( m_urlsToLoad.count(), 5 ); i++ ) | 281 | for( int i = 0; i < qMin( m_urlsToLoad.count(), 5 ); i++ ) | ||
282 | { | 282 | { | ||
283 | QUrl url = m_urlsToLoad.takeFirst(); | 283 | QUrl url = m_urlsToLoad.takeFirst(); | ||
284 | QString groups = loadedPlaylistsConfig().readEntry( url.url() ); | 284 | QString groups = loadedPlaylistsConfig().readEntry( url.url() ); | ||
285 | Playlists::PlaylistFilePtr playlist = Playlists::loadPlaylistFile( url, this ); | 285 | Playlists::PlaylistFilePtr playlist = Playlists::loadPlaylistFile( url, this ); | ||
286 | if( !playlist ) | 286 | if( !playlist ) | ||
287 | { | 287 | { | ||
288 | Amarok::Components::logger()->longMessage( | 288 | Amarok::Logger::longMessage( | ||
289 | i18n("The playlist file \"%1\" could not be loaded.", url.fileName() ), | 289 | i18n("The playlist file \"%1\" could not be loaded.", url.fileName() ), | ||
290 | Amarok::Logger::Error | 290 | Amarok::Logger::Error | ||
291 | ); | 291 | ); | ||
292 | continue; | 292 | continue; | ||
293 | } | 293 | } | ||
294 | 294 | | |||
295 | if( !groups.isEmpty() && playlist->isWritable() ) | 295 | if( !groups.isEmpty() && playlist->isWritable() ) | ||
296 | playlist->setGroups( groups.split( ',', QString::SkipEmptyParts ) ); | 296 | playlist->setGroups( groups.split( ',', QString::SkipEmptyParts ) ); | ||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |