Commit Graph

409 Commits

Author SHA1 Message Date
Arun Narayanankutty 97cbf556a0 clean up library view
library view sorts the library and display the contents in alphabetical order (bold letter/number followed by a line) . the line cannot be themed as it is hard-coded "QPen line_pen(opt.palette.color(QPalette::Dark))". Here i try to remove the line, align the letter to left and give the letter a highlight using QRect. this way it looks better and is completely themable ...
2015-09-10 03:52:35 -05:00
Eduardo Sánchez Muñoz 4722477b1e Add full rescan reason for original year tag support. 2015-07-01 15:33:25 +02:00
Eduardo Sánchez Muñoz e0816800b1 Add support for original year tags. 2015-06-30 18:34:34 +02:00
Chocobozzz d82b0f8a5a Add ability for sort by group and performer in the library view 2015-06-11 22:45:34 +02:00
Chocobozzz 5aec1c0e24 Merge remote-tracking branch 'upstream/master' into qt5
Update qt version to 5.4.2
2015-06-03 22:57:58 +02:00
Mattias Andersson 60918ef7f8 Return result directly. 2015-05-26 21:51:04 +02:00
Mattias Andersson aaf2ec25b3 Run make format. 2015-05-23 09:19:23 +02:00
Mattias Andersson 82dcdd3a12 Sort discs numerically when using Group by disc. 2015-05-23 09:19:23 +02:00
Chocobozzz e986ab5a4b Merge master branch and adapt it to qt5 2015-04-16 17:16:34 +02:00
Chocobozzz 8b226c2171 Update non optionnals sources to qt5 2015-04-11 23:24:07 +02:00
Arnaud Bienner 946c0381d1 Don't set thread priority in LibraryWatcher constructor, as this is executed in the main thread.
Do it when thread actually starts (create a new Thread class for this purpose).
Fixes #4523.
2015-02-28 16:44:32 +01:00
Ignas Kaziukenas 0a2a358d8b "Green Day Problem" solved. Year-Album grouping also obeys grouping tag that allows to order albums released in the same year non-alphabetically 2014-10-29 15:29:45 +02:00
Ignas Kaziukenas a2df43c830 Reverted changes amde to groupby_performer 2014-10-27 15:49:11 +02:00
Ignas Kaziukenas 7516438c8b Added disc to the groupby interface. Replced groupby_performer to groupby_disc 2014-10-27 14:47:04 +02:00
Gavin Howard 0e030b5461 Ran make format. 2014-08-26 10:54:05 -06:00
Gavin Howard 54742de613 A quick patch to have the library ignore all articles when sorting. 2014-08-25 21:22:53 -06:00
David Sansome 01ae151f8a Delay writing WMA ratings and play counts until playback has finished. Fixes #3593 2014-06-07 15:29:23 +10:00
David Sansome f6a72828a9 Write statistics and ratings in Library, not LibraryBackend. 2014-06-07 15:19:43 +10:00
Mark Furneaux b463f32459 Fix memory leak in pixmap disk cache 2014-05-28 17:30:07 -04:00
Mark Furneaux b2bd7828c4 More style changes 2014-05-27 20:18:24 -04:00
Mark Furneaux 94b391e0c9 Optimizations and style changes 2014-05-27 18:21:30 -04:00
Mark Furneaux 2332a74bbe Add persistent disk cache for library pixmaps
I'll reference #4379

When viewing the library with album covers visible, the covers load very slowly the first time
as they have to wait on the tagreaders. If I scroll down the library, it takes minutes for the
tagreader to catch up. The nice thing is that the pixmaps are cached. However, once
Clementine is restarted, the whole process has to happen again.

This patch adds a persistent disk cache in the form of a QNetworkDiskCache to store the
pixmaps on disk and load them into the QPixmapCache as required.

I've noted literally night and day performance improvements, not only when scrolling through the library.
There is much better interface responsiveness when searching, and I no longer see the no_cover_icon
temporarily anymore.
2014-05-27 17:40:25 -04:00
John Maguire 24a4cff807 Merge pull request #4288 from sundrythoughts/rating-optimization
Increase performance of mass rating changes.
2014-05-20 12:42:39 +01:00
Joseph Freeman fe4a80b2d5 Removed commented-out code and ran make format. 2014-04-25 19:41:04 -04:00
Joseph Freeman 156728390d Increase performance of mass rating changes. 2014-04-25 19:37:46 -04:00
Mattias Andersson 5fffbbc689 Add explanatory comment to last commit. 2014-04-22 12:25:59 +02:00
Mattias Andersson 56dade2598 Fix slow library search on sqlite 3.8. 2014-04-19 14:23:50 +02:00
Mattias Andersson cdf5363320 Prevent translation of the names of the available fields in the tool tip for the library search field. 2014-02-22 18:21:58 +01:00
John Maguire 5146bcdebc Some more NULL -> nullptr conversions. 2014-02-21 17:30:46 +01:00
Mattias Andersson 3b01247df9 Iterate over a copy of the parents container since we are removing elements from the original. 2014-02-13 10:41:24 +01:00
John Maguire 192b60d965 Use nullptr as parent parameter default everywhere 2014-02-10 16:03:54 +01:00
John Maguire 3323c2d094 Convert all instances of foreach() to a C++11 for
find ext src -name '*.cpp' -exec \
    sed -i -e 's/foreach(\([^,]\+\),/for (\1 :/' {} \;
2014-02-10 14:43:32 +01:00
Mattias Andersson 175827f73f Add a tool tip to the library search field. 2014-02-08 14:50:12 +01:00
John Maguire bebd781fdf Reformat all non-3rd-party C/C++/Objective-C++.
Command line:
find src ext -regex '.*\.\(h\|cpp\|mm\)' -exec clang-format -i
 -style='{BasedOnStyle: Google, DerivePointerBinding: false}' {} \;
2014-02-07 16:34:20 +01:00
David Sansome eaf182a59a Merge pull request #4161 from BrummbQ/master
don't rescan unchanged files if library has been unavailable.  Fixes #3032
2014-02-07 22:45:55 +11:00
Gregor Tätzner 0cab75b28f removed useless debug log 2014-02-06 19:27:36 +01:00
John Maguire 8d1f4612db Hide use of boost multi-index behind pimpl. 2014-02-06 17:53:33 +01:00
John Maguire 71893e4847 Use nullptr instead of NULL everywhere. 2014-02-06 17:29:59 +01:00
John Maguire d309d4ab27 Use c++11 instead of boost where possible. 2014-02-06 16:51:39 +01:00
Gregor Tätzner 7317b6792e don't rescan unchanged files if library has been unavailable 2014-02-01 20:21:28 +01:00
Arnaud Bienner 08a4629565 '-' is considered as 'NOT' operator by FTS, leading to unexpected results. Not sure how to escape it, better to replace it for now 2014-01-16 16:35:09 +01:00
Mattias Andersson bd880dcafe Tweak the replacement of colons.
Make sure that there are no trailing whitspaces on tokens before appending "* ".
2014-01-14 01:09:24 +01:00
Mattias Andersson 3f4e8e5b88 Check if token is a valid column name in the fts table before treating it as such. 2014-01-13 16:16:33 +01:00
goetzc ad0f8a6f90 playlist context menu entry: Show in library 2014-01-11 15:03:32 -05:00
GitAnt a39e559425 Implemented sort by bitrate 2013-12-17 16:07:20 +01:00
GitAnt d53bcde897 Consistently added GroupBy_Bitrate enum item 2013-12-16 19:18:02 +01:00
Andreas 98dd001a4f Further work on portable version. 2013-10-03 17:08:42 +02:00
Andreas acb18cdcde First tries on a portable version. 2013-09-29 10:43:34 +02:00
Mateusz Kowalczyk ff71138079 Change file deletion question dialogs to warnings. 2013-06-01 16:23:37 +10:00
Arnaud Bienner 88918d45c5 Update issue 1175:
Save rating and statistics in two distinct ways, and let users activate them separately in preferences.
2013-03-30 23:42:29 +01:00
Arnaud Bienner 6108a8a46a Oops 2013-03-27 00:13:11 +01:00
Arnaud Bienner db5fbe2059 Update issue 1175:
Add an option in preferences to save all ratings/statistics into files, for all songs
2013-03-26 23:56:46 +01:00
Uwe Klotz a6d3b48231 Extend tag support: performer, grouping
The transaction handling while upgrading the database schema had to be revised.
Furthermore some QSqlQuery statements needed to be finished properly.

Fixes issue 2556
2013-03-10 18:16:03 +11:00
Arnaud Bienner b157c307e7 Add preference to save ratings and statistics in files 2013-02-24 18:36:37 +01:00
Arnaud Bienner 08d40f5fca Handle statistics tags apart, and write them to file when they change.
Next step: add a preference to activate this (should be deactivated by default IMO).
2013-02-24 17:45:25 +01:00
David Sansome e3c8caa613 Preserve user stats like play/skip counts when reloading song metadata when opening the edit tag dialog. Fixes issue 3359. 2012-12-26 00:50:32 +11:00
David Sansome 2302b80d52 Fix some style issues 2012-10-27 16:30:13 -07:00
Tony Motakis 09580b6df2 Various artists node now will appear in any GroupBy level
With this patch, compilations will be grouped under Various artists not
only when Artist is used as the top most Group By setting, but also in
lower levels as well. For example the user can set the top level Group By
to 'Genre' and still get compilations organized separately under each genre
when using Artist or AlbumArtist for the second nested Group By level.

Fixes issue 2757
2012-10-27 16:30:13 -07:00
Tony Motakis 25685e7cba Postpone CreateCompilationArtistNode() until PostQuery()
With the previous patch the Various artists node creation is oved to
RunQuery, which means that a later call to BeginReset() will delete it.
In this patch, we keep the logic deciding whether we need the node in
RunQuery(), but postpone the actual creation until PostQuery().
2012-10-27 16:30:10 -07:00
Tony Motakis 207225d620 HasCompilations() implementation local to the LibraryModel
Instead of relying on the backend to provide us with the information
of whether there are compilations in the whole of the library, we instead
look into the query we are currently working with for compilations. This
way we can be as granular as we want in the future.

This also means we now have to add the Various artists node at the time we
do the query with RunQuery() instead at BeginReset().
2012-10-27 16:30:08 -07:00
Tony Motakis 14eca258a2 Refactor duplicate code in LazyPopulate and ResetAsync
There is no reason why these need to reimplement the same thing;
put the common functionality in RunQuery() and PostQuery() and re use
the code. Less code paths to keep track of make it easier to implement
new features and fixes.
2012-10-27 16:30:05 -07:00
Arnaud Bienner 09596e3732 Don't get stuck when exiting Clementine while library is being created/updated 2012-08-30 00:01:28 +02:00
Ilya Kasnacheev 682acad53f Preserve the current song in the library view when filtering. Fixes issue 2936 2012-08-26 13:36:44 +01:00
John Maguire 6b87318710 Revert "Typedef QSearchField to old LineEdit on non Mac, and make it compatible with QSearchField"
This reverts commit 59517f5b4e.

Update issue 3047
Status: Accepted
Breaks the mac build. We should do a proper fix for this.
2012-07-12 14:04:29 +02:00
Arnaud Bienner 59517f5b4e Typedef QSearchField to old LineEdit on non Mac, and make it compatible with QSearchField
Fixes issue 3047. (for now)
2012-07-10 00:44:05 +02:00
John Maguire b01a0de8d6 Re-enable a few disabled features from the Qocoa porting. 2012-06-28 12:35:20 +02:00
John Maguire 35a7c7284b Fix placeholder text in library & icecast filters. 2012-06-28 11:40:09 +02:00
John Maguire f97fe9c69b Mostly port LibraryFilterWidget to qocoa. 2012-06-28 11:39:59 +02:00
Arnaud Bienner 2fe212e68b Display item's tooltip if it has one 2012-06-27 00:57:31 +02:00
David Sansome f95afa4cb3 Check whether .cue files exist instead of assuming Qt will return an invalid datetime for non-existent files. 2012-06-19 20:28:10 +01:00
David Sansome 57865f82c2 Make the grouping of global search results configurable 2012-06-17 16:20:40 +01:00
David Sansome b427fc8a24 Merge branch 'globalsearch-tree'
Fixes issue 2238
Fixes issue 2241
Fixes issue 2368
Fixes issue 2375
Fixes issue 2843
Fixes issue 2872
Fixes issue 2938
2012-06-16 21:24:29 +01:00
David Sansome 21fbd40f9f Don't try to initialise the library model until after the grouping settings have been read from the config. Fixes issue 3005 2012-06-16 20:54:08 +01:00
David Sansome 7b4ff1d2ee Update the Search settings page, use the configured provider order 2012-06-11 16:26:33 +01:00
David Sansome b669dd64fa Search simple providers properly, use the bigger album cover icon, disable the divider items, align the dividers' icons properly 2012-06-10 17:36:40 +01:00
David Sansome 41fab25569 Auto-expand tree items and lazy load album cover art 2012-06-10 17:15:32 +01:00
David Sansome 9c36cfa199 Replace the global search widget with a "Search" view on the sidebar. Organise results in a tree automatically. 2012-06-10 16:36:15 +01:00
Norman Back 704c87b267 Use hidden album art images when scanning the library
Fixes issue 2973
2012-06-05 18:42:11 +01:00
David Sansome 27a4bd426e Cache album art in the library model between resets (to prevent flickering when filtering), and don't load art for the same album multiple times.
Fixes issue 2528
2012-06-02 14:52:30 +01:00
David Sansome ba2f4ddedc Fix a crash in the smart playlist preview when the moodbar column is enabled 2012-05-30 11:06:25 +01:00
David Sansome 7d9f2b7b7d Use LineEdit::set_focus() instead of QWidget::setFocus() on LineEdit widgets that might be OS X search widgets
Fixes issue 2823
2012-03-25 21:14:39 +01:00
David Sansome ab5ccf69da Refactoring: remove BackgroundThread 2012-02-26 15:05:46 +00:00
David Sansome bacef04405 Refactoring: remove a couple of the AlbumCoverLoader instances and instead use a shared CurrentArtLoader. 2012-02-26 14:40:51 +00:00
David Sansome 48f15c9fc7 Refactoring: instead of passing individual pointers to useful core classes (like TaskManager or LibraryBackend) to each class that uses them, pass one singleton-like Application instance everywhere. 2012-02-26 14:40:51 +00:00
Angus Gratton f33d9b82d4 Prompt user if they are adding one part of a larger compilation to Various Artists. Fixes issue 2725 2012-02-19 13:55:30 +00:00
David Sansome 281d69581c Add Edit file information and Show in file browser actions to the files view. Fixes issue 2559 2012-01-29 18:44:00 +00:00
David Sansome facb366017 Remove subdirectory watches after a directory is removed from the library. Otherwise subdirectories that changed after the directory was removed would be re-scanned and re-added. 2012-01-29 17:39:28 +00:00
Alan Briolat 336750f15c Treat "albumartist" as artist, not album 2012-01-29 15:47:15 +00:00
Alan Briolat 0508fa450c Fixed "Album artist" string in "group by" dialog to reuse existing translations
Fixes issue 2675
2012-01-29 14:50:15 +00:00
David Sansome 626ce20ec0 Merge branch 'external-tagreader' 2012-01-08 18:38:48 +00:00
David Sansome d4b4606068 Create the FilesystemWatcherInterface directly in the LibraryWatcher, fixing a crash when trying to add a new device. 2012-01-08 18:37:46 +00:00
David Sansome 2e49e89e7b Fix a crash on startup after disabling watching the library for changes. Fixes issue 2585 2012-01-08 12:55:06 +00:00
David Sansome 4618651cf4 Merge branch 'master' into external-tagreader 2012-01-07 22:52:18 +00:00
David Sansome 9be641ee87 The external tagreader mostly works now:
* Make TagReaderClient a singleton until it's easier to pass dependencies around
 * Add a WaitForSignal() that uses a local event loop to wait for a signal to be emitted
 * Add a WaitForFinished() to _MessageReplyBase that blocks using a semaphore
 * Add blocking versions of all TagReaderClient methods
 * Use the TagReaderClient everywhere that Song::InitFromFile and friends were used before
2012-01-07 00:26:07 +00:00
John Maguire 483c36748e const& and tweaks to Mac directory canonicalisation. 2012-01-05 16:11:39 +00:00
John Maguire 761737eb4d Add more robust subdirectory detection in LibraryWatcher. 2012-01-05 15:56:46 +00:00
John Maguire 55e9fd8dc3 Disable watching for FS updates when requested. 2012-01-05 15:01:43 +00:00
John Maguire 9fdfb52225 Use FSEvent-based filesystem watcher on Mac. 2012-01-05 14:51:23 +00:00
David Sansome 9306efef99 Fix compilation on windows due to #defines leaking out of windows headers 2011-11-28 19:13:01 +00:00
David Sansome b873209d39 Remove the <xiphcomment.h> include from song.h so that windows headers don't infect everything else. Also move other bits of song.h into song.cpp, and reduce the number of includes in song.h. 2011-11-28 13:56:55 +00:00
Angus Gratton c5c581a4f1 Autodetect compilations based on effective_albumartist not artist (Fixes issue 509) 2011-11-28 11:04:38 +00:00
Angus Gratton 2cf6875c6d Fix bug caused by adding Various Artists for albumartist, where nodes would sometimes not move under Various Artists due to album node never being empty (Issue 509) 2011-11-28 11:04:38 +00:00
Angus Gratton b158f6788d Add support for Various Artists in Album Artist library mode (Issue 509) 2011-11-28 11:04:38 +00:00
Angus Gratton edb9b0b4fe Add album effective_artist filter that falls back to artist when unavailable (Issue 509) 2011-11-28 11:04:38 +00:00
David Sansome e9253af931 Load cover art for the library in a background thread. Fixes issue 2243 2011-11-13 00:31:27 +00:00
David Sansome b37f679c36 Implement the options to hide/show the global search box, and to hide/show all other search boxes. 2011-11-05 19:09:37 +00:00
David Sansome 6d45415b00 Consistently use "Various artists" with a lower case "a" 2011-10-30 16:53:39 +00:00
John Maguire a1ece63f3a Use URLs for openInFileBrowser. 2011-10-26 14:54:24 +02:00
David Sansome c1041ed6d4 Support for playing tracks from local library 2011-08-29 03:32:41 +01:00
David Sansome dad76b78dd Move all the settings pages to their own widgets and classes 2011-08-14 00:07:10 +01:00
Arnaud Bienner f7859f591c Adding CD devices in devices tab. Fixes issue 701. 2011-08-05 02:15:16 +02:00
David Sansome 38100f5e59 Make CoverProviders not a singleton 2011-07-23 19:34:41 +01:00
David Sansome dd3eee63e5 Remove python scripting support 2011-07-23 15:32:12 +01:00
David Sansome e6b2e5bcae Make the DeleteSongs function actually delete songs again, and make a new MarkUnavailable function that is called when songs are deleted from disk (and stop it from removing the song from the search index). 2011-07-06 20:07:56 +00:00
Arnaud Bienner 63300d79db Set tr function's codec to system encoding. Should (finally) resolve problems with already translated strings 2011-06-22 20:41:48 +00:00
David Sansome 7415d85dce When initialising a song from a library query, don't always assume the metadata originally came from a file (which means icycast tags are ignored when it is played). Fixes issue 1857 2011-06-17 20:00:10 +00:00
John Maguire 02e4d30354 Fix compile error. 2011-06-14 16:13:48 +00:00
David Sansome ccd7afed17 Replace LibraryModel assertions with error logging 2011-06-14 15:33:51 +00:00
David Sansome 42fe215443 Don't treat the smart playlist node in the library like a regular container when applying filters - fixes an assertion when clicking the smart playlist node with None/None/None grouping. Fixes issue 1913 2011-06-14 15:27:07 +00:00
John Maguire 3fd8d4f78e Fix showing hint in library filter widget on mac. 2011-05-23 12:52:27 +00:00
John Maguire 20534811c8 Fix crash in mac library filter widget.
Fixes issue #1914
Thanks to: tyler.s.rhodes@gmail.com
2011-05-23 09:41:08 +00:00
David Sansome 147bbb9928 Add some more python bindings 2011-05-19 23:02:15 +00:00
David Sansome 792352be3b When songs disappear from the filesystem (either they're deleted or are on a removable media that was unmounted), mark them as unavailable instead of removing them from the database. Thanks google@robbertkrebbers.nl. Fixes issue 401 2011-05-14 13:43:57 +00:00
John Maguire c9a0318553 Revert to not scanning hidden directories. 2011-05-13 16:56:42 +00:00
David Sansome ccb9f8cf94 Use URLs everywhere instead of filenames. Move the URL parsing and song loading code out of individual playlist parsers and into the base class. Fix the playlist parser unit tests. 2011-04-28 12:27:53 +00:00
David Sansome b15156a7a3 Handle bigger protobuf messages, add spotify searching to the UI 2011-04-27 16:38:28 +00:00
Andrea Decorte c6c4902d3f Added two new options for date queries in smart playlists. Fixes issue
1141
2011-04-24 17:52:16 +00:00
David Sansome 3eedc916ad Add a new logging system 2011-04-22 16:50:29 +00:00
Arnaud Bienner 41a4393b24 Translate dynamic playlist names at runtime. 2011-04-19 21:39:02 +00:00
Paweł Bara 032b5f7e48 initial commit of "multiple covers providers" feature:
- simple API for cover providers (both C++ and SIP)
- a new "package" for cover related code
2011-04-02 13:34:06 +00:00
Andrea Decorte ecda0ada4a Playlists get an automatic name, no more prompts. Fixes issue #423 2011-03-25 19:16:12 +00:00
David Sansome d91aaa880c Make the library watcher pick up hidden files too. 2011-03-23 16:50:19 +00:00
Paweł Bara e619d7a280 fixing a bug where streams were removed from playlist during Clementine's startup 2011-03-20 16:07:24 +00:00
Paweł Bara bfb068a6d1 conditionally hide some context menu actions in library view and playlist view
Song.is_stream()
2011-03-20 12:43:10 +00:00
Paweł Bara a4bf317f33 minor deleted items handling fixes 2011-03-18 21:54:22 +00:00
David Sansome 9086ab8ed4 Add a "Show in file browser..." to the library context menu as well. Fixes issue #1563 2011-03-17 19:52:21 +00:00
David Sansome 0594fc53af Enable the "Edit track information..." item in the library context menu when right-clicking an un-expanded node 2011-03-17 19:52:15 +00:00
David Sansome 002ae13817 Use the canonical file path (resolve symlinks and '..') when adding directories to the library, and when adding files to the playlist. Fixes issue #1494 2011-03-13 14:43:03 +00:00
David Sansome 3d593e696c Make escape and backspace work in the library and radio views. Fixes issue 1510 2011-03-13 14:14:16 +00:00
Andrea Decorte f62f1a6df8 Middle click to append to playlist now works in the other views. Fixes issue #1546 2011-03-10 12:42:35 +00:00
Andrea Decorte b8a008aaeb Added middleclick to enqueue to playlist. Fixes issue #865 2011-03-06 15:53:08 +00:00
Andrea Decorte cfe6b9e652 Added option to hide dividers in library view. Fixes issue #1125 2011-03-05 15:20:27 +00:00
David Sansome dacc7c1a2d Remove " characters from the library filter text before doing an FTS query. Fixes issue #1504 2011-03-04 21:10:10 +00:00
David Sansome 2b08d27a88 Show loading indicators in the library model and the status bar when asynchronously loading songs during initialisation. 2011-02-26 14:27:57 +00:00
David Sansome 62b6d052de Fix the library model test 2011-02-26 13:34:31 +00:00
Paweł Bara aa6c3ab35b a way to mark DB schema versions as requiring a full library rescan
message dialog for a user when he's reached a full library rescan requiring schema version (like the final one of CUE sheet support)
2011-02-25 20:10:41 +00:00
Arnaud Bienner 609f882e27 Making library init async. Prevent from freezing GUI with large collection (especially Jamendo) when loading from DB for the first time since startup 2011-02-24 23:29:45 +00:00
Paweł Bara 5c8c5c5413 making availability of library view's context menu items saner (?). also makes the CUEs readonly from library view 2011-02-21 20:06:44 +00:00
Paweł Bara 05cbe241e9 just changed a duplicated translation string 2011-02-20 16:23:30 +00:00
Paweł Bara 677a93b359 minor changes 2011-02-20 15:05:05 +00:00