Diff of /xbmc/GUIViewStateMusic.cpp [a03c42] .. [305358]  Maximize  Restore

Repo status: analyzing...

  Switch to unified view

a/xbmc/GUIViewStateMusic.cpp b/xbmc/GUIViewStateMusic.cpp
...
...
378
}
378
}
379
379
380
380
381
CGUIViewStateMusicSmartPlaylist::CGUIViewStateMusicSmartPlaylist(const CFileItemList& items) : CGUIViewStateWindowMusic(items)
381
CGUIViewStateMusicSmartPlaylist::CGUIViewStateMusicSmartPlaylist(const CFileItemList& items) : CGUIViewStateWindowMusic(items)
382
{
382
{
383
  if (items.GetContent() == "songs" || items.GetContent() == "mixed") 
384
  {
383
  CStdString strTrackLeft=g_guiSettings.GetString("musicfiles.trackformat");
385
    CStdString strTrackLeft=g_guiSettings.GetString("musicfiles.trackformat");
384
  CStdString strTrackRight=g_guiSettings.GetString("musicfiles.trackformatright");
386
    CStdString strTrackRight=g_guiSettings.GetString("musicfiles.trackformatright");
385
387
386
  AddSortMethod(SORT_METHOD_PLAYLIST_ORDER, 559, LABEL_MASKS(strTrackLeft, strTrackRight));
388
    AddSortMethod(SORT_METHOD_PLAYLIST_ORDER, 559, LABEL_MASKS(strTrackLeft, strTrackRight));
387
  AddSortMethod(SORT_METHOD_TRACKNUM, 554, LABEL_MASKS(strTrackLeft, strTrackRight));  // Userdefined, Userdefined| empty, empty
389
    AddSortMethod(SORT_METHOD_TRACKNUM, 554, LABEL_MASKS(strTrackLeft, strTrackRight));  // Userdefined, Userdefined| empty, empty
388
  if (g_guiSettings.GetBool("filelists.ignorethewhensorting"))
390
    if (g_guiSettings.GetBool("filelists.ignorethewhensorting"))
389
  {
391
    {
390
    AddSortMethod(SORT_METHOD_TITLE_IGNORE_THE, 556, LABEL_MASKS("%T - %A", "%D"));  // Title, Artist, Duration| empty, empty
392
      AddSortMethod(SORT_METHOD_TITLE_IGNORE_THE, 556, LABEL_MASKS("%T - %A", "%D"));  // Title, Artist, Duration| empty, empty
391
    AddSortMethod(SORT_METHOD_ALBUM_IGNORE_THE, 558, LABEL_MASKS("%B - %T - %A", "%D"));  // Album, Titel, Artist, Duration| empty, empty
393
      AddSortMethod(SORT_METHOD_ALBUM_IGNORE_THE, 558, LABEL_MASKS("%B - %T - %A", "%D"));  // Album, Titel, Artist, Duration| empty, empty
392
    AddSortMethod(SORT_METHOD_ARTIST_IGNORE_THE, 557, LABEL_MASKS("%A - %T", "%D"));  // Artist, Titel, Duration| empty, empty
394
      AddSortMethod(SORT_METHOD_ARTIST_IGNORE_THE, 557, LABEL_MASKS("%A - %T", "%D"));  // Artist, Titel, Duration| empty, empty
393
    AddSortMethod(SORT_METHOD_LABEL_IGNORE_THE, 551, LABEL_MASKS(strTrackLeft, strTrackRight));
395
      AddSortMethod(SORT_METHOD_LABEL_IGNORE_THE, 551, LABEL_MASKS(strTrackLeft, strTrackRight));
394
  }
396
    }
395
  else
397
    else
396
  {
398
    {
397
    AddSortMethod(SORT_METHOD_TITLE, 556, LABEL_MASKS("%T - %A", "%D"));  // Title, Artist, Duration| empty, empty
399
      AddSortMethod(SORT_METHOD_TITLE, 556, LABEL_MASKS("%T - %A", "%D"));  // Title, Artist, Duration| empty, empty
398
    AddSortMethod(SORT_METHOD_ALBUM, 558, LABEL_MASKS("%B - %T - %A", "%D"));  // Album, Titel, Artist, Duration| empty, empty
400
      AddSortMethod(SORT_METHOD_ALBUM, 558, LABEL_MASKS("%B - %T - %A", "%D"));  // Album, Titel, Artist, Duration| empty, empty
399
    AddSortMethod(SORT_METHOD_ARTIST, 557, LABEL_MASKS("%A - %T", "%D"));  // Artist, Titel, Duration| empty, empty
401
      AddSortMethod(SORT_METHOD_ARTIST, 557, LABEL_MASKS("%A - %T", "%D"));  // Artist, Titel, Duration| empty, empty
400
    AddSortMethod(SORT_METHOD_LABEL, 551, LABEL_MASKS(strTrackLeft, strTrackRight));
402
      AddSortMethod(SORT_METHOD_LABEL, 551, LABEL_MASKS(strTrackLeft, strTrackRight));
401
  }
403
    }
402
  AddSortMethod(SORT_METHOD_DURATION, 555, LABEL_MASKS("%T - %A", "%D"));  // Titel, Artist, Duration| empty, empty
404
    AddSortMethod(SORT_METHOD_DURATION, 555, LABEL_MASKS("%T - %A", "%D"));  // Titel, Artist, Duration| empty, empty
403
  AddSortMethod(SORT_METHOD_SONG_RATING, 563, LABEL_MASKS("%T - %A", "%R"));  // Titel, Artist, Rating| empty, empty
405
    AddSortMethod(SORT_METHOD_SONG_RATING, 563, LABEL_MASKS("%T - %A", "%R"));  // Titel, Artist, Rating| empty, empty
404
  SetSortMethod(g_settings.m_viewStateMusicNavSongs.m_sortMethod);
406
    SetSortMethod(SORT_METHOD_PLAYLIST_ORDER);
405
407
406
  SetViewAsControl(g_settings.m_viewStateMusicNavSongs.m_viewMode);
408
    SetViewAsControl(g_settings.m_viewStateMusicNavSongs.m_viewMode);
407
409
408
  SetSortOrder(g_settings.m_viewStateMusicNavSongs.m_sortOrder);
410
    SetSortOrder(g_settings.m_viewStateMusicNavSongs.m_sortOrder);
411
  } 
412
  else if (items.GetContent() == "albums") 
413
  {
414
    CStdString strAlbumLeft = g_advancedSettings.m_strMusicLibraryAlbumFormat;
415
    if (strAlbumLeft.IsEmpty())
416
      strAlbumLeft = "%B"; // album
417
    CStdString strAlbumRight = g_advancedSettings.m_strMusicLibraryAlbumFormatRight;
418
    if (strAlbumRight.IsEmpty())
419
      strAlbumRight = "%A"; // artist
420
421
    AddSortMethod(SORT_METHOD_PLAYLIST_ORDER, 559, LABEL_MASKS("%F", "", strAlbumLeft, strAlbumRight));
422
    // album
423
    if (g_guiSettings.GetBool("filelists.ignorethewhensorting"))
424
      AddSortMethod(SORT_METHOD_ALBUM_IGNORE_THE, 558, LABEL_MASKS("%F", "", strAlbumLeft, strAlbumRight));  // Filename, empty | Userdefined, Userdefined
425
    else
426
      AddSortMethod(SORT_METHOD_ALBUM, 558, LABEL_MASKS("%F", "", strAlbumLeft, strAlbumRight));  // Filename, empty | Userdefined, Userdefined
427
    
428
    // artist
429
    if (g_guiSettings.GetBool("filelists.ignorethewhensorting"))
430
      AddSortMethod(SORT_METHOD_ARTIST_IGNORE_THE, 557, LABEL_MASKS("%F", "", strAlbumLeft, strAlbumRight));  // Filename, empty | Userdefined, Userdefined
431
    else
432
      AddSortMethod(SORT_METHOD_ARTIST, 557, LABEL_MASKS("%F", "", strAlbumLeft, strAlbumRight));  // Filename, empty | Userdefined, Userdefined
433
    
434
    // year
435
    AddSortMethod(SORT_METHOD_YEAR, 562, LABEL_MASKS("%F", "", strAlbumLeft, strAlbumRight));
436
437
    SetSortMethod(SORT_METHOD_PLAYLIST_ORDER);
438
    SetViewAsControl(g_settings.m_viewStateMusicNavAlbums.m_viewMode);
439
    SetSortOrder(g_settings.m_viewStateMusicNavAlbums.m_sortOrder);
440
  } 
441
  else 
442
  {
443
    CLog::Log(LOGERROR,"Music Smart Playlist must be one of songs, mixed or albums");
444
  }
445
  
409
  LoadViewState(items.m_strPath, WINDOW_MUSIC_NAV);
446
  LoadViewState(items.m_strPath, WINDOW_MUSIC_NAV);
410
}
447
}
411
448
412
void CGUIViewStateMusicSmartPlaylist::SaveViewState()
449
void CGUIViewStateMusicSmartPlaylist::SaveViewState()
413
{
450
{

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks