diff -Nru musique-1.2.1/CHANGES musique-1.3/CHANGES --- musique-1.2.1/CHANGES 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/CHANGES 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,18 @@ +1.3 +- Album and artist sorting +- Album covers in the playlist +- Faster artist and album views +- Notification at end of collection scan +- Notification support on Ubuntu +- Gapless playback (Only works on Linux with the GStreamer Phonon backend) +- Find more local covers (added GIF, PNG, BMP and JPEG file types) +- Fixed homonymous albums from different artists being erroneously merged +- Fixed albums not correctly sorted when playing an artist +- Fixed play icon hover animation in Folders view +- Fixed lyrics showing showing garbage in some cases +- Fixed handling of tracks that have no associated album +- New and updated translations + 1.2.1 - Faster painting of artist photos and album covers - Autoupdate on Mac and Windows diff -Nru musique-1.2.1/debian/changelog musique-1.3/debian/changelog --- musique-1.2.1/debian/changelog 2013-02-04 11:28:21.000000000 +0000 +++ musique-1.3/debian/changelog 2014-02-17 17:09:20.000000000 +0000 @@ -1,21 +1,9 @@ -musique (1.2.1-1~webupd8~precise0) precise; urgency=medium - - * new upstream release - - -- Alin Andrei Mon, 04 Feb 2013 13:28:21 +0200 - -musique (1.2-1~webupd8~raring) raring; urgency=medium - - * upload for Raring - - -- Alin Andrei Wed, 24 Oct 2012 18:51:43 +0300 +musique (1.3-1~webupd8~precise) precise; urgency=medium -musique (1.2-1~webupd8~quantal) quantal; urgency=medium - * new upstream release - - -- Alin Andrei Wed, 24 Oct 2012 18:51:43 +0300 - + + -- Alin Andrei Mon, 17 Feb 2014 23:46:17 +0200 + musique (1.1-2.1) unstable; urgency=low * Non-maintainer upload. diff -Nru musique-1.2.1/debian/control musique-1.3/debian/control --- musique-1.2.1/debian/control 2013-02-04 11:26:40.000000000 +0000 +++ musique-1.3/debian/control 2012-02-23 13:36:54.000000000 +0000 @@ -2,7 +2,7 @@ Section: sound Priority: extra Maintainer: Jan Hauke Rahm -Build-Depends: debhelper (>= 7), qt4-qmake, libphonon-dev, libtag1-dev +Build-Depends: debhelper (>= 9), qt4-qmake, libphonon-dev, libtag1-dev Standards-Version: 3.9.3 Homepage: http://flavio.tordini.org/musique Vcs-Git: git://git.debian.org/collab-maint/musique.git @@ -10,7 +10,7 @@ Package: musique Architecture: any -Depends: libqt4-sql-sqlite, ${shlibs:Depends}, ${misc:Depends}, phonon-backend, dbus-x11, phonon-backend-gstreamer, gstreamer0.10-plugins-good, gstreamer0.10-plugins-bad, gstreamer0.10-ffmpeg, gstreamer0.10-x +Depends: libqt4-sql-sqlite, ${shlibs:Depends}, ${misc:Depends} Description: Simple but sophisticated graphical music player Musique unclutters your music listening experience with a clean and innovative interface. It comes with one playlist, plain and simple, but also diff -Nru musique-1.2.1/empty.ts musique-1.3/empty.ts --- musique-1.2.1/empty.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/empty.ts 2013-10-11 07:42:11.000000000 +0000 @@ -115,6 +115,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + + + + ArtistInfo Read more @@ -122,6 +149,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + + + + BreadcrumbWidget &Back @@ -588,6 +646,14 @@ &Report an Issue... + + Search + + + + %1 finished scanning your music collection + + MediaView Binary files /tmp/EcAbBzrrpa/musique-1.2.1/images/sort.png and /tmp/KoMDkRx8s0/musique-1.3/images/sort.png differ diff -Nru musique-1.2.1/INSTALL musique-1.3/INSTALL --- musique-1.2.1/INSTALL 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/INSTALL 2013-10-11 07:42:11.000000000 +0000 @@ -1,9 +1,9 @@ # Build instructions ## Prerequisites -To compile Minitunes you need: -- Qt4: http://qt.nokia.com. The following Qt modules are needed: network, xml, phonon, sql -- TagLib: http://developer.kde.org/~wheeler/taglib.html +To compile Musique you need: +- Qt4: http://qt.digia.com. The following Qt modules are needed: network, xml, phonon, sql +- TagLib: http://taglib.github.io On a Debian or Ubuntu system type: sudo apt-get install build-essential qt4-dev-tools libphonon-dev libtag1-dev libqt4-sql-sqlite @@ -15,7 +15,7 @@ $ make ## Running -./build/target/minitunes +./build/target/musique ## A word about Phonon on Linux To be able to actually listen to music you need a working Phonon setup. diff -Nru musique-1.2.1/LICENSE.LGPL musique-1.3/LICENSE.LGPL --- musique-1.2.1/LICENSE.LGPL 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/LICENSE.LGPL 1970-01-01 00:00:00.000000000 +0000 @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff -Nru musique-1.2.1/locale/ast.ts musique-1.3/locale/ast.ts --- musique-1.2.1/locale/ast.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/ast.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Ordenar por + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Ordenar por + + + BreadcrumbWidget &Back @@ -584,6 +642,14 @@ &Report an Issue... + &Informar de un problema... + + + Search + Guetar + + + %1 finished scanning your music collection diff -Nru musique-1.2.1/locale/be.ts musique-1.3/locale/be.ts --- musique-1.2.1/locale/be.ts 1970-01-01 00:00:00.000000000 +0000 +++ musique-1.3/locale/be.ts 2013-10-11 07:42:11.000000000 +0000 @@ -0,0 +1,756 @@ + +UTF-8 + + AboutView + + Version %1 + Версія %1 + + + %1 is Free Software but its development takes precious time. + %1 - гэта Свабоднае Праграмнае Забеспячэнне, але яго распрацоўка патрабуе каштоўнага часу. + + + Please <a href='%1'>donate</a> to support the continued development of %2. + Калі ласка, <a href='%1'>ахвяруйце</a> для падтрымкі далейшага развіцця %2. + + + Released under the <a href='%1'>GNU General Public License</a> + Зроблена пад <a href='%1'>GNU General Public License</a> + + + &Close + &Зачыніць + + + About + Пра праграму + + + What you always wanted to know about %1 and never dared to ask + Тое, што Вы заўсёды хацелі ведаць пра %1 і ніколі не наважваліся спытаць + + + You may want to try my other apps as well: + Вы можаце паспрабаваць мае іншыя праграмы: + + + %1, a YouTube app + %1, праграма для YouTube + + + %1, a YouTube music player + %1, музычны прайгравальнік для YouTube + + + Translate %1 to your native language using %2 + Перакладзіце %1 на Вашу родную мову, выкарыстоўваючы %2 + + + Licensed to: %1 + Ліцэнзія да: %1 + + + + ActivationDialog + + Enter your License Details + Увядзіце дэталі Вашай ліцэнзіі + + + &Email: + &Пошта: + + + &Code: + &Код: + + + + ActivationView + + Please license %1 + Калі ласка, атрымайце ліцэнзію %1 + + + This demo has expired. + Тэрмін дэманстрацыі скончыўся. + + + Without a license, the application will expire in %1 days. + Без ліцэнзіі праграма перастане працаваць праз %1 дзён. + + + By purchasing the full version, you will also support the hard work I put into creating %1. + Набыўшы поўную версію, Вы падтрымаеце маю цяжкую працу па стварэнні %1. + + + Use Demo + Выкарыстаць дэманстрацыю + + + Enter License + Увесці ліцэнзію + + + Buy License + Набыць ліцэнзію + + + The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. + Поўная версія дазваляе Вам дадаваць болей за %1 песень у спіс прайграння і слухаць музыку без перапынкаў. + + + + AlbumInfo + + Buy on %1 + Набыць на %1 + + + Read more + Чытаць яшчэ + + + + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Сартаваць паводле + + + + ArtistInfo + + Read more + Чытаць яшчэ + + + + ArtistListView + + Track Count + + + + Album Count + + + + Name + Імя + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Сартаваць паводле + + + + BreadcrumbWidget + + &Back + &Назад + + + Go back + Ісці назад + + + + ChooseFolderView + + Welcome to <a href='%1'>%2</a>, + Запрашаем у <a href='%1'>%2</a>, + + + %1 needs to scan your music collection. + %1 патрабуе сканавання Вашай музычнай калекцыі + + + Cancel + Адмена + + + Use iTunes collection + Выкарыстаць калекцыю iTunes + + + Use %1 + Выкарыстаць %1 + + + Choose a folder... + Абраць тэчку... + + + %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. + %1 злучыцца з сэрвісам Last.fm і перадасць імёны выканаўцаў і назвы альбомаў дзеля таго, каб атрымаць вокладкі, біяграфіі і іншае. + + + If you have privacy concerns about this you can quit now. + Калі Вы маеце прыватныя дадзеныя ў гэтым, можаце выйсці зараз. + + + Where's your music collection? + Дзе Ваша музычная калекцыя? + + + Select the location of your music collection. + Абраць месцазнаходжанне Вашай музычнай калекцыі. + + + Locate your collection + Вызначыць месца Вашай калекцыі + + + + ClearButton + + Clear + Ачысціць + + + + CollectionScanner + + A scanning task is already running + Сканаванне ўжо ў працэсе + + + + CollectionScannerView + + %1 is scanning your music collection. + %1 скануе Вашу музычную калекцыю. + + + %1 is using <a href='%2'>%3</a> to catalog your music. + %1 выкарыстоўвае <a href='%2'>%3</a>, каб зрабіць каталог з Вашай музыкі. + + + This will take time depending on your collection size and network speed. + Гэта адыме пэўны час у залежнасці ад памеру Вашай калекцыі і хуткасці сеткі. + + + Go grab a coffee + Выпіце пакуль кавы + + + + DownloadWidget + + Downloading update... + Запампоўваецца абнаўленне... + + + + DropArea + + Drop here to append to the playlist + Перацягніце сюды, каб далучыць да спісу прайгравання + + + + FinderWidget + + Artists + Выканаўцы + + + Albums + Альбомы + + + Folders + Тэчкі + + + + GlobalShortcuts + + Play + Граць + + + Pause + Паўза + + + Play/Pause + Граць/Паўза + + + Stop + Спыніць + + + Stop playing after current track + Спыніць гранне пасля бягучай песні + + + Next track + Наступная песня + + + Previous track + Папярэдняя песня + + + Increase volume + Гучней + + + Decrease volume + Цішэй + + + Mute + Бязгучна + + + Seek forward + Праматаць наперад + + + Seek backward + Праматаць назад + + + + LastFm + + Authentication failed + Ідэнтыфікацыя не атрымалася + + + + LastFmLoginDialog + + Log in to %1 + Увайсці ў %1 + + + &Username: + &Імя карыстальніка: + + + &Password: + &Пароль: + + + Signup for a %1 account + Увайсці ў рахунак %1 + + + Forgot your <a href='%1'>username</a> or <a href='%2'>password</a>? + Забылі Ваша <a href='%1'>імя карыстальніка</a> альбо <a href='%2'>пароль</a>? + + + Cancel + Адмена + + + + MainWindow + + &Back + &Назад + + + Go to the previous view + Ісці да папярэдняга выгляду + + + &Info + &Інфармацыя + + + Show information about the current track + Паказаць інфармацыю аб бягучай песні + + + P&revious + П&апярэдні + + + Go back to the previous track + Ісці назад да папярэдняй песні + + + &Next + &Наступны + + + Skip to the next track + Перайсці да наступнай песні + + + &Play + &Граць + + + Start playback + Пачаць прайграванне + + + &Full Screen + &Поўны экран + + + Go full screen + Уключыць на ўвесь экран + + + &Remove + &Выдаліць + + + Remove the selected tracks from the playlist + Выдаліць абраныя песні з спісу прайграння + + + Move &Up + &Вышэй + + + Move up the selected tracks in the playlist + Пасунуць вышэй абраныя песні ў спісе прайграння + + + Move &Down + Ніжэй + + + Move down the selected tracks in the playlist + Пасунуць ніжэй абраныя песні ў спісе прайграння + + + &Quit + &Выйсці + + + Bye + Да сустрэчы! + + + &Change collection folder... + &Змяніць тэчку калекцыі... + + + Choose a different music collection folder + Абраць іншую тэчку музычнай калекцыі + + + &Website + &Сайт праграмы + + + %1 on the Web + &1 у Сеціве + + + Make a &donation + А&хвяраваць + + + Please support the continued development of %1 + Калі ласка, падтрымайце для далейшага развіцця %1 + + + &About + &Пра праграму + + + Info about %1 + Інфармацыя пра %1 + + + &Clear + &Ачысціць + + + Remove all tracks from the playlist + Выдаліць усе песні з спісу прайграння + + + &Shuffle + &Выпадкова + + + Random playlist mode + Выпадковы рэжым прайграння + + + &Repeat + &Паўтарыць + + + Play first song again after all songs are played + Граць першую песню зноў пасля таго, як усе песні адыгралі + + + Mute volume + Бязгучна + + + &Application + &Праграма + + + &Playback + &Прайграванне + + + Play&list + Спіс п&райгравання + + + &View + &Выгляд + + + &Help + &Дапамога + + + Press %1 to raise the volume, %2 to lower it + Націсніце %1 для павелічэння гуку, %2 для памяншэння + + + Opening %1 + Адкрыццё %1 + + + Updating collection... + Абнаўленне калекцыі... + + + Updating collection - %1% + Абнаўленне калекцыі - %1% + + + Collection updated + Калекцыя абноўлена + + + Fatal error: %1 + Фатальная памылка: %1 + + + Error: %1 + Памылка: %1 + + + Leave &Full Screen + &Выйсці з поўнаэкраннага рэжыму + + + Remaining time: %1 + Час, які застаўся: %1 + + + Volume at %1% + Гучнасць: %1% + + + Volume is muted + Гуку няма + + + Volume is unmuted + Гук ёсць + + + Get the full version + Атрымаць поўную версію + + + %1 version %2 is now available. + %1 версія №2 даступная. + + + Remind me later + Нагадаць мне пазней + + + Update + Абнавіць + + + &Window + &Акно + + + &Minimize + &Зменшыць + + + &Close + &Зачыніць + + + Buy %1... + Купіць %1... + + + &Stop After This Track + &Спыніць пасля гэтай песні + + + &Scrobbling + &Музычны густ + + + Send played tracks titles to %1 + Даслаць назвы адыграных песень да %1 + + + &Log Out from %1 + &Выйсці з %1 + + + &Report an Issue... + &Паведаміць пра праблему... + + + Search + Пошук + + + %1 finished scanning your music collection + + + + + MediaView + + Drop items here + Перацягніце элементы сюды + + + Playlist finished + Спіс прайгравання скончыўся + + + This is just the demo version of %1. + Гэта толькі дэманстратыўная версія %1. + + + It allows you to play a few tracks so you can test the application and see if it works for you. + Гэта дазваляе прайграць некалькі песень, каб Вы маглі ацаніць праграму і зразумець, ці падыходзіць яна Вам. + + + Continue + Працягваць + + + Get the full version + Атрымаць поўную версію + + + + MessageWidget + + A new version of %1 is available! + Новая версія %1 даступная! + + + %1 %2 is now available. You have %3. + %1 %2 зараз даступна. Вы маеце %3. + + + Would you like to download it now? + Ці хочаце Вы запампаваць гэта зараз? + + + Skip This Version + Прапусціць гэтую версію + + + Remind Me Later + Нагадаць пасля + + + Install Update + Усталяваць абнаўленне + + + + PasteLineEdit + + Paste + Уставіць + + + + PlaylistModel + + This demo is limited to only %1 tracks in the playlist. + Гэта дэманстрацыя абмяжоўвае спіс прайгравання на толькі %1 песень. + + + + PlaylistView + + Playlist is empty + Спіс прайгравання пусты + + + %1 tracks - Total length is %2 + %1 песень - Усяго працягласць %2 + + + + SearchLineEdit + + Search + Пошук + + + + SearchView + + Your search had no results. + Ваш пошук не даў вынікаў. + + + + TrackListView + + Tracks + Песні + + + \ No newline at end of file diff -Nru musique-1.2.1/locale/bg.ts musique-1.3/locale/bg.ts --- musique-1.2.1/locale/bg.ts 1970-01-01 00:00:00.000000000 +0000 +++ musique-1.3/locale/bg.ts 2013-10-11 07:42:11.000000000 +0000 @@ -0,0 +1,756 @@ + +UTF-8 + + AboutView + + Version %1 + Версия %1 + + + %1 is Free Software but its development takes precious time. + % 1 е свободен софтуер, но развитието му отнема ценно време. + + + Please <a href='%1'>donate</a> to support the continued development of %2. + Моля <a href='%1'>дарете</a> за да подкрепите развитието на %2. + + + Released under the <a href='%1'>GNU General Public License</a> + Разпространява се под <a href='%1'>GNU General Public License</a> + + + &Close + &Затваряне + + + About + Относно + + + What you always wanted to know about %1 and never dared to ask + Това, което винаги сте искали да знаете за %1 , но никога не сте се осмелявали да попитате + + + You may want to try my other apps as well: + Ако искате, разгледайте и другите ми приложения: + + + %1, a YouTube app + %1, YouTube приложение + + + %1, a YouTube music player + %1, YouTube музикален плеър + + + Translate %1 to your native language using %2 + Преведете %1 на вашият роден език, като използвате %2 + + + Licensed to: %1 + Лицензирано на: %1 + + + + ActivationDialog + + Enter your License Details + Въведи информацията за твоя лиценз + + + &Email: + &Ел. поща: + + + &Code: + &Код: + + + + ActivationView + + Please license %1 + Моля лицензирайте %1 + + + This demo has expired. + Демо - версията приключи. + + + Without a license, the application will expire in %1 days. + Без лиценз, приложението ще спре да работи след %1 дни. + + + By purchasing the full version, you will also support the hard work I put into creating %1. + Купувайки пълната версия, ще подкрепите работата, която съм вложил в създаването на %1. + + + Use Demo + Използвайте Демото + + + Enter License + Въведете лиценза + + + Buy License + Купете лиценз + + + The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. + Пълната версия ти позволява да добавиш повече от %1 песни към списъка и да слушаш различни версии на всяка песен. + + + + AlbumInfo + + Buy on %1 + Купи на %1 + + + Read more + Прочетете повече + + + + AlbumListView + + Artist + Изпълнител + + + Title + Заглавие + + + Year + Година + + + Popularity + Популярност + + + Reversed Order + Обръщане на подредбата + + + Sort by + Сортирай по + + + + ArtistInfo + + Read more + Прочетете повече + + + + ArtistListView + + Track Count + Брой записи + + + Album Count + Брой албуми + + + Name + Име + + + Year + Година + + + Popularity + Популярност + + + Reversed Order + Обръщане на подредбата + + + Sort by + Сортирай по + + + + BreadcrumbWidget + + &Back + &Назад + + + Go back + Назад + + + + ChooseFolderView + + Welcome to <a href='%1'>%2</a>, + Добре дошли в <a href='%1'>%2</a>, + + + %1 needs to scan your music collection. + %1 трябва да сканира вашата музикална колекция. + + + Cancel + Отмяна + + + Use iTunes collection + Използвай iTunes колекция + + + Use %1 + Използвай %1 + + + Choose a folder... + Избор на папка... + + + %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. + %1 ще се свърже с услугите на Last.fm и ще добави към имената на изпълнителите и албумите, обложки, биография и още много неща. + + + If you have privacy concerns about this you can quit now. + Ако се притеснявате за личният си живот, може да се откажете сега. + + + Where's your music collection? + Къде се намира вашата музикална колекция? + + + Select the location of your music collection. + Изберете местоположението на вашата музикална колекция. + + + Locate your collection + Локализирайте вашата колекция + + + + ClearButton + + Clear + Изчистване + + + + CollectionScanner + + A scanning task is already running + Сканирането вече е стартирано + + + + CollectionScannerView + + %1 is scanning your music collection. + %1 сканира вашата музикална колекция. + + + %1 is using <a href='%2'>%3</a> to catalog your music. + %1 се използва <a href='%2'>%3</a> за да каталогизирате вашата музика. + + + This will take time depending on your collection size and network speed. + Това ще отнеме известно време в зависимост от размера на вашата колекция и скоростта на връзката. + + + Go grab a coffee + Отидете за кафе + + + + DownloadWidget + + Downloading update... + Сваляне на обновления... + + + + DropArea + + Drop here to append to the playlist + Поставете тук, за да добавите към списъка за изпълнение + + + + FinderWidget + + Artists + Изпълнители + + + Albums + Албуми + + + Folders + Папки + + + + GlobalShortcuts + + Play + Изпълнение + + + Pause + Пауза + + + Play/Pause + Изпълнение/Пауза + + + Stop + Спиране + + + Stop playing after current track + Спри изпълнението след текущата песен + + + Next track + Следващ запис + + + Previous track + Предишен запис + + + Increase volume + Увеличаване на звука + + + Decrease volume + Намаляване на звука + + + Mute + Заглушаване + + + Seek forward + Търси напред + + + Seek backward + Търси назад + + + + LastFm + + Authentication failed + Грешка при влизането + + + + LastFmLoginDialog + + Log in to %1 + Влизане в %1 + + + &Username: + &Потребителско име: + + + &Password: + &Парола: + + + Signup for a %1 account + Регистрирай се за %1 акаунт + + + Forgot your <a href='%1'>username</a> or <a href='%2'>password</a>? + Забравили сте вашето <a href='%1'>потребителско име</a> или <a href='%2'>парола</a>? + + + Cancel + Отмяна + + + + MainWindow + + &Back + &Назад + + + Go to the previous view + Отиди до предишното + + + &Info + &Информация + + + Show information about the current track + Покажи информация за текущият запис + + + P&revious + Предишен + + + Go back to the previous track + Обратно към предишният запис + + + &Next + &Следващ + + + Skip to the next track + Прескачане до следващият запис + + + &Play + &Изпълнение + + + Start playback + Начало на изпълнението + + + &Full Screen + &Цял екран + + + Go full screen + Отиди в режим на цял екран + + + &Remove + &Премахване + + + Remove the selected tracks from the playlist + Премахване на избраните записи от списъка за изпълнение + + + Move &Up + Преместване &Нагоре + + + Move up the selected tracks in the playlist + Преместване на избраните записи нагоре в списъка за изпълнение + + + Move &Down + Преместване &Надолу + + + Move down the selected tracks in the playlist + Преместване на избраните записи надолу в списъка за изпълнение + + + &Quit + &Спиране + + + Bye + Купи + + + &Change collection folder... + &Смяна на папката с колекцията... + + + Choose a different music collection folder + Избор на папка с друга музикална колекция + + + &Website + &Интернет страница + + + %1 on the Web + %1 в Интернет + + + Make a &donation + Направете &дарение + + + Please support the continued development of %1 + Моля, подкрепете развитието на %1 + + + &About + &Относно + + + Info about %1 + Информация за %1 + + + &Clear + &Изчистване + + + Remove all tracks from the playlist + Премахване на всички записи от списъка за изпълнение + + + &Shuffle + &Разбъркано + + + Random playlist mode + Режим на случайно подреждане в списъка + + + &Repeat + &Повторение + + + Play first song again after all songs are played + Изпълнение отново на първата песен, след, като всички песни се изпълнят + + + Mute volume + Заглушаване на звука + + + &Application + &Приложение + + + &Playback + &Възпроизвеждане + + + Play&list + &Списък + + + &View + &Преглед + + + &Help + &Помощ + + + Press %1 to raise the volume, %2 to lower it + Натиснете %1 за да увеличите звука, %2 да го намалите + + + Opening %1 + Отваряне на %1 + + + Updating collection... + Обновяване на колекцията... + + + Updating collection - %1% + Обновяване на колекцията - %1% + + + Collection updated + Колекцията е обновена + + + Fatal error: %1 + Фатална грешка: %1 + + + Error: %1 + Грешка: %1 + + + Leave &Full Screen + Напусни &Цял екран + + + Remaining time: %1 + Оставащо време: %1 + + + Volume at %1% + Сила на звука %1% + + + Volume is muted + Звукът е заглушен + + + Volume is unmuted + Звукът е пуснат + + + Get the full version + Вземете пълната версия + + + %1 version %2 is now available. + %1 версия %2 вече е налична. + + + Remind me later + Напомни ми по късно + + + Update + Обновяване + + + &Window + &Прозорец + + + &Minimize + &Минимизиране + + + &Close + &Затваряне + + + Buy %1... + Купи %1... + + + &Stop After This Track + &Спиране след този запис + + + &Scrobbling + &Превъртане + + + Send played tracks titles to %1 + Изпрати заглавията на прослушаните песни към %1 + + + &Log Out from %1 + &Изход от %1 + + + &Report an Issue... + &Докладване на проблеми... + + + Search + Търсене + + + %1 finished scanning your music collection + %1 сканирано от вашата музикална колекция + + + + MediaView + + Drop items here + Поставете елементите тук + + + Playlist finished + Списъкът е завършен + + + This is just the demo version of %1. + Това е просто демо - версия на %1. + + + It allows you to play a few tracks so you can test the application and see if it works for you. + Тя ви позволява да изпълните няколко песни, така че да тествате приложението и да видите дали ще работи при вас. + + + Continue + Продължаване + + + Get the full version + Вземете пълната версия + + + + MessageWidget + + A new version of %1 is available! + Достъпна е нова версия на %1 ! + + + %1 %2 is now available. You have %3. + %1 %2 е налична. Вие имате %3. + + + Would you like to download it now? + Искате ли да ги изтеглите сега? + + + Skip This Version + Пропусни тази версия + + + Remind Me Later + Напомни ми по- късно + + + Install Update + Инсталиране на обновлението + + + + PasteLineEdit + + Paste + Поставяне + + + + PlaylistModel + + This demo is limited to only %1 tracks in the playlist. + Тази демо - версия е ограничена само до %1 записа в списъка за изпълнение. + + + + PlaylistView + + Playlist is empty + Списъкът е празен + + + %1 tracks - Total length is %2 + %1 записа - Обща продължителност %2 + + + + SearchLineEdit + + Search + Търсене + + + + SearchView + + Your search had no results. + Не са намерени резултати. + + + + TrackListView + + Tracks + Записи + + + \ No newline at end of file diff -Nru musique-1.2.1/locale/ca_ES.ts musique-1.3/locale/ca_ES.ts --- musique-1.2.1/locale/ca_ES.ts 1970-01-01 00:00:00.000000000 +0000 +++ musique-1.3/locale/ca_ES.ts 2013-10-11 07:42:11.000000000 +0000 @@ -0,0 +1,756 @@ + +UTF-8 + + AboutView + + Version %1 + Versió %1 + + + %1 is Free Software but its development takes precious time. + %1 és Software lliure, però el seu desenvolupament pren un temps preciós. + + + Please <a href='%1'>donate</a> to support the continued development of %2. + Siusplau <a href='%1'>dóna</a> per ajudar al desenvolupament continuat del %2. + + + Released under the <a href='%1'>GNU General Public License</a> + Alliberat sota la <a href='%1'>Llicència Pública General de GNU</a> + + + &Close + &Tanca + + + About + Quant a + + + What you always wanted to know about %1 and never dared to ask + El que sempre havíeu volgut saber sobre el %1 i mai us havíeu atrevit a preguntar + + + You may want to try my other apps as well: + És possible que també vulgueu provar altres aplicacions meves: + + + %1, a YouTube app + %1, una aplicació de YouTube + + + %1, a YouTube music player + %1, un reproductor de música de YouTube + + + Translate %1 to your native language using %2 + Tradueix %1 al teu idioma utilitzant %2 + + + Licensed to: %1 + Llicenciat a: %1 + + + + ActivationDialog + + Enter your License Details + Entra els detalls de la teva llicència + + + &Email: + &Email: + + + &Code: + &Codi: + + + + ActivationView + + Please license %1 + Si us plau, llicencia el %1 + + + This demo has expired. + Aquesta demo ha expirat. + + + Without a license, the application will expire in %1 days. + Sense llicència, l'aplicació caducarà en %1 dies + + + By purchasing the full version, you will also support the hard work I put into creating %1. + Comprant la versió completa, també donarà suport al dur treball que he posat en la creació del %1. + + + Use Demo + Utilitza la demo + + + Enter License + Entra la lliçència + + + Buy License + Comprar llicència + + + The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. + La versió completa us permet afegir més de %1 pistes a la llista de reproducció i escoltar la vostra música sense interrupcions + + + + AlbumInfo + + Buy on %1 + Compra en %1 + + + Read more + Llegeix més + + + + AlbumListView + + Artist + Artista + + + Title + Títol + + + Year + Any + + + Popularity + Popularitat + + + Reversed Order + Ordre invers + + + Sort by + Ordena per + + + + ArtistInfo + + Read more + Llegeix més + + + + ArtistListView + + Track Count + Ordena per pista + + + Album Count + Ordena per àlbum + + + Name + Nom + + + Year + Any + + + Popularity + Popularitat + + + Reversed Order + Ordre invers + + + Sort by + Ordena per + + + + BreadcrumbWidget + + &Back + &Enrere + + + Go back + Ves enrere + + + + ChooseFolderView + + Welcome to <a href='%1'>%2</a>, + Benvinguts a <a href='%1'>%2</a>, + + + %1 needs to scan your music collection. + El %1 necessita escanejar la vostra col·lecció de música. + + + Cancel + Cancel·la + + + Use iTunes collection + Fes servir una col·lecció iTunes + + + Use %1 + Usa %1 + + + Choose a folder... + Escull un directori... + + + %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. + %1 es connectarà als serveis web de Last.fm i els passarà els noms dels artistes i títols dels àlbums per trobar les portades, biografies i molt més. + + + If you have privacy concerns about this you can quit now. + Si li preocupa la privacitat d'això pot sortir ara. + + + Where's your music collection? + On teniu la col·lecció de música? + + + Select the location of your music collection. + Seleccioneu la ubicació de la col·lecció de música. + + + Locate your collection + Busqueu la vostra col·lecció + + + + ClearButton + + Clear + Neteja + + + + CollectionScanner + + A scanning task is already running + Ja s'està executant un escaneig + + + + CollectionScannerView + + %1 is scanning your music collection. + El %1 està escanejant la vostra col·lecció de música. + + + %1 is using <a href='%2'>%3</a> to catalog your music. + El %1 fa servir <a href='%2'>%3</a> per catalogar la vostra música. + + + This will take time depending on your collection size and network speed. + Això prendrà temps, depenent de la mida de la vostra col·lecció i la velocitat de xarxa. + + + Go grab a coffee + Aneu a fer un cafè + + + + DownloadWidget + + Downloading update... + Descarregant actualitzacions... + + + + DropArea + + Drop here to append to the playlist + Deixeu anar aquí per afegir a la llista de reproducció + + + + FinderWidget + + Artists + Artistes + + + Albums + Àlbums + + + Folders + Carpetes + + + + GlobalShortcuts + + Play + Reprodueix + + + Pause + Pausa + + + Play/Pause + Reprodueix / Pausa + + + Stop + Atura + + + Stop playing after current track + Atura després de la pista actual + + + Next track + Pista següent + + + Previous track + Pista anterior + + + Increase volume + Augmenta el volum + + + Decrease volume + Disminueix el volum + + + Mute + Silencia + + + Seek forward + Cerca endavant + + + Seek backward + Cerca enrere + + + + LastFm + + Authentication failed + Autentificació fallida + + + + LastFmLoginDialog + + Log in to %1 + Entra a %1 + + + &Username: + Nom d'&Usuari: + + + &Password: + &Contrassenya: + + + Signup for a %1 account + Crea un compte de %1 + + + Forgot your <a href='%1'>username</a> or <a href='%2'>password</a>? + Heu oblidat el vostre <a href='%1'>Nom d'Usuari</a> or <a href='%2'>Contrassenya</a>? + + + Cancel + Cancel·la + + + + MainWindow + + &Back + &Enrere + + + Go to the previous view + Ves a la vista anterior + + + &Info + &Informació + + + Show information about the current track + Mostra informació sobre la pista actual + + + P&revious + &Previ + + + Go back to the previous track + Torna a la pista prèvia + + + &Next + &Següent + + + Skip to the next track + Salta a la pista següent + + + &Play + &Reprodueix + + + Start playback + Comença la reproducció + + + &Full Screen + Pantalla &completa + + + Go full screen + Ves a pantalla completa + + + &Remove + &Esborra + + + Remove the selected tracks from the playlist + Esborra les pistes seleccionades de la llista de reproducció + + + Move &Up + Mou A&munt + + + Move up the selected tracks in the playlist + Mou cap amunt les pistes seleccionades en la llista de reproducció + + + Move &Down + Mou A&vall + + + Move down the selected tracks in the playlist + Mou cap avall les pistes seleccionades en la llista de reproducció + + + &Quit + &Surt + + + Bye + Adéu + + + &Change collection folder... + &Canvia el directori de la col·lecció... + + + Choose a different music collection folder + Trieu una carpeta de col·lecció de música diferent + + + &Website + Pàgina &web + + + %1 on the Web + %1 en la web + + + Make a &donation + Feu una &donació + + + Please support the continued development of %1 + Siusplau recolza el desenvolupament continuat del %1 + + + &About + &Quant a + + + Info about %1 + Informació sobre el %1 + + + &Clear + &Neteja + + + Remove all tracks from the playlist + Elimina totes les peces de la llista de reproducció + + + &Shuffle + &Aleatori + + + Random playlist mode + Mode aleatori de la llista de reproducció + + + &Repeat + &Repeteix + + + Play first song again after all songs are played + Torna a reproduir la primera cançó després que hagin sonat totes les cançons + + + Mute volume + Silencia el volum + + + &Application + &Aplicació + + + &Playback + &Reproducció + + + Play&list + &Llista de reproducció + + + &View + &Vista + + + &Help + A&juda + + + Press %1 to raise the volume, %2 to lower it + Prem %1 per pujar el volum, %2 per baixar-lo + + + Opening %1 + Obrint %1 + + + Updating collection... + Actualitzant la col·lecció... + + + Updating collection - %1% + Actualitzant la col·lecció - %1% + + + Collection updated + Col·lecció actualitzada + + + Fatal error: %1 + Error fatal: %1 + + + Error: %1 + Error: %1 + + + Leave &Full Screen + Abandona la Pantalla &completa + + + Remaining time: %1 + Temps restant: %1 + + + Volume at %1% + Volum al %1% + + + Volume is muted + Volum silenciat + + + Volume is unmuted + Volum de-silenciat + + + Get the full version + Aconsegueix la versió completa + + + %1 version %2 is now available. + %1 la versió %2 ja està disponible. + + + Remind me later + Recorda'm-ho més tard + + + Update + Actualitza + + + &Window + &Finestra + + + &Minimize + &Minimitza + + + &Close + &Tanca + + + Buy %1... + Compra %1... + + + &Stop After This Track + &Atura després d'aquesta pista + + + &Scrobbling + &Scrobbling + + + Send played tracks titles to %1 + Envia les pistes reproduïdes a %1 + + + &Log Out from %1 + &Surt de %1 + + + &Report an Issue... + &Informa d'un problema... + + + Search + Cerca + + + %1 finished scanning your music collection + %1 acaba d'escanejar la vostra col·lecció de música + + + + MediaView + + Drop items here + Deixa anar elements aquí + + + Playlist finished + Llista de reproducció finalitzada + + + This is just the demo version of %1. + Això és només la versió de demostració del %1. + + + It allows you to play a few tracks so you can test the application and see if it works for you. + Li permet reproduir unes quantes pistes per provar l'aplicació i veure si li va bé. + + + Continue + Continua + + + Get the full version + Aconsegueix la versió completa + + + + MessageWidget + + A new version of %1 is available! + Una nova versió de %1 està disponible + + + %1 %2 is now available. You have %3. + %1 %2 estan disponibles. Tu tens %3. + + + Would you like to download it now? + T'agradaria descarregar-ho ara? + + + Skip This Version + Omet aquesta versió + + + Remind Me Later + Recorda-m'ho després + + + Install Update + Instal·la Actualització + + + + PasteLineEdit + + Paste + Enganxar + + + + PlaylistModel + + This demo is limited to only %1 tracks in the playlist. + Aquesta versió de prova és limitada a tan sols %1 pistes a la llista de reproducció. + + + + PlaylistView + + Playlist is empty + Llista de reproducció buida + + + %1 tracks - Total length is %2 + %1 pistes - Longitud total de %2 + + + + SearchLineEdit + + Search + Cerca + + + + SearchView + + Your search had no results. + La seva cerca no ha donat resultats. + + + + TrackListView + + Tracks + Pistes + + + \ No newline at end of file diff -Nru musique-1.2.1/locale/ca.ts musique-1.3/locale/ca.ts --- musique-1.2.1/locale/ca.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/ca.ts 2013-10-11 07:42:11.000000000 +0000 @@ -48,22 +48,22 @@ Licensed to: %1 - + Llicenciat a: %1 ActivationDialog Enter your License Details - + Entra els detalls de la teva llicència &Email: - + &Email: &Code: - + &Codi: @@ -78,7 +78,7 @@ Without a license, the application will expire in %1 days. - + Sense llicència, l'aplicació caducarà en %1 dies By purchasing the full version, you will also support the hard work I put into creating %1. @@ -90,15 +90,15 @@ Enter License - + Entra la lliçència Buy License - + Comprar llicència The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. - + La versió completa us permet afegir més de %1 pistes a la llista de reproducció i escoltar la vostra música sense interrupcions @@ -113,6 +113,33 @@ + AlbumListView + + Artist + Artista + + + Title + Títol + + + Year + Any + + + Popularity + Popularitat + + + Reversed Order + Ordre invers + + + Sort by + Ordena per + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + Ordena per pista + + + Album Count + Ordena per àlbum + + + Name + Nom + + + Year + Any + + + Popularity + Popularitat + + + Reversed Order + Ordre invers + + + Sort by + Ordena per + + + BreadcrumbWidget &Back @@ -214,7 +272,7 @@ DownloadWidget Downloading update... - + Descarregant actualitzacions... @@ -586,6 +644,14 @@ &Report an Issue... &Informa d'un problema... + + Search + Cerca + + + %1 finished scanning your music collection + %1 acaba d'escanejar la vostra col·lecció de música + MediaView @@ -618,34 +684,34 @@ MessageWidget A new version of %1 is available! - + Una nova versió de %1 està disponible %1 %2 is now available. You have %3. - + %1 %2 estan disponibles. Tu tens %3. Would you like to download it now? - + T'agradaria descarregar-ho ara? Skip This Version - + Omet aquesta versió Remind Me Later - + Recorda-m'ho després Install Update - + Instal·la Actualització PasteLineEdit Paste - + Enganxar diff -Nru musique-1.2.1/locale/cs_CZ.ts musique-1.3/locale/cs_CZ.ts --- musique-1.2.1/locale/cs_CZ.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/cs_CZ.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + Umělec + + + Title + Název + + + Year + Rok + + + Popularity + Oblíbenost + + + Reversed Order + Obrácené pořadí + + + Sort by + Třídit podle + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + Počet skladeb + + + Album Count + Počet alb + + + Name + Jméno + + + Year + Rok + + + Popularity + Oblíbenost + + + Reversed Order + Obrácené pořadí + + + Sort by + Třídit podle + + + BreadcrumbWidget &Back @@ -586,6 +644,14 @@ &Report an Issue... &Nahlásit chybu... + + Search + Hledat + + + %1 finished scanning your music collection + + MediaView diff -Nru musique-1.2.1/locale/da.ts musique-1.3/locale/da.ts --- musique-1.2.1/locale/da.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/da.ts 2013-10-11 07:42:11.000000000 +0000 @@ -8,11 +8,11 @@ %1 is Free Software but its development takes precious time. - %1 er Free Software men dens udvikling tager værdifuld tid. + %1 er fri software, men udviklingen tager værdifuld tid. Please <a href='%1'>donate</a> to support the continued development of %2. - Venligst <a href='%1'>doner</a> for at støtte den fortsatte udvikling af %2. + <a href='%1'>Doner</a> venligst for at støtte den fortsatte udvikling af %2. Released under the <a href='%1'>GNU General Public License</a> @@ -113,6 +113,33 @@ + AlbumListView + + Artist + Artist + + + Title + Titel + + + Year + År + + + Popularity + Popularitet + + + Reversed Order + Modsat rækkefølge + + + Sort by + Sorter efter + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + Antal nummere + + + Album Count + Antal album + + + Name + Navn + + + Year + År + + + Popularity + Popularitet + + + Reversed Order + Modsat rækkefølge + + + Sort by + Sorter efter + + + BreadcrumbWidget &Back @@ -587,6 +645,14 @@ &Report an Issue... &Rapporter et problem... + + Search + Søg + + + %1 finished scanning your music collection + %1 er færdig med at scanne din musiksamling + MediaView diff -Nru musique-1.2.1/locale/de.ts musique-1.3/locale/de.ts --- musique-1.2.1/locale/de.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/de.ts 2013-10-11 07:42:11.000000000 +0000 @@ -98,7 +98,7 @@ The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. - + In der Vollversion kannst du mehr als %1 Titel in die Abspielliste einfügen und ohne Unterbrechungen Musik hören. @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + + + + BreadcrumbWidget &Back @@ -586,6 +644,14 @@ &Report an Issue... Ein Problem &melden... + + Search + Suchen + + + %1 finished scanning your music collection + + MediaView diff -Nru musique-1.2.1/locale/el.ts musique-1.3/locale/el.ts --- musique-1.2.1/locale/el.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/el.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Ταξινόμηση κατά ... + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + όνομα + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Ταξινόμηση κατά ... + + + BreadcrumbWidget &Back @@ -586,6 +644,14 @@ &Report an Issue... &Αναφέρετε κάποιο σφάλμα... + + Search + Αναζήτηση + + + %1 finished scanning your music collection + + MediaView diff -Nru musique-1.2.1/locale/es_ES.ts musique-1.3/locale/es_ES.ts --- musique-1.2.1/locale/es_ES.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/es_ES.ts 2013-10-11 07:42:11.000000000 +0000 @@ -48,22 +48,22 @@ Licensed to: %1 - + Con licencia para %1 ActivationDialog Enter your License Details - + Introducir detalles de la licencia &Email: - + Corr&eo electrónico: &Code: - + &Código: @@ -78,7 +78,7 @@ Without a license, the application will expire in %1 days. - + La aplicación caducará en %1 días si no tiene una licencia. By purchasing the full version, you will also support the hard work I put into creating %1. @@ -90,11 +90,11 @@ Enter License - + Introducir licencia Buy License - + Comprar licencia The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Sortear por + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Sortear por + + + BreadcrumbWidget &Back @@ -214,7 +272,7 @@ DownloadWidget Downloading update... - + Descargando actualización... @@ -586,6 +644,14 @@ &Report an Issue... &Reporte un inconveniente... + + Search + Buscar + + + %1 finished scanning your music collection + + MediaView @@ -618,34 +684,34 @@ MessageWidget A new version of %1 is available! - + ¡Una nueva versión de %1 ya está disponible! %1 %2 is now available. You have %3. - + %1 %2 ya está disponible. Tienes la %3. Would you like to download it now? - + ¿Deseas descargarla ahora? Skip This Version - + Saltar esta versión Remind Me Later - + Recordarme después Install Update - + Instalar actualización PasteLineEdit Paste - + Pegar diff -Nru musique-1.2.1/locale/es_MX.ts musique-1.3/locale/es_MX.ts --- musique-1.2.1/locale/es_MX.ts 1970-01-01 00:00:00.000000000 +0000 +++ musique-1.3/locale/es_MX.ts 2013-10-11 07:42:11.000000000 +0000 @@ -0,0 +1,756 @@ + +UTF-8 + + AboutView + + Version %1 + Versión %1 + + + %1 is Free Software but its development takes precious time. + %1 es Software Libre pero su desarrollo toma tiempo valioso. + + + Please <a href='%1'>donate</a> to support the continued development of %2. + Por favor <a href='%1'>dona</a> para apoyar el continuo desarrollo de %2. + + + Released under the <a href='%1'>GNU General Public License</a> + Publicado bajo la <a href='%1'>Licencia Pública General GNU</a> + + + &Close + &Cerrar + + + About + Acerca de + + + What you always wanted to know about %1 and never dared to ask + Lo que siempre quisiste saber acerca de %1 y nunca se atrevió a preguntar + + + You may want to try my other apps as well: + Puedes probar mis otras aplicaciones también: + + + %1, a YouTube app + %1, una aplicación de YouTube + + + %1, a YouTube music player + &1, un reproductor de música de YouTube + + + Translate %1 to your native language using %2 + Traducir %1 a tu lenguaje nativo usando %2 + + + Licensed to: %1 + Licencia para: %1 + + + + ActivationDialog + + Enter your License Details + Ingresa tus detalles de licensia + + + &Email: + &Correo: + + + &Code: + &Código: + + + + ActivationView + + Please license %1 + + + + This demo has expired. + Esta demo ha expirado. + + + Without a license, the application will expire in %1 days. + Sin una licensia, la aplicación expirará en %1 días. + + + By purchasing the full version, you will also support the hard work I put into creating %1. + Con la compra de la versión completa, apoyará el trabajo duro que he puesto en la creación de %1. + + + Use Demo + Usar Demo + + + Enter License + Ingresa Licensia + + + Buy License + Comprar Licensia + + + The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. + La versión completa te permite agregar mas de %1 pistas a la lista de reproducción y escuchar tu música sin interrupciones. + + + + AlbumInfo + + Buy on %1 + Comprar en %1 + + + Read more + Leer más + + + + AlbumListView + + Artist + Artista + + + Title + Título + + + Year + Año + + + Popularity + Popularidad + + + Reversed Order + + + + Sort by + Ordenar por + + + + ArtistInfo + + Read more + Leer más + + + + ArtistListView + + Track Count + + + + Album Count + + + + Name + + + + Year + Año + + + Popularity + Popularidad + + + Reversed Order + + + + Sort by + Ordenar por + + + + BreadcrumbWidget + + &Back + &Atrás + + + Go back + Ir atrás + + + + ChooseFolderView + + Welcome to <a href='%1'>%2</a>, + Bienvenido a <a href='%1'>%2</a>, + + + %1 needs to scan your music collection. + %1 necesita escanear tu colección de música + + + Cancel + Cancelar + + + Use iTunes collection + Usar colección de iTunes + + + Use %1 + Usar %1 + + + Choose a folder... + Elige una carpeta... + + + %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. + %1 se conectará con los servicios web de Last.fm y transferirá los nombres de artistas y títulos de álbums para extraer el arte de la tapa, biografías y mucho más. + + + If you have privacy concerns about this you can quit now. + Si tienes preocupaciones de privacidad acerca de esto puedes abandonarlo ahora. + + + Where's your music collection? + ¿Dónde está tu colección de música? + + + Select the location of your music collection. + Selecciona la ubicación de tu colección de música. + + + Locate your collection + Ubicar tu colección + + + + ClearButton + + Clear + Limpiar + + + + CollectionScanner + + A scanning task is already running + Una tarea de escaneo se está ejecutando + + + + CollectionScannerView + + %1 is scanning your music collection. + %1 está escaneando tu colección de música. + + + %1 is using <a href='%2'>%3</a> to catalog your music. + %1 está usando <a href='%2'>%3</a> para catalogar tu música. + + + This will take time depending on your collection size and network speed. + Esto tomará tiempo dependiendo del tamaño de tu colección y velocidad de conexión. + + + Go grab a coffee + Ve a tomar un café + + + + DownloadWidget + + Downloading update... + Descargando actualizaciones... + + + + DropArea + + Drop here to append to the playlist + Arrastra aquí para añadir a la lista de reproducción + + + + FinderWidget + + Artists + Artistas + + + Albums + Álbums + + + Folders + Carpetas + + + + GlobalShortcuts + + Play + Reproducir + + + Pause + Pausa + + + Play/Pause + Reproducir/Pausa + + + Stop + Detener + + + Stop playing after current track + Detener reproducción despues de la pista actual + + + Next track + Pista siguiente + + + Previous track + Pista anterior + + + Increase volume + Subir volumen + + + Decrease volume + Bajar volumen + + + Mute + Mudo + + + Seek forward + + + + Seek backward + + + + + LastFm + + Authentication failed + Autenticación fallida + + + + LastFmLoginDialog + + Log in to %1 + Iniciar sesión para %1 + + + &Username: + &Usuario: + + + &Password: + &Contraseña: + + + Signup for a %1 account + Registrase para una cuenta de %1 + + + Forgot your <a href='%1'>username</a> or <a href='%2'>password</a>? + Olvidaste tu <a href='%1'> usuario</a> o <a href='%2'>contraseña</a>? + + + Cancel + Cancelar + + + + MainWindow + + &Back + &Atrás + + + Go to the previous view + Ir a la vista previa + + + &Info + $Info + + + Show information about the current track + Mostar información acerca de la pista actual + + + P&revious + + + + Go back to the previous track + Ir atrás a la pista anterior + + + &Next + + + + Skip to the next track + Saltar a la pista siguiente + + + &Play + &Reproducir + + + Start playback + Iniciar reproducción + + + &Full Screen + &Pantalla completa + + + Go full screen + Ir a pantalla completa + + + &Remove + &Eliminar + + + Remove the selected tracks from the playlist + Eliminar las pistas seleccionadas de la lista de reproducción + + + Move &Up + &Subir + + + Move up the selected tracks in the playlist + Subir las pistas seleccionadas en la lista de reproducción + + + Move &Down + + + + Move down the selected tracks in the playlist + + + + &Quit + &Salir + + + Bye + Adiós + + + &Change collection folder... + &Cambiar carpeta de colección... + + + Choose a different music collection folder + Elige una carpeta de colección de música diferente + + + &Website + &Sitio Web + + + %1 on the Web + %1 en la Web + + + Make a &donation + Hacer una &donación + + + Please support the continued development of %1 + Por favor apoya el continuo desarrollo de %1 + + + &About + &Acerca de + + + Info about %1 + Información acerca de %1 + + + &Clear + &Limpiar + + + Remove all tracks from the playlist + Elimiar todas las pistas de la lista de reproducción + + + &Shuffle + &Aleatorio + + + Random playlist mode + Lista de reproducción en modo aleatorio + + + &Repeat + &Repetir + + + Play first song again after all songs are played + Reproducir primer canción después de que todas las canciones se hayan reproducido + + + Mute volume + Silenciar + + + &Application + &Aplicación + + + &Playback + + + + Play&list + + + + &View + &Ver + + + &Help + &Ayuda + + + Press %1 to raise the volume, %2 to lower it + Presiona %1 para subir el volumen, %2 para bajarlo + + + Opening %1 + Abriendo %1 + + + Updating collection... + Actualizando colección... + + + Updating collection - %1% + Actualizando colección - %1% + + + Collection updated + Colección actualizada + + + Fatal error: %1 + Error fatal: %1 + + + Error: %1 + Error: %1 + + + Leave &Full Screen + Quitar &Pantalla Completa + + + Remaining time: %1 + Tiempo restante: %1 + + + Volume at %1% + Volumen a %1% + + + Volume is muted + Volumen está silenciado + + + Volume is unmuted + + + + Get the full version + Conseguir la versión completa + + + %1 version %2 is now available. + %1 versión %2 está disponible ahora. + + + Remind me later + Recordarme después + + + Update + Actualizar + + + &Window + &Ventana + + + &Minimize + &Minimizar + + + &Close + &Cerrar + + + Buy %1... + Comprar %1 + + + &Stop After This Track + &Detener después de esta pista + + + &Scrobbling + &Scrobbling + + + Send played tracks titles to %1 + Enviar títulos de pistas reproduccidas a %1 + + + &Log Out from %1 + &Cerrar sesión de %1 + + + &Report an Issue... + &Reporta un problema... + + + Search + Buscar + + + %1 finished scanning your music collection + %1 escaneo de tu colección de música terminado + + + + MediaView + + Drop items here + Arrastra objetos aquí + + + Playlist finished + Lista de reproducción finalizada + + + This is just the demo version of %1. + Esto es solo una versión demo de %1. + + + It allows you to play a few tracks so you can test the application and see if it works for you. + Permite reproducir algunas pistas para que puedas probar la aplicación y ver como trabaja para ti. + + + Continue + Continuar + + + Get the full version + Conseguir la versión completa + + + + MessageWidget + + A new version of %1 is available! + Una nueva versión de %1 esta disponible! + + + %1 %2 is now available. You have %3. + %1 %2 está disponible ahora. Tienes %3. + + + Would you like to download it now? + ¿Te gustaría descargarla ahora? + + + Skip This Version + Saltar esta versión + + + Remind Me Later + Recordarme después + + + Install Update + Instalar actualizaciones + + + + PasteLineEdit + + Paste + Pegar + + + + PlaylistModel + + This demo is limited to only %1 tracks in the playlist. + Este demo está limitado solo a %1 de pistas en la lista de reproducción + + + + PlaylistView + + Playlist is empty + Lista de reproducción está vacía + + + %1 tracks - Total length is %2 + %1 pistas - Duración total %2 + + + + SearchLineEdit + + Search + Buscar + + + + SearchView + + Your search had no results. + Tu búsqueda no tuvo resultados. + + + + TrackListView + + Tracks + Pistas + + + \ No newline at end of file diff -Nru musique-1.2.1/locale/es.ts musique-1.3/locale/es.ts --- musique-1.2.1/locale/es.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/es.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + Artista + + + Title + Titulo + + + Year + Año + + + Popularity + Popularidad + + + Reversed Order + Orden Invertido + + + Sort by + Ordenar por + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + Ordernar por pista + + + Album Count + Ordenar por album + + + Name + Nombre + + + Year + Año + + + Popularity + Popularidad + + + Reversed Order + Orden Invertido + + + Sort by + Ordenar por + + + BreadcrumbWidget &Back @@ -154,7 +212,7 @@ Choose a folder... - Escoge una carpeta... + Elige una carpeta %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. @@ -162,7 +220,7 @@ If you have privacy concerns about this you can quit now. - Si tienes preocupaciones de privacía respecto a esto puedes salir ahora. + Si tienes preocupaciones de privacidad respecto a esto puedes salir ahora. Where's your music collection? @@ -221,7 +279,7 @@ DropArea Drop here to append to the playlist - Déjalo caer aquí para añadirlo a la lista de reproducción + Arrástralo aquí para añadirlo a la lista de reproducción @@ -251,7 +309,7 @@ Play/Pause - Reproducir/pausar + Reproducir/Pausar Stop @@ -376,7 +434,7 @@ &Remove - Q&uitar + &Quitar Remove the selected tracks from the playlist @@ -586,6 +644,14 @@ &Report an Issue... &Informar de un problema... + + Search + Buscar + + + %1 finished scanning your music collection + + MediaView diff -Nru musique-1.2.1/locale/fa_IR.ts musique-1.3/locale/fa_IR.ts --- musique-1.2.1/locale/fa_IR.ts 1970-01-01 00:00:00.000000000 +0000 +++ musique-1.3/locale/fa_IR.ts 2013-10-11 07:42:11.000000000 +0000 @@ -0,0 +1,756 @@ + +UTF-8 + + AboutView + + Version %1 + نسخه %1 + + + %1 is Free Software but its development takes precious time. + %1 یک نرم‌افزار آزاد است اما توسعه آن زمان بسیار زیادی می‌گیرد. + + + Please <a href='%1'>donate</a> to support the continued development of %2. + لطفا برای پشتیبانی از ادامه‌ی توسعه %2 <a href='%1'>کمک</a> کنید. + + + Released under the <a href='%1'>GNU General Public License</a> + منتشر شده تحت <a href='%1'>گواهینامه‌ی عمومی گنو</a> + + + &Close + &خروج + + + About + درباره + + + What you always wanted to know about %1 and never dared to ask + همان چیزی که همیشه سعی داشتید درباره %1 بدانید اما جرات پرسیدنش را نداشتید + + + You may want to try my other apps as well: + ممکن است بخواهید برنامه‌های دیگر من را نیز امتحان کنید: + + + %1, a YouTube app + %1، یک برنامه برای یوتیوب + + + %1, a YouTube music player + %1، یک پخش‌کننده‌ی موسیقی برای یوتیوب + + + Translate %1 to your native language using %2 + %1 را به زبان مادری خود با استفاده از %2 ترجمه کنید + + + Licensed to: %1 + گواهی شده: %1 + + + + ActivationDialog + + Enter your License Details + اطلاعات گواهینامه خود را وارد کنید + + + &Email: + &پست‌الکترونیکی: + + + &Code: + &کد: + + + + ActivationView + + Please license %1 + لطفا گواهینامه %1 + + + This demo has expired. + این نسخه آزمایشی منقضی شده است. + + + Without a license, the application will expire in %1 days. + بدون گواهینامه این برنامه تا %1 روز دیگر منقضی می‌شود. + + + By purchasing the full version, you will also support the hard work I put into creating %1. + با خریداری نسخه کامل، شما از تلاش بسیار زیاد من برای ساخت %1 کمک می‌کنید. + + + Use Demo + استفاده از نسخه آزمایشی + + + Enter License + واردکردن گواهینامه + + + Buy License + خرید گواهینامه + + + The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. + نسخه کامل به شما اجازه می‌دهد که بیش از %1 موسیقی را به فهرست‌پخش خود اضافه و گوش کنید. + + + + AlbumInfo + + Buy on %1 + خرید از %1 + + + Read more + بیشتر بخوانید + + + + AlbumListView + + Artist + هنرمند + + + Title + عنوان + + + Year + سال + + + Popularity + شهرت + + + Reversed Order + چیدمان معکوس + + + Sort by + مرتب‌سازی براساس + + + + ArtistInfo + + Read more + بیشتر بخوانید + + + + ArtistListView + + Track Count + تعداد آهنگ‌ها + + + Album Count + تعداد آلبوم + + + Name + نام + + + Year + سال + + + Popularity + شهرت + + + Reversed Order + چیدمان معکوس + + + Sort by + مرتب‌سازی براساس + + + + BreadcrumbWidget + + &Back + &برگشت + + + Go back + بر به عقب + + + + ChooseFolderView + + Welcome to <a href='%1'>%2</a>, + به <a href='%1'>%2</a> خوش‌آمدید، + + + %1 needs to scan your music collection. + %1 احتیاج دارد که مجموعه موسیقی شما را پایش کند. + + + Cancel + لغو + + + Use iTunes collection + استفاده از مجموعه‌ی iTunes + + + Use %1 + استفاده از %1 + + + Choose a folder... + انتخاب یک پوشه... + + + %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. + %1 به سرویس وب Last.fm متصل خواهد شد و اطلاعات نام هنرمند و عنوان آلبوم‌ها را جهت دریافت عکس پوششی آلبوم، زندگی‌نامه و چیزهای دیگر، ارسال خواهد کرد. + + + If you have privacy concerns about this you can quit now. + اگر نگرانی‌هایی در خصوص حریم‌خصوصی خود دارید می‌توانید همین الان خارج شوید. + + + Where's your music collection? + مجموعه‌ی موسیقی شما کجاست؟ + + + Select the location of your music collection. + محل مجموعه‌ی موسیقی خود را انتخاب کنید. + + + Locate your collection + مکان مجموعه‌ی خود را مشخص کنید + + + + ClearButton + + Clear + پاک کردن + + + + CollectionScanner + + A scanning task is already running + درحال حاضر یک پایش درحال اجراست + + + + CollectionScannerView + + %1 is scanning your music collection. + %1 در حال پایش مجموعه موسیقی شماست. + + + %1 is using <a href='%2'>%3</a> to catalog your music. + %1 در حال استفاده از <a href='%2'>%3</a> برای کاتلوگ کردن موسیقی شماست. + + + This will take time depending on your collection size and network speed. + این عمل با توجه به اندازه مجموعه‌ی موسیقی شما و سرعت اینترنتتان ممکن است طول بکشد. + + + Go grab a coffee + یک فنجون قهوه برای خودت بریز + + + + DownloadWidget + + Downloading update... + درحال بارگیری بروزرسانی... + + + + DropArea + + Drop here to append to the playlist + اینجا بندازید تا به فهرست پخش شما اضافه شود + + + + FinderWidget + + Artists + هنرمندان + + + Albums + آلبوم‌ها + + + Folders + پوشه‌ها + + + + GlobalShortcuts + + Play + پخش + + + Pause + مکث + + + Play/Pause + پخش/مکث + + + Stop + توقف + + + Stop playing after current track + توقف پخش پس از موسیقی فعلی + + + Next track + موسیقی بعدی + + + Previous track + موسیقی قبلی + + + Increase volume + افزایش بلندی صدا + + + Decrease volume + کاهش بلندی صدا + + + Mute + بی‌صدا + + + Seek forward + انتقال به جلو + + + Seek backward + انتقال به عقب + + + + LastFm + + Authentication failed + تصدیق هویت شکست خورد + + + + LastFmLoginDialog + + Log in to %1 + به %1 وارد شوید + + + &Username: + &نام‌کاربری: + + + &Password: + &گذرواژه: + + + Signup for a %1 account + ثبت‌نام برای یک حساب %1 + + + Forgot your <a href='%1'>username</a> or <a href='%2'>password</a>? + <a href='%1'>نام‌کاربری</a> یا <a href='%2'>گذرواژه‌ی</a> خود را فراموش کرده‌اید؟ + + + Cancel + لغو + + + + MainWindow + + &Back + &عقب + + + Go to the previous view + رفتن به نما قبلی + + + &Info + &اطلاعات + + + Show information about the current track + نمایش اطلاعات مربوط به موسیقی فعلی + + + P&revious + &قبلی + + + Go back to the previous track + به موسیقی قبلی برو + + + &Next + &بعدی + + + Skip to the next track + به موسیقی بعدی برو + + + &Play + &پخش + + + Start playback + شروع پخش + + + &Full Screen + &تمام‌صفحه + + + Go full screen + به حالت تمام‌صفحه برو + + + &Remove + &حذف + + + Remove the selected tracks from the playlist + حذف موسیقی انتخاب شده از فهرست‌پخش + + + Move &Up + انتقال به &بالا + + + Move up the selected tracks in the playlist + انتقال موسیقی انتخاب شده به بالا در فهرست پخش + + + Move &Down + انتقال به &پایین + + + Move down the selected tracks in the playlist + انتقال موسیقی انتخاب شده به پایین در فهرست پخش + + + &Quit + &خروج + + + Bye + خداحافظ + + + &Change collection folder... + &تعویض پوشه‌ی مجموعه... + + + Choose a different music collection folder + انتخاب یک مکان متفاوت برای پوشه مجموعه‌ی موسیقی‌ها + + + &Website + &پایگاه وب + + + %1 on the Web + %1 بر روی وب + + + Make a &donation + &کمک کردن + + + Please support the continued development of %1 + لطفا از ادامه ی توسعه‌ی %1 پشتیبانی کنید + + + &About + &درباره + + + Info about %1 + اطلاعات درباره %1 + + + &Clear + &پاک کردن + + + Remove all tracks from the playlist + حذف تمام موسیقی‌ها از فهرست‌پخش + + + &Shuffle + &اتفاقی + + + Random playlist mode + حالت + + + &Repeat + &تکرار + + + Play first song again after all songs are played + پخش اولین آهنگ پس از پخش تمام آهنگ‌ها + + + Mute volume + خاموش‌کردن صدا + + + &Application + &برنامه + + + &Playback + &پخش + + + Play&list + &فهرست‌پخش + + + &View + &نما + + + &Help + &راهنما + + + Press %1 to raise the volume, %2 to lower it + برای بلند کردن صدا %1 را فشار دهید و برای کم کردن آن %2 + + + Opening %1 + درحال باز کردن %1 + + + Updating collection... + بروزرسانی مجموعه... + + + Updating collection - %1% + بروزرسانی مجموعه - %1% + + + Collection updated + مجموعه بروزرسانی شد + + + Fatal error: %1 + خطا حیاتی: %1 + + + Error: %1 + خطا: %1 + + + Leave &Full Screen + &خارج شدن از تمام‌صفحه + + + Remaining time: %1 + زمان باقی‌مانده: %1 + + + Volume at %1% + بلندی صدا در %1% + + + Volume is muted + صدا قطع شده است + + + Volume is unmuted + صدا وصل شده است + + + Get the full version + دریافت نسخه کامل + + + %1 version %2 is now available. + %1 نسخه %2 موجود است. + + + Remind me later + بعدا یادآوری کن + + + Update + بروزرسانی + + + &Window + &پنجره + + + &Minimize + &کمینه کردن + + + &Close + &خروج + + + Buy %1... + خرید %1... + + + &Stop After This Track + &توقف بعد از این موسیقی + + + &Scrobbling + &درحال اسکروبل + + + Send played tracks titles to %1 + ارسال موسیقی‌های پخش شده به %1 + + + &Log Out from %1 + &خروج از %1 + + + &Report an Issue... + &گزارش یک مشکل... + + + Search + جست‌وجو + + + %1 finished scanning your music collection + %1 پایش مجموعه موسیقی شما را به پایان برد + + + + MediaView + + Drop items here + موسیقی‌ها را اینجا بیاندازید + + + Playlist finished + فهرست‌پخش تمام شد + + + This is just the demo version of %1. + این تنها نسخه آزمایشی %1 است. + + + It allows you to play a few tracks so you can test the application and see if it works for you. + این نسخه تنها به شما اجازه می‌دهد تا تعدادی از آهنگ‌ها را برای آزمایش اینکه برنامه برای شما کار میکند پخش کنید. + + + Continue + ادامه + + + Get the full version + دریافت نسخه کامل + + + + MessageWidget + + A new version of %1 is available! + یک نسخه جدید از %1 موجود است! + + + %1 %2 is now available. You have %3. + %1 %2 موجود است. شما %3 را دارید. + + + Would you like to download it now? + آیا مایلید که هم‌اکنون آن را دانلود کنید؟ + + + Skip This Version + این نسخه لازم نیست + + + Remind Me Later + بعدا یادآوری کن + + + Install Update + نصب بروزرسانی + + + + PasteLineEdit + + Paste + چسباندن + + + + PlaylistModel + + This demo is limited to only %1 tracks in the playlist. + این دمو فقط محدود به %1 موسیقی در فهرست پخش است. + + + + PlaylistView + + Playlist is empty + فهرست‌پخش خالی است + + + %1 tracks - Total length is %2 + %1 موسیقی - در مجموع به میزان %2 + + + + SearchLineEdit + + Search + جست‌وجو + + + + SearchView + + Your search had no results. + جست‌وجو شما نتیجه‌ای در بر نداشت. + + + + TrackListView + + Tracks + موسیقی‌ها + + + \ No newline at end of file diff -Nru musique-1.2.1/locale/fi_FI.ts musique-1.3/locale/fi_FI.ts --- musique-1.2.1/locale/fi_FI.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/fi_FI.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + Artisti + + + Title + Nimi + + + Year + Vuosi + + + Popularity + Suosio + + + Reversed Order + Käänteinen järjestys + + + Sort by + Järjestysperuste + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + Kappalemäärä + + + Album Count + Levymäärä + + + Name + Nimi + + + Year + Vuosi + + + Popularity + Suosio + + + Reversed Order + Käänteinen järjestys + + + Sort by + Järjestysperuste + + + BreadcrumbWidget &Back @@ -134,11 +192,11 @@ ChooseFolderView Welcome to <a href='%1'>%2</a>, - Tervetuloa sovellukseen <a href='%1'>%2</a>, + Tervetuloa, käytössäsi on <a href='%1'>%2</a> %1 needs to scan your music collection. - %1 haluaa skannata musiikkikokoelmasi. + %1 haluaa tutkia musiikkikokoelmasi. Cancel @@ -158,7 +216,7 @@ %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. - %1 yhdistää Last.fm -verkkopalveluihin ja välittää artistin ja albumin nimen noutaakseen kansitaiteen, biografian ja paljon muuta. + %1 yhdistää Last.fm-verkkopalveluihin ja välittää esittäjän sekä levyn nimen noutaakseen kansitaiteen, biografian ja paljon muuta. If you have privacy concerns about this you can quit now. @@ -188,14 +246,14 @@ CollectionScanner A scanning task is already running - Skannaus on jo käynnissä + Tutkinta on jo käynnissä CollectionScannerView %1 is scanning your music collection. - %1 skannaa musiikkikirjastoasi. + %1 tutkii musiikkikirjastoasi. %1 is using <a href='%2'>%3</a> to catalog your music. @@ -368,7 +426,7 @@ &Full Screen - &Kokonäyttö + &Koko näyttö Go full screen @@ -586,6 +644,14 @@ &Report an Issue... &Ilmoita ongelmasta... + + Search + Etsi + + + %1 finished scanning your music collection + %1 sai valmiiksi musiikkikokoelmasi tutkimisen + MediaView diff -Nru musique-1.2.1/locale/fr.ts musique-1.3/locale/fr.ts --- musique-1.2.1/locale/fr.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/fr.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + Artiste + + + Title + Titre + + + Year + Année + + + Popularity + Popularité + + + Reversed Order + Ordre inversé + + + Sort by + Trier par + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + Nombre de morceaux + + + Album Count + Nombre d’albums + + + Name + Nom + + + Year + Année + + + Popularity + Popularité + + + Reversed Order + Ordre inversé + + + Sort by + Trier par + + + BreadcrumbWidget &Back @@ -587,6 +645,14 @@ &Report an Issue... &Signaler un problème... + + Search + Chercher + + + %1 finished scanning your music collection + %1 a fini de parcourir votre collection musicale + MediaView diff -Nru musique-1.2.1/locale/gl.ts musique-1.3/locale/gl.ts --- musique-1.2.1/locale/gl.ts 1970-01-01 00:00:00.000000000 +0000 +++ musique-1.3/locale/gl.ts 2013-10-11 07:42:11.000000000 +0000 @@ -0,0 +1,756 @@ + +UTF-8 + + AboutView + + Version %1 + Versión %1 + + + %1 is Free Software but its development takes precious time. + %1 é software libre mais aínda así o seu desenvolvemento leva o seu prezado tempo. + + + Please <a href='%1'>donate</a> to support the continued development of %2. + Por favor, <a href='%1'>doa</a> coa fin de axudar a seguirmos desenvolvendo %2. + + + Released under the <a href='%1'>GNU General Public License</a> + Lanzado baixo a <a href='%1'>GNU General Public License</a> + + + &Close + &Pechar + + + About + Acerca de + + + What you always wanted to know about %1 and never dared to ask + O que vostede sempre quixo saber sobre %1 e nunca se atreveu a preguntar + + + You may want to try my other apps as well: + Pode querer probar tamén os outros aplicativos meus: + + + %1, a YouTube app + %1, un aplicativo de YouTube + + + %1, a YouTube music player + %1, un reprodutor de música de YouTube + + + Translate %1 to your native language using %2 + Traducir do %1 ao seu idioma nativo usando %2 + + + Licensed to: %1 + Baixo licenza por: %1 + + + + ActivationDialog + + Enter your License Details + Introduce os detalles da túa licenza + + + &Email: + &Correo electrónico: + + + &Code: + &Código: + + + + ActivationView + + Please license %1 + Licenza %1 + + + This demo has expired. + Esta demo caducou. + + + Without a license, the application will expire in %1 days. + Sen licenza o aplicativo expira en %1 días. + + + By purchasing the full version, you will also support the hard work I put into creating %1. + Ao comprar a versión completa, tamén vai apoiar o traballo arreo que puxen en crear %1. + + + Use Demo + Usar a demostración + + + Enter License + Introducir a licenza + + + Buy License + Comprar a licenza + + + The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. + A versión completa permíteche engadir máis que %1 pistas á lista de reprodución e escoitar a túa música sen interrupcións. + + + + AlbumInfo + + Buy on %1 + Comprar en %1 + + + Read more + Ler máis + + + + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Ordenar por + + + + ArtistInfo + + Read more + Ler máis + + + + ArtistListView + + Track Count + + + + Album Count + + + + Name + Nome + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Ordenar por + + + + BreadcrumbWidget + + &Back + &Atrás + + + Go back + Ir atrás + + + + ChooseFolderView + + Welcome to <a href='%1'>%2</a>, + Benvido a <a href='%1'>%2</a>, + + + %1 needs to scan your music collection. + %1 precisa escanear a túa colección de música. + + + Cancel + Cancelar + + + Use iTunes collection + Usar a colección de iTunes + + + Use %1 + Usar %1 + + + Choose a folder... + Escoller un cartafol... + + + %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. + %1 conectarase cos servizos web de Last.fm e remitirlles os nomes de artistas e títulos dos álbums para, con iso, obter as portadas dos álbums, as biografías e outras tantas cousas máis. + + + If you have privacy concerns about this you can quit now. + Se tes dúbidas sobre da privacidade que isto che supón podes saír agora mesmo. + + + Where's your music collection? + Onde tes a túa colección de música? + + + Select the location of your music collection. + Indica onde está a túa colección de música + + + Locate your collection + Indica onde está túa colección + + + + ClearButton + + Clear + Limpar + + + + CollectionScanner + + A scanning task is already running + Xa se está a executar unha tarefa de análise + + + + CollectionScannerView + + %1 is scanning your music collection. + %1 está a analizar a túa colección de música. + + + %1 is using <a href='%2'>%3</a> to catalog your music. + %1 está a empregar <a href='%2'>%3</a> para catalogar a túa música. + + + This will take time depending on your collection size and network speed. + A isto levaralle un anaco, máis ou menos segundo sexa o tamaño da colección e a conexión á rede. + + + Go grab a coffee + Vai e colle un café + + + + DownloadWidget + + Downloading update... + Descargando a actualización... + + + + DropArea + + Drop here to append to the playlist + Arrástrao aquí para poñelo na lista de reprodución + + + + FinderWidget + + Artists + Artistas + + + Albums + Álbums + + + Folders + Cartafoles + + + + GlobalShortcuts + + Play + Reproducir + + + Pause + Deter + + + Play/Pause + Reproducir/deter + + + Stop + Parar + + + Stop playing after current track + Parar a reprodución despois da pista actual + + + Next track + Seguinte pista + + + Previous track + Pista anterior + + + Increase volume + Aumentar volume + + + Decrease volume + Diminuír volume + + + Mute + Silenciar + + + Seek forward + Buscar cara adiante + + + Seek backward + Buscar cara atrás + + + + LastFm + + Authentication failed + Fallou a autenticación + + + + LastFmLoginDialog + + Log in to %1 + Entrar en %1 + + + &Username: + &Nome de usuario: + + + &Password: + &Contrasinal: + + + Signup for a %1 account + Rexistrar unha conta en %1 + + + Forgot your <a href='%1'>username</a> or <a href='%2'>password</a>? + Esqueciches o <a href='%1'>nome do usuario</a> ou o <a href='%2'>contrasinal</a>? + + + Cancel + Cancelar + + + + MainWindow + + &Back + &Atrás + + + Go to the previous view + Ir á vista anterior + + + &Info + &Información + + + Show information about the current track + Mostrar a información da pista actual + + + P&revious + A&nterior + + + Go back to the previous track + Ir á pista anterior + + + &Next + &Seguinte + + + Skip to the next track + Ir á seguinte pista + + + &Play + &Reproducir + + + Start playback + Comezar a reprodución + + + &Full Screen + &Pantalla completa + + + Go full screen + Ir á pantalla completa + + + &Remove + &Retirar + + + Remove the selected tracks from the playlist + Retirar as pistas seleccionadas da lista de reprodución + + + Move &Up + Mover cara &arriba + + + Move up the selected tracks in the playlist + Mover cara arriba as pistas seleccionadas na lista de reprodución + + + Move &Down + Mover cara a&baixo + + + Move down the selected tracks in the playlist + Mover cara abaixo as pistas seleccionadas na lista de reprodución + + + &Quit + &Saír + + + Bye + Deica logo + + + &Change collection folder... + &Cambiar o cartafol da colección... + + + Choose a different music collection folder + Escolle outro cartafol de colección de música + + + &Website + Sitio &web + + + %1 on the Web + %1 na web + + + Make a &donation + Facer unha &doazón + + + Please support the continued development of %1 + Por favor apoie o desenvolvemento continuo de %1 + + + &About + &Sobre + + + Info about %1 + Información acerca de %1 + + + &Clear + &Limpar + + + Remove all tracks from the playlist + Retirar todas as pistas da lista de reprodución + + + &Shuffle + Ao &chou + + + Random playlist mode + Modo de reprodución ao chou + + + &Repeat + &Repetir + + + Play first song again after all songs are played + Reproducir de novo a primeira canción despois de todas as cancións sexan reproducidas + + + Mute volume + Silenciar o volume + + + &Application + &Aplicativo + + + &Playback + &Reproducir + + + Play&list + &Lista de reprodución + + + &View + &Ver + + + &Help + A&xuda + + + Press %1 to raise the volume, %2 to lower it + Prema %1 para aumentar o volume, %2 para diminuílo + + + Opening %1 + Abrindo %1 + + + Updating collection... + Actualizando a colección... + + + Updating collection - %1% + Actualizando a colección - %1% + + + Collection updated + Actualizouse a colección + + + Fatal error: %1 + Erro fatídico: %1 + + + Error: %1 + Erro: %1 + + + Leave &Full Screen + Saír da &pantalla completa + + + Remaining time: %1 + Tempo restante: %1 + + + Volume at %1% + Volume en %1% + + + Volume is muted + O volume está silenciado + + + Volume is unmuted + O volume non está silenciado + + + Get the full version + Obter a versión completa + + + %1 version %2 is now available. + %1 versión %2 xa está dispoñíbel. + + + Remind me later + Lembrar máis adiante + + + Update + Actualizar + + + &Window + &Xanela + + + &Minimize + &Minimizar + + + &Close + &Pechar + + + Buy %1... + Mercar %1... + + + &Stop After This Track + &Deter despois desta pista + + + &Scrobbling + &Scrobbling + + + Send played tracks titles to %1 + Enviar os títulos das pistas que soaron a %1 + + + &Log Out from %1 + &Saír de %1 + + + &Report an Issue... + &Informar dun erro... + + + Search + Buscar + + + %1 finished scanning your music collection + + + + + MediaView + + Drop items here + Soltar elementos aquí + + + Playlist finished + A lista de reprodución rematou + + + This is just the demo version of %1. + Isto é só a versión demo de %1. + + + It allows you to play a few tracks so you can test the application and see if it works for you. + Permíteche reproducir unhas cantas pistas e con iso comprobar como traballa o aplicativo e se che serve. + + + Continue + Continuar + + + Get the full version + Obter a versión completa + + + + MessageWidget + + A new version of %1 is available! + Hai unha nova versión de %1 dispoñible! + + + %1 %2 is now available. You have %3. + %1 %2 está agora dispoñible. Tes %3. + + + Would you like to download it now? + Queres descargala agora? + + + Skip This Version + Saltar esta versión + + + Remind Me Later + Acórdamo máis adiante + + + Install Update + Instalar a actualización + + + + PasteLineEdit + + Paste + Pegar + + + + PlaylistModel + + This demo is limited to only %1 tracks in the playlist. + Esta demo está limitada a só %1 pistas na lista de reprodución. + + + + PlaylistView + + Playlist is empty + A lista de reprodución está baleira + + + %1 tracks - Total length is %2 + %1 pistas - a duración total é de %2 + + + + SearchLineEdit + + Search + Buscar + + + + SearchView + + Your search had no results. + A súa busca non obtivo resultados. + + + + TrackListView + + Tracks + Pistas + + + \ No newline at end of file diff -Nru musique-1.2.1/locale/hu_HU.ts musique-1.3/locale/hu_HU.ts --- musique-1.2.1/locale/hu_HU.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/hu_HU.ts 2013-10-11 07:42:11.000000000 +0000 @@ -48,22 +48,22 @@ Licensed to: %1 - + Licencelve: %1 ActivationDialog Enter your License Details - + Adja meg a licence részleteit &Email: - + &E-mail: &Code: - + &Kód: @@ -78,7 +78,7 @@ Without a license, the application will expire in %1 days. - + Licenc nélkül az alkalmazás lejár %1 nap múlva. By purchasing the full version, you will also support the hard work I put into creating %1. @@ -90,15 +90,15 @@ Enter License - + Licenc megadása: Buy License - + Licenc vásárlása The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. - + A teljes verzió engedi hogy a lejátszólistájához %1 számnál többet hozzáadjon, és a zenéit megszakítások nélkül hallgassa. @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + + + + BreadcrumbWidget &Back @@ -214,7 +272,7 @@ DownloadWidget Downloading update... - + Frissítés letöltése... @@ -321,7 +379,7 @@ Cancel - + Mégse @@ -584,6 +642,14 @@ &Report an Issue... + &Hiba jelentése... + + + Search + Keresés + + + %1 finished scanning your music collection @@ -618,34 +684,34 @@ MessageWidget A new version of %1 is available! - + %1 új verziója elérhető! %1 %2 is now available. You have %3. - + %1 %2 most elérhető. Önnek %3 van. Would you like to download it now? - + Szeretné letölteni most? Skip This Version - + Verzió kihagyása Remind Me Later - + Emlékeztessen később Install Update - + Frissítés telepítése PasteLineEdit Paste - + Beillesztés diff -Nru musique-1.2.1/locale/ia.ts musique-1.3/locale/ia.ts --- musique-1.2.1/locale/ia.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/ia.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Ordinar per + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + Nomine + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Ordinar per + + + BreadcrumbWidget &Back @@ -214,7 +272,7 @@ DownloadWidget Downloading update... - + Discargante actualisation... @@ -586,6 +644,14 @@ &Report an Issue... &Reportar un problema... + + Search + Cercar + + + %1 finished scanning your music collection + + MediaView @@ -618,7 +684,7 @@ MessageWidget A new version of %1 is available! - + Un nove version de %1 es disponibile! %1 %2 is now available. You have %3. diff -Nru musique-1.2.1/locale/it.ts musique-1.3/locale/it.ts --- musique-1.2.1/locale/it.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/it.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + Artista + + + Title + Titolo + + + Year + Anno + + + Popularity + Popolarità + + + Reversed Order + Ordine invertito + + + Sort by + Ordina per + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + Contatore tracce + + + Album Count + Contatore Album + + + Name + Nome + + + Year + Anno + + + Popularity + Popolarità + + + Reversed Order + Ordine Invertito + + + Sort by + Ordina per + + + BreadcrumbWidget &Back @@ -586,6 +644,14 @@ &Report an Issue... &Segnala un problema... + + Search + Ricerca + + + %1 finished scanning your music collection + %1 ho finito di scannerizzare la tua collezione musicale + MediaView diff -Nru musique-1.2.1/locale/ky.ts musique-1.3/locale/ky.ts --- musique-1.2.1/locale/ky.ts 1970-01-01 00:00:00.000000000 +0000 +++ musique-1.3/locale/ky.ts 2013-10-11 07:42:11.000000000 +0000 @@ -0,0 +1,756 @@ + +UTF-8 + + AboutView + + Version %1 + Версия %1 + + + %1 is Free Software but its development takes precious time. + %1 — бекер программалык жабдык, бирок анын иштетүүсү көп убагымды алат. + + + Please <a href='%1'>donate</a> to support the continued development of %2. + %2'ке <a href='%1'>тартуу кылып</a> мындан аркы иштетүүсүн колдоп бериңиз. + + + Released under the <a href='%1'>GNU General Public License</a> + <a href='%1'>GNU General Public License</a> шартында чыгарылган + + + &Close + &Жабуу + + + About + Программа жөнүндө + + + What you always wanted to know about %1 and never dared to ask + %1 жөнүндө дайыма билгиңиз келген нерселер бирок сураганга мүмкүнчүлүгүңүз жок болгон + + + You may want to try my other apps as well: + Башка тиркемелеримди да карап көрсөңүз болот: + + + %1, a YouTube app + %1, YouTube тиркемеси + + + %1, a YouTube music player + %1, YouTube музыка ойноткучу + + + Translate %1 to your native language using %2 + %1'ти %2 аркылуу өз эне тилиңизге которуңуз + + + Licensed to: %1 + Лицензияланган: %1 + + + + ActivationDialog + + Enter your License Details + Лицензия маалыматтарыңызды киргизиңиз + + + &Email: + &E-mail'иңиз: + + + &Code: + &Кодуңуз: + + + + ActivationView + + Please license %1 + Лицензия %1 + + + This demo has expired. + Демострациялоо мөөнөтү бүттү. + + + Without a license, the application will expire in %1 days. + Лицензиясыз болгондуктан, тиркеменин мөөнөтү %1 күндөн кийин бүтөт. + + + By purchasing the full version, you will also support the hard work I put into creating %1. + Толук версиясын алсаңыз, %1 үчүн оор жумуш кылып жатканымды да колдоп бере аласыз. + + + Use Demo + Демону колдонуу + + + Enter License + Лицензияны киргизүү + + + Buy License + Лицензияны сатып алуу + + + The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. + Толук версиясы ойнотуу тизмесине %1 жолчодон көбүрөөк кошууга жана музыканы үзгүлтүксүз угууга мүмкүндүк берет. + + + + AlbumInfo + + Buy on %1 + %1 сайтынан сатып алуу + + + Read more + Толугураак окуу + + + + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Сорттоо + + + + ArtistInfo + + Read more + Толугураак окуу + + + + ArtistListView + + Track Count + + + + Album Count + + + + Name + Аты + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Сорттоо + + + + BreadcrumbWidget + + &Back + &Артка + + + Go back + Артка кайтуу + + + + ChooseFolderView + + Welcome to <a href='%1'>%2</a>, + <a href='%1'>%2</a>'ке кош келиңиз, + + + %1 needs to scan your music collection. + %1'ке сиздин музыка коллекцияңызды скандоо керек. + + + Cancel + Жокко чыгаруу + + + Use iTunes collection + iTunes коллекциясын колдонуу + + + Use %1 + %1 папкасын колдонуу + + + Choose a folder... + Папканы тандоо... + + + %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. + %1 аткаруучунун жана альбомдун аттары боюнча Last.fm'дин кызматтарына туташып альбом тышын, өмүр баянын ж.б. нерселерин алат. + + + If you have privacy concerns about this you can quit now. + Эгер сизде жашырындуулук жөнүндө убайымдарыңыз бар болсо, азыр чыгып кетсеңиз болот. + + + Where's your music collection? + Музыка коллекцияңыз кайсы жерде? + + + Select the location of your music collection. + Музыка коллекцияңыздын жайгашкан жерин тандаңыз. + + + Locate your collection + Коллекцияңызды табыңыз + + + + ClearButton + + Clear + Тазалоо + + + + CollectionScanner + + A scanning task is already running + Скандоо процесси аткарылууда + + + + CollectionScannerView + + %1 is scanning your music collection. + %1 сиздин коллекцияңызды скандап жатууда. + + + %1 is using <a href='%2'>%3</a> to catalog your music. + Сиздин музыкаңызды каталогдоштуруу үчүн %1 <a href='%2'>%3</a>'ди колдонот. + + + This will take time depending on your collection size and network speed. + Бул коллекция өлчөмүңүздүн жана туташуу ылдамдыгыңыздын шартына жараша бир аз убакытты ээлейт. + + + Go grab a coffee + Кофе ичип угуңуз + + + + DownloadWidget + + Downloading update... + Жаңылоолор жүктөп алынууда... + + + + DropArea + + Drop here to append to the playlist + Ойнотуу тизмесине кошуу үчүн бул жерге ташыңыз + + + + FinderWidget + + Artists + Аткаруучулар + + + Albums + Альбомдор + + + Folders + Папкалар + + + + GlobalShortcuts + + Play + Ойнотуу + + + Pause + Бир азга токтотуу + + + Play/Pause + Ойнотуу/Бир азга токтотуу + + + Stop + Токтотуу + + + Stop playing after current track + Кезектеги жолчодон кийин токтотуу + + + Next track + Кийинки трек + + + Previous track + Мурунку трек + + + Increase volume + Көлөмүн чоңойтуу + + + Decrease volume + Көлөмүн кичирейтүү + + + Mute + Үндү өчүрүү + + + Seek forward + Алдыга түрүү + + + Seek backward + Артка түрүү + + + + LastFm + + Authentication failed + Аутентификация катасы + + + + LastFmLoginDialog + + Log in to %1 + %1'ге кирүү + + + &Username: + &Колдонуучу аты: + + + &Password: + &Сырсөз: + + + Signup for a %1 account + %1'ге каттоо + + + Forgot your <a href='%1'>username</a> or <a href='%2'>password</a>? + <a href='%1'>Колдонуучу атыңызды</a> же <a href='%2'>сырсөзүңүздү</a> унуттуңузбу? + + + Cancel + Жокко чыгаруу + + + + MainWindow + + &Back + &Артка + + + Go to the previous view + Мурунку көрүнүшкө өтүү + + + &Info + &Маалымат + + + Show information about the current track + Кезектеги жолчо жөнүндө маалыматты көрсөтүү + + + P&revious + Му&рунку + + + Go back to the previous track + Мурунку жолчого кайтуу + + + &Next + &Кийинки + + + Skip to the next track + Кийинки жолчого өтүү + + + &Play + &Ойнотуу + + + Start playback + Ойнотууну баштоо + + + &Full Screen + &Толук экран + + + Go full screen + Толук экранга өтүү + + + &Remove + Ө&чүрүү + + + Remove the selected tracks from the playlist + Тандалган жолчолордун ойнотуу тизмесинен өчүрүү + + + Move &Up + Ө&йдө + + + Move up the selected tracks in the playlist + Тандалган жолчолорду ойнотуу тизмесинен өйдө ташуу + + + Move &Down + &Ылдый + + + Move down the selected tracks in the playlist + Тандалган жолчолорду ойнотуу тизмесинен ылдый ташуу + + + &Quit + &Чыгуу + + + Bye + Кош болуңуз + + + &Change collection folder... + Коллекция папкасын ө&згөртүү... + + + Choose a different music collection folder + Башка музыка коллекциясынын папкасын тандоо + + + &Website + &Веб-сайт + + + %1 on the Web + %1 интернетте + + + Make a &donation + &Тартуу кылуу + + + Please support the continued development of %1 + %1 иштетүүсүнүн улантуусун колдоп бериңиз + + + &About + Программа &жөнүндө + + + Info about %1 + %1 жөнүндө маалымат + + + &Clear + &Тазалоо + + + Remove all tracks from the playlist + Бардык жолчолорду ойнотуу тизмесинен өчүрүү + + + &Shuffle + &Аралаштыруу + + + Random playlist mode + Кокустук ойнотуу тизмесинин режими + + + &Repeat + &Кайталатуу + + + Play first song again after all songs are played + Бардык ырлар ойнотулгандан кийин биринчи ырды кайтадан ойнотуу + + + Mute volume + Үнүн өчүрүү + + + &Application + &Тиркеме + + + &Playback + &Ойнотуу + + + Play&list + Ойнотуу т&измеси + + + &View + &Көрүнүш + + + &Help + &Жардам + + + Press %1 to raise the volume, %2 to lower it + Көлөмүн чоңойтуу үчүн %1 комбинациясын басыңыз, кичирейтүү үчүн %2 + + + Opening %1 + %1 ачылууда + + + Updating collection... + Коллекция жаңыланууда... + + + Updating collection - %1% + Коллекция жаңыланууда - %1% + + + Collection updated + Коллекция жаңыланды + + + Fatal error: %1 + Фаталдуу ката: %1 + + + Error: %1 + Катасы: %1 + + + Leave &Full Screen + &Толук экрандан чыгуу + + + Remaining time: %1 + Калган убагы: %1 + + + Volume at %1% + Көлөмү %1% + + + Volume is muted + Үнү өчүрүлдү + + + Volume is unmuted + Үнү күйгүзүлдү + + + Get the full version + Толук версиясын алуу + + + %1 version %2 is now available. + %2'дун %1 версиясы жеткиликтүү. + + + Remind me later + Кечирээк эске салуу + + + Update + Жаңылоо + + + &Window + &Терезе + + + &Minimize + &Түрүү + + + &Close + &Жабуу + + + Buy %1... + %1'ти сатып алуу... + + + &Stop After This Track + Бул жолчодон кийин &токтотуу + + + &Scrobbling + &Скробблинг + + + Send played tracks titles to %1 + Ойнотулган жолчолордун аттарын %1'ге жиберүү + + + &Log Out from %1 + %1'тен &чыгуу + + + &Report an Issue... + Катаны &маалымдоо... + + + Search + Издөө + + + %1 finished scanning your music collection + + + + + MediaView + + Drop items here + Элементтерди бул жерге ташыңыз + + + Playlist finished + Ойнотуу тизмеси бүтүрүлдү + + + This is just the demo version of %1. + Бул жөн эле %1'тин демо-версиясы. + + + It allows you to play a few tracks so you can test the application and see if it works for you. + Тиркеменин ишке жөндөмдүүлүгүн текшерип көрүү үчүн бул бир нече жолчону ойнотконго мүмкүндүк берет. + + + Continue + Улантуу + + + Get the full version + Толук версиясын алуу + + + + MessageWidget + + A new version of %1 is available! + %1'тин жаңы версиясы жеткиликтүү! + + + %1 %2 is now available. You have %3. + %1 %2 азыр жеткиликтүү. Сизде %3. + + + Would you like to download it now? + Азыр жүктөп алгыңыз келеби? + + + Skip This Version + Бул версияны өткөрүү + + + Remind Me Later + Кечирээк эске салуу + + + Install Update + Жаңылоолорду орнотуу + + + + PasteLineEdit + + Paste + Коюу + + + + PlaylistModel + + This demo is limited to only %1 tracks in the playlist. + Бул демо ойнотуу тизмесинде %1 жолчо менен гана чектелген. + + + + PlaylistView + + Playlist is empty + Ойнотуу тизмеси бош + + + %1 tracks - Total length is %2 + %1 жолчо - Жалпы узундугу %2 + + + + SearchLineEdit + + Search + Издөө + + + + SearchView + + Your search had no results. + Сиздин издөөңүз натыйжасыз. + + + + TrackListView + + Tracks + Тректер + + + \ No newline at end of file diff -Nru musique-1.2.1/locale/locale.pri musique-1.3/locale/locale.pri --- musique-1.2.1/locale/locale.pri 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/locale.pri 2013-10-11 07:42:11.000000000 +0000 @@ -3,7 +3,7 @@ DEPENDPATH += $$PWD # ls -1 *.ts | tr '\n' ' ' -TRANSLATIONS += ast.ts ca.ts cs_CZ.ts da.ts de.ts el.ts en.ts es.ts es_ES.ts fi_FI.ts fr.ts hu_HU.ts ia.ts it.ts lv.ts nb.ts nl.ts pl.ts pt.ts pt_BR.ts ro.ts ru.ts sk.ts sr.ts te.ts tr.ts tt.ts uk.ts zh_CN.ts +TRANSLATIONS += ast.ts be.ts bg.ts ca.ts ca_ES.ts cs_CZ.ts da.ts de.ts el.ts en.ts es.ts es_ES.ts es_MX.ts fa_IR.ts fi_FI.ts fr.ts gl.ts hu_HU.ts ia.ts it.ts ky.ts ms_MY.ts nb.ts nl.ts pl.ts pt.ts pt_BR.ts ro.ts ru.ts sk.ts sr.ts tr.ts tt.ts uk.ts vi.ts zh_CN.ts zh_TW.ts isEmpty(QMAKE_LRELEASE) { win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe diff -Nru musique-1.2.1/locale/lv.ts musique-1.3/locale/lv.ts --- musique-1.2.1/locale/lv.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/lv.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1,690 +0,0 @@ - -UTF-8 - - AboutView - - Version %1 - Versija %1 - - - %1 is Free Software but its development takes precious time. - %1 ir bezmaksas programmatūra, bet tās izstrāde arī aizņem tik dārgo laiku. - - - Please <a href='%1'>donate</a> to support the continued development of %2. - Lūdzu <a href='%1'>ziedot</a> , lai atbalstītu nepārtrauktu attīstību %2. - - - Released under the <a href='%1'>GNU General Public License</a> - - - - &Close - &Aizvērt - - - About - Par - - - What you always wanted to know about %1 and never dared to ask - Ko vienmēr gribējies uzzināt par %1, bet nekad neuzdrošinājāties jautāt - - - You may want to try my other apps as well: - - - - %1, a YouTube app - - - - %1, a YouTube music player - - - - Translate %1 to your native language using %2 - - - - Licensed to: %1 - - - - - ActivationDialog - - Enter your License Details - - - - &Email: - - - - &Code: - - - - - ActivationView - - Please license %1 - - - - This demo has expired. - - - - Without a license, the application will expire in %1 days. - - - - By purchasing the full version, you will also support the hard work I put into creating %1. - - - - Use Demo - - - - Enter License - - - - Buy License - - - - The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. - - - - - AlbumInfo - - Buy on %1 - Pirkt %1 - - - Read more - Lasīt vairāk - - - - ArtistInfo - - Read more - Lasīt vairāk - - - - BreadcrumbWidget - - &Back - &Atpakaļ - - - Go back - Doties atpakaļ - - - - ChooseFolderView - - Welcome to <a href='%1'>%2</a>, - Laipni lūdzam <a href='%1'>%2</a> , - - - %1 needs to scan your music collection. - %1 nepieciešams caursaktīt Jūsu mūzikas kolekciju. - - - Cancel - Atcelt - - - Use iTunes collection - Izmantot iTunes kolekciju - - - Use %1 - Izmantot %1 - - - Choose a folder... - Izvēlēties mapi... - - - %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. - - - - If you have privacy concerns about this you can quit now. - Ja Jums ir bažas par privātumu, jūs varat tagad atcelt darbību. - - - Where's your music collection? - Kur ir Jūsu mūzikas kolekcija? - - - Select the location of your music collection. - Iestatiet Jūsu mūzikas kolekcijas atrašanās vietu. - - - Locate your collection - Atrodiet savu kolekciju - - - - ClearButton - - Clear - Nodzēst - - - - CollectionScanner - - A scanning task is already running - Caurskatīšana jau ir sākusies - - - - CollectionScannerView - - %1 is scanning your music collection. - %1 caursakta mūzikas kolekciju. - - - %1 is using <a href='%2'>%3</a> to catalog your music. - %1 izmanto <a href='%2'>%3</a>, lai izveidotu mūzikas katalogu. - - - This will take time depending on your collection size and network speed. - Tas prasīs laiku atkarībā no jūsu kolekcijas apmēra un tīkla ātruma. - - - Go grab a coffee - Izbaudiet tasi kafijas - - - - DownloadWidget - - Downloading update... - - - - - DropArea - - Drop here to append to the playlist - - - - - FinderWidget - - Artists - Izpildītāji - - - Albums - Albūmi - - - Folders - Mapes - - - - GlobalShortcuts - - Play - Atskaņot - - - Pause - Pauze - - - Play/Pause - Atskaņot/Pauze - - - Stop - Apturēt - - - Stop playing after current track - Apturēt līdz ar ieraksta izskaņu - - - Next track - Nākamais ieraksts - - - Previous track - Iepriekšējais ieraksts - - - Increase volume - Skaļāk - - - Decrease volume - Klusāk - - - Mute - Apklusināt - - - Seek forward - Pārtīt uz priekšu - - - Seek backward - Attīt - - - - LastFm - - Authentication failed - - - - - LastFmLoginDialog - - Log in to %1 - - - - &Username: - - - - &Password: - - - - Signup for a %1 account - - - - Forgot your <a href='%1'>username</a> or <a href='%2'>password</a>? - - - - Cancel - Atcelt - - - - MainWindow - - &Back - &Atpakaļ - - - Go to the previous view - Doties uz iepriekšējo skatu - - - &Info - &Informācija - - - Show information about the current track - Parādīt informāciju par pašreizējo ierakstu - - - P&revious - - - - Go back to the previous track - Doties uz iepriekšējo ierakstu - - - &Next - &Nākamais - - - Skip to the next track - Pārlēkt uz nākamo ierakstu - - - &Play - &Atskaņot - - - Start playback - Sākt atskaņošanu - - - &Full Screen - &Pilnekrāna režīms - - - Go full screen - &Doties uz pilnekrāna režīmu - - - &Remove - &Noņemt - - - Remove the selected tracks from the playlist - Noņemt izvēlētos ierakstus no atskaņošanas saraksta - - - Move &Up - Pārvietot &augšup - - - Move up the selected tracks in the playlist - Izvēlētos atskaņošanas sarakta ierakstus pārvietot augšup - - - Move &Down - Pārvietot lejup - - - Move down the selected tracks in the playlist - Izvēlētos atskaņošanas sarakta ierakstus pārvietot lejup - - - &Quit - &Beigt - - - Bye - Visu labu! - - - &Change collection folder... - &Mainīt kolekcijas mapi... - - - Choose a different music collection folder - Izvēlieties citu mūzikas kolekcijas mapi - - - &Website - &Mājaslapa - - - %1 on the Web - %1 tīmeklī - - - Make a &donation - Veic &ziedojumu - - - Please support the continued development of %1 - Lūdzu atbalstiet nepārtrauktu %1 attīstību - - - &About - &Par - - - Info about %1 - Informācija par %1 - - - &Clear - &Nodzēst - - - Remove all tracks from the playlist - &Notīrīt atskaņošanas sarakstu - - - &Shuffle - &Jaukti - - - Random playlist mode - - - - &Repeat - &Atkārtot - - - Play first song again after all songs are played - - - - Mute volume - Apklusināt skaņu - - - &Application - &Aplikācija - - - &Playback - - - - Play&list - - - - &View - &Skats - - - &Help - &Palīdzība - - - Press %1 to raise the volume, %2 to lower it - Nospiediet %1 lai palielinātu skaļumu, %2 lai to samazinātu - - - Opening %1 - Atver %1 - - - Updating collection... - Atjaunina kolekciju... - - - Updating collection - %1% - Atjaunina kolekciju - %1% - - - Collection updated - Kolekcija atjaunināta - - - Fatal error: %1 - - - - Error: %1 - Kļūda: %1 - - - Leave &Full Screen - Pamest &pilnekrāna režīmu - - - Remaining time: %1 - Atlikušais laiks: %1 - - - Volume at %1% - Skaļuma līmenis %1% - - - Volume is muted - Skaņa apklusināta - - - Volume is unmuted - Skaņa ieslēgta - - - Get the full version - Novilkt pilnu versiju - - - %1 version %2 is now available. - - - - Remind me later - - - - Update - - - - &Window - - - - &Minimize - - - - &Close - &Aizvērt - - - Buy %1... - - - - &Stop After This Track - - - - &Scrobbling - - - - Send played tracks titles to %1 - - - - &Log Out from %1 - - - - &Report an Issue... - - - - - MediaView - - Drop items here - Nomest ierakstus šeit - - - Playlist finished - Atksaņošanas saraksts izskanējis - - - This is just the demo version of %1. - Šī ir tikai %1 demo versija. - - - It allows you to play a few tracks so you can test the application and see if it works for you. - - - - Continue - Turpināt - - - Get the full version - Iegūt pilno versiju - - - - MessageWidget - - A new version of %1 is available! - - - - %1 %2 is now available. You have %3. - - - - Would you like to download it now? - - - - Skip This Version - - - - Remind Me Later - - - - Install Update - - - - - PasteLineEdit - - Paste - - - - - PlaylistModel - - This demo is limited to only %1 tracks in the playlist. - - - - - PlaylistView - - Playlist is empty - Atskaņojamais saraksts ir tukš - - - %1 tracks - Total length is %2 - %1 ieraksts - Kopējais garums %2 - - - - SearchLineEdit - - Search - Meklēt - - - - SearchView - - Your search had no results. - - - - - TrackListView - - Tracks - Ieraksti - - - \ No newline at end of file diff -Nru musique-1.2.1/locale/ms_MY.ts musique-1.3/locale/ms_MY.ts --- musique-1.2.1/locale/ms_MY.ts 1970-01-01 00:00:00.000000000 +0000 +++ musique-1.3/locale/ms_MY.ts 2013-10-11 07:42:11.000000000 +0000 @@ -0,0 +1,756 @@ + +UTF-8 + + AboutView + + Version %1 + Versi %1 + + + %1 is Free Software but its development takes precious time. + %1 merupakan Perisian Bebas tetapi pembangunannya mengambil masa yang berharga. + + + Please <a href='%1'>donate</a> to support the continued development of %2. + Sila <a href='%1'>beri sumbangan</a> untuk menyokong pembangunan berterusan %2. + + + Released under the <a href='%1'>GNU General Public License</a> + Dikeluarkan dibawah <a href='%1'>Lesen Awam Am GNU</a> + + + &Close + %Tutup + + + About + Perihal + + + What you always wanted to know about %1 and never dared to ask + Apakah yang anda mahu tahu mengenai %1 tetapi segan untuk menanya + + + You may want to try my other apps as well: + Anda mahu cuba aplikasi saya yang lain: + + + %1, a YouTube app + %1, merupakan apl YouTube + + + %1, a YouTube music player + %1, merupakan pemain muzik YouTube + + + Translate %1 to your native language using %2 + Terjemah %1 kepada bahasa ibunda anda menggunakan %2 + + + Licensed to: %1 + Dilesenkan kepada: %1 + + + + ActivationDialog + + Enter your License Details + Masukkan Perincian Lesen anda + + + &Email: + &Emel: + + + &Code: + &Kod: + + + + ActivationView + + Please license %1 + Sila lesenkan %1 + + + This demo has expired. + Demo ini telah tamat tempoh. + + + Without a license, the application will expire in %1 days. + Tanpa lesen, aplikasi akan luput dalam tempoh %1 hari. + + + By purchasing the full version, you will also support the hard work I put into creating %1. + Dengan pembelian versi penuh, anda akan menyokong hasil kerja yang saya lakukan ketika menghasilkan %1. + + + Use Demo + Guna Demo + + + Enter License + Masukkan Lesen + + + Buy License + Beli Lesen + + + The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. + Versi penuh membolehkan anda tambah lebih dari %1 trek ke senarai main dan dengar muzik anda tanpa gangguan. + + + + AlbumInfo + + Buy on %1 + Beli di %1 + + + Read more + Baca lagi + + + + AlbumListView + + Artist + Artis + + + Title + Tajuk + + + Year + Tahun + + + Popularity + Populariti + + + Reversed Order + Tertib Songsang + + + Sort by + Isih mengikut + + + + ArtistInfo + + Read more + Baca lagi + + + + ArtistListView + + Track Count + Kiraan Trek + + + Album Count + Kiraan Album + + + Name + Nama + + + Year + Tahun + + + Popularity + Populariti + + + Reversed Order + Tertib Songsang + + + Sort by + Isih mengikut + + + + BreadcrumbWidget + + &Back + &Undur + + + Go back + Kembali + + + + ChooseFolderView + + Welcome to <a href='%1'>%2</a>, + Selamat datang ke <a href='%1'>%2</a>, + + + %1 needs to scan your music collection. + %1 perlu mengimbas koleksi muzik anda. + + + Cancel + Batal + + + Use iTunes collection + Guna koleksi iTunes + + + Use %1 + Guna %1 + + + Choose a folder... + Pilih satu folder... + + + %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. + %1 akan menyambung ke perkhidmatan sesawang Last.fm dan lepasi nama artis dan tajuk album untuk mendapatkan seni kulit album, biografi dan banyak lagi. + + + If you have privacy concerns about this you can quit now. + Jika anda mementingkan privasi mengenai ini anda boleh keluar sekarang. + + + Where's your music collection? + Dimana lokasi koleksi muzik anda? + + + Select the location of your music collection. + Pilih lokasi bagi koleksi muzik anda. + + + Locate your collection + Cari koleksi anda + + + + ClearButton + + Clear + Kosongkan + + + + CollectionScanner + + A scanning task is already running + Satu tugas mengimbas sudah pun berjalan + + + + CollectionScannerView + + %1 is scanning your music collection. + %1 sedang mengimbas koleksi muzik anda. + + + %1 is using <a href='%2'>%3</a> to catalog your music. + %1 menggunakan <a href='%2'>%3</a> untuk katalogkan muzik anda. + + + This will take time depending on your collection size and network speed. + Ia mengambil masa dan bergantung pada saiz koleksi dan kelajuan rangkaian anda. + + + Go grab a coffee + Rehat dahulu dan dapat secawan kopi + + + + DownloadWidget + + Downloading update... + Memuat turun kemaskini... + + + + DropArea + + Drop here to append to the playlist + Lepaskan disini untuk tambah ke senarai main + + + + FinderWidget + + Artists + Artis + + + Albums + Album + + + Folders + Folder + + + + GlobalShortcuts + + Play + Main + + + Pause + Jeda + + + Play/Pause + Main/Jeda + + + Stop + Henti + + + Stop playing after current track + Henti main selepas trek semasa + + + Next track + Trek berikutnya + + + Previous track + Trek terdahulu + + + Increase volume + Tingkatkan volum + + + Decrease volume + Rendahkan volum + + + Mute + Senyap + + + Seek forward + Jangkau hadapan + + + Seek backward + Jangkau mengundur + + + + LastFm + + Authentication failed + Pengesahihan gagal + + + + LastFmLoginDialog + + Log in to %1 + Daftar masuk ke %1 + + + &Username: + &Nama pengguna: + + + &Password: + &Kata laluan: + + + Signup for a %1 account + Daftar untuk akaun %1 + + + Forgot your <a href='%1'>username</a> or <a href='%2'>password</a>? + Lupa <a href='%1'>nama pengguna</a> atau <a href='%2'>kata laluan</a> anda? + + + Cancel + Batal + + + + MainWindow + + &Back + &Undur + + + Go to the previous view + Pergi ke paparan terdahulu + + + &Info + Ma&klumat + + + Show information about the current track + Tunjuk maklumat mengenai trek semasa + + + P&revious + Te&rdahulu + + + Go back to the previous track + Pergi kembali ke trek terdahulu + + + &Next + &Berikutnya + + + Skip to the next track + Langkau ke trek berikutnya + + + &Play + &Main + + + Start playback + Mulakan main balik + + + &Full Screen + Skrin &Penuh + + + Go full screen + Pergi ke skrin penuh + + + &Remove + &Buang + + + Remove the selected tracks from the playlist + Buang trek terpilih dari senarai main + + + Move &Up + Alih Ke &Atas + + + Move up the selected tracks in the playlist + Alih trek terpilih ke atas di dalam senarai main + + + Move &Down + Alih Ke &Bawah + + + Move down the selected tracks in the playlist + Alih trek terpilih ke bawah dalam senarai main + + + &Quit + &Keluar + + + Bye + Selamat Tinggal + + + &Change collection folder... + &Ubah folder koleksi... + + + Choose a different music collection folder + Pilih folder koleksi muzik yang lain + + + &Website + Laman Sesa&wang + + + %1 on the Web + %1 pada Sesawang + + + Make a &donation + Beri S&umbangan + + + Please support the continued development of %1 + Sila beri sokongan pada pembangunan berterusan %1 + + + &About + Perih&al + + + Info about %1 + Maklumat mengenai %1 + + + &Clear + K&osongkan + + + Remove all tracks from the playlist + Buang semua trek dari senarai main + + + &Shuffle + Ko&cok + + + Random playlist mode + Mod senarai main rawak + + + &Repeat + U&lang + + + Play first song again after all songs are played + Main lagu pertama sekali lagi selepas semua lagu dimainkan + + + Mute volume + Senyapkan volum + + + &Application + &Aplikasi + + + &Playback + &Main Balik + + + Play&list + Senarai Ma&in + + + &View + &Lihat + + + &Help + &Bantuan + + + Press %1 to raise the volume, %2 to lower it + Tekan %1 untuk tingkatkan volum, %2 untuk rendahkannya + + + Opening %1 + Membuka %1 + + + Updating collection... + Mengemaskini koleksi... + + + Updating collection - %1% + Mengemaskini koleksi - %1% + + + Collection updated + Koleksi dikemaskini + + + Fatal error: %1 + Ralat mati: %1 + + + Error: %1 + Ralat: %1 + + + Leave &Full Screen + Tinggalkan Skrin P&enuh + + + Remaining time: %1 + Masa berbaki: %1 + + + Volume at %1% + Volum pada %1% + + + Volume is muted + Volum disenyapkan + + + Volume is unmuted + Volum disuarakan + + + Get the full version + Dapatkan versi penuh + + + %1 version %2 is now available. + %1 versi %2 kini sudah tersedia. + + + Remind me later + Maklum saya kemudian + + + Update + Kemaskini + + + &Window + &Tetingkap + + + &Minimize + &Minimum + + + &Close + %Tutup + + + Buy %1... + Beli %1... + + + &Stop After This Track + &Henti Selepas Trek Ini + + + &Scrobbling + &Scrobbling + + + Send played tracks titles to %1 + Hantar tajuk trek dimainkan ke %1 + + + &Log Out from %1 + &Daftar Keluar dari %1 + + + &Report an Issue... + &Laporkan Masalah... + + + Search + Gelintar + + + %1 finished scanning your music collection + %1 selesai mengimbas koleksi muzik anda + + + + MediaView + + Drop items here + Lepaskan item disini + + + Playlist finished + Senarai main selesai + + + This is just the demo version of %1. + Ini hanyalah versi demo %1. + + + It allows you to play a few tracks so you can test the application and see if it works for you. + Ia membolehkan anda main beberapa trek supaya anda dapat uji aplikasi dan lihat jika ia berfungsi untuk anda. + + + Continue + Teruskan + + + Get the full version + Dapatkan versi penuh + + + + MessageWidget + + A new version of %1 is available! + Versi baru %1 tersedia! + + + %1 %2 is now available. You have %3. + %1 %2 kini tersedia. Anda mempunyai %3. + + + Would you like to download it now? + Anda hendak muat turun ia sekarang? + + + Skip This Version + Langkau Versi Ini + + + Remind Me Later + Maklum Saya Kemudian + + + Install Update + Pasang Kemaskini + + + + PasteLineEdit + + Paste + Tampal + + + + PlaylistModel + + This demo is limited to only %1 tracks in the playlist. + Ini adalah demo yang mana hanya terhad pada %1 trek dalam senarai main. + + + + PlaylistView + + Playlist is empty + Senarai main kosong + + + %1 tracks - Total length is %2 + %1 trek - Jumlah adalah %2 + + + + SearchLineEdit + + Search + Gelintar + + + + SearchView + + Your search had no results. + Gelintar anda tidak memberi keputusan. + + + + TrackListView + + Tracks + Trek + + + \ No newline at end of file diff -Nru musique-1.2.1/locale/nb.ts musique-1.3/locale/nb.ts --- musique-1.2.1/locale/nb.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/nb.ts 2013-10-11 07:42:11.000000000 +0000 @@ -48,22 +48,22 @@ Licensed to: %1 - + Lisensiert til: %1 ActivationDialog Enter your License Details - + Angi lisensdetaljer &Email: - + &E-post: &Code: - + &Kode: @@ -78,7 +78,7 @@ Without a license, the application will expire in %1 days. - + Uten lisens, vil programmet utløper i %1 dager. By purchasing the full version, you will also support the hard work I put into creating %1. @@ -90,11 +90,11 @@ Enter License - + Angi Lisens Buy License - + Kjøp Lisens The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Sorter etter + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Sorter etter + + + BreadcrumbWidget &Back @@ -214,7 +272,7 @@ DownloadWidget Downloading update... - + Laster ned oppdatering... @@ -584,6 +642,14 @@ &Report an Issue... + &Rapporter et Problem + + + Search + Søk + + + %1 finished scanning your music collection @@ -618,34 +684,34 @@ MessageWidget A new version of %1 is available! - + En ny versjon av %1 er tilgjengelig! %1 %2 is now available. You have %3. - + %1 %2 er nå tilgjengelig. Du har %3. Would you like to download it now? - + Vil du last den ned nå? Skip This Version - + Hopp Over Denne Versjonen Remind Me Later - + Minn Meg Senere Install Update - + Installer Oppdatering PasteLineEdit Paste - + Lim diff -Nru musique-1.2.1/locale/nl.ts musique-1.3/locale/nl.ts --- musique-1.2.1/locale/nl.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/nl.ts 2013-10-11 07:42:11.000000000 +0000 @@ -50,22 +50,22 @@ Licensed to: %1 - + Gelicenseerd aan: %1 ActivationDialog Enter your License Details - + Vul uw licentie-details in &Email: - + &E-mailadres: &Code: - + &Code: @@ -80,7 +80,7 @@ Without a license, the application will expire in %1 days. - + Zonder een licentie zal deze applicatie vervallen in %1 dagen. By purchasing the full version, you will also support the hard work I put into creating %1. @@ -92,15 +92,15 @@ Enter License - + Vul licentie in Buy License - + Koop licentie The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. - + De volledige versie stelt u in staat om meer dan %1 nummers aan de afspeellijst toe te voegen en te luisteren naar muziek zonder onderbrekingen. @@ -115,6 +115,33 @@ + AlbumListView + + Artist + Artiest + + + Title + Titel + + + Year + Jaar + + + Popularity + Populariteit + + + Reversed Order + Omgekeerde Volgorde + + + Sort by + Sorteer op + + + ArtistInfo Read more @@ -122,6 +149,37 @@ + ArtistListView + + Track Count + Aantal Liedjes + + + Album Count + Aantal Albums + + + Name + Naam + + + Year + Jaar + + + Popularity + Populariteit + + + Reversed Order + Omgekeerde Volgorde + + + Sort by + Sorteer op + + + BreadcrumbWidget &Back @@ -216,7 +274,7 @@ DownloadWidget Downloading update... - + Bezig met downloaden van update... @@ -588,6 +646,14 @@ &Report an Issue... &Rapporteer een Probleem... + + Search + Zoek + + + %1 finished scanning your music collection + #1 is klaar met het indexeren van uw muziek collectie + MediaView @@ -620,34 +686,34 @@ MessageWidget A new version of %1 is available! - + Een nieuwe versie van %1 is beschikbaar! %1 %2 is now available. You have %3. - + %1 %2 is nu beschikbaar. U heeft %3. Would you like to download it now? - + Wilt u deze nu downloaden? Skip This Version - + Sla deze versie over Remind Me Later - + Herinner me later Install Update - + Installeer update PasteLineEdit Paste - + Plakken diff -Nru musique-1.2.1/locale/pl.ts musique-1.3/locale/pl.ts --- musique-1.2.1/locale/pl.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/pl.ts 2013-10-11 07:42:11.000000000 +0000 @@ -28,7 +28,7 @@ What you always wanted to know about %1 and never dared to ask - Wszystko, co zawsze chcieliście wiedzieć o %1 , a baliście się zapytać + Wszystko, co zawsze chcieliście wiedzieć o %1, a baliście się zapytać You may want to try my other apps as well: @@ -48,14 +48,14 @@ Licensed to: %1 - + Licencjonowane dla: %1 ActivationDialog Enter your License Details - + Wpisz szczegóły Twojej licencji &Email: @@ -63,7 +63,7 @@ &Code: - + &Kod: @@ -74,7 +74,7 @@ This demo has expired. - Te demo wygasło. + To demo wygasło. Without a license, the application will expire in %1 days. @@ -98,7 +98,7 @@ The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. - + Pełna wersja pozwala na dodanie więcej niż %1 utworów do playlisty oraz słuchanie muzyki bez przerw. @@ -113,6 +113,33 @@ + AlbumListView + + Artist + Artysta + + + Title + Tytuł + + + Year + Rok + + + Popularity + Popularność + + + Reversed Order + Odwrócona kolejność + + + Sort by + Sortuj według + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + Ilość utworów + + + Album Count + Ilość albumów + + + Name + Nazwa + + + Year + Rok + + + Popularity + Popularność + + + Reversed Order + Odwrócona kolejność + + + Sort by + Sortuj według + + + BreadcrumbWidget &Back @@ -336,7 +394,7 @@ &Info - &informacje + &Informacje Show information about the current track @@ -488,7 +546,7 @@ Press %1 to raise the volume, %2 to lower it - Wciśnij %1 , aby zwiększyć głośność, %2, aby ją zmniejszyć + Wciśnij %1, aby zwiększyć głośność, %2, aby ją zmniejszyć Opening %1 @@ -584,7 +642,15 @@ &Report an Issue... - + &Zgłoś problem... + + + Search + Szukaj + + + %1 finished scanning your music collection + %1 zakończono przeszukiwanie twojej kolekcji muzyki @@ -618,11 +684,11 @@ MessageWidget A new version of %1 is available! - + Nowa wersja %1 jest dostępna! %1 %2 is now available. You have %3. - + %1 %2 jest już dostępny, Ty masz %3. Would you like to download it now? @@ -638,7 +704,7 @@ Install Update - + Zainstaluj aktualizację diff -Nru musique-1.2.1/locale/pt_BR.ts musique-1.3/locale/pt_BR.ts --- musique-1.2.1/locale/pt_BR.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/pt_BR.ts 2013-10-11 07:42:11.000000000 +0000 @@ -48,22 +48,22 @@ Licensed to: %1 - + Licenciado a: %1 ActivationDialog Enter your License Details - + Entre com seus Detalhes de Licença &Email: - + E-mail: &Code: - + Código: @@ -78,7 +78,7 @@ Without a license, the application will expire in %1 days. - + Sem licença, a aplicação irá expirar em %1 dias. By purchasing the full version, you will also support the hard work I put into creating %1. @@ -90,11 +90,11 @@ Enter License - + Entrar com a Licença. Buy License - + Comprar a Licença. The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. @@ -113,6 +113,33 @@ + AlbumListView + + Artist + Artista + + + Title + Título + + + Year + Ano + + + Popularity + Popularidade + + + Reversed Order + Ordem Inversa + + + Sort by + Ordenar por + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + Contador De Faixa + + + Album Count + Contador De Álbum + + + Name + Nome + + + Year + Ano + + + Popularity + Popularidade + + + Reversed Order + Ordem Inversa + + + Sort by + Ordenar por + + + BreadcrumbWidget &Back @@ -214,7 +272,7 @@ DownloadWidget Downloading update... - + Baixando atualização... @@ -586,6 +644,14 @@ &Report an Issue... &Relatar um problema... + + Search + Pesquisar + + + %1 finished scanning your music collection + %1 finalizou a busca de sua coleção de músicas + MediaView @@ -618,34 +684,34 @@ MessageWidget A new version of %1 is available! - + Uma nova versão do %1 está disponível! %1 %2 is now available. You have %3. - + %1 %2 está disponível. Você está usando %3. Would you like to download it now? - + Gostaria de fazer o download agora? Skip This Version - + Pular esta versão. Remind Me Later - + Me lembre mais tarde. Install Update - + Instalar atualização. PasteLineEdit Paste - + Colar. diff -Nru musique-1.2.1/locale/pt.ts musique-1.3/locale/pt.ts --- musique-1.2.1/locale/pt.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/pt.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + + + + BreadcrumbWidget &Back @@ -586,6 +644,14 @@ &Report an Issue... + + Search + Pesquisar + + + %1 finished scanning your music collection + + MediaView diff -Nru musique-1.2.1/locale/ro.ts musique-1.3/locale/ro.ts --- musique-1.2.1/locale/ro.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/ro.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Sortează după + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Sortează după + + + BreadcrumbWidget &Back @@ -586,6 +644,14 @@ &Report an Issue... &Raportează o problemă... + + Search + Caută + + + %1 finished scanning your music collection + + MediaView diff -Nru musique-1.2.1/locale/ru.ts musique-1.3/locale/ru.ts --- musique-1.2.1/locale/ru.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/ru.ts 2013-10-11 07:42:11.000000000 +0000 @@ -114,6 +114,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Сортировать по + + + ArtistInfo Read more @@ -121,6 +148,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + Название + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Сортировать по + + + BreadcrumbWidget &Back @@ -587,6 +645,14 @@ &Report an Issue... Соо&бщить об ошибке + + Search + Поиск + + + %1 finished scanning your music collection + + MediaView diff -Nru musique-1.2.1/locale/sk.ts musique-1.3/locale/sk.ts --- musique-1.2.1/locale/sk.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/sk.ts 2013-10-11 07:42:11.000000000 +0000 @@ -98,7 +98,7 @@ The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. - + Plná verzia ti umožní pridať viac ako %1 skladieb do playlistu a vychutnať si teda muziku bez prerušení. @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Zoradiť podľa + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + Meno + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Zoradiť podľa + + + BreadcrumbWidget &Back @@ -321,7 +379,7 @@ Cancel - + Zrušiť @@ -586,6 +644,14 @@ &Report an Issue... &Nahlásiť problém... + + Search + Hľadať + + + %1 finished scanning your music collection + + MediaView diff -Nru musique-1.2.1/locale/sr.ts musique-1.3/locale/sr.ts --- musique-1.2.1/locale/sr.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/sr.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + + + + BreadcrumbWidget &Back @@ -586,6 +644,14 @@ &Report an Issue... + + Search + Претрага + + + %1 finished scanning your music collection + + MediaView diff -Nru musique-1.2.1/locale/te.ts musique-1.3/locale/te.ts --- musique-1.2.1/locale/te.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/te.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1,690 +0,0 @@ - -UTF-8 - - AboutView - - Version %1 - రూపాంతరం %1 - - - %1 is Free Software but its development takes precious time. - - - - Please <a href='%1'>donate</a> to support the continued development of %2. - - - - Released under the <a href='%1'>GNU General Public License</a> - - - - &Close - మూసివేయి (&C) - - - About - గురించి - - - What you always wanted to know about %1 and never dared to ask - - - - You may want to try my other apps as well: - - - - %1, a YouTube app - %1, ఒక యూట్యూబ్ అనువర్తనం - - - %1, a YouTube music player - %1, ఒక యూట్యూబ్ సంగీత ప్రదర్శకం - - - Translate %1 to your native language using %2 - - - - Licensed to: %1 - - - - - ActivationDialog - - Enter your License Details - - - - &Email: - - - - &Code: - - - - - ActivationView - - Please license %1 - - - - This demo has expired. - డెమో కాలంచెల్లినది. - - - Without a license, the application will expire in %1 days. - - - - By purchasing the full version, you will also support the hard work I put into creating %1. - - - - Use Demo - డెమో వాడు - - - Enter License - - - - Buy License - - - - The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. - - - - - AlbumInfo - - Buy on %1 - %1 లో కొనండి - - - Read more - మరింత చదువండి - - - - ArtistInfo - - Read more - మరింత చదువండి - - - - BreadcrumbWidget - - &Back - వెనుకకు (&B) - - - Go back - వెనుకకు వెళ్ళు - - - - ChooseFolderView - - Welcome to <a href='%1'>%2</a>, - <a href='%1'>%2</a> కి స్వాగతం, - - - %1 needs to scan your music collection. - - - - Cancel - రద్దుచేయి - - - Use iTunes collection - ఐట్యూన్స్ సేకరణను వాడు - - - Use %1 - %1 ని వాడు - - - Choose a folder... - ఒక సంచయాన్ని ఎన్నుకోండి... - - - %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. - - - - If you have privacy concerns about this you can quit now. - - - - Where's your music collection? - మీ సంగీత సేకరణ ఎక్కడ ఉన్నది? - - - Select the location of your music collection. - - - - Locate your collection - మీ సేకరణను తెలుపండి - - - - ClearButton - - Clear - తుడిచివేయి - - - - CollectionScanner - - A scanning task is already running - - - - - CollectionScannerView - - %1 is scanning your music collection. - - - - %1 is using <a href='%2'>%3</a> to catalog your music. - - - - This will take time depending on your collection size and network speed. - - - - Go grab a coffee - - - - - DownloadWidget - - Downloading update... - - - - - DropArea - - Drop here to append to the playlist - - - - - FinderWidget - - Artists - కళాకారులు - - - Albums - ఆల్బమ్లు - - - Folders - సంచయాలు - - - - GlobalShortcuts - - Play - ఆడించు - - - Pause - నిలిపివేయి - - - Play/Pause - ఆడించు/నిలిపివేయి - - - Stop - ఆపివేయి - - - Stop playing after current track - - - - Next track - తరువాతి ట్రాక్ - - - Previous track - మునుపటి ట్రాక్ - - - Increase volume - శబ్దాన్ని పెంచు - - - Decrease volume - శబ్దాన్ని తగ్గించు - - - Mute - నిశబ్దం - - - Seek forward - ముందుకి లాగుము - - - Seek backward - వెనుకకు లాగుము - - - - LastFm - - Authentication failed - ధృవీకరణ విఫలమైంది - - - - LastFmLoginDialog - - Log in to %1 - %1 లోకి ప్రవేశించండి - - - &Username: - వాడుకరిపేరు (&U): - - - &Password: - సంకేతపదం (&P): - - - Signup for a %1 account - - - - Forgot your <a href='%1'>username</a> or <a href='%2'>password</a>? - - - - Cancel - రద్దుచేయి - - - - MainWindow - - &Back - వెనుకకు (&B) - - - Go to the previous view - మునపటి వీక్షణానికి వెళ్ళు - - - &Info - సమాచారం (&I) - - - Show information about the current track - ప్రస్తుత ట్రాక్ గురించిన సమాచారాన్ని చూపించు - - - P&revious - మునుపటి (&r) - - - Go back to the previous track - మునుపటి ట్రాకుకు వెళ్ళు - - - &Next - తదుపరి (&N) - - - Skip to the next track - తదుపరి పాటకు దాటవేయి - - - &Play - ఆడించు (&P) - - - Start playback - ప్లేబ్యాక్ ప్రారంభించు - - - &Full Screen - పూర్తి తెర (&F) - - - Go full screen - పూర్తి తెరకు మారు - - - &Remove - తీసివేయి (&R) - - - Remove the selected tracks from the playlist - - - - Move &Up - పైకి జరుపు (&U) - - - Move up the selected tracks in the playlist - - - - Move &Down - కిందికి జరుపు (&D) - - - Move down the selected tracks in the playlist - - - - &Quit - నిష్క్రమించు (&Q) - - - Bye - సెలవు - - - &Change collection folder... - సేకరణ సంచయాన్ని మార్చండి (&C)... - - - Choose a different music collection folder - - - - &Website - వెబ్‌సైటు (&W) - - - %1 on the Web - జాలం నందు %1 - - - Make a &donation - విరాలం ఇవ్వండి (&d) - - - Please support the continued development of %1 - దయచేసి %1 యొక్క నిరంతర అభివృద్ధికి సహకరించండి - - - &About - గురించి (&A) - - - Info about %1 - %1 గురించిన సమాచారం - - - &Clear - శుభ్రపరుచు (&C) - - - Remove all tracks from the playlist - - - - &Shuffle - యాదృచ్ఛికం (&S) - - - Random playlist mode - - - - &Repeat - పునరావృతం (&R) - - - Play first song again after all songs are played - - - - Mute volume - వాల్యూమ్ మ్యూట్ చేయి - - - &Application - అనువర్తనం (&A) - - - &Playback - ప్లేబ్యాక్ (&P) - - - Play&list - పాటలజాబితా (&l) - - - &View - వీక్షణం (&V) - - - &Help - సహాయం (&H) - - - Press %1 to raise the volume, %2 to lower it - - - - Opening %1 - %1 తెరుస్తున్నది - - - Updating collection... - సేకరణను నవీకరిస్తున్నది... - - - Updating collection - %1% - సేకరణను నవీకరిస్తున్నది - %1% - - - Collection updated - సేకరణ నవీకరించబడింది - - - Fatal error: %1 - ఫెటల్ దోషము: %1 - - - Error: %1 - దోషము: %1 - - - Leave &Full Screen - పూర్తితెరను వదిలివేయి (&F) - - - Remaining time: %1 - మిగిలిన సమయం: %1 - - - Volume at %1% - - - - Volume is muted - వాల్యూమ్ మ్యూట్ చేయబడింది - - - Volume is unmuted - వాల్యూమ్ మ్యూట్ చేయబడలేదు - - - Get the full version - పూర్తి రూపాంతరాన్ని పొందండి - - - %1 version %2 is now available. - - - - Remind me later - నాకు తరువాత గుర్తుచేయి - - - Update - నవీకరించు - - - &Window - కిటికీ (&W) - - - &Minimize - కనిష్టీకరించు (&M) - - - &Close - మూసివేయి (&C) - - - Buy %1... - - - - &Stop After This Track - - - - &Scrobbling - - - - Send played tracks titles to %1 - - - - &Log Out from %1 - %1 నుండి నిష్క్రమించండి (&L) - - - &Report an Issue... - - - - - MediaView - - Drop items here - అంశాలను ఇక్కడ లాగివదలండి - - - Playlist finished - ఆటజాబితా పూర్తయింది - - - This is just the demo version of %1. - ఇది %1 రూపాంతరం యొక్క డెమో మాత్రమే. - - - It allows you to play a few tracks so you can test the application and see if it works for you. - - - - Continue - కొనసాగు - - - Get the full version - పూర్తి రూపాంతరాన్ని పొందండి - - - - MessageWidget - - A new version of %1 is available! - - - - %1 %2 is now available. You have %3. - - - - Would you like to download it now? - - - - Skip This Version - - - - Remind Me Later - - - - Install Update - - - - - PasteLineEdit - - Paste - - - - - PlaylistModel - - This demo is limited to only %1 tracks in the playlist. - - - - - PlaylistView - - Playlist is empty - ఆటజాబితా ఖాళీగావుంది - - - %1 tracks - Total length is %2 - - - - - SearchLineEdit - - Search - వెతుకు - - - - SearchView - - Your search had no results. - మీ శోధనకు ఎటువంటి ఫలితాలు లేవు. - - - - TrackListView - - Tracks - ట్రాకులు - - - \ No newline at end of file diff -Nru musique-1.2.1/locale/tr.ts musique-1.3/locale/tr.ts --- musique-1.2.1/locale/tr.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/tr.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Sırala + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + İsim + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Sırala + + + BreadcrumbWidget &Back @@ -586,6 +644,14 @@ &Report an Issue... Bir Sorun Bildi&r + + Search + Arama + + + %1 finished scanning your music collection + + MediaView diff -Nru musique-1.2.1/locale/tt.ts musique-1.3/locale/tt.ts --- musique-1.2.1/locale/tt.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/tt.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + + + + BreadcrumbWidget &Back @@ -586,6 +644,14 @@ &Report an Issue... + + Search + Эзләү + + + %1 finished scanning your music collection + + MediaView diff -Nru musique-1.2.1/locale/uk.ts musique-1.3/locale/uk.ts --- musique-1.2.1/locale/uk.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/uk.ts 2013-10-11 07:42:11.000000000 +0000 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Сортувати по + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + Назва + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + Сортувати по + + + BreadcrumbWidget &Back @@ -584,6 +642,14 @@ &Report an Issue... + По&відомити про помилку + + + Search + Пошук + + + %1 finished scanning your music collection diff -Nru musique-1.2.1/locale/vi.ts musique-1.3/locale/vi.ts --- musique-1.2.1/locale/vi.ts 1970-01-01 00:00:00.000000000 +0000 +++ musique-1.3/locale/vi.ts 2013-10-11 07:42:11.000000000 +0000 @@ -0,0 +1,756 @@ + +UTF-8 + + AboutView + + Version %1 + Phiên bản %1 + + + %1 is Free Software but its development takes precious time. + %1 là phần mềm miễn phí nhưng quá trình phát triển phần mềm này mất rất nhiều thời gian cũng như tâm sức. + + + Please <a href='%1'>donate</a> to support the continued development of %2. + Xin vui lòng <a href='%1'>đóng góp về tài chính cho chúng tôi</a> để hỗ trợ việc phát triển của %2. + + + Released under the <a href='%1'>GNU General Public License</a> + Được phát hành với điều khoản của <a href='%1'>GNU General Public License</a> + + + &Close + &Đóng lại + + + About + Dịch bởi Phan Anh + + + What you always wanted to know about %1 and never dared to ask + Những gì bạn luôn luôn muốn biết về %1 và ngại nêu ra thắc mắc + + + You may want to try my other apps as well: + Bạn có thể muốn thử các ứng dụng khác của tôi : + + + %1, a YouTube app + %1, một + + + %1, a YouTube music player + %1, là một trình nghe nhạc trên YouTube + + + Translate %1 to your native language using %2 + Chuyển ngữ %1 sang ngôn ngữ của bạn bằng cách sử dụng %2 + + + Licensed to: %1 + Giấy phép: %1 + + + + ActivationDialog + + Enter your License Details + Điền vào chi tiết giấy phép + + + &Email: + &Email: + + + &Code: + &Mã: + + + + ActivationView + + Please license %1 + Xin giấy phép %1 + + + This demo has expired. + Phần thử nghiệm này đã hết hạn. + + + Without a license, the application will expire in %1 days. + Nếu không có giấy phép, các ứng dụng sẽ hết hạn trong %1 ngày. + + + By purchasing the full version, you will also support the hard work I put into creating %1. + Bằng cách mua phiên bản đầy đủ, bạn cũng sẽ hỗ trợ vào quá trình phát triển của phần mềm %1. + + + Use Demo + Sử dụng phiên bản dùng thử + + + Enter License + Điền vào giấy phép + + + Buy License + Mua giấy phép + + + The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. + Phiên bản đầy đủ cho phép bạn thêm vào nhiều hơn %1 track trong danh sách phát và nghe nhạc không bị ngắt quãng. + + + + AlbumInfo + + Buy on %1 + Mua trên %1 + + + Read more + Đọc thêm + + + + AlbumListView + + Artist + Nghệ sĩ + + + Title + Tiêu đề + + + Year + Năm + + + Popularity + Độ nổi tiếng + + + Reversed Order + Trật tự đảo ngược + + + Sort by + Sắp xếp theo + + + + ArtistInfo + + Read more + Đọc thêm + + + + ArtistListView + + Track Count + Số lượng track + + + Album Count + Số lượng albu + + + Name + Tên + + + Year + Năm + + + Popularity + Độ nổi tiếng + + + Reversed Order + Trật tự đảo ngược + + + Sort by + Sắp xếp theo + + + + BreadcrumbWidget + + &Back + &Quay lại + + + Go back + Quay trở lại + + + + ChooseFolderView + + Welcome to <a href='%1'>%2</a>, + Chào mừng đến với <a href='%1'>%2</a>, + + + %1 needs to scan your music collection. + %1 cần quét lại bộ sưu tập của bạn. + + + Cancel + Hủy bỏ + + + Use iTunes collection + Sử dụng bộ sưu tập iTunes + + + Use %1 + Sử dụng %1 + + + Choose a folder... + Chọn một thư mục... + + + %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. + %1 sẽ kết nối đến dịch vụ web từ Last.fm và truy vấn các thông tin về tên nghệ sĩ hay tự đề album cũng như phần họa bìa của album đó và nhiều thông tin khác. + + + If you have privacy concerns about this you can quit now. + Nếu bạn lo ngại về những thông tin cá nhân của mình, bạn có thể thoát ngay bây giờ. + + + Where's your music collection? + Phần bộ sưu tập âm nhạc của bạn ở đâu? + + + Select the location of your music collection. + Chọn địa điểm dành cho bộ sưu tập âm nhạc của bạn + + + Locate your collection + Xác định vị trí bộ sưu tập của bạn + + + + ClearButton + + Clear + Dọn dẹp phần nội dung + + + + CollectionScanner + + A scanning task is already running + Hiện đang chạy một tác vụ quét dữ liệu + + + + CollectionScannerView + + %1 is scanning your music collection. + %1 hiện đang quét bộ sưu tập của bạn. + + + %1 is using <a href='%2'>%3</a> to catalog your music. + %1 hiện đang sử dụng <a href='%2'>%3</a> để phân loại âm nhạc của bạn. + + + This will take time depending on your collection size and network speed. + Phần này sẽ tốn đôi chút thời gian tùy thuộc vào kích thước bộ sưu tập của bạn cũng như tốc độ của mạng internet. + + + Go grab a coffee + Hãy uống một ly cà phê và thư giãn đi nào + + + + DownloadWidget + + Downloading update... + Đang tải về phần cập nhật... + + + + DropArea + + Drop here to append to the playlist + Bỏ tại đây và nối kết vào danh sách phát + + + + FinderWidget + + Artists + Các nghệ sĩ + + + Albums + Albu + + + Folders + Thư mục + + + + GlobalShortcuts + + Play + Phát + + + Pause + Tạm dừng + + + Play/Pause + Phát/Tạm dừng + + + Stop + Dừng lại + + + Stop playing after current track + Dừng phát sau track hiện tại + + + Next track + Track tiếp theo + + + Previous track + Track trước đó + + + Increase volume + Tăng âm lượng + + + Decrease volume + Giảm âm lượng + + + Mute + Tắt tiếng + + + Seek forward + Tiến lên phía trước + + + Seek backward + Lùi lại phía sau + + + + LastFm + + Authentication failed + Xác nhận thất bại + + + + LastFmLoginDialog + + Log in to %1 + Đăng nhập vào %1 + + + &Username: + &Tên tài khoản: + + + &Password: + &Mật khẩu: + + + Signup for a %1 account + Đăng ký một tài khoản tại %1 + + + Forgot your <a href='%1'>username</a> or <a href='%2'>password</a>? + Quên phần <a href='%1'>tên tài khoản</a> hoặc <a href='%2'>mật khẩu</a>? + + + Cancel + Hủy bỏ + + + + MainWindow + + &Back + &Quay lại + + + Go to the previous view + Đi đến phần hiển thị trước đó + + + &Info + &Thông tin + + + Show information about the current track + Hiển thị thông tin về track hiện tại + + + P&revious + &Trước đó + + + Go back to the previous track + Quay lại track trước đó + + + &Next + &Tiếp theo + + + Skip to the next track + Bỏ qua và đi đến track tiếp theo + + + &Play + &Phát + + + Start playback + Bắt đầu chế độ phát + + + &Full Screen + &Toàn màn hình + + + Go full screen + Chuyển sang toàn màn hình + + + &Remove + &Loại bỏ + + + Remove the selected tracks from the playlist + Loại bỏ các track được chọn khỏi danh sách phát + + + Move &Up + Chuyển &lên + + + Move up the selected tracks in the playlist + Di chuyển lên trên các track được chọn trong danh sách phát + + + Move &Down + Chuyển &xuống + + + Move down the selected tracks in the playlist + Di chuyển xuống dưới các track được chọn trong danh sách phát + + + &Quit + &Thoát + + + Bye + Tạm biệt bạn nhé + + + &Change collection folder... + &Thay đổi thư mục của bộ sưu tập... + + + Choose a different music collection folder + Chọn một thư mục khác cho phần bộ sưu tập âm nhạc + + + &Website + &Website + + + %1 on the Web + %1 trên Web + + + Make a &donation + Ủng &hộ + + + Please support the continued development of %1 + Xin vui lòng hỗ trợ việc phát triển của %1 + + + &About + &Dịch bởi Phan Anh + + + Info about %1 + Xem thông tin về %1 + + + &Clear + &Xóa bỏ thông tin + + + Remove all tracks from the playlist + Loại bỏ tất cả các track khỏi danh sách phát + + + &Shuffle + &Ngẫu nhiên + + + Random playlist mode + Chế độ sử dụng danh sách phát ngẫu nhiên + + + &Repeat + &Lặp lại + + + Play first song again after all songs are played + Phát bài hát đầu tiên lại một lần nữa sau khi đã phát tất cả các bài hát khác + + + Mute volume + Tắt tiếng + + + &Application + &Ứng dụng + + + &Playback + &Chế độ phát lại + + + Play&list + Danh s&ách phát + + + &View + &Chế độ hiển thị + + + &Help + &Giúp đỡ + + + Press %1 to raise the volume, %2 to lower it + Click vào %1 để tăng âm lượng, %2 để giảm âm lượng xuống + + + Opening %1 + Đang mở %1 + + + Updating collection... + Đang cập nhật bộ sưu tập... + + + Updating collection - %1% + Đang cập nhật bộ sưu tập - %1% + + + Collection updated + Đã cập nhật xong bộ sưu tập + + + Fatal error: %1 + Xảy ra lỗi: %1 + + + Error: %1 + Lỗi: %1 + + + Leave &Full Screen + Thoát khỏi &chế độ toàn màn hình + + + Remaining time: %1 + Thời gian còn lại: %1 + + + Volume at %1% + Âm lượng ở mức %1% + + + Volume is muted + Đã tắt âm lượng + + + Volume is unmuted + Đã mở lại âm lượng + + + Get the full version + Nhận phiên bản đầy đủ + + + %1 version %2 is now available. + %1 phiên bản %2 hiện vừa mới được phát hành. + + + Remind me later + Thông báo cho tôi sau + + + Update + Cập nhật + + + &Window + &Cửa sổ + + + &Minimize + &Thu nhỏ + + + &Close + &Đóng lại + + + Buy %1... + Mua %1... + + + &Stop After This Track + &Dừng lại sau track này + + + &Scrobbling + &Lấy về + + + Send played tracks titles to %1 + Gửi tiêu đề các track đã phát đến %1 + + + &Log Out from %1 + &Đăng nhập khỏi %1 + + + &Report an Issue... + &Báo cáo một vấn đề... + + + Search + Tìm kiếm + + + %1 finished scanning your music collection + %1 đã hoàn tất việc quét thông tin về bộ sưu tập của bạn + + + + MediaView + + Drop items here + Thả các đối tượng vào đây + + + Playlist finished + Đã phát xong toàn bộ danh sách + + + This is just the demo version of %1. + Đây chỉ là phần dùng thử của phiên bản %1. + + + It allows you to play a few tracks so you can test the application and see if it works for you. + Phần này cho phép bạn phát một vài track để bạn có thể kiểm thử ứng dụng và tìm hiểu cách hoạt động phù hợp với bạn. + + + Continue + Tiếp tục + + + Get the full version + Nhận phiên bản đầy đủ + + + + MessageWidget + + A new version of %1 is available! + Hiện đã phát hành một phiên bản mới của %1! + + + %1 %2 is now available. You have %3. + %1 %2 hiện đã được phát hành. Phiên bản hiện tại bạn đang sở hữu %3. + + + Would you like to download it now? + Bạn có muốn tải về phần này không? + + + Skip This Version + Bỏ qua phiên bản này + + + Remind Me Later + Thông báo cho tôi sau + + + Install Update + Cài đặt bản cập nhật + + + + PasteLineEdit + + Paste + Dán + + + + PlaylistModel + + This demo is limited to only %1 tracks in the playlist. + Phần dùng thử chỉ phát được khoảng %1 track trong danh sách phát. + + + + PlaylistView + + Playlist is empty + Danh sách phát hiện không có đối tượng nào + + + %1 tracks - Total length is %2 + %1 track - Tổng thời gian là %2 + + + + SearchLineEdit + + Search + Tìm kiếm + + + + SearchView + + Your search had no results. + Không có kết quả nào khớp với phần bạn tìm kiếm + + + + TrackListView + + Tracks + Track + + + \ No newline at end of file diff -Nru musique-1.2.1/locale/zh_CN.ts musique-1.3/locale/zh_CN.ts --- musique-1.2.1/locale/zh_CN.ts 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/locale/zh_CN.ts 2013-10-11 07:42:11.000000000 +0000 @@ -16,7 +16,7 @@ Released under the <a href='%1'>GNU General Public License</a> - 依据 <a href='%1'>GNU General Public License</a> 分发 + 依据 <a href='%1'>GNU 通用公共许可证</a> 分发 &Close @@ -63,7 +63,7 @@ &Code: - + 激活码(C): @@ -78,7 +78,7 @@ Without a license, the application will expire in %1 days. - + 若无授权,该软件将会在 %1 天后过期。 By purchasing the full version, you will also support the hard work I put into creating %1. @@ -98,7 +98,7 @@ The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. - + 完整版本允许您添加超过 %1 首的曲目到播放列表且允许您不受打断的聆听音乐。 @@ -113,6 +113,33 @@ + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + 排序 + + + ArtistInfo Read more @@ -120,6 +147,37 @@ + ArtistListView + + Track Count + + + + Album Count + + + + Name + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + 排序 + + + BreadcrumbWidget &Back @@ -586,6 +644,14 @@ &Report an Issue... 报告问题&R… + + Search + 搜索 + + + %1 finished scanning your music collection + + MediaView @@ -618,34 +684,34 @@ MessageWidget A new version of %1 is available! - + 发现新版本的 %1 ! %1 %2 is now available. You have %3. - + %1 %2 已经可用。您现拥有 %3。 Would you like to download it now? - + 您想现在下载吗? Skip This Version - + 跳过此版本 Remind Me Later - + 稍后提醒我 Install Update - + 安装更新 PasteLineEdit Paste - + 粘贴 diff -Nru musique-1.2.1/locale/zh_TW.ts musique-1.3/locale/zh_TW.ts --- musique-1.2.1/locale/zh_TW.ts 1970-01-01 00:00:00.000000000 +0000 +++ musique-1.3/locale/zh_TW.ts 2013-10-11 07:42:11.000000000 +0000 @@ -0,0 +1,756 @@ + +UTF-8 + + AboutView + + Version %1 + 版本 %1 + + + %1 is Free Software but its development takes precious time. + %1 是自由軟體,但是其開發花了寶貴的時間。 + + + Please <a href='%1'>donate</a> to support the continued development of %2. + 請 <a href='%1'>贊助</a> 以支持持續發展 %2。 + + + Released under the <a href='%1'>GNU General Public License</a> + 發布在 <a href='%1'>GNU 通用公共授權條款</a>之下 + + + &Close + &關閉 + + + About + 關於 + + + What you always wanted to know about %1 and never dared to ask + 什麼是您一直想知道 %1 卻不敢問的? + + + You may want to try my other apps as well: + 您也許也想要試試我其他的軟體: + + + %1, a YouTube app + %1 ,一個Youtube應用程式 + + + %1, a YouTube music player + %1 ,一個Youtube音樂應用程式 + + + Translate %1 to your native language using %2 + 使用 %2 將 %1 翻譯成您的本地語言 + + + Licensed to: %1 + 授權使用:%1 + + + + ActivationDialog + + Enter your License Details + 輸入您的授權資料 + + + &Email: + 電子郵件: + + + &Code: + 授權碼: + + + + ActivationView + + Please license %1 + 請授權許可給 %1 + + + This demo has expired. + 這個展示版已過期。 + + + Without a license, the application will expire in %1 days. + 沒有許可證,本程式將於 %1 天過期。 + + + By purchasing the full version, you will also support the hard work I put into creating %1. + 透過購買完整版,您還可以支持我投入更多心力於打造 %1。 + + + Use Demo + 使用展示版 + + + Enter License + 輸入授權 + + + Buy License + 購買授權 + + + The full version allows you to add more than %1 tracks to the playlist and listen to your music without interruptions. + + + + + AlbumInfo + + Buy on %1 + 在 %1 上購買 + + + Read more + 閱讀更多 + + + + AlbumListView + + Artist + + + + Title + + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + 排序根據 + + + + ArtistInfo + + Read more + 閱讀更多 + + + + ArtistListView + + Track Count + + + + Album Count + + + + Name + 名稱 + + + Year + + + + Popularity + + + + Reversed Order + + + + Sort by + 排序根據 + + + + BreadcrumbWidget + + &Back + 後退(&B) + + + Go back + 退回 + + + + ChooseFolderView + + Welcome to <a href='%1'>%2</a>, + 歡迎使用 <a href='%1'>%2</a>, + + + %1 needs to scan your music collection. + + + + Cancel + 取消 + + + Use iTunes collection + 使用 iTunes 收藏 + + + Use %1 + 使用 %1 + + + Choose a folder... + 選擇資料夾: + + + %1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more. + %1 將會連接 Last.fm 的網路服務並傳送演唱者的名稱與專輯名稱,以獲取專輯封面、個人傳記以及更多。 + + + If you have privacy concerns about this you can quit now. + 若您有隱私上的顧慮,那您可以現在就離開。 + + + Where's your music collection? + 您的音樂收藏在哪裡呢? + + + Select the location of your music collection. + + + + Locate your collection + 定位您的收藏 + + + + ClearButton + + Clear + 清除 + + + + CollectionScanner + + A scanning task is already running + 一個檢視任務正在進行中 + + + + CollectionScannerView + + %1 is scanning your music collection. + %1 正在檢視您的音樂收藏 + + + %1 is using <a href='%2'>%3</a> to catalog your music. + + + + This will take time depending on your collection size and network speed. + 這會依據您收藏的大小與網路速度的不同,來佔用一點時間。 + + + Go grab a coffee + 去泡杯咖啡吧! + + + + DownloadWidget + + Downloading update... + 下載更新中... + + + + DropArea + + Drop here to append to the playlist + 拖曳至此以增加至播放清單 + + + + FinderWidget + + Artists + 藝術家 + + + Albums + 專輯 + + + Folders + 資料夾 + + + + GlobalShortcuts + + Play + 播放 + + + Pause + 暫停 + + + Play/Pause + 播放/暫停 + + + Stop + 停止 + + + Stop playing after current track + 停止播放當前曲目 + + + Next track + 下一首曲目 + + + Previous track + 上一首曲目 + + + Increase volume + 增加音量 + + + Decrease volume + 減少音量 + + + Mute + 靜音 + + + Seek forward + 快轉 + + + Seek backward + 倒轉 + + + + LastFm + + Authentication failed + 認證失敗 + + + + LastFmLoginDialog + + Log in to %1 + 登入到 %1 + + + &Username: + &帳號: + + + &Password: + &密碼: + + + Signup for a %1 account + 註冊一個 %1 帳號 + + + Forgot your <a href='%1'>username</a> or <a href='%2'>password</a>? + 忘記您的 <a href='%1'>使用者名稱</a> 或 <a href='%2'>密碼</a>? + + + Cancel + 取消 + + + + MainWindow + + &Back + 後退(&B) + + + Go to the previous view + + + + &Info + + + + Show information about the current track + + + + P&revious + 上一個 + + + Go back to the previous track + 回到上一首曲目 + + + &Next + 下一首(&N) + + + Skip to the next track + 跳至下一首曲目 + + + &Play + &播放 + + + Start playback + 開始播放 + + + &Full Screen + &全螢幕 + + + Go full screen + 切換至全螢幕 + + + &Remove + 清除 + + + Remove the selected tracks from the playlist + 從播放清單中移除選取的曲目 + + + Move &Up + 上移 + + + Move up the selected tracks in the playlist + 在播放清單中向上移動選定的曲目 + + + Move &Down + 下移 + + + Move down the selected tracks in the playlist + 在播放清單中向下移動選定的曲目 + + + &Quit + &離開 + + + Bye + 再見 + + + &Change collection folder... + + + + Choose a different music collection folder + + + + &Website + 網站 + + + %1 on the Web + 在網絡上的 %1 + + + Make a &donation + + + + Please support the continued development of %1 + 請支持持續發展 %1 + + + &About + &關於 + + + Info about %1 + 有關 %1 訊息 + + + &Clear + 清除(&C) + + + Remove all tracks from the playlist + 從播放清單中刪除所有曲目 + + + &Shuffle + 隨機(&S) + + + Random playlist mode + 隨機播放清單模式 + + + &Repeat + 重複(&R) + + + Play first song again after all songs are played + 所有歌曲播放後再次播放第一首歌曲 + + + Mute volume + 靜音 + + + &Application + 應用 + + + &Playback + 播放 + + + Play&list + 播放清單(&L) + + + &View + 檢視 + + + &Help + 說明 + + + Press %1 to raise the volume, %2 to lower it + 按 %1 提高音量,%2 降低音量 + + + Opening %1 + 開啟 %1 + + + Updating collection... + + + + Updating collection - %1% + + + + Collection updated + + + + Fatal error: %1 + + + + Error: %1 + 錯誤:%1 + + + Leave &Full Screen + 離開全螢幕(&F) + + + Remaining time: %1 + 剩餘時間:%1 + + + Volume at %1% + 音量達到 %1% + + + Volume is muted + 音量處於靜音狀態 + + + Volume is unmuted + 音量處於非靜音狀態 + + + Get the full version + 取得完整版 + + + %1 version %2 is now available. + 現在有 %1 版本 %2 可用。 + + + Remind me later + 稍候提醒我 + + + Update + 更新 + + + &Window + 視窗(&W) + + + &Minimize + &最小化 + + + &Close + &關閉 + + + Buy %1... + 購買 %1 + + + &Stop After This Track + 在這首曲目後停止(&S) + + + &Scrobbling + &Scrobbling + + + Send played tracks titles to %1 + 寄送播放曲目標題到 %1 + + + &Log Out from %1 + 從 %1 &登出 + + + &Report an Issue... + &問題回報... + + + Search + 搜尋 + + + %1 finished scanning your music collection + + + + + MediaView + + Drop items here + 拖放項目到這裡 + + + Playlist finished + 清單播放完成 + + + This is just the demo version of %1. + 這僅僅是演示版的 %1。 + + + It allows you to play a few tracks so you can test the application and see if it works for you. + + + + Continue + 繼續 + + + Get the full version + 取得完整版 + + + + MessageWidget + + A new version of %1 is available! + 有新版本的 %1 可用 + + + %1 %2 is now available. You have %3. + %1 %2 現在可用。您有 %3. + + + Would you like to download it now? + 您想現在就下載嗎? + + + Skip This Version + 跳過此版本 + + + Remind Me Later + 稍候提醒我 + + + Install Update + 安裝更新 + + + + PasteLineEdit + + Paste + 貼上 + + + + PlaylistModel + + This demo is limited to only %1 tracks in the playlist. + 這個展示版是被限制只能有 %1 首曲目在播放清單中。 + + + + PlaylistView + + Playlist is empty + 播放清單是空的 + + + %1 tracks - Total length is %2 + %1 曲目 - 總長度為 %2 + + + + SearchLineEdit + + Search + 搜尋 + + + + SearchView + + Your search had no results. + 您的搜尋沒有結果。 + + + + TrackListView + + Tracks + + + + \ No newline at end of file diff -Nru musique-1.2.1/musique.desktop musique-1.3/musique.desktop --- musique-1.2.1/musique.desktop 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/musique.desktop 2013-10-11 07:42:11.000000000 +0000 @@ -1,13 +1,13 @@ [Desktop Entry] Name=Musique Comment=Listen to your music collection -GenericName=Music Player +GenericName=Musique Music Player Exec=musique Terminal=false Type=Application Icon=musique -Categories=Qt;Audio;Music;Player;AudioVideo; -StartupNotify=true +Categories=AudioVideo;Player;Qt; +StartupNotify=false Actions=TogglePlaying;Next;Previous;Info; [Desktop Action TogglePlaying] diff -Nru musique-1.2.1/musique.pro musique-1.3/musique.pro --- musique-1.2.1/musique.pro 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/musique.pro 2013-10-11 07:42:11.000000000 +0000 @@ -1,9 +1,6 @@ CONFIG += release -DEFINES += QT_NO_DEBUG_OUTPUT - TEMPLATE = app - -VERSION = 1.2.1 +VERSION = 1.3 DEFINES += APP_VERSION="$$VERSION" APP_NAME = Musique @@ -12,12 +9,14 @@ APP_UNIX_NAME = musique DEFINES += APP_UNIX_NAME="$$APP_UNIX_NAME" -DEFINES += QT_USE_FAST_CONCATENATION -DEFINES += QT_USE_FAST_OPERATOR_PLUS +DEFINES *= QT_NO_DEBUG_OUTPUT +DEFINES *= QT_USE_QSTRINGBUILDER DEFINES += QT_STRICT_ITERATORS TARGET = $${APP_UNIX_NAME} -LIBS += -ltag +unix:!mac { + LIBS += -ltag +} QT += network xml phonon sql include(src/qtsingleapplication/qtsingleapplication.pri) @@ -28,7 +27,6 @@ src/urllineedit.h \ src/spacer.h \ src/constants.h \ - src/faderwidget/faderwidget.h \ src/networkaccess.h \ src/global.h \ src/updatechecker.h \ @@ -94,7 +92,6 @@ src/searchlineedit.cpp \ src/urllineedit.cpp \ src/spacer.cpp \ - src/faderwidget/faderwidget.cpp \ src/updatechecker.cpp \ src/networkaccess.cpp \ src/finderwidget.cpp \ @@ -211,4 +208,4 @@ icon512.path = $$DATADIR/icons/hicolor/512x512/apps icon512.files += data/512x512/$${APP_UNIX_NAME}.png } -mac|win32:include(local/local.pri) +mac|win32|contains(DEFINES, APP_UBUNTU):include(local/local.pri) diff -Nru musique-1.2.1/resources.qrc musique-1.3/resources.qrc --- musique-1.2.1/resources.qrc 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/resources.qrc 2013-10-11 07:42:11.000000000 +0000 @@ -7,5 +7,6 @@ images/item/artist.png images/item/track.png style.css + images/sort.png diff -Nru musique-1.2.1/src/aboutview.cpp musique-1.3/src/aboutview.cpp --- musique-1.2.1/src/aboutview.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/aboutview.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "aboutview.h" #include "constants.h" #ifdef APP_ACTIVATION diff -Nru musique-1.2.1/src/aboutview.h musique-1.3/src/aboutview.h --- musique-1.2.1/src/aboutview.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/aboutview.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef ABOUTVIEW_H #define ABOUTVIEW_H diff -Nru musique-1.2.1/src/albumlistview.cpp musique-1.3/src/albumlistview.cpp --- musique-1.2.1/src/albumlistview.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/albumlistview.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,8 +1,199 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "albumlistview.h" +#include "mainwindow.h" +#include "utils.h" +#include "artistsqlmodel.h" #include "database.h" -#include -#include "albumsqlmodel.h" +#ifdef APP_EXTRA +#include "extra.h" +#endif + +namespace The { +QHash* globalActions(); +} + +static const char *sortByKey = "albumSortBy"; +static const char *reverseOrderKey = "albumReverseOrder"; + +AlbumListView::AlbumListView(QWidget *parent) : BaseFinderView(parent), + showToolBar(false) { + setupToolbar(); +} + +void AlbumListView::appear() { + BaseFinderView::appear(); + if (showToolBar) { + QStatusBar *statusBar = MainWindow::instance()->statusBar(); +#ifdef APP_EXTRA + Extra::fadeInWidget(statusBar, statusBar); +#endif + statusBar->insertPermanentWidget(0, toolBar); + toolBar->show(); + } +} + +void AlbumListView::disappear() { + BaseFinderView::disappear(); + if (showToolBar) { + QStatusBar *statusBar = MainWindow::instance()->statusBar(); +#ifdef APP_EXTRA + Extra::fadeInWidget(statusBar, statusBar); +#endif + statusBar->removeWidget(toolBar); + } +} + +void AlbumListView::setupToolbar() { + toolBar = new QToolBar(); + toolBar->hide(); + toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + toolBar->setIconSize(QSize(16, 16)); + + QSettings settings; + sortBy = static_cast(settings.value(sortByKey, SortByArtist).toInt()); + + QMenu *sortMenu = new QMenu(this); + QActionGroup *sortGroup = new QActionGroup(this); + + QAction *sortByArtistAction = new QAction(tr("Artist"), this); + sortByArtistAction->setActionGroup(sortGroup); + sortByArtistAction->setCheckable(true); + if (sortBy == SortByArtist) sortByArtistAction->setChecked(true); + connect(sortByArtistAction, SIGNAL(triggered()), SLOT(setSortByArtist())); + sortMenu->addAction(sortByArtistAction); -AlbumListView::AlbumListView(QWidget *parent) : BaseFinderView(parent) { + QAction *sortByNameAction = new QAction(tr("Title"), this); + sortByNameAction->setActionGroup(sortGroup); + sortByNameAction->setCheckable(true); + if (sortBy == SortByTitle) sortByNameAction->setChecked(true); + connect(sortByNameAction, SIGNAL(triggered()), SLOT(setSortByTitle())); + sortMenu->addAction(sortByNameAction); + + QAction *sortByYearAction = new QAction(tr("Year"), this); + sortByYearAction->setActionGroup(sortGroup); + sortByYearAction->setCheckable(true); + if (sortBy == SortByYear) sortByYearAction->setChecked(true); + connect(sortByYearAction, SIGNAL(triggered()), SLOT(setSortByYear())); + sortMenu->addAction(sortByYearAction); + + QAction *sortByPopularityAction = new QAction(tr("Popularity"), this); + sortByPopularityAction->setActionGroup(sortGroup); + sortByPopularityAction->setCheckable(true); + if (sortBy == SortByPopularity) sortByPopularityAction->setChecked(true); + connect(sortByPopularityAction, SIGNAL(triggered()), SLOT(setSortByPopularity())); + sortMenu->addAction(sortByPopularityAction); + + sortMenu->addSeparator(); + + reversedOrder = settings.value(reverseOrderKey, false).toBool(); + + QAction *reversedOrderAction = new QAction(tr("Reversed Order"), this); + reversedOrderAction->setCheckable(true); + if (reversedOrder) reversedOrderAction->setChecked(true); + connect(reversedOrderAction, SIGNAL(triggered(bool)), SLOT(setReversedOrder(bool))); + sortMenu->addAction(reversedOrderAction); + + QToolButton *sortButton = new QToolButton(this); + sortButton->setText(tr("Sort by")); + sortButton->setIcon(Utils::icon("sort")); + sortButton->setIconSize(QSize(16, 16)); + sortButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + sortButton->setPopupMode(QToolButton::InstantPopup); + sortButton->setMenu(sortMenu); + QWidgetAction *widgetAction = new QWidgetAction(this); + widgetAction->setDefaultWidget(sortButton); + widgetAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_O)); + toolBar->addAction(widgetAction); +} + +void AlbumListView::updateQuery(bool transition) { + QString sql = "select id from albums where trackCount>0"; + + switch (sortBy) { + case SortByArtist: + sql = "select b.id from albums b, artists a" + " where b.artist=a.id and b.trackCount>0" + " order by a.name collate nocase"; + if (reversedOrder) sql += " desc"; + sql += ", b.year"; + if (!reversedOrder) sql += " desc"; + sql += ", b.trackCount"; + if (!reversedOrder) sql += " desc"; + break; + case SortByYear: + sql += " and year>0 order by year"; + if (!reversedOrder) sql += " desc"; + break; + case SortByPopularity: + sql += " order by listeners"; + if (!reversedOrder) sql += " desc"; + break; + default: + sql += " order by title collate nocase"; + if (reversedOrder) sql += " desc"; + break; + } + +#ifdef APP_EXTRA + if (transition) + Extra::fadeInWidget(this, this); +#endif + + if (!sqlModel->query().isValid()) + QTimer::singleShot(1000, this, SLOT(preloadThumbs())); + + sqlModel->setQuery(sql, Database::instance().getConnection()); + if (sqlModel->lastError().isValid()) + qWarning() << sqlModel->lastError().text(); + + scrollToTop(); + showToolBar = true; +} + +void AlbumListView::preloadThumbs() { + qApp->processEvents(); + QSqlDatabase db = Database::instance().getConnection(); + QSqlQuery query(sqlModel->query().lastQuery(), db); + bool success = query.exec(); + if (!success) + qDebug() << query.lastQuery() << query.lastError().text() << query.lastError().number(); + while (query.next()) { + int albumId = query.value(0).toInt(); + Album* album = Album::forId(albumId); + album->getThumb(); + qApp->processEvents(); + } +} + +void AlbumListView::setSortBy(SortBy sortBy) { + this->sortBy = sortBy; + updateQuery(true); + QSettings settings; + settings.setValue(sortByKey, (int)sortBy); +} +void AlbumListView::setReversedOrder(bool reversedOrder) { + this->reversedOrder = reversedOrder; + updateQuery(true); + QSettings settings; + settings.setValue(reverseOrderKey, reversedOrder); } diff -Nru musique-1.2.1/src/albumlistview.h musique-1.3/src/albumlistview.h --- musique-1.2.1/src/albumlistview.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/albumlistview.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,7 +1,30 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef ALBUMLISTVIEW_H #define ALBUMLISTVIEW_H +#include +#include #include "basefinderview.h" +#include "albumsqlmodel.h" class AlbumListView : public BaseFinderView { @@ -9,7 +32,37 @@ public: AlbumListView(QWidget *parent); - + void setModel(AlbumSqlModel *model) { BaseFinderView::setModel(model); sqlModel = model; } + void updateQuery(bool transition = false); + void setShowToolBar(bool show) { showToolBar = show; } + + enum SortBy { + SortByTitle = 0, + SortByArtist, + SortByYear, + SortByPopularity + }; + +public slots: + void appear(); + void disappear(); + +private slots: + void setSortBy(SortBy sortBy); + void setSortByTitle() { setSortBy(SortByTitle); } + void setSortByArtist() { setSortBy(SortByArtist); } + void setSortByYear() { setSortBy(SortByYear); } + void setSortByPopularity() { setSortBy(SortByPopularity); } + void setReversedOrder(bool reversedOrder); + void preloadThumbs(); + +private: + void setupToolbar(); + QToolBar *toolBar; + AlbumSqlModel *sqlModel; + SortBy sortBy; + bool reversedOrder; + bool showToolBar; }; #endif // ALBUMLISTVIEW_H diff -Nru musique-1.2.1/src/albumsqlmodel.cpp musique-1.3/src/albumsqlmodel.cpp --- musique-1.2.1/src/albumsqlmodel.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/albumsqlmodel.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "albumsqlmodel.h" #include "model/album.h" #include "mainwindow.h" @@ -13,17 +33,14 @@ case Finder::ItemTypeRole: return Finder::ItemTypeAlbum; - break; case Finder::DataObjectRole: album = Album::forId(QSqlQueryModel::data(QSqlQueryModel::index(index.row(), 0)).toInt()); connect(album, SIGNAL(gotPhoto()), MainWindow::instance(), SLOT(update()), Qt::UniqueConnection); return QVariant::fromValue(QPointer(album)); - break; case Finder::HoveredItemRole: return hoveredRow == index.row(); - break; case Finder::PlayIconAnimationItemRole: return timeLine->currentFrame() / 1000.; diff -Nru musique-1.2.1/src/albumsqlmodel.h musique-1.3/src/albumsqlmodel.h --- musique-1.2.1/src/albumsqlmodel.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/albumsqlmodel.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef ALBUMSQLMODEL_H #define ALBUMSQLMODEL_H diff -Nru musique-1.2.1/src/artistlistview.cpp musique-1.3/src/artistlistview.cpp --- musique-1.2.1/src/artistlistview.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/artistlistview.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,6 +1,202 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "artistlistview.h" -#include "database.h" -#include +#include "mainwindow.h" +#include "utils.h" #include "artistsqlmodel.h" +#include "database.h" +#ifdef APP_EXTRA +#include "extra.h" +#endif + +namespace The { +QHash* globalActions(); +} + +static const char *sortByKey = "artistSortBy"; +static const char *reverseOrderKey = "artistReverseOrder"; + +ArtistListView::ArtistListView(QWidget *parent) : BaseFinderView(parent) { + setupToolbar(); +} + +void ArtistListView::appear() { + QStatusBar *statusBar = MainWindow::instance()->statusBar(); +#ifdef APP_EXTRA + Extra::fadeInWidget(statusBar, statusBar); +#endif + BaseFinderView::appear(); + statusBar->insertPermanentWidget(0, toolBar); + toolBar->show(); +} + +void ArtistListView::disappear() { + QStatusBar *statusBar = MainWindow::instance()->statusBar(); +#ifdef APP_EXTRA + Extra::fadeInWidget(statusBar, statusBar); +#endif + BaseFinderView::disappear(); + statusBar->removeWidget(toolBar); +} + +void ArtistListView::setupToolbar() { + toolBar = new QToolBar(); + toolBar->hide(); + toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + toolBar->setIconSize(QSize(16, 16)); + + QSettings settings; + sortBy = static_cast(settings.value(sortByKey, SortByTrackCount).toInt()); + + QMenu *sortMenu = new QMenu(this); + QActionGroup *sortGroup = new QActionGroup(this); + + QAction *sortByTrackCountAction = new QAction(tr("Track Count"), this); + sortByTrackCountAction->setActionGroup(sortGroup); + sortByTrackCountAction->setCheckable(true); + if (sortBy == SortByTrackCount) sortByTrackCountAction->setChecked(true); + connect(sortByTrackCountAction, SIGNAL(triggered()), SLOT(setSortByTrackCount())); + sortMenu->addAction(sortByTrackCountAction); + + QAction *sortByAlbumCountAction = new QAction(tr("Album Count"), this); + sortByAlbumCountAction->setActionGroup(sortGroup); + sortByAlbumCountAction->setCheckable(true); + if (sortBy == SortByAlbumCount) sortByAlbumCountAction->setChecked(true); + connect(sortByAlbumCountAction, SIGNAL(triggered()), SLOT(setSortByAlbumCount())); + sortMenu->addAction(sortByAlbumCountAction); + + QAction *sortByNameAction = new QAction(tr("Name"), this); + sortByNameAction->setActionGroup(sortGroup); + sortByNameAction->setCheckable(true); + if (sortBy == SortByName) sortByNameAction->setChecked(true); + connect(sortByNameAction, SIGNAL(triggered()), SLOT(setSortByName())); + sortMenu->addAction(sortByNameAction); + + QAction *sortByYearAction = new QAction(tr("Year"), this); + sortByYearAction->setActionGroup(sortGroup); + sortByYearAction->setCheckable(true); + if (sortBy == SortByYear) sortByYearAction->setChecked(true); + connect(sortByYearAction, SIGNAL(triggered()), SLOT(setSortByYear())); + sortMenu->addAction(sortByYearAction); + + QAction *sortByPopularityAction = new QAction(tr("Popularity"), this); + sortByPopularityAction->setActionGroup(sortGroup); + sortByPopularityAction->setCheckable(true); + if (sortBy == SortByPopularity) sortByPopularityAction->setChecked(true); + connect(sortByPopularityAction, SIGNAL(triggered()), SLOT(setSortByPopularity())); + sortMenu->addAction(sortByPopularityAction); + + sortMenu->addSeparator(); + + reversedOrder = settings.value(reverseOrderKey, false).toBool(); + + QAction *reversedOrderAction = new QAction(tr("Reversed Order"), this); + reversedOrderAction->setCheckable(true); + if (reversedOrder) reversedOrderAction->setChecked(true); + connect(reversedOrderAction, SIGNAL(triggered(bool)), SLOT(setReversedOrder(bool))); + sortMenu->addAction(reversedOrderAction); + + QToolButton *sortButton = new QToolButton(this); + sortButton->setText(tr("Sort by")); + sortButton->setIcon(Utils::icon("sort")); + sortButton->setIconSize(QSize(16, 16)); + sortButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + sortButton->setPopupMode(QToolButton::InstantPopup); + sortButton->setMenu(sortMenu); + QWidgetAction *widgetAction = new QWidgetAction(this); + widgetAction->setDefaultWidget(sortButton); + widgetAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_O)); + toolBar->addAction(widgetAction); +} + +void ArtistListView::updateQuery(bool transition) { + QString sql = "select id from artists where trackCount>0"; + + switch (sortBy) { + case SortByTrackCount: + sql += " order by trackCount"; + if (!reversedOrder) sql += " desc"; + sql += ", listeners"; + if (!reversedOrder) sql += " desc"; + break; + case SortByAlbumCount: + sql += " order by albumCount"; + if (!reversedOrder) sql += " desc"; + sql += ", listeners"; + if (!reversedOrder) sql += " desc"; + break; + case SortByYear: + sql += " and yearFrom>0 order by yearFrom"; + if (!reversedOrder) sql += " desc"; + break; + case SortByPopularity: + sql += " order by listeners"; + if (!reversedOrder) sql += " desc"; + break; + default: + sql += " order by name collate nocase"; + if (reversedOrder) sql += " desc"; + break; + } + +#ifdef APP_EXTRA + if (transition) + Extra::fadeInWidget(this, this); +#endif + + if (!sqlModel->query().isValid()) + QTimer::singleShot(1000, this, SLOT(preloadThumbs())); + + sqlModel->setQuery(sql, Database::instance().getConnection()); + if (sqlModel->lastError().isValid()) + qWarning() << sqlModel->lastError().text(); + + scrollToTop(); +} + +void ArtistListView::preloadThumbs() { + qApp->processEvents(); + QSqlDatabase db = Database::instance().getConnection(); + QSqlQuery query(sqlModel->query().lastQuery(), db); + bool success = query.exec(); + if (!success) + qDebug() << query.lastQuery() << query.lastError().text() << query.lastError().number(); + while (query.next()) { + int artistId = query.value(0).toInt(); + Artist* artist = Artist::forId(artistId); + artist->getPhoto(); + qApp->processEvents(); + } +} + +void ArtistListView::setSortBy(SortBy sortBy) { + this->sortBy = sortBy; + updateQuery(true); + QSettings settings; + settings.setValue(sortByKey, (int)sortBy); +} -ArtistListView::ArtistListView(QWidget *parent) : BaseFinderView(parent) { } +void ArtistListView::setReversedOrder(bool reversedOrder) { + this->reversedOrder = reversedOrder; + updateQuery(true); + QSettings settings; + settings.setValue(reverseOrderKey, reversedOrder); +} diff -Nru musique-1.2.1/src/artistlistview.h musique-1.3/src/artistlistview.h --- musique-1.2.1/src/artistlistview.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/artistlistview.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,7 +1,30 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef ARTISTLISTVIEW_H #define ARTISTLISTVIEW_H +#include +#include #include "basefinderview.h" +#include "artistsqlmodel.h" class ArtistListView : public BaseFinderView { @@ -9,6 +32,37 @@ public: ArtistListView(QWidget *parent); + void setModel(ArtistSqlModel *model) { BaseFinderView::setModel(model); sqlModel = model; } + void updateQuery(bool transition = false); + + enum SortBy { + SortByName = 0, + SortByAlbumCount, + SortByTrackCount, + SortByYear, + SortByPopularity + }; + +public slots: + void appear(); + void disappear(); + +private slots: + void setSortBy(SortBy sortBy); + void setSortByName() { setSortBy(SortByName); } + void setSortByTrackCount() { setSortBy(SortByTrackCount); } + void setSortByAlbumCount() { setSortBy(SortByAlbumCount); } + void setSortByYear() { setSortBy(SortByYear); } + void setSortByPopularity() { setSortBy(SortByPopularity); } + void setReversedOrder(bool reversedOrder); + void preloadThumbs(); + +private: + void setupToolbar(); + QToolBar *toolBar; + ArtistSqlModel *sqlModel; + SortBy sortBy; + bool reversedOrder; }; diff -Nru musique-1.2.1/src/artistsqlmodel.cpp musique-1.3/src/artistsqlmodel.cpp --- musique-1.2.1/src/artistsqlmodel.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/artistsqlmodel.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "artistsqlmodel.h" #include "mainwindow.h" diff -Nru musique-1.2.1/src/artistsqlmodel.h musique-1.3/src/artistsqlmodel.h --- musique-1.2.1/src/artistsqlmodel.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/artistsqlmodel.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef ARTISTSQLMODEL_H #define ARTISTSQLMODEL_H diff -Nru musique-1.2.1/src/autocomplete.cpp musique-1.3/src/autocomplete.cpp --- musique-1.2.1/src/autocomplete.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/autocomplete.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "autocomplete.h" #include "suggester.h" #ifdef APP_MAC diff -Nru musique-1.2.1/src/autocomplete.h musique-1.3/src/autocomplete.h --- musique-1.2.1/src/autocomplete.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/autocomplete.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef SUGGESTCOMPLETION_H #define SUGGESTCOMPLETION_H diff -Nru musique-1.2.1/src/basefinderview.cpp musique-1.3/src/basefinderview.cpp --- musique-1.2.1/src/basefinderview.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/basefinderview.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "basefinderview.h" #include "finderitemdelegate.h" #include "basesqlmodel.h" @@ -7,39 +27,35 @@ BaseFinderView::BaseFinderView(QWidget *parent) : QListView(parent) { - this->setItemDelegate(new FinderItemDelegate(this)); - this->setSelectionMode(QAbstractItemView::ExtendedSelection); + setItemDelegate(new FinderItemDelegate(this)); + setSelectionMode(QAbstractItemView::ExtendedSelection); // layout - this->setGridSize(QSize(151, 151)); - // this->setViewMode(QListView::IconMode); - // this->setSpacing(1); - this->setFlow(QListView::LeftToRight); - this->setWrapping(true); - this->setResizeMode(QListView::Adjust); - this->setMovement(QListView::Static); - this->setUniformItemSizes(true); + setGridSize(QSize(151, 151)); + setFlow(QListView::LeftToRight); + setWrapping(true); + setResizeMode(QListView::Adjust); + setMovement(QListView::Static); + setUniformItemSizes(true); // colors QPalette p = palette(); p.setBrush(QPalette::Base, Qt::black); p.setBrush(QPalette::Text, Qt::white); p.setColor(QPalette::Background, Qt::transparent); - this->setPalette(p); + setPalette(p); // dragndrop - this->setDragEnabled(true); - this->setDragDropMode(QAbstractItemView::DragOnly); + setDragEnabled(true); + setDragDropMode(QAbstractItemView::DragOnly); // cosmetics - this->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); - this->setFrameShape( QFrame::NoFrame ); - this->setAttribute(Qt::WA_MacShowFocusRect, false); - // setStyleSheet("background:transparent"); + setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); + setFrameShape(QFrame::NoFrame); + setAttribute(Qt::WA_MacShowFocusRect, false); verticalScrollBar()->setPageStep(3); verticalScrollBar()->setSingleStep(1); - } void BaseFinderView::appear() { @@ -47,8 +63,7 @@ setMouseTracking(true); BaseSqlModel *baseSqlModel = dynamic_cast(model()); if (baseSqlModel) { - QSqlQuery query = baseSqlModel->query(); - baseSqlModel->setQuery(QSqlQuery(query.lastQuery(), Database::instance().getConnection())); + baseSqlModel->restoreQuery(); while (baseSqlModel->canFetchMore()) baseSqlModel->fetchMore(); } @@ -57,15 +72,12 @@ void BaseFinderView::disappear() { setEnabled(false); setMouseTracking(false); - // BaseSqlModel *baseSqlModel = dynamic_cast(model()); - // if (baseSqlModel) baseSqlModel->clear(); + BaseSqlModel *baseSqlModel = dynamic_cast(model()); + if (baseSqlModel) baseSqlModel->clear(); } void BaseFinderView::leaveEvent(QEvent * /* event */) { - BaseSqlModel *baseModel = dynamic_cast(model()); - if (baseModel) { - baseModel->clearHover(); - } + QMetaObject::invokeMethod(model(), "clearHover"); } void BaseFinderView::mouseMoveEvent(QMouseEvent *event) { @@ -74,10 +86,10 @@ // qDebug() << "BaseFinderView::mouseMoveEvent" << event->pos(); if (isHoveringPlayIcon(event)) { - QMetaObject::invokeMethod(model(), "enterPlayIconHover", Qt::DirectConnection); + QMetaObject::invokeMethod(model(), "enterPlayIconHover"); setCursor(Qt::PointingHandCursor); } else { - QMetaObject::invokeMethod(model(), "exitPlayIconHover", Qt::DirectConnection); + QMetaObject::invokeMethod(model(), "exitPlayIconHover"); unsetCursor(); } diff -Nru musique-1.2.1/src/basefinderview.h musique-1.3/src/basefinderview.h --- musique-1.2.1/src/basefinderview.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/basefinderview.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef BASEFINDERVIEW_H #define BASEFINDERVIEW_H diff -Nru musique-1.2.1/src/basesqlmodel.cpp musique-1.3/src/basesqlmodel.cpp --- musique-1.2.1/src/basesqlmodel.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/basesqlmodel.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,6 +1,27 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "basesqlmodel.h" #include "trackmimedata.h" #include "database.h" +#include "model/item.h" BaseSqlModel::BaseSqlModel(QObject *parent) : QSqlQueryModel(parent) { hoveredRow = -1; @@ -11,17 +32,31 @@ connect(timeLine, SIGNAL(frameChanged(int)), SLOT(updatePlayIcon())); } +void BaseSqlModel::setQuery(const QSqlQuery &query) { + lastQuery = query.lastQuery(); + QSqlQueryModel::setQuery(query); +} + +void BaseSqlModel::setQuery(const QString &query, const QSqlDatabase &db) { + lastQuery = query; + QSqlQueryModel::setQuery(query, db); +} + +void BaseSqlModel::restoreQuery() { + if (!query().isValid()) + setQuery(lastQuery, Database::instance().getConnection()); +} + void BaseSqlModel::setHoveredRow(int row) { int oldRow = hoveredRow; hoveredRow = row; - emit dataChanged( createIndex( oldRow, 0 ), createIndex( oldRow, columnCount() - 1 ) ); - emit dataChanged( createIndex( hoveredRow, 0 ), createIndex( hoveredRow, columnCount() - 1 ) ); + emit dataChanged(index(oldRow, 0 ), index(oldRow, 0)); + emit dataChanged(index(hoveredRow, 0), index(hoveredRow, 0)); } void BaseSqlModel::clearHover() { - emit dataChanged( createIndex( hoveredRow, 0 ), createIndex( hoveredRow, columnCount() - 1 ) ); + emit dataChanged(index(hoveredRow, 0), index(hoveredRow, 0)); hoveredRow = -1; - // timeLine->stop(); } void BaseSqlModel::enterPlayIconHover() { @@ -45,7 +80,7 @@ } void BaseSqlModel::updatePlayIcon() { - emit dataChanged( createIndex( hoveredRow, 0 ), createIndex( hoveredRow, columnCount() - 1 ) ); + emit dataChanged(index(hoveredRow, 0), index(hoveredRow, 0)); } // --- Sturm und drang --- diff -Nru musique-1.2.1/src/basesqlmodel.h musique-1.3/src/basesqlmodel.h --- musique-1.2.1/src/basesqlmodel.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/basesqlmodel.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,9 +1,29 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef BASESQLMODEL_H #define BASESQLMODEL_H -#include -#include -#include "model/item.h" +#include + +class Item; class BaseSqlModel : public QSqlQueryModel { @@ -11,6 +31,9 @@ public: BaseSqlModel(QObject *parent = 0); + void setQuery(const QSqlQuery &query); + void setQuery(const QString &query, const QSqlDatabase &db); + void restoreQuery(); void setHoveredRow(int row); public slots: @@ -30,6 +53,7 @@ int hoveredRow; QTimeLine * timeLine; bool playIconHovered; + QString lastQuery; private slots: void updatePlayIcon(); diff -Nru musique-1.2.1/src/breadcrumbwidget.cpp musique-1.3/src/breadcrumbwidget.cpp --- musique-1.2.1/src/breadcrumbwidget.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/breadcrumbwidget.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "breadcrumbwidget.h" #include "utils.h" diff -Nru musique-1.2.1/src/breadcrumbwidget.h musique-1.3/src/breadcrumbwidget.h --- musique-1.2.1/src/breadcrumbwidget.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/breadcrumbwidget.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef BREADCRUMBWIDGET_H #define BREADCRUMBWIDGET_H diff -Nru musique-1.2.1/src/choosefolderview.cpp musique-1.3/src/choosefolderview.cpp --- musique-1.2.1/src/choosefolderview.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/choosefolderview.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "choosefolderview.h" #include "constants.h" #include "fontutils.h" @@ -38,7 +58,7 @@ tipLabel = new QLabel( tr("%1 needs to scan your music collection.").arg(Constants::NAME) , this); - tipLabel->setFont(FontUtils::big()); + tipLabel->setFont(FontUtils::bigger()); vLayout->addWidget(tipLabel); QBoxLayout *buttonLayout = new QHBoxLayout(); @@ -72,14 +92,14 @@ connect(chooseDirButton, SIGNAL(clicked()), SLOT(chooseFolder())); buttonLayout->addWidget(chooseDirButton); -#if !defined(APP_MAC) && !defined(Q_WS_WIN) +#ifndef APP_EXTRA QLabel *privacyLabel = new QLabel( tr("%1 will connect to the Last.fm web services and pass artist names and album titles in order to fetch covert art, biographies and much more.") .arg(Constants::NAME) + " " + tr("If you have privacy concerns about this you can quit now.") , this); - privacyLabel->setFont(FontUtils::small()); + privacyLabel->setFont(FontUtils::smaller()); privacyLabel->setOpenExternalLinks(true); privacyLabel->setWordWrap(true); vLayout->addWidget(privacyLabel); diff -Nru musique-1.2.1/src/choosefolderview.h musique-1.3/src/choosefolderview.h --- musique-1.2.1/src/choosefolderview.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/choosefolderview.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef CHOOSEFOLDERVIEW_H #define CHOOSEFOLDERVIEW_H diff -Nru musique-1.2.1/src/collectionscanner.cpp musique-1.3/src/collectionscanner.cpp --- musique-1.2.1/src/collectionscanner.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/collectionscanner.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "collectionscanner.h" #include "database.h" #include "model/track.h" @@ -19,11 +39,12 @@ #endif fileExtensionsBlacklist - << "jpg" << "png" << "gif" << "bmp" - << "txt" << "doc" << "rtf" << "pdf" - << "db" << "log" + << "jpg" << "jpeg" << "png" << "gif" << "bmp" << "tif" << "tiff" + << "txt" << "doc" << "rtf" << "pdf" << "html" << "htm" << "ps" << "xls" << "js" << "css" + << "db" << "log" << "url" << "nfo" << "ini" << "dat" << "md5" << "sfv" << "DS_Store" << "zip" << "rar" << "dmg" << "iso" - << "m3u" << "pls" << "cue"; + << "m3u" << "pls" << "cue" + << "avi" << "flv" << "mpg" << "wmv" << "swf"; } void CollectionScanner::reset() { @@ -74,8 +95,8 @@ } else { - // drop the previous, if any - Database::instance().drop(); + // delete any existing data + Database::instance().clear(); // invalidate caches Artist::clearCache(); @@ -203,6 +224,8 @@ trackPaths.clear(); } + QSqlQuery("vacuum", Database::instance().getConnection()); + stopped = false; working = false; @@ -475,7 +498,7 @@ const QString albumTag = DataUtils::cleanTag(file->getTags()->album); // try to normalize the album title to a simpler form - const QString albumHash = DataUtils::normalizeTag(albumTag); + const QString albumHash = Album::getHash(albumTag, file->getArtist()); if (albumTag.isEmpty()) { processTrack(file); @@ -508,6 +531,15 @@ const QString albumTag = file->getTags()->album; album->setTitle(DataUtils::cleanTag(albumTag)); album->setYear(file->getTags()->year); + + Artist *artist = file->getArtist(); + if (artist) album->setArtist(artist); // && artist->getId() > 0 + else qDebug() << "Album" << album->getTitle() << "lacks an artist"; + + if (artist && artist->getId() <= 0) qWarning() << "artist id" << artist->getId() << artist->getName(); + + // qDebug() << "Processing album:" << album->getTitle() << album->getHash(); + album->setProperty("originalHash", album->getHash()); // local covers @@ -515,20 +547,15 @@ if (!QFile::exists(imageLocation)) { const QString filePath = file->getFileInfo().absolutePath(); bool localCover = false; - localCover = CoverUtils::coverFromFile(filePath, imageLocation); + localCover = CoverUtils::coverFromFile(filePath, album); if (!localCover) { - localCover = CoverUtils::coverFromTags(filePath, imageLocation); + localCover = CoverUtils::coverFromTags(filePath, album); if (localCover) qDebug() << "Found embedded cover for" << filePath; } if (localCover) album->setProperty("localCover", true); } - Artist *artist = file->getArtist(); - if (artist && artist->getId() > 0) album->setArtist(artist); - else qDebug() << "Album" << album->getTitle() << "lacks an artist"; - // qDebug() << "Processing album:" << album->getTitle() << album->getHash(); - if (loadedAlbums.contains(album->getHash())) { qDebug() << "ERROR Album already processed!" << album->getTitle() << album->getHash(); return; @@ -568,13 +595,13 @@ // if (hash != album->getHash()) loadedAlbums.insert(album->getHash(), album); - int albumId = Album::idForName(album->getTitle()); + int albumId = Album::idForHash(album->getHash()); album->setId(albumId); if (albumId < 0) { // qDebug() << "We have a new cool album:" << album->getTitle(); album->insert(); // TODO last insert id - albumId = Album::idForName(album->getTitle()); + albumId = Album::idForHash(album->getHash()); } else { qDebug() << "Updating album" << album->getTitle(); album->update(); diff -Nru musique-1.2.1/src/collectionscanner.h musique-1.3/src/collectionscanner.h --- musique-1.2.1/src/collectionscanner.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/collectionscanner.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef COLLECTIONSCANNER_H #define COLLECTIONSCANNER_H @@ -32,7 +52,7 @@ class FileInfo { public: - FileInfo() : artist(0), album(0), tags(0) { }; + FileInfo() : artist(0), album(0), tags(0) { } ~FileInfo() { if (artist) delete artist; if (album) delete album; diff -Nru musique-1.2.1/src/collectionscannerthread.cpp musique-1.3/src/collectionscannerthread.cpp --- musique-1.2.1/src/collectionscannerthread.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/collectionscannerthread.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "collectionscannerthread.h" #include "collectionscanner.h" diff -Nru musique-1.2.1/src/collectionscannerthread.h musique-1.3/src/collectionscannerthread.h --- musique-1.2.1/src/collectionscannerthread.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/collectionscannerthread.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef COLLECTIONSCANNERTHREAD_H #define COLLECTIONSCANNERTHREAD_H diff -Nru musique-1.2.1/src/collectionscannerview.cpp musique-1.3/src/collectionscannerview.cpp --- musique-1.2.1/src/collectionscannerview.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/collectionscannerview.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "collectionscannerview.h" #include "constants.h" #include "fontutils.h" @@ -15,7 +35,7 @@ QLabel *tipLabel = new QLabel( tr("%1 is scanning your music collection.").arg(Constants::NAME) , this); - tipLabel->setFont(FontUtils::big()); + tipLabel->setFont(FontUtils::bigger()); layout->addWidget(tipLabel); progressBar = new QProgressBar(this); diff -Nru musique-1.2.1/src/collectionscannerview.h musique-1.3/src/collectionscannerview.h --- musique-1.2.1/src/collectionscannerview.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/collectionscannerview.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef COLLECTIONSCANNERVIEW_H #define COLLECTIONSCANNERVIEW_H diff -Nru musique-1.2.1/src/collectionsuggester.cpp musique-1.3/src/collectionsuggester.cpp --- musique-1.2.1/src/collectionsuggester.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/collectionsuggester.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "collectionsuggester.h" #include diff -Nru musique-1.2.1/src/collectionsuggester.h musique-1.3/src/collectionsuggester.h --- musique-1.2.1/src/collectionsuggester.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/collectionsuggester.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef COLLECTIONSUGGESTER_H #define COLLECTIONSUGGESTER_H diff -Nru musique-1.2.1/src/constants.cpp musique-1.3/src/constants.cpp --- musique-1.2.1/src/constants.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/constants.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "constants.h" #include @@ -5,7 +25,7 @@ #define STRINGIFY(x) STR(x) const char *Constants::VERSION = STRINGIFY(APP_VERSION); -const int Constants::DATABASE_VERSION = 1; +const int Constants::DATABASE_VERSION = 2; const char *Constants::NAME = STRINGIFY(APP_NAME); const char *Constants::UNIX_NAME = STRINGIFY(APP_UNIX_NAME); const char *Constants::ORG_NAME = "Flavio Tordini"; diff -Nru musique-1.2.1/src/constants.h musique-1.3/src/constants.h --- musique-1.2.1/src/constants.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/constants.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef CONSTANTS_H #define CONSTANTS_H diff -Nru musique-1.2.1/src/context/albuminfo.cpp musique-1.3/src/context/albuminfo.cpp --- musique-1.2.1/src/context/albuminfo.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/context/albuminfo.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "albuminfo.h" #include "../model/album.h" #include "../fontutils.h" @@ -18,7 +38,7 @@ titleLabel = new QLabel(this); titleLabel->setPalette(parent->palette()); titleLabel->setWordWrap(true); - titleLabel->setFont(FontUtils::bigBold()); + titleLabel->setFont(FontUtils::biggerBold()); titleLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); layout->addWidget(titleLabel); @@ -37,7 +57,7 @@ #ifdef APP_AFFILIATE_AMAZON buyOnAmazonButton = new QPushButton(this); buyOnAmazonButton->hide(); - buyOnAmazonButton->setFont(FontUtils::small()); + buyOnAmazonButton->setFont(FontUtils::smaller()); buyOnAmazonButton->setText(tr("Buy on %1").arg("Amazon")); buyOnAmazonButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); connect(buyOnAmazonButton, SIGNAL(clicked()), SLOT(amazonClicked())); diff -Nru musique-1.2.1/src/context/albuminfo.h musique-1.3/src/context/albuminfo.h --- musique-1.2.1/src/context/albuminfo.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/context/albuminfo.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef ALBUMINFO_H #define ALBUMINFO_H diff -Nru musique-1.2.1/src/context/artistinfo.cpp musique-1.3/src/context/artistinfo.cpp --- musique-1.2.1/src/context/artistinfo.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/context/artistinfo.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "artistinfo.h" #include "../model/artist.h" #include "../fontutils.h" @@ -15,7 +35,7 @@ titleLabel = new QLabel(this); titleLabel->setPalette(parent->palette()); titleLabel->setWordWrap(true); - titleLabel->setFont(FontUtils::bigBold()); + titleLabel->setFont(FontUtils::biggerBold()); titleLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); layout->addWidget(titleLabel); diff -Nru musique-1.2.1/src/context/artistinfo.h musique-1.3/src/context/artistinfo.h --- musique-1.2.1/src/context/artistinfo.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/context/artistinfo.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef ARTISTINFO_H #define ARTISTINFO_H diff -Nru musique-1.2.1/src/context/trackinfo.cpp musique-1.3/src/context/trackinfo.cpp --- musique-1.2.1/src/context/trackinfo.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/context/trackinfo.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "trackinfo.h" #include "../fontutils.h" #include "../model/track.h" @@ -15,7 +35,7 @@ titleLabel = new QLabel(this); titleLabel->setPalette(palette()); titleLabel->setWordWrap(true); - titleLabel->setFont(FontUtils::bigBold()); + titleLabel->setFont(FontUtils::biggerBold()); titleLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); layout->addWidget(titleLabel); diff -Nru musique-1.2.1/src/context/trackinfo.h musique-1.3/src/context/trackinfo.h --- musique-1.2.1/src/context/trackinfo.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/context/trackinfo.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef TRACKINFO_H #define TRACKINFO_H diff -Nru musique-1.2.1/src/contextualview.cpp musique-1.3/src/contextualview.cpp --- musique-1.2.1/src/contextualview.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/contextualview.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "contextualview.h" #include "context/artistinfo.h" #include "context/albuminfo.h" diff -Nru musique-1.2.1/src/contextualview.h musique-1.3/src/contextualview.h --- musique-1.2.1/src/contextualview.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/contextualview.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef CONTEXTUALVIEW_H #define CONTEXTUALVIEW_H diff -Nru musique-1.2.1/src/coverutils.cpp musique-1.3/src/coverutils.cpp --- musique-1.2.1/src/coverutils.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/coverutils.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,4 +1,25 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "coverutils.h" +#include "model/album.h" bool CoverUtils::isAcceptableImage(const QImage &image) { static const int minimumSize = 150; @@ -30,24 +51,21 @@ return image; } -bool CoverUtils::saveImageToLocation(const QImage &image, QString imageLocation) { - qDebug() << "Saving scaled image to" << imageLocation; - QFile file(imageLocation); - QDir dir; - dir.mkpath(QFileInfo(file).path()); - if (!file.open(QIODevice::WriteOnly)) { - qWarning() << "Error opening file for writing" << file.fileName(); - return false; - } - return image.save(&file, "JPG"); +bool CoverUtils::saveImage(const QImage &image, Album *album) { + QImage scaledImage = maybeScaleImage(image); + QBuffer buffer; + scaledImage.save(&buffer, "JPG"); + album->setPhoto(buffer.data()); + return true; } -bool CoverUtils::coverFromFile(QString dir, QString imageLocation) { +bool CoverUtils::coverFromFile(QString dir, Album *album) { static QList coverREs; if (coverREs.isEmpty()) { - coverREs << QRegExp(".*cover.jpg", Qt::CaseInsensitive) - << QRegExp(".*front.jpg", Qt::CaseInsensitive) - << QRegExp(".*folder.jpg", Qt::CaseInsensitive); + QLatin1String ext(".(jpe?g|gif|png|bmp)"); + coverREs << QRegExp(".*cover.*" + ext, Qt::CaseInsensitive) + << QRegExp(".*front.*" + ext, Qt::CaseInsensitive) + << QRegExp(".*folder.*" + ext, Qt::CaseInsensitive); } const QFileInfoList flist = QDir(dir).entryInfoList( @@ -60,13 +78,8 @@ if (filename.contains(re)) { qDebug() << "Found local cover" << filename; QImage image(fileInfo.absoluteFilePath()); - if (isAcceptableImage(image)) { - QImage scaledImage = maybeScaleImage(image); - if (image == scaledImage) - return QFile::copy(fileInfo.absoluteFilePath(), imageLocation); - else - return saveImageToLocation(scaledImage, imageLocation); - } + if (isAcceptableImage(image)) + return saveImage(image, album); break; } } @@ -75,33 +88,33 @@ return false; } -bool CoverUtils::coverFromTags(QString filename, QString imageLocation) { +bool CoverUtils::coverFromTags(QString filename, Album *album) { const QString suffix = QFileInfo(filename).suffix().toLower(); if (suffix == "mp3") { TagLib::MPEG::File f((TagLib::FileName)filename.toUtf8()); if (!f.isValid()) return false; - return coverFromMPEGTags(f.ID3v2Tag(), imageLocation); + return coverFromMPEGTags(f.ID3v2Tag(), album); } else if (suffix == "ogg" || suffix == "oga") { TagLib::Ogg::Vorbis::File f((TagLib::FileName)filename.toUtf8()); if (!f.isValid()) return false; - return coverFromXiphComment(f.tag(), imageLocation); + return coverFromXiphComment(f.tag(), album); } else if (suffix == "flac") { TagLib::FLAC::File f((TagLib::FileName)filename.toUtf8()); bool res = false; - if (f.isValid()) res = coverFromMPEGTags(f.ID3v2Tag(), imageLocation); - if (!res) res = coverFromXiphComment(f.xiphComment(), imageLocation); + if (f.isValid()) res = coverFromMPEGTags(f.ID3v2Tag(), album); + if (!res) res = coverFromXiphComment(f.xiphComment(), album); return res; } else if (suffix == "aac" || suffix == "m4a" || suffix == "m4b" || suffix == "m4p" || suffix == "mp4") { - return coverFromMP4(filename, imageLocation); + return coverFromMP4(filename, album); } return false; } -bool CoverUtils::coverFromMPEGTags(TagLib::ID3v2::Tag *tag, QString imageLocation) { +bool CoverUtils::coverFromMPEGTags(TagLib::ID3v2::Tag *tag, Album *album) { if (!tag) return false; @@ -118,24 +131,10 @@ image.loadFromData((const uchar *) frame->picture().data(), frame->picture().size()); if (!isAcceptableImage(image)) return false; - QImage scaledImage = maybeScaleImage(image); - if (image != scaledImage) - return saveImageToLocation(scaledImage, imageLocation); - - QFile imagefile(imageLocation); - QDir dir; - dir.mkpath(QFileInfo(imagefile).path()); - if (!imagefile.open(QIODevice::WriteOnly)) { - qWarning() << "Error opening file for writing" << imagefile.fileName(); - return false; - } - QDataStream stream(&imagefile); - stream.writeRawData(frame->picture().data(), frameSize); - - return true; + return saveImage(image, album); } -bool CoverUtils::coverFromXiphComment(TagLib::Ogg::XiphComment *xiphComment, QString imageLocation) { +bool CoverUtils::coverFromXiphComment(TagLib::Ogg::XiphComment *xiphComment, Album *album) { if (!xiphComment) return false; @@ -152,24 +151,10 @@ qDebug() << "Cover from Xiph!"; - QImage scaledImage = maybeScaleImage(image); - if (image != scaledImage) - return saveImageToLocation(scaledImage, imageLocation); - - QFile imagefile(imageLocation); - QDir dir; - dir.mkpath(QFileInfo(imagefile).path()); - if (!imagefile.open(QIODevice::WriteOnly)) { - qWarning() << "Error opening file for writing" << imagefile.fileName(); - return false; - } - QDataStream stream(&imagefile); - stream.writeRawData(data.constData(), data.size()); - - return true; + return saveImage(image, album); } -bool CoverUtils::coverFromMP4(QString filename, QString imageLocation) { +bool CoverUtils::coverFromMP4(QString filename, Album *album) { TagLib::MP4::File f((TagLib::FileName)filename.toUtf8()); if (!f.isValid()) return false; @@ -188,19 +173,5 @@ qDebug() << "Cover from MP4!"; - QImage scaledImage = maybeScaleImage(image); - if (image != scaledImage) - return saveImageToLocation(scaledImage, imageLocation); - - QFile imagefile(imageLocation); - QDir dir; - dir.mkpath(QFileInfo(imagefile).path()); - if (!imagefile.open(QIODevice::WriteOnly)) { - qWarning() << "Error opening file for writing" << imagefile.fileName(); - return false; - } - QDataStream stream(&imagefile); - stream.writeRawData(coverArt.data().data(), coverArt.data().size()); - - return true; + return saveImage(image, album); } diff -Nru musique-1.2.1/src/coverutils.h musique-1.3/src/coverutils.h --- musique-1.2.1/src/coverutils.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/coverutils.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef COVERUTILS_H #define COVERUTILS_H @@ -13,20 +33,22 @@ #include #include +class Album; + class CoverUtils { public: - static bool coverFromFile(QString dir, QString imageLocation); - static bool coverFromTags(QString filename, QString imageLocation); + static bool coverFromFile(QString dir, Album *album); + static bool coverFromTags(QString filename, Album *album); private: CoverUtils() {} static bool isAcceptableImage(const QImage &image); static QImage maybeScaleImage(const QImage &image); - static bool saveImageToLocation(const QImage &image, QString imageLocation); - static bool coverFromMPEGTags(TagLib::ID3v2::Tag *tag, QString imageLocation); - static bool coverFromXiphComment(TagLib::Ogg::XiphComment *xiphComment, QString imageLocation); - static bool coverFromMP4(QString filename, QString imageLocation); + static bool saveImage(const QImage &image, Album *album); + static bool coverFromMPEGTags(TagLib::ID3v2::Tag *tag, Album *album); + static bool coverFromXiphComment(TagLib::Ogg::XiphComment *xiphComment, Album *album); + static bool coverFromMP4(QString filename, Album *album); }; diff -Nru musique-1.2.1/src/database.cpp musique-1.3/src/database.cpp --- musique-1.2.1/src/database.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/database.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,51 +1,86 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "database.h" #include "constants.h" #include -static const QString dbName = QLatin1String(Constants::UNIX_NAME) + ".db"; static Database *databaseInstance = 0; Database::Database() { - - QString dataLocation = QDesktopServices::storageLocation(QDesktopServices::DataLocation); - QDir().mkpath(dataLocation); - dbLocation = dataLocation + "/" + dbName; - QMutexLocker locker(&lock); - if(QFile::exists(dbLocation)) { + const QString dataLocation = getDataLocation(); + const QString dbLocation = getDbLocation(); - // qDebug() << "Database found in" << dbLocation; + if(QFile::exists(dbLocation)) { // check db version int databaseVersion = getAttribute("version").toInt(); if (databaseVersion != Constants::DATABASE_VERSION) { - qDebug("Wrong database version: %d", databaseVersion); + qWarning("Updating database version: %d to %d", databaseVersion, Constants::DATABASE_VERSION); + updateRoot = collectionRoot(); + drop(); + removeRecursively(dataLocation); + create(); } - } else createDatabase(); - - maybeCreateDownloadsTable(); - + } else create(); } Database::~Database() { closeConnections(); } -void Database::createDatabase() { +const QString &Database::getDataLocation() { + static const QString location = QDesktopServices::storageLocation(QDesktopServices::DataLocation); + return location; +} +const QString &Database::getFilesLocation() { + static const QString location = getDataLocation() + QLatin1String("/files/"); + return location; +} + +const QString &Database::getDbLocation() { + static const QString location = getDataLocation() + QLatin1String("/") + + QLatin1String(Constants::UNIX_NAME) + QLatin1String(".db"); + return location; +} + +void Database::create() { qDebug() << "Creating the database"; + QDir().mkpath(getDataLocation()); + const QSqlDatabase db = getConnection(); + createAttributes(); + QSqlQuery("create table artists (" "id integer primary key autoincrement," "hash varchar(32)," "name varchar(255)," - // "mbid varchar(50)," - // "lifeBegin integer," - // "lifeEnd integer," + "yearFrom integer," + "yearTo integer," + "listeners integer," "albumCount integer," "trackCount integer)", db); @@ -54,61 +89,62 @@ "hash varchar(32)," "title varchar(255)," "year integer," - // "language varchar(5)," "artist integer," - "trackCount integer)" - , db); - - QSqlQuery( - "create table tracks (" - "id integer primary key autoincrement," - "path varchar(255)," // path is NOT unique: .cue files - "title varchar(255)," - // "start integer, end integer," // cue files - "duration integer," - "track integer," - "year integer," - "artist integer," - "album integer," - "tstamp integer)" - , db); - - QSqlQuery( - "create table nontracks (" - "path varchar(255)," - "tstamp integer)" - , db); - QSqlQuery("create unique index idx_path on nontracks(path)", db); - - QSqlQuery("create table attributes (name varchar(255), value)", db); - QSqlQuery("insert into attributes (name, value) values ('version', " + QString::number(Constants::DATABASE_VERSION) + ")", db); - QSqlQuery("insert into attributes (name, value) values ('status', " + QString::number(ScanIncomplete) + ")", db); - QSqlQuery("insert into attributes (name, value) values ('lastUpdate', 0)", db); - QSqlQuery("insert into attributes (name, value) values ('root', '')", db); - -} + "listeners integer," + "trackCount integer)", db); -void Database::maybeCreateDownloadsTable() { - const QSqlDatabase db = getConnection(); + QSqlQuery("create table tracks (" + "id integer primary key autoincrement," + "path varchar(255)," // path is NOT unique: .cue files + "title varchar(255)," + // TODO "start integer, end integer," // cue files + "duration integer," + "track integer," + "year integer," + "artist integer," + "album integer," + "tstamp integer)", db); - bool createTable = false; - - QSqlQuery query(db); - if (!query.exec("SELECT name FROM sqlite_master WHERE type='table' AND name='downloads'")) { - qWarning() << query.lastQuery() << query.lastError().text(); - createTable = true; - } else if (query.next()) return; + QSqlQuery("create table nontracks (" + "path varchar(255)," + "tstamp integer)", db); + QSqlQuery("create unique index unique_nontracks_path on nontracks(path)", db); QSqlQuery("create table downloads (" "id integer primary key autoincrement," "objectid integer," "type integer," - "status integer," "errors integer," - "url varchar(255))" - , db); + "url varchar(255))", db); - qDebug() << "Downloads table created"; + /* TODO tags + QSqlQuery("create table tags (" + "id integer primary key autoincrement," + "name varchar," + "artistCount integer," + "albumCount integer)", db); + QSqlQuery("create unique index unique_tags_name on tags(name)", db); + + QSqlQuery("create table artisttags (" + "artist integer," + "tag integer)", db); + QSqlQuery("create unique index unique_artisttags on artisttags(artist,tag)", db); + + QSqlQuery("create table albumtags (" + "album integer," + "tag integer)", db); + QSqlQuery("create unique index unique_albumtags on albumtags(album,tag)", db); + */ +} + +void Database::createAttributes() { + const QSqlDatabase db = getConnection(); + QSqlQuery("create table attributes (name varchar(255), value)", db); + QSqlQuery("create unique index unique_attributes_name on attributes(name)", db); + QSqlQuery("insert into attributes (name, value) values ('version', " + QString::number(Constants::DATABASE_VERSION) + ")", db); + QSqlQuery("insert into attributes (name, value) values ('status', " + QString::number(ScanIncomplete) + ")", db); + QSqlQuery("insert into attributes (name, value) values ('lastUpdate', 0)", db); + QSqlQuery("insert into attributes (name, value) values ('root', '')", db); } Database& Database::instance() { @@ -132,9 +168,10 @@ } else { qDebug() << "Creating db connection for" << threadName; QSqlDatabase connection = QSqlDatabase::addDatabase("QSQLITE", threadName); - connection.setDatabaseName(dbLocation); + connection.setDatabaseName(getDbLocation()); if(!connection.open()) { - qWarning() << QString("Cannot connect to database %1 in thread %2").arg(dbLocation, threadName); + qWarning() << QString("Cannot connect to database %1 in thread %2") + .arg(connection.databaseName(), threadName); } connections.insert(currentThread, connection); return connection; @@ -187,14 +224,11 @@ if (!success) qDebug() << query.lastError().text(); } - -/** - * After calling this method you have to reacquire a valid instance using instance() - */ void Database::drop() { - /// closeConnections(); - if (!QFile::remove(dbLocation)) { - qWarning() << "Cannot delete database" << dbLocation; + qDebug() << "Dropping the database"; + + if (!QFile::remove(getDbLocation())) { + qWarning() << "Cannot delete database" << getDbLocation(); // fallback to delete records in tables const QSqlDatabase db = getConnection(); @@ -203,11 +237,15 @@ qWarning() << query.lastQuery() << query.lastError().text(); } + QStringList tableNames; while (query.next()) { QString tableName = query.value(0).toString(); - if (tableName.startsWith("sqlite_") || tableName == "attributes") continue; - QString dropSQL = "delete from " + tableName; - qWarning() << "dropSQL" << dropSQL; + if (tableName.startsWith("sqlite_")) continue; + tableNames << tableName; + } + + foreach (QString tableName, tableNames) { + QString dropSQL = "drop table " + tableName; QSqlQuery query2(db); if (!query2.exec(dropSQL)) { qWarning() << query2.lastQuery() << query2.lastError().text(); @@ -215,10 +253,32 @@ } query.exec("delete from sqlite_sequence"); + query.exec("vacuum"); + } + + closeConnections(); +} +void Database::clear() { + const QSqlDatabase db = getConnection(); + QSqlQuery query(db); + if (!query.exec("select name from sqlite_master where type='table'")) { + qWarning() << query.lastQuery() << query.lastError().text(); } - if (databaseInstance) delete databaseInstance; - databaseInstance = 0; + + while (query.next()) { + QString tableName = query.value(0).toString(); + if (tableName.startsWith("sqlite_")) continue; + QString dropSQL = "delete from " + tableName; + QSqlQuery query2(db); + if (!query2.exec(dropSQL)) { + qWarning() << query2.lastQuery() << query2.lastError().text(); + } + } + + query.exec("delete from sqlite_sequence"); + query.exec("vacuum"); + createAttributes(); } void Database::closeConnections() { @@ -236,3 +296,23 @@ qDebug() << "Closing connection" << connection; connection.close(); } + +bool Database::removeRecursively(const QString & dirName) { + bool result = false; + QDir dir(dirName); + if (dir.exists(dirName)) { + Q_FOREACH(QFileInfo info, dir.entryInfoList( + QDir::NoDotAndDotDot | QDir::System | QDir::Hidden | + QDir::AllDirs | QDir::Files, QDir::DirsFirst)) { + if (info.isDir()) + result = removeRecursively(info.absoluteFilePath()); + else + result = QFile::remove(info.absoluteFilePath()); + + if (!result) + return result; + } + result = dir.rmdir(dirName); + } + return result; +} diff -Nru musique-1.2.1/src/database.h musique-1.3/src/database.h --- musique-1.2.1/src/database.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/database.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef DATABASE_H #define DATABASE_H @@ -17,27 +37,33 @@ static Database& instance(); QSqlDatabase getConnection(); ~Database(); + void create(); + void drop(); + void clear(); int status(); void setStatus(int status); uint lastUpdate(); void setLastUpdate(uint date); QString collectionRoot(); void setCollectionRoot(QString dir); - void drop(); void closeConnections(); void closeConnection(); + const QString &needsUpdate() { return updateRoot; } + + static const QString &getDataLocation(); + static const QString &getFilesLocation(); + static const QString &getDbLocation(); private: Database(); - void createDatabase(); + void createAttributes(); QVariant getAttribute(QString name); void setAttribute(QString name, QVariant value); - - void maybeCreateDownloadsTable(); + bool removeRecursively(const QString & dirName); QMutex lock; - QString dbLocation; QHash connections; + QString updateRoot; }; diff -Nru musique-1.2.1/src/datautils.cpp musique-1.3/src/datautils.cpp --- musique-1.2.1/src/datautils.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/datautils.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,52 +1,47 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "datautils.h" DataUtils::DataUtils() { } -static const QRegExp nonWordExpression("\\W+"); -// static const QRegExp nonWordExpression("[^\\p{L}]+"); - -/** - * Clean a string removing all non-word chars - * and fixing all uppercase chars - * This function is intended to increase legibility - */ QString DataUtils::cleanTag(QString s) { - s.replace("_", " "); - s = s.simplified(); - - return s; + return s.simplified(); } -/** - * Build a unique identifier for a string - */ QString DataUtils::normalizeTag(QString s) { + static const QRegExp nonWordExpression("\\W+"); + // static const QRegExp nonWordExpression("[^\\p{L}]+"); + s = s.simplified().toLower(); // The Beatles => Beatles s.replace(QRegExp("^the "), ""); - // sort words - s.replace("_", ""); - // s.replace("&", "and"); - QStringList words = s.split(nonWordExpression, QString::SkipEmptyParts); - words.sort(); - s = words.join(""); - // remove anything that is not a "letter" - // s = s.replace(nonWordExpression, ""); - - // s = s.simplified().toLower(); - - // TODO simplify accented chars èé=>e etc + s.remove(nonWordExpression); return s; } -/** - * Md5 of a string - */ QString DataUtils::md5(const QString name) { return QString::fromAscii(QCryptographicHash::hash(name.toUtf8(), QCryptographicHash::Md5).toHex()); } diff -Nru musique-1.2.1/src/datautils.h musique-1.3/src/datautils.h --- musique-1.2.1/src/datautils.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/datautils.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef DATAUTILS_H #define DATAUTILS_H diff -Nru musique-1.2.1/src/diskcache.cpp musique-1.3/src/diskcache.cpp --- musique-1.2.1/src/diskcache.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/diskcache.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "diskcache.h" #include diff -Nru musique-1.2.1/src/diskcache.h musique-1.3/src/diskcache.h --- musique-1.2.1/src/diskcache.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/diskcache.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef DISKCACHE_H #define DISKCACHE_H diff -Nru musique-1.2.1/src/droparea.cpp musique-1.3/src/droparea.cpp --- musique-1.2.1/src/droparea.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/droparea.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include #include "droparea.h" #include "utils.h" diff -Nru musique-1.2.1/src/droparea.h musique-1.3/src/droparea.h --- musique-1.2.1/src/droparea.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/droparea.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef DROPAREA_H #define DROPAREA_H diff -Nru musique-1.2.1/src/faderwidget/faderwidget.cpp musique-1.3/src/faderwidget/faderwidget.cpp --- musique-1.2.1/src/faderwidget/faderwidget.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/faderwidget/faderwidget.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -#include "faderwidget.h" - -// http://labs.trolltech.com/blogs/2007/08/21/fade-effects-a-blast-from-the-past/ - -FaderWidget::FaderWidget(QWidget *parent) : QWidget(parent) { - timeLine = new QTimeLine(250, this); - timeLine->setFrameRange(1000, 0); - connect(timeLine, SIGNAL(frameChanged(int)), this, SLOT(update())); - setAttribute(Qt::WA_DeleteOnClose); - resize(parent->size()); -} - -void FaderWidget::start(QPixmap frozenView) { - this->frozenView = frozenView; - timeLine->start(); - show(); -} - -void FaderWidget::paintEvent(QPaintEvent *) { - const qreal opacity = timeLine->currentFrame() / 1000.; - QPainter painter(this); - painter.setOpacity(opacity); - painter.drawPixmap(0, 0, frozenView); - // qDebug() << opacity; - - if (opacity <= 0.) - close(); - -} diff -Nru musique-1.2.1/src/faderwidget/faderwidget.h musique-1.3/src/faderwidget/faderwidget.h --- musique-1.2.1/src/faderwidget/faderwidget.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/faderwidget/faderwidget.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -#ifndef FADERWIDGET_H -#define FADERWIDGET_H - -#include - -class FaderWidget : public QWidget { - - Q_OBJECT - -public: - - FaderWidget(QWidget *parent); - - int fadeDuration() const { - return timeLine->duration(); - } - void setFadeDuration(int milliseconds) { - timeLine->setDuration(milliseconds); - } - void start(QPixmap frozenView); - -protected: - void paintEvent(QPaintEvent *event); - -private: - QTimeLine *timeLine; - QPixmap frozenView; - -}; - -/* -class FaderWidget : public QWidget { - - Q_OBJECT - -public: - FaderWidget(QWidget *oldWidget, QWidget *newWidget); - int fadeDuration() const { - return timeLine->duration(); - } - void setFadeDuration(int milliseconds) { - timeLine->setDuration(milliseconds); - } - void start(); - -protected: - void paintEvent(QPaintEvent *event); - -private: - QTimeLine *timeLine; - QPixmap frozenView; - QWidget *oldWidget; - QWidget *newWidget; - -};*/ - -#endif diff -Nru musique-1.2.1/src/filesystemfinderview.cpp musique-1.3/src/filesystemfinderview.cpp --- musique-1.2.1/src/filesystemfinderview.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/filesystemfinderview.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "filesystemfinderview.h" #include "database.h" #include "filesystemmodel.h" diff -Nru musique-1.2.1/src/filesystemfinderview.h musique-1.3/src/filesystemfinderview.h --- musique-1.2.1/src/filesystemfinderview.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/filesystemfinderview.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef FILESYSTEMFINDERVIEW_H #define FILESYSTEMFINDERVIEW_H diff -Nru musique-1.2.1/src/filesystemmodel.cpp musique-1.3/src/filesystemmodel.cpp --- musique-1.2.1/src/filesystemmodel.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/filesystemmodel.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,16 +1,28 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "filesystemmodel.h" #include "trackmimedata.h" #include "database.h" -FileSystemModel::FileSystemModel(QObject *parent) : QFileSystemModel(parent) { - hoveredRow = -1; - playIconHovered = false; - - timeLine = new QTimeLine(250, this); - timeLine->setFrameRange(1000, 0); - connect(timeLine, SIGNAL(frameChanged(int)), SLOT(updatePlayIcon())); - -} +FileSystemModel::FileSystemModel(QObject *parent) : QFileSystemModel(parent) { } QVariant FileSystemModel::data(const QModelIndex &index, int role) const { @@ -38,15 +50,6 @@ return QVariant::fromValue(QPointer(track)); } - case Finder::HoveredItemRole: - return hoveredRow == index.row(); - - case Finder::PlayIconAnimationItemRole: - return timeLine->currentFrame() / 1000.; - - case Finder::PlayIconHoveredRole: - return playIconHovered; - case Qt::StatusTipRole: if (!isDir(index)) { path = QFileSystemModel::data(index, QFileSystemModel::FilePathRole).toString(); @@ -64,42 +67,6 @@ return QVariant(); } -void FileSystemModel::setHoveredRow(int row) { - int oldRow = hoveredRow; - hoveredRow = row; - emit dataChanged( createIndex( oldRow, 0 ), createIndex( oldRow, columnCount() - 1 ) ); - emit dataChanged( createIndex( hoveredRow, 0 ), createIndex( hoveredRow, columnCount() - 1 ) ); -} - -void FileSystemModel::clearHover() { - emit dataChanged( createIndex( hoveredRow, 0 ), createIndex( hoveredRow, columnCount() - 1 ) ); - hoveredRow = -1; -} - -void FileSystemModel::enterPlayIconHover() { - if (playIconHovered) return; - playIconHovered = true; - if (timeLine->state() != QTimeLine::Running) { - timeLine->setDirection(QTimeLine::Forward); - timeLine->start(); - } -} - -void FileSystemModel::exitPlayIconHover() { - if (!playIconHovered) return; - playIconHovered = false; - if (timeLine->state() == QTimeLine::Running) { - timeLine->stop(); - timeLine->setDirection(QTimeLine::Backward); - timeLine->start(); - } - setHoveredRow(hoveredRow); -} - -void FileSystemModel::updatePlayIcon() { - emit dataChanged( createIndex( hoveredRow, 0 ), createIndex( hoveredRow, columnCount() - 1 ) ); -} - // --- Sturm und drang --- Qt::DropActions FileSystemModel::supportedDropActions() const { diff -Nru musique-1.2.1/src/filesystemmodel.h musique-1.3/src/filesystemmodel.h --- musique-1.2.1/src/filesystemmodel.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/filesystemmodel.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef FILESYSTEMMODEL_H #define FILESYSTEMMODEL_H @@ -11,6 +31,7 @@ public: FileSystemModel(QObject *parent = 0); + int columnCount(const QModelIndex & = QModelIndex()) const { return 1; } QVariant data(const QModelIndex &item, int role) const; Item* itemAt(const QModelIndex &index) const { if (isDir(index)) { @@ -27,12 +48,6 @@ void clear() { //reset(); } - void setHoveredRow(int row); - -public slots: - void clearHover(); - void enterPlayIconHover(); - void exitPlayIconHover(); protected: // drag and drop @@ -41,13 +56,6 @@ Qt::DropActions supportedDropActions() const; QMimeData* mimeData( const QModelIndexList &indexes ) const; - int hoveredRow; - QTimeLine * timeLine; - bool playIconHovered; - -private slots: - void updatePlayIcon(); - }; #endif // FILESYSTEMMODEL_H diff -Nru musique-1.2.1/src/filteringfilesystemmodel.cpp musique-1.3/src/filteringfilesystemmodel.cpp --- musique-1.2.1/src/filteringfilesystemmodel.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/filteringfilesystemmodel.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,10 +1,36 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "filteringfilesystemmodel.h" #include "finderwidget.h" #include "model/track.h" #include "model/folder.h" FilteringFileSystemModel::FilteringFileSystemModel(QObject *parent) : - QSortFilterProxyModel(parent) { } + QSortFilterProxyModel(parent) { + hoveredRow = -1; + playIconHovered = false; + timeLine = new QTimeLine(250, this); + timeLine->setFrameRange(1000, 0); + connect(timeLine, SIGNAL(frameChanged(int)), SLOT(updatePlayIcon())); +} bool FilteringFileSystemModel::filterAcceptsRow( int sourceRow, @@ -29,3 +55,57 @@ if (track) return true; else return false; } + +QVariant FilteringFileSystemModel::data(const QModelIndex &index, int role) const { + switch (role) { + + case Finder::HoveredItemRole: + return hoveredRow == index.row(); + + case Finder::PlayIconAnimationItemRole: + return timeLine->currentFrame() / 1000.; + + case Finder::PlayIconHoveredRole: + return playIconHovered; + + default: + return QSortFilterProxyModel::data(index, role); + + } +} + +void FilteringFileSystemModel::setHoveredRow(int row) { + int oldRow = hoveredRow; + hoveredRow = row; + emit dataChanged(index(oldRow, 0 ), index(oldRow, 0)); + emit dataChanged(index(hoveredRow, 0), index(hoveredRow, 0)); +} + +void FilteringFileSystemModel::clearHover() { + emit dataChanged(index(hoveredRow, 0), index(hoveredRow, 0)); + hoveredRow = -1; +} + +void FilteringFileSystemModel::enterPlayIconHover() { + if (playIconHovered) return; + playIconHovered = true; + if (timeLine->state() != QTimeLine::Running) { + timeLine->setDirection(QTimeLine::Forward); + timeLine->start(); + } +} + +void FilteringFileSystemModel::exitPlayIconHover() { + if (!playIconHovered) return; + playIconHovered = false; + if (timeLine->state() == QTimeLine::Running) { + timeLine->stop(); + timeLine->setDirection(QTimeLine::Backward); + timeLine->start(); + } + setHoveredRow(hoveredRow); +} + +void FilteringFileSystemModel::updatePlayIcon() { + emit dataChanged(index(hoveredRow, 0), index(hoveredRow, 0)); +} diff -Nru musique-1.2.1/src/filteringfilesystemmodel.h musique-1.3/src/filteringfilesystemmodel.h --- musique-1.2.1/src/filteringfilesystemmodel.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/filteringfilesystemmodel.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef FILTERINGFILESYSTEMMODEL_H #define FILTERINGFILESYSTEMMODEL_H @@ -9,10 +29,24 @@ public: FilteringFileSystemModel(QObject *parent = 0); + void setHoveredRow(int row); + +public slots: + void clearHover(); + void enterPlayIconHover(); + void exitPlayIconHover(); protected: + QVariant data(const QModelIndex &index, int role) const; bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; + int hoveredRow; + QTimeLine * timeLine; + bool playIconHovered; + +private slots: + void updatePlayIcon(); + }; #endif // FILTERINGFILESYSTEMMODEL_H diff -Nru musique-1.2.1/src/finderitemdelegate.cpp musique-1.3/src/finderitemdelegate.cpp --- musique-1.2.1/src/finderitemdelegate.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/finderitemdelegate.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "finderitemdelegate.h" #include "basesqlmodel.h" #include "finderwidget.h" @@ -209,7 +229,7 @@ const bool isSelected = option.state & QStyle::State_Selected; // thumb - QPixmap pixmap = getAlbumPixmap(album); + QPixmap pixmap = album->getThumb(); if (pixmap.isNull()) pixmap = getMissingAlbumPixmap(); painter->drawPixmap(0, 0, pixmap); @@ -380,7 +400,7 @@ bool tooBig = false; QRect textBox = painter->boundingRect(nameBox, Qt::AlignCenter | Qt::TextWordWrap, name); if (textBox.height() > nameBox.height()) { - painter->setFont(FontUtils::small()); + painter->setFont(FontUtils::smaller()); textBox = painter->boundingRect(nameBox, Qt::AlignCenter | Qt::TextWordWrap, name); if (textBox.height() > nameBox.height()) { // it's still too big @@ -404,7 +424,7 @@ static const int PADDING = 4; painter->save(); - painter->setFont(FontUtils::small()); + painter->setFont(FontUtils::smaller()); QRectF textBox = painter->boundingRect(rect, Qt::AlignLeft | Qt::AlignTop, text); textBox.adjust(0, 0, PADDING, 0); @@ -421,7 +441,7 @@ static const int PADDING = 10; painter->save(); - painter->setFont(FontUtils::smallBold()); + painter->setFont(FontUtils::smallerBold()); QSizeF textSize(QFontMetrics(painter->font()).size( Qt::TextSingleLine, text)); QRect textBox((rect.width() - textSize.width()) / 2 , (rect.height() - textSize.height()) / 3 + 4, textSize.width(), textSize.height()); @@ -470,15 +490,3 @@ } return pixmap; } - -QPixmap FinderItemDelegate::getAlbumPixmap(Album *album) const { - QPixmap pixmap = album->property("pixmap").value(); - if (pixmap.isNull()) { - // qDebug() << "Creating pixmap for" << album; - QPixmap p = album->getPhoto(); - if (!p.isNull()) - pixmap = album->getPhoto().scaled(ITEM_WIDTH, ITEM_HEIGHT); - album->setProperty("pixmap", pixmap); - } - return pixmap; -} diff -Nru musique-1.2.1/src/finderitemdelegate.h musique-1.3/src/finderitemdelegate.h --- musique-1.2.1/src/finderitemdelegate.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/finderitemdelegate.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef ITEMDELEGATE_H #define ITEMDELEGATE_H @@ -34,7 +54,6 @@ void drawBadge(QPainter *painter, QString text, const QRect&) const; void drawCentralLabel(QPainter *painter, QString text, const QRect&) const; QPixmap getArtistPixmap(Artist*) const; - QPixmap getAlbumPixmap(Album*) const; QPixmap getFolderPixmap(Folder*) const; static const int ITEM_WIDTH; diff -Nru musique-1.2.1/src/finderwidget.cpp musique-1.3/src/finderwidget.cpp --- musique-1.2.1/src/finderwidget.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/finderwidget.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "finderwidget.h" #include "segmentedcontrol.h" @@ -187,7 +207,6 @@ trackListModel = new TrackSqlModel(this); trackListView = new TrackListView(this); connect(trackListView, SIGNAL(activated(const QModelIndex &)), SLOT(trackActivated(const QModelIndex &))); - connect(trackListView, SIGNAL(play(const QModelIndex &)), SLOT(trackPlayed(const QModelIndex &))); connect(trackListView, SIGNAL(entered(const QModelIndex &)), SLOT(trackEntered(const QModelIndex &))); connect(trackListView, SIGNAL(viewportEntered()), trackListModel, SLOT(clearHover())); trackListView->setModel(trackListModel); @@ -198,15 +217,15 @@ fileSystemModel = new FileSystemModel(this); fileSystemModel->setResolveSymlinks(true); fileSystemModel->setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot); - FilteringFileSystemModel *proxyModel = new FilteringFileSystemModel(this); - proxyModel->setSourceModel(fileSystemModel); + filteringFileSystemModel = new FilteringFileSystemModel(this); + filteringFileSystemModel->setSourceModel(fileSystemModel); fileSystemView = new FileSystemFinderView(this); connect(fileSystemView, SIGNAL(activated(const QModelIndex &)), SLOT(folderActivated(const QModelIndex &))); connect(fileSystemView, SIGNAL(play(const QModelIndex &)), SLOT(folderPlayed(const QModelIndex &))); connect(fileSystemView, SIGNAL(entered(const QModelIndex &)), SLOT(folderEntered(const QModelIndex &))); - connect(fileSystemView, SIGNAL(viewportEntered()), fileSystemModel, SLOT(clearHover())); - fileSystemView->setModel(proxyModel); + connect(fileSystemView, SIGNAL(viewportEntered()), filteringFileSystemModel, SLOT(clearHover())); + fileSystemView->setModel(filteringFileSystemModel); fileSystemView->setFileSystemModel(fileSystemModel); stackedWidget->addWidget(fileSystemView); } @@ -227,12 +246,7 @@ void FinderWidget::showArtists() { if (!artistListView) setupArtists(); - - artistListModel->setQuery("select id from artists where trackCount>0 order by trackCount desc", - Database::instance().getConnection()); - if (artistListModel->lastError().isValid()) - qDebug() << artistListModel->lastError(); - + artistListView->updateQuery(); showWidget(artistListView, true); finderBar->setCheckedAction(artistsAction); QSettings settings; @@ -241,13 +255,8 @@ void FinderWidget::showAlbums() { if (!albumListView) setupAlbums(); - - albumListModel->setQuery( - "select id from albums where trackCount>0 order by artist, year desc, trackCount desc", - Database::instance().getConnection()); - if (albumListModel->lastError().isValid()) - qDebug() << albumListModel->lastError(); - + albumListView->updateQuery(); + albumListView->setShowToolBar(true); showWidget(albumListView, true); finderBar->setCheckedAction(albumsAction); QSettings settings; @@ -349,6 +358,14 @@ } } +void FinderWidget::disappear() { + QWidget *currentWidget = stackedWidget->currentWidget(); + if (currentWidget) { + bool success = QMetaObject::invokeMethod(stackedWidget->currentWidget(), "disappear", Qt::DirectConnection); + if (!success) qDebug() << "Error invoking disappear() on" << stackedWidget->currentWidget(); + } +} + void FinderWidget::artistEntered ( const QModelIndex & index ) { artistListModel->setHoveredRow(index.row()); } @@ -372,6 +389,7 @@ albumListView->setWindowTitle(artist->getName()); albumListView->scrollToTop(); + albumListView->setShowToolBar(false); showWidget(albumListView, false); } @@ -431,7 +449,7 @@ } void FinderWidget::folderEntered ( const QModelIndex & index ) { - fileSystemModel->setHoveredRow(index.row()); + filteringFileSystemModel->setHoveredRow(index.row()); } void FinderWidget::folderActivated(const QModelIndex & index) { diff -Nru musique-1.2.1/src/finderwidget.h musique-1.3/src/finderwidget.h --- musique-1.2.1/src/finderwidget.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/finderwidget.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef FINDERWIDGET_H #define FINDERWIDGET_H @@ -7,10 +27,13 @@ class PlaylistModel; class PlaylistView; class SegmentedControl; +class ArtistListView; class ArtistSqlModel; +class AlbumListView; class AlbumSqlModel; class TrackSqlModel; class FileSystemModel; +class FilteringFileSystemModel; class FileSystemFinderView; class Track; class SearchModel; @@ -52,6 +75,7 @@ this->playlistView = playlistView; } void appear(); + void disappear(); void showSearch(QString query); void addTracksAndPlay(QList tracks); void artistActivated(Artist *artist); @@ -108,11 +132,12 @@ FileSystemFinderView *fileSystemView; FileSystemModel *fileSystemModel; + FilteringFileSystemModel *filteringFileSystemModel; - QListView *artistListView; + ArtistListView *artistListView; ArtistSqlModel *artistListModel; - QListView *albumListView; + AlbumListView *albumListView; AlbumSqlModel *albumListModel; QListView *trackListView; diff -Nru musique-1.2.1/src/fontutils.cpp musique-1.3/src/fontutils.cpp --- musique-1.2.1/src/fontutils.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/fontutils.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,8 +1,28 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "fontutils.h" static const int MIN_PIXEL_SIZE = 11; -const QFont FontUtils::small() { +const QFont &FontUtils::smaller() { static QFont font; static bool initialized = false; if (!initialized) { @@ -13,7 +33,7 @@ return font; } -const QFont FontUtils::smallBold() { +const QFont &FontUtils::smallerBold() { static QFont font; static bool initialized = false; if (!initialized) { @@ -25,7 +45,7 @@ return font; } -const QFont FontUtils::big() { +const QFont &FontUtils::bigger() { static QFont font; static bool initialized = false; if (!initialized) { @@ -35,7 +55,7 @@ return font; } -const QFont FontUtils::bigBold() { +const QFont &FontUtils::biggerBold() { static QFont font; static bool initialized = false; if (!initialized) { diff -Nru musique-1.2.1/src/fontutils.h musique-1.3/src/fontutils.h --- musique-1.2.1/src/fontutils.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/fontutils.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef FONTUTILS_H #define FONTUTILS_H @@ -6,10 +26,10 @@ class FontUtils { public: - static const QFont small(); - static const QFont smallBold(); - static const QFont big(); - static const QFont bigBold(); + static const QFont &smaller(); + static const QFont &smallerBold(); + static const QFont &bigger(); + static const QFont &biggerBold(); }; diff -Nru musique-1.2.1/src/global.h musique-1.3/src/global.h --- musique-1.2.1/src/global.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/global.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef GLOBAL_H #define GLOBAL_H @@ -118,24 +138,49 @@ } } + static QHash g_nams; + + QNetworkAccessManager* createNetworkAccessManager() { + networkHttpProxySetting(); + maybeSetSystemProxy(); + QNetworkAccessManager *nam = new QNetworkAccessManager(); + + // A simple disk based cache + QNetworkDiskCache *cache = new DiskCache(); + QString cacheLocation = QDesktopServices::storageLocation(QDesktopServices::DataLocation); + qDebug() << cacheLocation; + cache->setCacheDirectory(cacheLocation); + nam->setCache(cache); + return nam; + } + QNetworkAccessManager* networkAccessManager() { - static QNetworkAccessManager *nam = 0; - if (!nam) { - networkHttpProxySetting(); - maybeSetSystemProxy(); - nam = new QNetworkAccessManager(); - QNetworkDiskCache *cache = new DiskCache(); - QString cacheLocation = QDesktopServices::storageLocation( - QDesktopServices::DataLocation); - cache->setCacheDirectory(cacheLocation); - nam->setCache(cache); + // const QString threadName = QThread::currentThread()->objectName(); + // qDebug() << "threadName" << threadName; + if (g_nams.contains(QThread::currentThread())) { + return g_nams.value(QThread::currentThread()); + } else { + // qDebug() << "NetworkAccessManager for thread" << QThread::currentThread(); + QNetworkAccessManager* nam = createNetworkAccessManager(); + g_nams.insert(QThread::currentThread(), nam); + return nam; } - return nam; } + // key is thread itself + static QHash g_http; + NetworkAccess* http() { - static NetworkAccess *na = new NetworkAccess(); - return na; + // const QString threadName = QThread::currentThread()->objectName(); + // qDebug() << "threadName" << threadName; + if (g_http.contains(QThread::currentThread())) { + return g_http.value(QThread::currentThread()); + } else { + // qDebug() << "NetworkAccess for thread" << QThread::currentThread(); + NetworkAccess *http = new NetworkAccess(); + g_http.insert(QThread::currentThread(), http); + return http; + } } } diff -Nru musique-1.2.1/src/globalshortcutbackend.cpp musique-1.3/src/globalshortcutbackend.cpp --- musique-1.2.1/src/globalshortcutbackend.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/globalshortcutbackend.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "globalshortcutbackend.h" #include "globalshortcuts.h" diff -Nru musique-1.2.1/src/globalshortcutbackend.h musique-1.3/src/globalshortcutbackend.h --- musique-1.2.1/src/globalshortcutbackend.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/globalshortcutbackend.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef GLOBALSHORTCUTBACKEND_H #define GLOBALSHORTCUTBACKEND_H diff -Nru musique-1.2.1/src/globalshortcuts.cpp musique-1.3/src/globalshortcuts.cpp --- musique-1.2.1/src/globalshortcuts.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/globalshortcuts.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "globalshortcuts.h" #include "globalshortcutbackend.h" diff -Nru musique-1.2.1/src/globalshortcuts.h musique-1.3/src/globalshortcuts.h --- musique-1.2.1/src/globalshortcuts.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/globalshortcuts.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef GLOBALSHORTCUTS_H #define GLOBALSHORTCUTS_H diff -Nru musique-1.2.1/src/gnomeglobalshortcutbackend.cpp musique-1.3/src/gnomeglobalshortcutbackend.cpp --- musique-1.2.1/src/gnomeglobalshortcutbackend.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/gnomeglobalshortcutbackend.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "gnomeglobalshortcutbackend.h" #include "globalshortcuts.h" diff -Nru musique-1.2.1/src/gnomeglobalshortcutbackend.h musique-1.3/src/gnomeglobalshortcutbackend.h --- musique-1.2.1/src/gnomeglobalshortcutbackend.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/gnomeglobalshortcutbackend.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef GNOMEGLOBALSHORTCUTBACKEND_H #define GNOMEGLOBALSHORTCUTBACKEND_H diff -Nru musique-1.2.1/src/imagedownloader.cpp musique-1.3/src/imagedownloader.cpp --- musique-1.2.1/src/imagedownloader.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/imagedownloader.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "imagedownloader.h" #include @@ -17,7 +37,6 @@ int id; int objectId; int type; - int status; int errors; QString url; }; @@ -28,14 +47,9 @@ } void ImageDownloaderThread::run() { - qDebug() << "Starting image downloads"; imageDownloader = new ImageDownloader(); - // connect(imageDownloader, SIGNAL(progress(int)), SIGNAL(progress(int)), Qt::QueuedConnection); - // connect(imageDownloader, SIGNAL(error(QString)), SIGNAL(error(QString)), Qt::QueuedConnection); - // connect(imageDownloader, SIGNAL(finished()), SLOT(finish()), Qt::QueuedConnection); - // connect(imageDownloader, SIGNAL(finished()), SIGNAL(finished()), Qt::QueuedConnection); imageDownloader->run(); // Start thread event loop @@ -46,7 +60,6 @@ delete imageDownloader; qDebug() << "ImageDownloaderThread::run() exited"; - } ImageDownloader::ImageDownloader(QObject *parent) : QObject(parent), imageDownload(0) { @@ -56,23 +69,15 @@ void ImageDownloader::enqueue(int objectId, int objectType, QString url) { QSqlDatabase db = Database::instance().getConnection(); QSqlQuery query(db); - query.prepare("insert into downloads (objectid, type, status, errors, url) values (?,?,?,0,?)"); + query.prepare("insert into downloads (objectid, type, errors, url) values (?,?,0,?)"); query.bindValue(0, objectId); query.bindValue(1, objectType); - query.bindValue(2, ImageDownloader::WaitingStatus); - query.bindValue(3, url); + query.bindValue(2, url); if (!query.exec()) qWarning() << query.lastQuery() << query.lastError().text(); } -void ImageDownloader::clearQueue() { - QSqlDatabase db = Database::instance().getConnection(); - QSqlQuery query("delete from downloads", db); - if (!query.exec()) - qWarning() << query.lastQuery() << query.lastError().text(); -} - void ImageDownloader::run() { popFromQueue(); } @@ -82,9 +87,8 @@ // get the next download QSqlDatabase db = Database::instance().getConnection(); QSqlQuery query(db); - query.prepare("select id, objectid, type, status, errors, url from downloads " - "where status=? and errors<10 order by type, errors, id limit 1"); - query.bindValue(0, ImageDownloader::WaitingStatus); + query.prepare("select id, objectid, type, errors, url from downloads " + "where errors<10 order by errors, type, id limit 1"); if (!query.exec()) qWarning() << query.lastQuery() << query.lastError().text(); if (!query.next()) { @@ -97,17 +101,8 @@ imageDownload->id = query.value(0).toInt(); imageDownload->objectId = query.value(1).toInt(); imageDownload->type = query.value(2).toInt(); - imageDownload->status = query.value(3).toInt(); - imageDownload->errors = query.value(4).toInt(); - imageDownload->url = query.value(5).toString(); - - // mark it as "Processing" - query = QSqlQuery(db); - query.prepare("update downloads set status=? where id=?"); - query.bindValue(0, ImageDownloader::ProcessingStatus); - query.bindValue(1, imageDownload->id); - if (!query.exec()) - qWarning() << query.lastQuery() << query.lastError().text(); + imageDownload->errors = query.value(3).toInt(); + imageDownload->url = query.value(4).toString(); // start download QUrl url(imageDownload->url); @@ -125,7 +120,7 @@ } else if (imageDownload->type == ImageDownloader::AlbumType) { Album* album = Album::forId(imageDownload->objectId); if (album) album->setPhoto(bytes); - else qDebug() << imageDownload->url << "has no matching artist"; + else qDebug() << imageDownload->url << "has no matching album"; } else { qDebug() << "Unknown object type" << imageDownload->type; } @@ -148,9 +143,8 @@ // Increase errorcount QSqlDatabase db = Database::instance().getConnection(); QSqlQuery query = QSqlQuery(db); - query.prepare("update downloads set errors=errors+1, status=? where id=?"); - query.bindValue(0, ImageDownloader::WaitingStatus); - query.bindValue(1, imageDownload->id); + query.prepare("update downloads set errors=errors+1 where id=?"); + query.bindValue(0, imageDownload->id); if (!query.exec()) qWarning() << query.lastQuery() << query.lastError().text(); diff -Nru musique-1.2.1/src/imagedownloader.h musique-1.3/src/imagedownloader.h --- musique-1.2.1/src/imagedownloader.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/imagedownloader.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef IMAGEDOWNLOADER_H #define IMAGEDOWNLOADER_H @@ -16,17 +36,10 @@ enum ImageDownloadTypes { ArtistType = 0, - AlbumType = 1 - }; - - enum ImageDownloadStatuses { - WaitingStatus = 0, - ProcessingStatus = 1, - FailedStatus = 2 + AlbumType }; static void enqueue(int objectId, int objectType, QString url); - static void clearQueue(); public slots: void imageDownloaded(QByteArray bytes); diff -Nru musique-1.2.1/src/lastfm.cpp musique-1.3/src/lastfm.cpp --- musique-1.2.1/src/lastfm.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/lastfm.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,6 +1,26 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "lastfm.h" #include "datautils.h" -#include "../networkaccess.h" +#include "networkaccess.h" #include "lastfmlogindialog.h" #include "mainwindow.h" #include "constants.h" diff -Nru musique-1.2.1/src/lastfm.h musique-1.3/src/lastfm.h --- musique-1.2.1/src/lastfm.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/lastfm.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef LASTFM_H #define LASTFM_H diff -Nru musique-1.2.1/src/lastfmlogindialog.cpp musique-1.3/src/lastfmlogindialog.cpp --- musique-1.2.1/src/lastfmlogindialog.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/lastfmlogindialog.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "lastfmlogindialog.h" #include "fontutils.h" #include "lastfm.h" @@ -12,7 +32,7 @@ QFormLayout* layout = new QFormLayout(this); QLabel *label = new QLabel(tr("Log in to %1").arg("Last.fm")); - label->setFont(FontUtils::big()); + label->setFont(FontUtils::bigger()); layout->addWidget(label); // hack around https://bugreports.qt-project.org/browse/QTBUG-18308 @@ -56,7 +76,7 @@ tr("Signup for a %1 account").arg("Last.fm") + ""); signupLabel->setOpenExternalLinks(true); - signupLabel->setFont(FontUtils::small()); + signupLabel->setFont(FontUtils::smaller()); connect(signupLabel, SIGNAL(linkActivated(QString)), SLOT(close())); layout->addWidget(signupLabel); @@ -68,7 +88,7 @@ ); forgotLabel->hide(); forgotLabel->setOpenExternalLinks(true); - forgotLabel->setFont(FontUtils::small()); + forgotLabel->setFont(FontUtils::smaller()); connect(forgotLabel, SIGNAL(linkActivated(QString)), SLOT(close())); layout->addWidget(forgotLabel); diff -Nru musique-1.2.1/src/lastfmlogindialog.h musique-1.3/src/lastfmlogindialog.h --- musique-1.2.1/src/lastfmlogindialog.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/lastfmlogindialog.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef LASTFMLOGINDIALOG_H #define LASTFMLOGINDIALOG_H diff -Nru musique-1.2.1/src/main.cpp musique-1.3/src/main.cpp --- musique-1.2.1/src/main.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/main.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,67 +1,42 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include #include #include #include "constants.h" #include "mainwindow.h" #include "utils.h" -#ifndef Q_WS_X11 +#ifdef APP_EXTRA #include "extra.h" #endif #ifdef Q_WS_MAC #include "mac_startup.h" #endif -#ifdef Q_WS_X11 -QString getThemeName() { - QString themeName; - - QProcess process; - process.start("dconf", - QStringList() << "read" << "/org/gnome/desktop/interface/gtk-theme"); - if (process.waitForFinished()) { - themeName = process.readAllStandardOutput(); - themeName = themeName.trimmed(); - themeName.remove('\''); - if (!themeName.isEmpty()) return themeName; - } - - QString rcPaths = QString::fromLocal8Bit(qgetenv("GTK2_RC_FILES")); - if (!rcPaths.isEmpty()) { - QStringList paths = rcPaths.split(QLatin1String(":")); - foreach (const QString &rcPath, paths) { - if (!rcPath.isEmpty()) { - QFile rcFile(rcPath); - if (rcFile.exists() && rcFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - QTextStream in(&rcFile); - while(!in.atEnd()) { - QString line = in.readLine(); - if (line.contains(QLatin1String("gtk-theme-name"))) { - line = line.right(line.length() - line.indexOf(QLatin1Char('=')) - 1); - line.remove(QLatin1Char('\"')); - line = line.trimmed(); - themeName = line; - break; - } - } - } - } - if (!themeName.isEmpty()) - break; - } - } - - // Fall back to gconf - if (themeName.isEmpty()) - themeName = QGtkStyle::getGConfString(QLatin1String("/desktop/gnome/interface/gtk_theme")); - - return themeName; -} -#endif - int main(int argc, char **argv) { -#ifdef QT_MAC_USE_COCOA +#ifdef Q_WS_MAC mac::MacMain(); + // https://bugreports.qt-project.org/browse/QTBUG-32789 + QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande"); #endif QtSingleApplication app(argc, argv); @@ -76,31 +51,24 @@ app.setApplicationName(Constants::NAME); app.setOrganizationName(Constants::ORG_NAME); app.setOrganizationDomain(Constants::ORG_DOMAIN); +#ifndef APP_WIN app.setWheelScrollLines(1); +#endif app.setAttribute(Qt::AA_DontShowIconsInMenus); -#ifndef Q_WS_X11 +#ifdef APP_EXTRA Extra::appSetup(&app); #else - bool isGtk = app.style()->metaObject()->className() == QLatin1String("QGtkStyle"); - if (isGtk) { - app.setProperty("gtk", isGtk); - QString themeName = getThemeName(); - app.setProperty("style", themeName); - } QFile cssFile(":/style.css"); cssFile.open(QFile::ReadOnly); QString styleSheet = QLatin1String(cssFile.readAll()); app.setStyleSheet(styleSheet); #endif - const QString locale = QLocale::system().name(); - // qt translations QTranslator qtTranslator; - qtTranslator.load("qt_" + locale, + qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); - // qWarning() << "Qt translations:" << QLibraryInfo::location(QLibraryInfo::TranslationsPath); app.installTranslator(&qtTranslator); // app translations @@ -109,23 +77,18 @@ #else QString dataDir = ""; #endif - QString localeDir = qApp->applicationDirPath() + QDir::separator() + "locale"; + QString localeDir = qApp->applicationDirPath() + "/locale"; if (!QDir(localeDir).exists()) { - localeDir = dataDir + QDir::separator() + "locale"; + localeDir = dataDir + "/locale"; } + // qDebug() << "Using locale dir" << localeDir << locale; QTranslator translator; translator.load(QLocale::system(), QString(), QString(), localeDir); app.installTranslator(&translator); QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8")); MainWindow* mainWin = MainWindow::instance(); - mainWin->setWindowTitle(Constants::NAME); - -#ifndef Q_WS_X11 - Extra::windowSetup(mainWin); -#else - mainWin->setProperty("style", app.property("style")); -#endif + mainWin->show(); #ifndef APP_MAC QIcon appIcon; @@ -136,7 +99,8 @@ const int iconSizes [] = { 16, 22, 32, 48, 64, 128, 256, 512 }; for (int i = 0; i < 8; i++) { QString size = QString::number(iconSizes[i]); - QString png = dataDir + "/" + size + "x" + size + "/" + Constants::UNIX_NAME + ".png"; + QString png = dataDir + "/" + size + "x" + size + "/" + + Constants::UNIX_NAME + ".png"; appIcon.addFile(png, QSize(iconSizes[i], iconSizes[i])); } } @@ -146,9 +110,8 @@ mainWin->setWindowIcon(appIcon); #endif - mainWin->show(); - - mainWin->connect(&app, SIGNAL(messageReceived(const QString &)), mainWin, SLOT(messageReceived(const QString &))); + mainWin->connect(&app, SIGNAL(messageReceived(const QString &)), + mainWin, SLOT(messageReceived(const QString &))); app.setActivationWindow(mainWin, true); // all string literals are UTF-8 diff -Nru musique-1.2.1/src/mainwindow.cpp musique-1.3/src/mainwindow.cpp --- musique-1.2.1/src/mainwindow.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/mainwindow.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "mainwindow.h" #include "spacer.h" #include "constants.h" @@ -34,7 +54,7 @@ #include "lastfmlogindialog.h" #include "imagedownloader.h" #include -#ifndef Q_WS_X11 +#ifdef APP_EXTRA #include "extra.h" #include "updatedialog.h" #endif @@ -78,6 +98,10 @@ // remove that useless menu/toolbar context menu setContextMenuPolicy(Qt::NoContextMenu); +#ifdef APP_EXTRA + Extra::windowSetup(this); +#endif + // restore window position readSettings(); @@ -93,6 +117,15 @@ // event filter to block ugly toolbar tooltips qApp->installEventFilter(this); + qApp->processEvents(); + QTimer::singleShot(50, this, SLOT(lazyInit())); +} + +MainWindow::~MainWindow() { + delete history; +} + +void MainWindow::lazyInit() { // Global shortcuts GlobalShortcuts &shortcuts = GlobalShortcuts::instance(); #ifdef Q_WS_X11 @@ -104,11 +137,6 @@ #endif connect(&shortcuts, SIGNAL(PlayPause()), playAct, SLOT(trigger())); connect(&shortcuts, SIGNAL(Stop()), this, SLOT(stop())); - -} - -MainWindow::~MainWindow() { - delete history; } void MainWindow::showInitialView() { @@ -117,16 +145,20 @@ if (db.status() == ScanComplete) { showMediaView(false); - QTimer::singleShot(1, this, SLOT(loadPlaylist())); + QTimer::singleShot(0, this, SLOT(loadPlaylist())); // update the collection when idle - QTimer::singleShot(2, this, SLOT(startIncrementalScan())); + QTimer::singleShot(500, this, SLOT(startIncrementalScan())); - QTimer::singleShot(3, this, SLOT(checkForUpdate())); + QTimer::singleShot(1000, this, SLOT(checkForUpdate())); } else { // no db, do the first scan dance - showChooseFolderView(false); + QString root = db.needsUpdate(); + if (!root.isEmpty() && QDir().exists(root)) + startFullScan(root); + else + showChooseFolderView(false); } } @@ -348,6 +380,7 @@ searchFocusAct = new QAction(this); searchFocusAct->setShortcut(QKeySequence::Find); + searchFocusAct->setStatusTip(tr("Search")); actions->insert("search", searchFocusAct); connect(searchFocusAct, SIGNAL(triggered()), SLOT(searchFocus())); addAction(searchFocusAct); @@ -437,6 +470,7 @@ playlistMenu = menuBar()->addMenu(tr("Play&list")); menus->insert("playlist", playlistMenu); playlistMenu->addAction(The::globalActions()->value("clearPlaylist")); + playlistMenu->addSeparator(); playlistMenu->addAction(The::globalActions()->value("shufflePlaylist")); playlistMenu->addAction(The::globalActions()->value("repeatPlaylist")); playlistMenu->addSeparator(); @@ -466,7 +500,7 @@ setUnifiedTitleAndToolBarOnMac(true); mainToolBar = new QToolBar(this); - mainToolBar->setToolButtonStyle(Qt::ToolButtonFollowStyle); + mainToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); mainToolBar->setFloatable(false); mainToolBar->setMovable(false); @@ -482,7 +516,7 @@ mainToolBar->addWidget(new Spacer()); - QFont smallerFont = FontUtils::small(); + QFont smallerFont = FontUtils::smaller(); currentTime = new QLabel(mainToolBar); currentTime->setFont(smallerFont); mainToolBar->addWidget(currentTime); @@ -546,13 +580,9 @@ } void MainWindow::createStatusBar() { - - // remove ugly borders on OSX - statusBar()->setStyleSheet("::item{border:0 solid} QToolBar {padding:0;spacing:0;margin:0;border:0} QToolButton {padding:0;spacing:0;margin:0}"); - statusToolBar = new QToolBar(this); statusToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - + statusToolBar->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); #ifdef Q_WS_X11 int iconHeight = 16; int iconWidth = iconHeight; @@ -561,6 +591,11 @@ int iconWidth = iconHeight * 3 / 2; #endif statusToolBar->setIconSize(QSize(iconWidth, iconHeight)); + + QWidget *spring = new QWidget(); + spring->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + statusToolBar->addWidget(spring); + statusToolBar->addAction(The::globalActions()->value("shufflePlaylist")); statusToolBar->addAction(The::globalActions()->value("repeatPlaylist")); statusToolBar->addAction(The::globalActions()->value("clearPlaylist")); @@ -785,12 +820,19 @@ } void MainWindow::fullScanFinished() { +#ifdef APP_EXTRA + Extra::notify(tr("%1 finished scanning your music collection").arg(Constants::NAME), "", ""); +#else QApplication::alert(this, 0); +#endif +#ifdef APP_WIN + QApplication::alert(this, 0); +#endif startImageDownload(); } void MainWindow::startIncrementalScan() { - statusBar()->showMessage(tr("Updating collection...")); + showMessage(tr("Updating collection...")); chooseFolderAct->setEnabled(false); CollectionScannerThread *scannerThread = new CollectionScannerThread(); // incremental! @@ -801,14 +843,14 @@ } void MainWindow::incrementalScanProgress(int percent) { - statusBar()->showMessage(tr("Updating collection - %1%").arg(QString::number(percent))); + showMessage(tr("Updating collection - %1%").arg(QString::number(percent))); } void MainWindow::incrementalScanFinished() { if (views->currentWidget() == mediaView || views->currentWidget() == contextualView) chooseFolderAct->setEnabled(true); - statusBar()->showMessage(tr("Collection updated")); + showMessage(tr("Collection updated")); startImageDownload(); } @@ -1188,9 +1230,13 @@ } void MainWindow::showActionInStatusBar(QAction* action, bool show) { +#ifdef APP_EXTRA + Extra::fadeInWidget(statusBar(), statusBar()); +#endif if (show) { if (!statusToolBar->actions().contains(action)) - statusToolBar->insertAction(statusToolBar->actions().first(), action); + // statusToolBar->insertAction(statusToolBar->actions().first(), action); + statusToolBar->insertAction(statusToolBar->actions().at(1), action); } else { statusToolBar->removeAction(action); } @@ -1202,7 +1248,7 @@ } void MainWindow::showMessage(QString message) { - statusBar()->showMessage(message, 60000); + statusBar()->showMessage(message, 5000); } void MainWindow::toggleScrobbling(bool enable) { diff -Nru musique-1.2.1/src/mainwindow.h musique-1.3/src/mainwindow.h --- musique-1.2.1/src/mainwindow.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/mainwindow.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef MAINWINDOW_H #define MAINWINDOW_H @@ -21,6 +41,7 @@ public: static MainWindow* instance(); ~MainWindow(); + QToolBar* getStatusToolbar() { return statusToolBar; } static void printHelp(); public slots: @@ -50,6 +71,7 @@ void resizeEvent(QResizeEvent *); private slots: + void lazyInit(); void visitSite(); void donate(); void reportIssue(); diff -Nru musique-1.2.1/src/mbnetworkaccess.cpp musique-1.3/src/mbnetworkaccess.cpp --- musique-1.2.1/src/mbnetworkaccess.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/mbnetworkaccess.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "mbnetworkaccess.h" namespace The { diff -Nru musique-1.2.1/src/mbnetworkaccess.h musique-1.3/src/mbnetworkaccess.h --- musique-1.2.1/src/mbnetworkaccess.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/mbnetworkaccess.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef MBNETWORKACCESS_H #define MBNETWORKACCESS_H diff -Nru musique-1.2.1/src/mediaview.cpp musique-1.3/src/mediaview.cpp --- musique-1.2.1/src/mediaview.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/mediaview.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "mediaview.h" #include "model/track.h" #include "model/artist.h" @@ -7,12 +27,13 @@ #include "constants.h" #include "lastfm.h" #include "model/album.h" -#ifdef Q_WS_MAC -#include "macutils.h" -#endif #ifdef APP_ACTIVATION #include "activation.h" #endif +#include "database.h" +#ifdef APP_EXTRA +#include "extra.h" +#endif namespace The { QHash* globalActions(); @@ -36,7 +57,8 @@ // playlist model playlistModel = new PlaylistModel(this); - connect(playlistModel, SIGNAL(activeRowChanged(int, bool)), SLOT(activeRowChanged(int, bool))); + connect(playlistModel, SIGNAL(activeRowChanged(int, bool, bool)), + SLOT(activeRowChanged(int, bool, bool))); connect(playlistModel, SIGNAL(playlistFinished()), SLOT(playlistFinished())); // finder @@ -62,8 +84,8 @@ finderWidget->setPlaylistView(playlistView); - splitter->setStretchFactor(0, 6); - splitter->setStretchFactor(1, 1); + splitter->setStretchFactor(0, 8); + splitter->setStretchFactor(1, 0); // restore splitter state QSettings settings; @@ -83,12 +105,15 @@ void MediaView::setMediaObject(Phonon::MediaObject *mediaObject) { this->mediaObject = mediaObject; - // connect(mediaObject, SIGNAL(aboutToFinish()), this, SLOT(aboutToFinish())); +#ifdef APP_MAC + mediaObject->setTransitionTime(-300); +#endif connect(mediaObject, SIGNAL(finished()), SLOT(playbackFinished())); connect(mediaObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), SLOT(stateChanged(Phonon::State, Phonon::State))); - //connect(mediaObject, SIGNAL(currentSourceChanged(Phonon::MediaSource)), - // this, SLOT(currentSourceChanged(Phonon::MediaSource))); + connect(mediaObject, SIGNAL(aboutToFinish()), SLOT(aboutToFinish())); + connect(mediaObject, SIGNAL(currentSourceChanged(Phonon::MediaSource)), + SLOT(currentSourceChanged(Phonon::MediaSource))); } void MediaView::saveSplitterState() { @@ -131,7 +156,7 @@ } } -void MediaView::activeRowChanged(int row, bool manual) { +void MediaView::activeRowChanged(int row, bool manual, bool startPlayback) { errorTimer->stop(); @@ -147,10 +172,12 @@ The::globalActions()->value("contextual")->setEnabled(true); // go! - QString path = track->getAbsolutePath(); - // qDebug() << "Playing" << path; - mediaObject->setCurrentSource(path); - mediaObject->play(); + if (startPlayback) { + QString path = track->getAbsolutePath(); + qWarning() << "Playing" << path; + mediaObject->setCurrentSource(path); + mediaObject->play(); + } track->setStartTime(QDateTime::currentDateTime().toTime_t()); @@ -178,12 +205,10 @@ // enable/disable actions The::globalActions()->value("stopafterthis")->setEnabled(true); -#ifdef Q_WS_MAC - if (mac::canNotify()) { - QString artistName = track->getArtist() ? track->getArtist()->getName() : ""; - QString albumName = track->getAlbum() ? track->getAlbum()->getName() : ""; - mac::notify(track->getTitle(), artistName, albumName); - } +#ifdef APP_EXTRA + QString artistName = track->getArtist() ? track->getArtist()->getName() : ""; + QString albumName = track->getAlbum() ? track->getAlbum()->getName() : ""; + Extra::notify(track->getTitle(), artistName, albumName); #endif // scrobbling @@ -205,6 +230,10 @@ finderWidget->appear(); } +void MediaView::disappear() { + finderWidget->disappear(); +} + void MediaView::playPause() { // qDebug() << "playPause() state" << mediaObject->state(); @@ -240,10 +269,19 @@ } void MediaView::playbackFinished() { + trackFinished(); + QAction* stopAfterThisAction = The::globalActions()->value("stopafterthis"); + if (stopAfterThisAction->isChecked()) { + stopAfterThisAction->setChecked(false); + } else playlistModel->skipForward(); +} + +void MediaView::trackFinished() { #ifdef APP_ACTIVATION - if (!Activation::instance().isActivated()) + if (!Activation::instance().isActivated()) { if (tracksPlayed > 1) demoMessage(); else tracksPlayed++; + } #endif // scrobbling @@ -256,13 +294,33 @@ needScrobble = true; } - QAction* stopAfterThisAction = The::globalActions()->value("stopafterthis"); - if (stopAfterThisAction->isChecked()) { - stopAfterThisAction->setChecked(false); - } else playlistModel->skipForward(); - if (needScrobble && track) LastFm::instance().scrobble(track); +} + +void MediaView::aboutToFinish() { + QAction* stopAfterThisAction = The::globalActions()->value("stopafterthis"); + if (!stopAfterThisAction->isChecked()) { + Track *nextTrack = playlistModel->getNextTrack(); + if (nextTrack) { + QString absolutePath = nextTrack->getAbsolutePath(); + qWarning() << "Enqueuing" << absolutePath; + mediaObject->enqueue(absolutePath); + } + } + trackFinished(); +} +void MediaView::currentSourceChanged(Phonon::MediaSource mediaSource) { + QString path = mediaSource.fileName(); + QString collectionRoot = Database::instance().collectionRoot(); + path = path.mid(collectionRoot.length() + 1); + qWarning() << path; + Track* track = Track::forPath(path); + if (track) { + int row = playlistModel->rowForTrack(track); + if (row >= 0) + playlistModel->setActiveRow(row, false, false); + } } #ifdef APP_ACTIVATION diff -Nru musique-1.2.1/src/mediaview.h musique-1.3/src/mediaview.h --- musique-1.2.1/src/mediaview.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/mediaview.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef MEDIAVIEW_H #define MEDIAVIEW_H @@ -25,16 +45,20 @@ public slots: void appear(); + void disappear(); void playPause(); void trackRemoved(); void search(QString query); private slots: - void activeRowChanged(int row, bool manual); + void activeRowChanged(int row, bool manual, bool startPlayback); void stateChanged(Phonon::State newState, Phonon::State oldState); void handleError(QString message); void playlistFinished(); void playbackFinished(); + void trackFinished(); + void aboutToFinish(); + void currentSourceChanged(Phonon::MediaSource mediaSource); #ifdef APP_ACTIVATION void updateContinueButton(int); #endif diff -Nru musique-1.2.1/src/model/album.cpp musique-1.3/src/model/album.cpp --- musique-1.2.1/src/model/album.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/model/album.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "album.h" #include "../constants.h" #include @@ -16,7 +36,7 @@ static QHash artistAlbums; -Album::Album() : year(0), artist(0) { +Album::Album() : year(0), artist(0), listeners(0), photo(0), thumb(0) { } @@ -44,8 +64,8 @@ // relations int artistId = query.value(2).toInt(); - // TODO this could be made lazy album->setArtist(Artist::forId(artistId)); + // if (!album->getArtist()) qWarning() << "no artist for" << album->getName(); // put into cache cache.insert(albumId, album); @@ -55,12 +75,12 @@ return 0; } -int Album::idForName(QString name) { +int Album::idForHash(QString hash) { int id = -1; QSqlDatabase db = Database::instance().getConnection(); QSqlQuery query(db); query.prepare("select id from albums where hash=?"); - query.bindValue(0, Album::getHash(name)); + query.bindValue(0, hash); bool success = query.exec(); if (!success) qDebug() << query.lastError().text(); if (query.next()) { @@ -73,12 +93,14 @@ void Album::insert() { QSqlDatabase db = Database::instance().getConnection(); QSqlQuery query(db); - query.prepare("insert into albums (hash,title,year,artist,trackCount) values (?,?,?,?,0)"); + query.prepare("insert into albums (hash,title,year,artist,trackCount,listeners)" + " values (?,?,?,?,0,?)"); query.bindValue(0, getHash()); query.bindValue(1, name); query.bindValue(2, year); int artistId = artist ? artist->getId() : 0; query.bindValue(3, artistId); + query.bindValue(4, listeners); bool success = query.exec(); if (!success) qDebug() << query.lastError().text(); @@ -89,6 +111,17 @@ query.bindValue(0, artist->getId()); bool success = query.exec(); if (!success) qDebug() << query.lastError().text(); + + // for artists that have no yearFrom, use the earliest album year + if (year > 0) { + query = QSqlQuery(db); + query.prepare("update artists set yearFrom=? where id=? and (yearFrom=0 or yearFrom>?)"); + query.bindValue(0, year); + query.bindValue(1, artist->getId()); + query.bindValue(2, year); + bool success = query.exec(); + if (!success) qDebug() << query.lastError().text(); + } } } @@ -107,13 +140,18 @@ if (!success) qDebug() << query.lastError().text(); } -QString Album::getHash() { - return Album::getHash(name); +QString Album::getHash(QString name, Artist *artist) { + QString h; + if (artist) h = artist->getHash() + "/"; + else h = "_unknown/"; + h += DataUtils::normalizeTag(name); + return h; } -QString Album::getHash(QString name) { - // return DataUtils::calculateHash(DataUtils::normalizeTag(name)); - return DataUtils::normalizeTag(name); +const QString & Album::getHash() { + if (hash.isNull()) + hash = getHash(name, artist); + return hash; } QString Album::getStatusTip() { @@ -122,9 +160,20 @@ if (artist) tip += artist->getName() + " - "; tip += getTitle(); if (year) tip += " (" + QString::number(year) + ")"; + // tip += " - " + formattedDuration(); return tip; } +QString Album::formattedDuration() { + int totalLength = Track::getTotalLength(getTracks()); + QString duration; + if (totalLength > 3600) + duration = QTime().addSecs(totalLength).toString("h:mm:ss"); + else + duration = QTime().addSecs(totalLength).toString("m:ss"); + return duration; +} + void Album::fetchInfo() { // an artist name is needed in order to fix the album title // also workaround last.fm bug with selftitled albums @@ -187,13 +236,22 @@ qDebug() << name << "-> MusicBrainz ->" << correctTitle; if (!correctTitle.isEmpty()) { this->name = correctTitle; + hash.clear(); } } // *** Last.fm Photo *** -QPixmap Album::getPhoto() { - return QPixmap(QDesktopServices::storageLocation(QDesktopServices::DataLocation) + "/albums/" + getHash()); +const QPixmap &Album::getPhoto() { + if (!photo) + photo = new QPixmap(getImageLocation()); + return *photo; +} + +const QPixmap &Album::getThumb() { + if (!thumb) + thumb = new QPixmap(getThumbLocation()); + return *thumb; } void Album::fetchLastFmSearch() { @@ -234,6 +292,7 @@ if (name != albumName) { qDebug() << "Fixed album name" << name << "=>" << albumName; name = albumName; + hash.clear(); } break; } @@ -257,6 +316,7 @@ int slashIndex = location.lastIndexOf('/'); if (slashIndex > 0) { name = location.mid(slashIndex); + hash.clear(); // qDebug() << "*** Redirected name is" << name; fetchLastFmSearch(); return; @@ -303,11 +363,12 @@ while(xml.readNextStartElement()) { - if (xml.name() == "album") { + if (xml.name() == QLatin1String("album")) { while (xml.readNextStartElement()) { + const QStringRef n = xml.name(); - if(xml.name() == "track") { + if(n == QLatin1String("track")) { QString number = xml.attributes().value("rank").toString(); if (trackNames.contains(number)) xml.skipCurrentElement(); else @@ -320,15 +381,17 @@ } } - else if(xml.name() == "name") { + else if(n == QLatin1String("name")) { QString albumTitle = xml.readElementText(); if (name != albumTitle) { qDebug() << "Fixed album name" << name << "->" << albumTitle; name = albumTitle; + hash.clear(); } } - else if(xml.name() == "image" && xml.attributes().value("size") == "extralarge") { + else if(n == QLatin1String("image") && + xml.attributes().value("size") == QLatin1String("extralarge")) { bool imageAlreadyPresent = property("localCover").toBool(); if (!imageAlreadyPresent) imageAlreadyPresent = QFile::exists(getImageLocation()); @@ -336,10 +399,14 @@ QString imageUrl = xml.readElementText(); if (!imageUrl.isEmpty()) setProperty("imageUrl", imageUrl); - } + } else xml.skipCurrentElement(); + } + + else if (n == QLatin1String("listeners")) { + listeners = xml.readElementText().toUInt(); } - else if(xml.name() == "releasedate" && year < 1600) { + else if(n == QLatin1String("releasedate") && year < 1600) { QString releasedateString = xml.readElementText().simplified(); if (!releasedateString.isEmpty()) { // Something like "6 Apr 1999, 00:00" @@ -351,23 +418,21 @@ } // wiki - else if(xml.name() == "wiki") { + else if(n == QLatin1String("wiki")) { while (xml.readNextStartElement()) { if(xml.name() == "content") { - QString bio = xml.readElementText(); + QString wiki = xml.readElementText(); static const QRegExp re("User-contributed text.*"); - bio.remove(re); - if (!bio.isEmpty()) { - const QString storageLocation = - QDesktopServices::storageLocation(QDesktopServices::DataLocation) - + "/albums/wikis/"; - QDir dir; - dir.mkpath(storageLocation); - QFile file(storageLocation + getHash()); + wiki.remove(re); + wiki = wiki.trimmed(); + if (!wiki.isEmpty()) { + QString wikiLocation = getWikiLocation(); + QDir().mkpath(QFileInfo(wikiLocation).absolutePath()); + QFile file(wikiLocation); if (!file.open(QIODevice::WriteOnly)) qWarning() << "Error opening file for writing" << file.fileName(); - QTextStream stream(&file); // we will serialize the data into the file - stream << bio; + QTextStream stream(&file); + stream << wiki; } } else xml.skipCurrentElement(); } @@ -387,11 +452,20 @@ emit gotInfo(); } +QString Album::getBaseLocation() { + return Database::getFilesLocation() + getHash(); +} + QString Album::getImageLocation() { - QString l = QDesktopServices::storageLocation(QDesktopServices::DataLocation) + "/albums/"; - // if (artist) l += artist->getHash() + "/"; - l += getHash(); // + ".jpg"; - return l; + return getBaseLocation() + QLatin1String("/_cover"); +} + +QString Album::getThumbLocation() { + return getBaseLocation() + QLatin1String("/_thumb"); +} + +QString Album::getWikiLocation() { + return getBaseLocation() + QLatin1String("/_wiki"); } void Album::setPhoto(QByteArray bytes) { @@ -399,15 +473,35 @@ // store photo QString storageLocation = getImageLocation(); + + QFileInfo info(storageLocation); + QDir().mkpath(info.absolutePath()); + QFile file(storageLocation); - QDir dir; - dir.mkpath(QFileInfo(file).path()); if (!file.open(QIODevice::WriteOnly)) { qWarning() << "Error opening file for writing" << file.fileName(); } - QDataStream stream( &file ); // we will serialize the data into the file + QDataStream stream(&file); stream.writeRawData(bytes.constData(), bytes.size()); + // prescale 150x150 thumb + static const int maximumSize = 150; + QImage img = QImage::fromData(bytes); + img = img.scaled(maximumSize, maximumSize, Qt::KeepAspectRatio, Qt::SmoothTransformation); + if (!img.save(getThumbLocation(), "JPG")) { + qWarning() << "Error saving thumbnail" << file.fileName(); + } + + if (thumb) { + delete thumb; + thumb = 0; + } + + if (photo) { + delete photo; + photo = 0; + } + emit gotPhoto(); } @@ -434,22 +528,14 @@ } QString Album::getWiki() { - - const QString storageLocation = - QDesktopServices::storageLocation(QDesktopServices::DataLocation) - + "/albums/wikis/"; - QFile file(storageLocation + getHash()); - + QFile file(getWikiLocation()); if (!file.exists()) return QString(); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { qDebug() << "Cannot open file" << file.fileName(); return QString(); } - QByteArray bytes = file.readAll(); return QString::fromUtf8(bytes.data()); - } QString normalizeString(QString s) { diff -Nru musique-1.2.1/src/model/album.h musique-1.3/src/model/album.h --- musique-1.2.1/src/model/album.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/model/album.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,7 +1,27 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef ALBUM_H #define ALBUM_H -#include +#include #include "item.h" #include "artist.h" #include "track.h" @@ -23,7 +43,9 @@ void setTitle(QString title) { this->name = title; } int getYear() { return year; } void setYear(int year) { this->year = year; } - QString getHash(); + static QString getHash(QString name, Artist *artist); + const QString &getHash(); + QString getWikiLocation(); QString getWiki(); // relations @@ -36,10 +58,12 @@ cache.clear(); } static Album* forId(int albumId); - static int idForName(QString name); + static int idForHash(QString name); void insert(); void update(); + QString formattedDuration(); + // internet /** @@ -48,8 +72,10 @@ * This will also emit gotPhoto() when the photo is ready. */ void fetchInfo(); - QPixmap getPhoto(); + const QPixmap &getPhoto(); + const QPixmap &getThumb(); QString getImageLocation(); + QString getThumbLocation(); void fixTrackTitle(Track* track); @@ -73,7 +99,7 @@ void parseLastFmRedirectedName(QNetworkReply *reply); private: - static QString getHash(QString); + QString getBaseLocation(); QString fixTrackTitleUsingTitle(Track* track, QString newTitle); static QHash cache; @@ -82,6 +108,10 @@ int year; Artist* artist; QString mbid; + QString hash; + uint listeners; + QPixmap *photo; + QPixmap *thumb; }; diff -Nru musique-1.2.1/src/model/artist.cpp musique-1.3/src/model/artist.cpp --- musique-1.2.1/src/model/artist.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/model/artist.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "artist.h" #include "../constants.h" #include @@ -13,9 +33,11 @@ NetworkAccess* http(); } -Artist::Artist(QObject *parent) : Item(parent) { - -} +Artist::Artist(QObject *parent) : Item(parent), + trackCount(0), + yearFrom(0), + yearTo(0), + listeners(0) { } QHash Artist::cache; @@ -29,7 +51,7 @@ QSqlDatabase db = Database::instance().getConnection(); QSqlQuery query(db); - query.prepare("select name, trackCount from artists where id=?"); + query.prepare("select name, trackCount, yearFrom, yearTo, listeners from artists where id=?"); query.bindValue(0, artistId); bool success = query.exec(); if (!success) qDebug() << query.lastQuery() << query.lastError().text(); @@ -38,8 +60,9 @@ artist->setId(artistId); artist->setName(query.value(0).toString()); artist->trackCount = query.value(1).toInt(); - // artist->lifeBegin = query.value(2).toInt(); - // artist->lifeEnd = query.value(3).toInt(); + artist->yearFrom = query.value(2).toInt(); + artist->yearTo = query.value(3).toInt(); + artist->listeners = query.value(4).toUInt(); // Add other fields here... // put into cache @@ -74,9 +97,14 @@ // qDebug() << "Artist::insert"; QSqlDatabase db = Database::instance().getConnection(); QSqlQuery query(db); - query.prepare("insert into artists (hash, name, albumCount, trackCount) values (?,?,0,0)"); + query.prepare("insert into artists" + " (hash, name, yearFrom, yearTo, listeners, albumCount, trackCount)" + " values (?,?,?,?,?,0,0)"); query.bindValue(0, hash); query.bindValue(1, name); + query.bindValue(2, yearFrom); + query.bindValue(3, yearTo); + query.bindValue(4, listeners); // qDebug() << query.lastQuery(); bool success = query.exec(); if (!success) qDebug() << query.lastError().text(); @@ -93,17 +121,18 @@ if (!success) qDebug() << query.lastError().text(); } -QString Artist::getHash() { - return Artist::getHash(name); +const QString &Artist::getHash() { + if (hash.isNull()) + hash = getHash(name); + return hash; } QString Artist::getHash(QString name) { - // return DataUtils::calculateHash(DataUtils::normalizeTag(name)); return DataUtils::normalizeTag(name); } QString Artist::getStatusTip() { - return name; + return name + QLatin1String(" - ") + QString("%1 tracks").arg(trackCount); } void Artist::fetchInfo() { @@ -127,6 +156,7 @@ qDebug() << name << "-> MusicBrainz ->" << correctName; if (!correctName.isEmpty()) { this->name = correctName; + hash.clear(); } // And now gently ask the Last.fm guys for some more info @@ -204,6 +234,7 @@ if (text.toLower() == preferredValueLower) { name = text; + hash.clear(); mbid = artistMbid; return; } @@ -223,6 +254,7 @@ } name = firstValue; + hash.clear(); mbid = firstMbid; } @@ -270,6 +302,7 @@ QString redirectedName = location.mid(slashIndex + 1); qDebug() << name << "redirected to" << redirectedName; name = redirectedName; + hash.clear(); fetchLastFmSearch(); return; } @@ -301,42 +334,66 @@ if (xml.name() == "artist") { while (xml.readNextStartElement()) { + const QStringRef n = xml.name(); - if(xml.name() == "name") { + if(n == QLatin1String("name")) { QString artistName = xml.readElementText(); if (name != artistName) { qDebug() << "Fixed artist name" << name << "->" << artistName; name = artistName; + hash.clear(); } } - else if(xml.name() == "image" && xml.attributes().value("size") == "extralarge") { + else if(n == QLatin1String("image") && + xml.attributes().value("size") == QLatin1String("extralarge")) { if (!QFile::exists(getImageLocation())) { QString imageUrl = xml.readElementText(); if (!imageUrl.isEmpty()) setProperty("imageUrl", imageUrl); + } else xml.skipCurrentElement(); + } + + else if (n == QLatin1String("stats")) { + while (xml.readNextStartElement()) { + if(xml.name() == "listeners") { + listeners = xml.readElementText().toUInt(); + } else xml.skipCurrentElement(); } } - else if(xml.name() == "bio") { + else if(n == QLatin1String("bio")) { while (xml.readNextStartElement()) { if(xml.name() == "content") { - bio = xml.readElementText(); + QString bio = xml.readElementText(); static const QRegExp licenseRE("User-contributed text is available.*"); bio.remove(licenseRE); + bio = bio.trimmed(); if (!bio.isEmpty()) { - const QString storageLocation = - QDesktopServices::storageLocation(QDesktopServices::DataLocation) - + "/artists/biographies/"; - QDir dir; - dir.mkpath(storageLocation); - QFile file(storageLocation + getHash()); + const QString bioLocation = getBioLocation(); + QDir().mkpath(QFileInfo(bioLocation).absolutePath()); + QFile file(bioLocation); if (!file.open(QIODevice::WriteOnly)) qWarning() << "Error opening file for writing" << file.fileName(); QTextStream stream(&file); stream << bio; } - } else xml.skipCurrentElement(); + + } else if (xml.name() == "formationlist") { + while (xml.readNextStartElement()) { + if(xml.name() == "formation") { + while (xml.readNextStartElement()) { + if(yearFrom == 0 && xml.name() == "yearfrom") { + yearFrom = xml.readElementText().toInt(); + } else if(xml.name() == "yearto") { + yearTo = xml.readElementText().toInt(); + } else xml.skipCurrentElement(); + } + } else xml.skipCurrentElement(); + } + } + + else xml.skipCurrentElement(); } } @@ -354,8 +411,16 @@ emit gotInfo(); } +QString Artist::getBaseLocation() { + return Database::getFilesLocation() + getHash(); +} + QString Artist::getImageLocation() { - return QDesktopServices::storageLocation(QDesktopServices::DataLocation) + "/artists/" + getHash(); + return getBaseLocation() + QLatin1String("/_photo"); +} + +QString Artist::getBioLocation() { + return getBaseLocation() + QLatin1String("/_bio"); } QPixmap Artist::getPhoto() { @@ -366,10 +431,9 @@ qDebug() << "Storing photo for" << name; // store photo - QString storageLocation = QDesktopServices::storageLocation(QDesktopServices::DataLocation) + "/artists/"; - QDir dir; - dir.mkpath(storageLocation); - QFile file(storageLocation + getHash()); + QString storageLocation = getImageLocation(); + QDir().mkpath(QFileInfo(storageLocation).absolutePath()); + QFile file(storageLocation); if (!file.open(QIODevice::WriteOnly)) { qDebug() << "Error opening file for writing" << file.fileName(); } @@ -382,7 +446,9 @@ QList Artist::getTracks() { QSqlDatabase db = Database::instance().getConnection(); QSqlQuery query(db); - query.prepare("select id from tracks where artist=? order by album, track, path"); + query.prepare("select t.id from tracks t, albums a" + " where (t.album=a.id or t.album=0) and t.artist=?" + " order by a.year desc, a.title collate nocase, t.track, t.path"); query.bindValue(0, id); bool success = query.exec(); if (!success) qDebug() << query.lastQuery() << query.lastError().text() << query.lastError().number(); @@ -392,24 +458,17 @@ Track* track = Track::forId(trackId); tracks << track; } + return tracks; } QString Artist::getBio() { - - const QString storageLocation = - QDesktopServices::storageLocation(QDesktopServices::DataLocation) - + "/artists/biographies/"; - QFile file(storageLocation + getHash()); - + QFile file(getBioLocation()); if (!file.exists()) return QString(); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { qDebug() << "Cannot open file" << file.fileName(); return QString(); } - QByteArray bytes = file.readAll(); return QString::fromUtf8(bytes.data()); - } diff -Nru musique-1.2.1/src/model/artist.h musique-1.3/src/model/artist.h --- musique-1.2.1/src/model/artist.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/model/artist.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef ARTIST_H #define ARTIST_H @@ -22,8 +42,10 @@ // properties QString getName() { return name; } void setName(QString name) { this->name = name; } - QString getHash(); + const QString &getHash(); int getTrackCount() { return trackCount; } + QString getBaseLocation(); + QString getBioLocation(); QString getBio(); // relations @@ -86,11 +108,17 @@ int trackCount; QString name; - QString bio; QString mbid; + int yearFrom; + int yearTo; + uint listeners; + // QStringList tags; + QStringList lastFmSearches; + QString hash; + }; // This is required in order to use QPointer as a QVariant diff -Nru musique-1.2.1/src/model/folder.cpp musique-1.3/src/model/folder.cpp --- musique-1.2.1/src/model/folder.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/model/folder.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "folder.h" #include diff -Nru musique-1.2.1/src/model/folder.h musique-1.3/src/model/folder.h --- musique-1.2.1/src/model/folder.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/model/folder.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef FOLDER_H #define FOLDER_H diff -Nru musique-1.2.1/src/model/item.h musique-1.3/src/model/item.h --- musique-1.2.1/src/model/item.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/model/item.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef ITEM_H #define ITEM_H @@ -10,7 +30,7 @@ Q_OBJECT public: - Item(QObject *parent = 0) : QObject(parent), id(0) { }; + Item(QObject *parent = 0) : QObject(parent), id(0) { } int getId() const { return id; } void setId(int id) { this->id = id; } virtual QString getName() = 0; @@ -23,6 +43,6 @@ // This is required in order to use QPointer as a QVariant typedef QPointer ItemPointer; -Q_DECLARE_METATYPE(ItemPointer); +Q_DECLARE_METATYPE(ItemPointer) #endif // ITEM_H diff -Nru musique-1.2.1/src/model/track.cpp musique-1.3/src/model/track.cpp --- musique-1.2.1/src/model/track.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/model/track.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "track.h" #include "album.h" #include "artist.h" @@ -343,6 +363,13 @@ return absolutePath; } +QString Track::getLyricsLocation() { + QString l = Database::getFilesLocation(); + if (artist) l += artist->getHash(); + l += QLatin1String("/_lyrics/") + getHash(); + return l; +} + void Track::getLyrics() { #ifdef APP_MAC_STORE_NO bool haveStyle = (QFile::exists(qApp->applicationDirPath() + "/../Resources/style.css")); @@ -351,17 +378,7 @@ } #endif - QString artistName; - if (artist) artistName = artist->getName(); - - // read from cache - const QString storageLocation = - QDesktopServices::storageLocation(QDesktopServices::DataLocation) - + "/lyrics"; - QString filePath = storageLocation; - if (artist) filePath += "/" + artist->getHash(); - filePath += "/" + getHash(); - QFile file(filePath); + QFile file(getLyricsLocation()); if (file.exists()) { if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { qDebug() << "Cannot open file" << file.fileName(); @@ -372,6 +389,9 @@ } } + QString artistName; + if (artist) artistName = artist->getName(); + // http://lyrics.wikia.com/LyricWiki:REST QUrl url = QString( "http://lyrics.wikia.com/api.php?func=getSong&artist=%1&song=%2&fmt=xml") @@ -408,8 +428,8 @@ void Track::scrapeLyrics(QByteArray bytes) { QString lyrics = QString::fromUtf8(bytes); - int pos = lyrics.indexOf( "'lyricbox'" ); + if (pos == -1) return; int startPos = lyrics.indexOf( ">", pos ) + 1; int endPos = lyrics.indexOf( "", startPos ); int otherDivPos = lyrics.indexOf( "getHash(); - QDir dir; - dir.mkpath(filePath); - filePath += "/" + getHash(); + QString filePath = getLyricsLocation(); + QDir().mkpath(QFileInfo(filePath).absolutePath()); QFile file(filePath); if (!file.open(QIODevice::WriteOnly)) { qDebug() << "Error opening file for writing" << file.fileName(); diff -Nru musique-1.2.1/src/model/track.h musique-1.3/src/model/track.h --- musique-1.2.1/src/model/track.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/model/track.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef TRACK_H #define TRACK_H @@ -89,6 +109,7 @@ void readLyricsFromTags(); private: + QString getLyricsLocation(); static QString getHash(QString); static QHash cache; diff -Nru musique-1.2.1/src/networkaccess.cpp musique-1.3/src/networkaccess.cpp --- musique-1.2.1/src/networkaccess.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/networkaccess.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "networkaccess.h" #include "constants.h" #include diff -Nru musique-1.2.1/src/networkaccess.h musique-1.3/src/networkaccess.h --- musique-1.2.1/src/networkaccess.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/networkaccess.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef NETWORKACCESS_H #define NETWORKACCESS_H diff -Nru musique-1.2.1/src/playlistitemdelegate.cpp musique-1.3/src/playlistitemdelegate.cpp --- musique-1.2.1/src/playlistitemdelegate.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/playlistitemdelegate.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "playlistitemdelegate.h" #include "model/track.h" #include "model/album.h" @@ -27,7 +47,8 @@ if (previousTrack) { const TrackPointer trackPointer = index.data(Playlist::DataObjectRole).value(); Track *track = trackPointer.data(); - if (previousTrack->getAlbum() != track->getAlbum()) { + if (previousTrack->getAlbum() != track->getAlbum() + || previousTrack->getArtist() != track->getArtist()) { return QSize(ITEM_HEIGHT*2, ITEM_HEIGHT*2); } } @@ -45,15 +66,22 @@ paintTrack(painter, option, index); } -QPixmap PlaylistItemDelegate::createPlayIcon() const { - QIcon icon = Utils::icon("media-playback-start"); - return icon.pixmap(16, 16); +const QPixmap &PlaylistItemDelegate::getPlayIcon(const QStyleOptionViewItem& option) const { + static QPixmap playIcon; + if (playIcon.isNull()) { + QColor highlightColor = option.palette.color(QPalette::Highlight); + QColor color = QColor::fromHsv(highlightColor.hue(), 255, 96); + QIcon icon = Utils::tintedIcon("media-playback-start", color, QList() << QSize(16, 16)); + playIcon = icon.pixmap(16, 16); + } + return playIcon; } -QPixmap PlaylistItemDelegate::getPlayIcon() const { +const QPixmap &PlaylistItemDelegate::getSelectedPlayIcon() const { static QPixmap playIcon; if (playIcon.isNull()) { - playIcon = createPlayIcon(); + QIcon icon = Utils::tintedIcon("media-playback-start", Qt::white, QList() << QSize(16, 16)); + playIcon = icon.pixmap(16, 16); } return playIcon; } @@ -105,17 +133,15 @@ if (isActive) { if (!isSelected) paintActiveOverlay(painter, option, line); - QFont boldFont = painter->font(); - boldFont.setBold(true); - painter->setFont(boldFont); // play icon - painter->drawPixmap(PADDING*2, (ITEM_HEIGHT - 16) / 2, 16, 16, getPlayIcon()); + QPixmap p = isSelected ? getSelectedPlayIcon() : getPlayIcon(option); + painter->drawPixmap(PADDING*1.5, (ITEM_HEIGHT - 16) / 2, 16, 16, p); } else { paintTrackNumber(painter, option, line, track); } // qDebug() << "painting" << track; - paintTrackTitle(painter, option, line, track); + paintTrackTitle(painter, option, line, track, isActive); paintTrackLength(painter, option, line, track); // separator @@ -126,102 +152,104 @@ } void PlaylistItemDelegate::paintAlbumHeader( - QPainter* painter, const QStyleOptionViewItem& option, QRect line, Track* track) const { + QPainter* painter, const QStyleOptionViewItem& option, + const QRect & line, Track* track) const { QString headerTitle; Album *album = track->getAlbum(); if (album) headerTitle = album->getTitle(); Artist *artist = track->getArtist(); - if (artist) headerTitle += " - " + artist->getName(); + if (artist) { + if (!headerTitle.isEmpty()) headerTitle += " - "; + headerTitle += artist->getName(); + } painter->save(); - // cover background - /* - QImage p = album->getPhoto(); - if (!p.isNull()) { - painter->drawTiledPixmap(line, QPixmap::fromImage(p)); - QLinearGradient linearGrad(0, 0, 0, line.height()); - linearGrad.setColorAt(0, QColor(0,0,0, 96)); - linearGrad.setColorAt(1, QColor(0,0,0, 64)); - painter->fillRect(line, QBrush(linearGrad)); - } else { - QLinearGradient linearGrad(0, 0, 0, line.height()); - linearGrad.setColorAt(0, option.palette.color(QPalette::Mid)); - linearGrad.setColorAt(1, option.palette.midlight().color()); - painter->fillRect(line, QBrush(linearGrad)); - }*/ - - QLinearGradient linearGrad(0, 0, 0, line.height()); -#ifdef APP_MAC - linearGrad.setColorAt(0, QColor(0x99, 0x99, 0x99, 0xFF)); - linearGrad.setColorAt(1, QColor(0xCC, 0xCC, 0xCC, 0xFF)); -#else - linearGrad.setColorAt(0, option.palette.color(QPalette::Mid)); - linearGrad.setColorAt(1, option.palette.color(QPalette::Midlight)); -#endif - painter->fillRect(line, QBrush(linearGrad)); + const int h = line.height(); - // borders - // painter->setPen(option.palette.color(QPalette::Light)); - // painter->drawLine(0, 0, line.width(), 0); - painter->setPen(option.palette.color(QPalette::Mid)); + static const int saturation = 24; + static const int value = 192; + QColor highlightColor = option.palette.color(QPalette::Highlight); + QColor topColor = QColor::fromHsv(highlightColor.hue(), saturation, value); + QColor bottomColor = QColor::fromHsv(topColor.hue(), saturation, value - 16); + QLinearGradient linearGradient(0, 0, 0, h); + linearGradient.setColorAt(0.0, topColor); + linearGradient.setColorAt(1.0, bottomColor); + painter->fillRect(line, linearGradient); + + // border + QColor borderColor = QColor::fromHsv(topColor.hue(), saturation, value - 32); + painter->setPen(borderColor); painter->drawLine(0, line.height()-1, line.width(), line.height()-1); + if (album) { + QPixmap p = album->getThumb(); + if (!p.isNull()) { + p = p.scaled(h, h, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + painter->drawPixmap(0, 0, p); + painter->drawLine(h, 0, h, h-1); + } + } else if (artist) { + QPixmap p = artist->getPhoto(); + if (!p.isNull()) { + p = p.scaled(h, h, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + painter->drawPixmap(0, 0, p); + painter->drawLine(h, 0, h, h-1); + } + } + + // album length + /* + if (album) { + // TODO this is the album duration, but not necessarily what we have in the playlist + QString albumLength = album->formattedDuration(); + QFont normalFont = painter->font(); + normalFont.setBold(false); + // normalFont.setPointSize(boldFont.pointSize()*.9); + painter->setFont(normalFont); + + // text shadow + painter->setPen(QColor(0, 0, 0, 96)); + painter->drawText(line.translated(-PADDING, -1), Qt::AlignRight | Qt::AlignVCenter, albumLength); + + painter->setPen(Qt::white); + painter->drawText(line.translated(-PADDING, 0), Qt::AlignRight | Qt::AlignVCenter, albumLength); + } + */ + // font QFont boldFont = painter->font(); boldFont.setBold(true); painter->setFont(boldFont); + const QFontMetrics fontMetrics = QFontMetrics(boldFont); + static const int textLeft = h + fontMetrics.height()/2; + // text size - QFontMetrics fontMetrics = QFontMetrics(painter->font()); QSize trackStringSize(fontMetrics.size(Qt::TextSingleLine, headerTitle)); int width = trackStringSize.width(); - const int maxWidth = line.width() - 80; + const int maxWidth = line.width() - textLeft; if (width > maxWidth) width = maxWidth; - QPoint textLoc(15, 0); + QPoint textLoc(textLeft, 0); QRect trackTextBox(textLoc.x(), textLoc.y(), width, line.height()); headerTitle = fontMetrics.elidedText(headerTitle, Qt::ElideRight, trackTextBox.width()); // text shadow - painter->setPen(QColor(0, 0, 0, 64)); + painter->setPen(QColor(0, 0, 0, 96)); painter->drawText(trackTextBox.translated(0, -1), Qt::AlignLeft | Qt::AlignVCenter, headerTitle); // text - painter->setPen(option.palette.color(QPalette::Light)); + painter->setPen(Qt::white); painter->drawText(trackTextBox, Qt::AlignLeft | Qt::AlignVCenter, headerTitle); - - // album length - if (album) { - // TODO this is the album duration, but not necessarily what we have in the playlist - int totalLength = Track::getTotalLength(album->getTracks()); - QString albumLength; - if (totalLength > 3600) - albumLength = QTime().addSecs(totalLength).toString("h:mm:ss"); - else - albumLength = QTime().addSecs(totalLength).toString("m:ss"); - QFont normalFont = painter->font(); - normalFont.setBold(false); - // normalFont.setPointSize(boldFont.pointSize()*.9); - painter->setFont(normalFont); - - // text shadow - painter->setPen(QColor(0, 0, 0, 64)); - painter->drawText(line.translated(-PADDING, -1), Qt::AlignRight | Qt::AlignVCenter, albumLength); - - painter->setPen(option.palette.color(QPalette::Light)); - painter->drawText(line.translated(-PADDING, 0), Qt::AlignRight | Qt::AlignVCenter, albumLength); - } - - // TODO album year painter->restore(); } -void PlaylistItemDelegate::paintTrackNumber( - QPainter* painter, const QStyleOptionViewItem& option, QRect line, Track* track) const { +void PlaylistItemDelegate::paintTrackNumber(QPainter* painter, const QStyleOptionViewItem& option, + const QRect &line, Track* track) const { const int trackNumber = track->getNumber(); if (trackNumber < 1) return; @@ -235,7 +263,7 @@ painter->setFont(boldFont); QString trackString = QString("%1").arg(trackNumber, 2, 10, QChar('0')); QSize trackStringSize(QFontMetrics(painter->font()).size( Qt::TextSingleLine, trackString)); - QPoint textLoc(PADDING*2, 0); + QPoint textLoc(PADDING*1.5, 0); QRect trackTextBox(textLoc.x(), textLoc.y(), trackStringSize.width(), line.height()); // rounded rect @@ -243,27 +271,35 @@ trackRoundedRect.setY((line.height() - trackStringSize.height()) / 2); trackRoundedRect.setHeight(trackStringSize.height()); trackRoundedRect.adjust(-PADDING/2, -PADDING/3, PADDING/2, PADDING/3); - painter->setOpacity(.5); + painter->setOpacity(.25); painter->setRenderHints(QPainter::Antialiasing, true); painter->setBrush(option.palette.window()); painter->setPen(option.palette.WindowText); painter->drawRoundedRect(trackRoundedRect, PADDING/2, PADDING/2, Qt::AbsoluteSize); + painter->setOpacity(.5); painter->drawText(trackTextBox, Qt::AlignCenter, trackString); painter->restore(); } -void PlaylistItemDelegate::paintTrackTitle( - QPainter* painter, const QStyleOptionViewItem& option, QRect line, Track* track) const { +void PlaylistItemDelegate::paintTrackTitle(QPainter* painter, const QStyleOptionViewItem& option, + const QRect &line, Track* track, bool isActive) const { + + painter->save(); + if (isActive) { + QFont boldFont = painter->font(); + boldFont.setBold(true); + painter->setFont(boldFont); + } QFontMetrics fontMetrics = QFontMetrics(painter->font()); QString trackTitle = track->getTitle(); QSize trackStringSize(fontMetrics.size(Qt::TextSingleLine, trackTitle)); - QPoint textLoc(PADDING*6, 0); + QPoint textLoc(PADDING*4.5, 0); int width = trackStringSize.width(); const int maxWidth = line.width() - 110; @@ -273,10 +309,11 @@ trackTitle = fontMetrics.elidedText(trackTitle, Qt::ElideRight, trackTextBox.width()); painter->drawText(trackTextBox, Qt::AlignLeft | Qt::AlignVCenter, trackTitle); + painter->restore(); } -void PlaylistItemDelegate::paintTrackLength( - QPainter* painter, const QStyleOptionViewItem& option, QRect line, Track* track) const { +void PlaylistItemDelegate::paintTrackLength(QPainter* painter, const QStyleOptionViewItem& option, + const QRect &line, Track* track) const { QString trackLength; if (track->getLength() > 3600) @@ -288,16 +325,15 @@ QPoint textLoc(PADDING*10, 0); QRect trackTextBox(textLoc.x(), textLoc.y(), line.width() - textLoc.x() - PADDING, line.height()); - const bool isSelected = option.state & QStyle::State_Selected; painter->save(); - if (!isSelected) painter->setPen(option.palette.color(QPalette::Mid)); + painter->setOpacity(.5); painter->drawText(trackTextBox, Qt::AlignRight | Qt::AlignVCenter, trackLength); painter->restore(); } void PlaylistItemDelegate::paintActiveOverlay( - QPainter *painter, const QStyleOptionViewItem& option, QRect line) const { + QPainter *painter,const QStyleOptionViewItem& option, const QRect &line) const { QColor highlightColor = option.palette.color(QPalette::Highlight); QColor backgroundColor = option.palette.color(QPalette::Base); @@ -324,7 +360,7 @@ painter->restore(); } -void PlaylistItemDelegate::paintSelectedOverlay( QPainter *painter, QRect line) const { +void PlaylistItemDelegate::paintSelectedOverlay( QPainter *painter, const QRect &line) const { QColor color1 = QColor::fromRgb(0x69, 0xa6, 0xd9); QColor color2 = QColor::fromRgb(0x14, 0x6b, 0xd4); painter->save(); diff -Nru musique-1.2.1/src/playlistitemdelegate.h musique-1.3/src/playlistitemdelegate.h --- musique-1.2.1/src/playlistitemdelegate.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/playlistitemdelegate.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef PLAYLISTITEMDELEGATE_H #define PLAYLISTITEMDELEGATE_H @@ -15,15 +35,20 @@ void paint( QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const; private: - QPixmap createPlayIcon() const; - QPixmap getPlayIcon() const; + const QPixmap &getPlayIcon(const QStyleOptionViewItem &option) const; + const QPixmap &getSelectedPlayIcon() const; void paintTrack(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; - void paintAlbumHeader(QPainter* painter, const QStyleOptionViewItem& option, QRect line, Track* track) const; - void paintTrackNumber(QPainter* painter, const QStyleOptionViewItem& option, QRect line, Track* track) const; - void paintTrackTitle(QPainter* painter, const QStyleOptionViewItem& option, QRect line, Track* track) const; - void paintTrackLength(QPainter* painter, const QStyleOptionViewItem& option, QRect line, Track* track) const; - void paintActiveOverlay(QPainter *painter, const QStyleOptionViewItem& option, QRect line) const; - void paintSelectedOverlay( QPainter *painter, QRect line) const; + void paintAlbumHeader(QPainter* painter, const QStyleOptionViewItem& option, + const QRect &line, Track* track) const; + void paintTrackNumber(QPainter* painter, const QStyleOptionViewItem& option, + const QRect &line, Track* track) const; + void paintTrackTitle(QPainter* painter, const QStyleOptionViewItem& option, + const QRect &line, Track* track, bool isActive) const; + void paintTrackLength(QPainter* painter, const QStyleOptionViewItem& option, + const QRect &line, Track* track) const; + void paintActiveOverlay(QPainter *painter, const QStyleOptionViewItem& option, + const QRect &line) const; + void paintSelectedOverlay(QPainter *painter, const QRect &line) const; static const int PADDING; static int ITEM_HEIGHT; diff -Nru musique-1.2.1/src/playlistmodel.cpp musique-1.3/src/playlistmodel.cpp --- musique-1.2.1/src/playlistmodel.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/playlistmodel.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,10 +1,30 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include #include "playlistmodel.h" #include "trackmimedata.h" #include "model/album.h" #include "model/artist.h" #include "mainwindow.h" -#ifdef APP_ACTIVATION +#ifdef APP_ACTIVATION_NO #include "activation.h" static const int demoMaxTracks = 15; static const QString demoMessage = @@ -48,7 +68,7 @@ return QVariant(); } -void PlaylistModel::setActiveRow(int row, bool manual) { +void PlaylistModel::setActiveRow(int row, bool manual, bool startPlayback) { if (!rowExists(row)) return; const int oldActiveRow = activeRow; @@ -65,7 +85,7 @@ QModelIndex newIndex = index(activeRow, 0, QModelIndex()); emit dataChanged(newIndex, newIndex); - emit activeRowChanged(row, manual); + emit activeRowChanged(row, manual, startPlayback); } @@ -100,6 +120,21 @@ } void PlaylistModel::skipForward() { + Track *nextTrack = getNextTrack(); + if (nextTrack) { + int nextRow = tracks.indexOf(nextTrack); + setActiveRow(nextRow); + } else { + activeRow = -1; + activeTrack = 0; + foreach(Track *track, playedTracks) + track->setPlayed(false); + playedTracks.clear(); + emit playlistFinished(); + } +} + +Track* PlaylistModel::getNextTrack() { QSettings settings; const bool shuffle = settings.value("shuffle").toBool(); const bool repeat = settings.value("repeat").toBool(); @@ -147,17 +182,7 @@ } - if (nextTrack) { - int nextRow = tracks.indexOf(nextTrack); - setActiveRow(nextRow); - } else { - activeRow = -1; - activeTrack = 0; - foreach(Track *track, playedTracks) - track->setPlayed(false); - playedTracks.clear(); - emit playlistFinished(); - } + return nextTrack; } Track* PlaylistModel::trackAt(int row) const { @@ -191,7 +216,7 @@ if (!tracks.empty()) { -#ifdef APP_ACTIVATION +#ifdef APP_ACTIVATION_NO bool activated = Activation::instance().isActivated(); if (!activated && this->tracks.size() >= demoMaxTracks) { MainWindow::instance()->showDemoDialog(demoMessage); @@ -203,7 +228,7 @@ this->tracks.size() + tracks.size() - 1); foreach(Track* track, tracks) { -#ifdef APP_ACTIVATION +#ifdef APP_ACTIVATION_NO if (!activated && this->tracks.size() >= demoMaxTracks) { endInsertRows(); MainWindow::instance()->showDemoDialog(demoMessage); @@ -228,13 +253,13 @@ activeRow = -1; emit layoutChanged(); emit reset(); - emit activeRowChanged(-1, false); + emit activeRowChanged(-1, false, false); } // --- item removal bool PlaylistModel::removeRows(int position, int rows, const QModelIndex &parent) { - qDebug() << __PRETTY_FUNCTION__ << position << rows << parent; + // qDebug() << __PRETTY_FUNCTION__ << position << rows << parent; // return false; @@ -346,7 +371,7 @@ } else insert = true; const int targetRow = beginRow + counter; tracks.insert(targetRow, track); -#ifdef APP_ACTIVATION +#ifdef APP_ACTIVATION_NO if (!Activation::instance().isActivated() && tracks.size() >= demoMaxTracks) { MainWindow::instance()->showDemoDialog(demoMessage); layoutChanged(); diff -Nru musique-1.2.1/src/playlistmodel.h musique-1.3/src/playlistmodel.h --- musique-1.2.1/src/playlistmodel.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/playlistmodel.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef PLAYLISTMODEL_H #define PLAYLISTMODEL_H @@ -38,7 +58,7 @@ const QModelIndex &parent); // custom methods - void setActiveRow(int row, bool manual = false); + void setActiveRow(int row, bool manual = false, bool startPlayback = true); bool rowExists( int row ) const { return (( row >= 0 ) && ( row < tracks.size() ) ); } void removeIndexes(QModelIndexList &indexes); int rowForTrack(Track* track); @@ -59,10 +79,11 @@ void clear(); void skipBackward(); void skipForward(); + Track* getNextTrack(); void trackRemoved(); signals: - void activeRowChanged(int, bool); + void activeRowChanged(int row, bool manual, bool startPlayback); void needSelectionFor(QList); void itemChanged(int total); void playlistFinished(); diff -Nru musique-1.2.1/src/playlistview.cpp musique-1.3/src/playlistview.cpp --- musique-1.2.1/src/playlistview.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/playlistview.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "playlistview.h" #include "model/track.h" #include "playlistmodel.h" @@ -170,7 +190,7 @@ QPen textPen; textPen.setBrush(palette().mid()); painter.setPen(textPen); - painter.setFont(FontUtils::bigBold()); + painter.setFont(FontUtils::biggerBold()); QSize textSize(QFontMetrics(painter.font()).size(Qt::TextSingleLine, emptyMessage)); QPoint centerPoint((this->width()-textSize.width())/2, diff -Nru musique-1.2.1/src/playlistview.h musique-1.3/src/playlistview.h --- musique-1.2.1/src/playlistview.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/playlistview.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef PLAYLISTVIEW_H #define PLAYLISTVIEW_H diff -Nru musique-1.2.1/src/playlistwidget.cpp musique-1.3/src/playlistwidget.cpp --- musique-1.2.1/src/playlistwidget.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/playlistwidget.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,6 +1,27 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "playlistwidget.h" #include "droparea.h" #include "playlistview.h" +#include "mainwindow.h" PlaylistArea::PlaylistArea( PlaylistView *playlistView, DropArea *dropArea, QWidget *parent) @@ -15,3 +36,8 @@ setLayout(layout); } + +void PlaylistArea::resizeEvent(QResizeEvent *e) { + int w = e->size().width(); + MainWindow::instance()->getStatusToolbar()->setMinimumWidth(w); +} diff -Nru musique-1.2.1/src/playlistwidget.h musique-1.3/src/playlistwidget.h --- musique-1.2.1/src/playlistwidget.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/playlistwidget.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef PLAYLISTWIDGET_H #define PLAYLISTWIDGET_H @@ -8,11 +28,14 @@ class PlaylistArea : public QWidget { - Q_OBJECT; + Q_OBJECT public: PlaylistArea(PlaylistView *playlistView, DropArea *dropArea, QWidget *parent); +protected: + void resizeEvent(QResizeEvent *e); + }; #endif // PLAYLISTWIDGET_H diff -Nru musique-1.2.1/src/searchcompletion.cpp musique-1.3/src/searchcompletion.cpp --- musique-1.2.1/src/searchcompletion.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/searchcompletion.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "searchcompletion.h" #include "networkaccess.h" diff -Nru musique-1.2.1/src/searchcompletion.h musique-1.3/src/searchcompletion.h --- musique-1.2.1/src/searchcompletion.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/searchcompletion.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef GOOGLESUGGEST_H #define GOOGLESUGGEST_H diff -Nru musique-1.2.1/src/searchmodel.cpp musique-1.3/src/searchmodel.cpp --- musique-1.2.1/src/searchmodel.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/searchmodel.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "searchmodel.h" #include "model/artist.h" diff -Nru musique-1.2.1/src/searchmodel.h musique-1.3/src/searchmodel.h --- musique-1.2.1/src/searchmodel.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/searchmodel.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef SEARCHMODEL_H #define SEARCHMODEL_H diff -Nru musique-1.2.1/src/searchview.cpp musique-1.3/src/searchview.cpp --- musique-1.2.1/src/searchview.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/searchview.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "searchview.h" #include "fontutils.h" @@ -36,7 +56,7 @@ QPen textPen; textPen.setBrush(palette().mid()); painter.setPen(textPen); - painter.setFont(FontUtils::bigBold()); + painter.setFont(FontUtils::biggerBold()); QSize textSize(QFontMetrics(painter.font()).size(Qt::TextSingleLine, emptyMessage)); QPoint centerPoint((this->width()-textSize.width())/2, diff -Nru musique-1.2.1/src/searchview.h musique-1.3/src/searchview.h --- musique-1.2.1/src/searchview.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/searchview.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef SEARCHVIEW_H #define SEARCHVIEW_H diff -Nru musique-1.2.1/src/segmentedcontrol.cpp musique-1.3/src/segmentedcontrol.cpp --- musique-1.2.1/src/segmentedcontrol.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/segmentedcontrol.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "segmentedcontrol.h" #include "fontutils.h" @@ -155,7 +175,7 @@ } int SegmentedControl::calculateButtonWidth (void) const { - QFont smallerBoldFont = FontUtils::smallBold(); + QFont smallerBoldFont = FontUtils::smallerBold(); QFontMetrics fontMetrics(smallerBoldFont); int tmpItemWidth, itemWidth = 0; foreach (QAction *action, d->actionList) { @@ -232,7 +252,7 @@ painter->drawRect(0, 0, width, height - 1); #endif - painter->setFont(FontUtils::smallBold()); + painter->setFont(FontUtils::smallerBold()); // text shadow painter->setPen(QColor(0, 0, 0, 128)); diff -Nru musique-1.2.1/src/segmentedcontrol.h musique-1.3/src/segmentedcontrol.h --- musique-1.2.1/src/segmentedcontrol.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/segmentedcontrol.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef SEGMENTEDCONTROL_H #define SEGMENTEDCONTROL_H diff -Nru musique-1.2.1/src/spacer.cpp musique-1.3/src/spacer.cpp --- musique-1.2.1/src/spacer.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/spacer.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "spacer.h" Spacer::Spacer(QWidget *parent) : QWidget(parent) { } diff -Nru musique-1.2.1/src/spacer.h musique-1.3/src/spacer.h --- musique-1.2.1/src/spacer.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/spacer.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef SPACER_H #define SPACER_H diff -Nru musique-1.2.1/src/suggester.h musique-1.3/src/suggester.h --- musique-1.2.1/src/suggester.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/suggester.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef SUGGESTER_H #define SUGGESTER_H diff -Nru musique-1.2.1/src/trackitemdelegate.cpp musique-1.3/src/trackitemdelegate.cpp --- musique-1.2.1/src/trackitemdelegate.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/trackitemdelegate.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "trackitemdelegate.h" #include "finderwidget.h" #include "model/track.h" diff -Nru musique-1.2.1/src/trackitemdelegate.h musique-1.3/src/trackitemdelegate.h --- musique-1.2.1/src/trackitemdelegate.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/trackitemdelegate.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef TRACKITEMDELEGATE_H #define TRACKITEMDELEGATE_H diff -Nru musique-1.2.1/src/tracklistview.cpp musique-1.3/src/tracklistview.cpp --- musique-1.2.1/src/tracklistview.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/tracklistview.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "tracklistview.h" #include "trackitemdelegate.h" #include "database.h" diff -Nru musique-1.2.1/src/tracklistview.h musique-1.3/src/tracklistview.h --- musique-1.2.1/src/tracklistview.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/tracklistview.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef TRACKLISTVIEW_H #define TRACKLISTVIEW_H diff -Nru musique-1.2.1/src/trackmimedata.cpp musique-1.3/src/trackmimedata.cpp --- musique-1.2.1/src/trackmimedata.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/trackmimedata.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "trackmimedata.h" TrackMimeData::TrackMimeData() { } diff -Nru musique-1.2.1/src/trackmimedata.h musique-1.3/src/trackmimedata.h --- musique-1.2.1/src/trackmimedata.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/trackmimedata.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef TRACKMIMEDATA_H #define TRACKMIMEDATA_H diff -Nru musique-1.2.1/src/tracksqlmodel.cpp musique-1.3/src/tracksqlmodel.cpp --- musique-1.2.1/src/tracksqlmodel.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/tracksqlmodel.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "tracksqlmodel.h" TrackSqlModel::TrackSqlModel(QObject *parent) : BaseSqlModel(parent) { diff -Nru musique-1.2.1/src/tracksqlmodel.h musique-1.3/src/tracksqlmodel.h --- musique-1.2.1/src/tracksqlmodel.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/tracksqlmodel.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef TRACKSQLMODEL_H #define TRACKSQLMODEL_H diff -Nru musique-1.2.1/src/updatechecker.cpp musique-1.3/src/updatechecker.cpp --- musique-1.2.1/src/updatechecker.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/updatechecker.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "updatechecker.h" #include "networkaccess.h" #include "constants.h" diff -Nru musique-1.2.1/src/updatechecker.h musique-1.3/src/updatechecker.h --- musique-1.2.1/src/updatechecker.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/updatechecker.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef UPDATECHECKER_H #define UPDATECHECKER_H diff -Nru musique-1.2.1/src/utils.cpp musique-1.3/src/utils.cpp --- musique-1.2.1/src/utils.cpp 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/utils.cpp 2013-10-11 07:42:11.000000000 +0000 @@ -1,32 +1,96 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #include "utils.h" -#ifndef Q_WS_X11 +#ifdef APP_EXTRA #include "extra.h" #endif -QIcon getIcon(const QString &name) { -#ifdef Q_WS_X11 - return QIcon::fromTheme(name); -#else - return Extra::getIcon(name); -#endif +QIcon Utils::themeIcon(const QString &name) { + if (QIcon::hasThemeIcon(name)) + return QIcon::fromTheme(name); + else + return QIcon(QString(":/images/%1.png").arg(name)); } QIcon Utils::icon(const QString &name) { -#ifdef Q_WS_X11 - QString themeName = qApp->property("style").toString(); - if (themeName == QLatin1String("Ambiance")) - return icon(QStringList() << name + "-symbolic" << name); - else return getIcon(name); -#else +#ifdef APP_EXTRA return Extra::getIcon(name); +#else + return themeIcon(name); #endif } QIcon Utils::icon(const QStringList &names) { QIcon icon; foreach (QString name, names) { - icon = getIcon(name); + icon = Utils::themeIcon(name); if (!icon.availableSizes().isEmpty()) break; } return icon; } + +QIcon Utils::tintedIcon(const QString &name, const QColor &color, QList sizes) { + QIcon i = icon(name); + QIcon t; + if (sizes.isEmpty()) sizes = i.availableSizes(); + foreach (QSize size, sizes) { + QPixmap pixmap = i.pixmap(size); + QImage tintedImage = tinted(pixmap.toImage(), color); + t.addPixmap(QPixmap::fromImage(tintedImage)); + } + return t; +} + +QImage Utils::grayscaled(const QImage &image) { + QImage img = image; + int pixels = img.width() * img.height(); + unsigned int *data = (unsigned int *)img.bits(); + for (int i = 0; i < pixels; ++i) { + int val = qGray(data[i]); + data[i] = qRgba(val, val, val, qAlpha(data[i])); + } + return img; +} + +QImage Utils::tinted(const QImage &image, const QColor &color, + QPainter::CompositionMode mode) { + QImage img(image.size(), QImage::Format_ARGB32_Premultiplied); + QPainter painter(&img); + painter.drawImage(0, 0, grayscaled(image)); + painter.setCompositionMode(mode); + painter.fillRect(img.rect(), color); + painter.end(); + img.setAlphaChannel(image.alphaChannel()); + return img; +} + +void Utils::setupAction(QAction *action) { + // never autorepeat. + // unexperienced users tend to keep keys pressed for a "long" time + action->setAutoRepeat(false); + + // show keyboard shortcuts in the status bar + if (!action->shortcut().isEmpty()) + action->setStatusTip(action->statusTip() + + " (" + + action->shortcut().toString(QKeySequence::NativeText) + + ")"); +} diff -Nru musique-1.2.1/src/utils.h musique-1.3/src/utils.h --- musique-1.2.1/src/utils.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/utils.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef UTILS_H #define UTILS_H @@ -6,12 +26,18 @@ class Utils { public: + static QIcon themeIcon(const QString &name); static QIcon icon(const QString &name); static QIcon icon(const QStringList &names); + static QIcon tintedIcon(const QString &name, const QColor &color, + QList sizes = QList()); + static void setupAction(QAction *action); private: Utils() { } - + static QImage grayscaled(const QImage &image); + static QImage tinted(const QImage &image, const QColor &color, + QPainter::CompositionMode mode = QPainter::CompositionMode_Screen); }; #endif // UTILS_H diff -Nru musique-1.2.1/src/view.h musique-1.3/src/view.h --- musique-1.2.1/src/view.h 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/src/view.h 2013-10-11 07:42:11.000000000 +0000 @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Musique. +Copyright 2013, Flavio Tordini + +Musique 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. + +Musique 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 Musique. If not, see . + +$END_LICENSE */ + #ifndef VIEW_H #define VIEW_H diff -Nru musique-1.2.1/style.css musique-1.3/style.css --- musique-1.2.1/style.css 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/style.css 2013-10-11 07:42:11.000000000 +0000 @@ -1,71 +1,12 @@ -/* Ambiance */ +/* statusbar */ -MainWindow[style="Ambiance"] > QToolBar { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #3c3b37, stop: 1 #474641); - border-top: 1px solid #474641; +QStatusBar QToolBar { + padding:0; + spacing:0; + margin:0; + border:0; } -MainWindow[style="Ambiance"] > QToolBar QToolButton, -MainWindow[style="Ambiance"] > QToolBar QLabel { - color: #dfdbd2; -} - -MainWindow[style="Ambiance"] > QToolBar QToolButton:disabled { - color: #8f8c86; -} - -MainWindow[style="Ambiance"] > QToolBar QToolButton:hover { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #474641, stop: 1 #3c3b37); - border-radius: 5px; - border: 1px outset #3c3b37; -} - -MainWindow[style="Ambiance"] > QToolBar QToolButton:pressed, -MainWindow[style="Ambiance"] > QToolBar QToolButton:checked { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #3b3a36, stop: 1 #363531); - border-radius: 5px; - border: 1px inset #292825; -} - -MainWindow[style="Ambiance"] QSlider::groove:horizontal { - border: 1px solid #808080; - height: 8px; - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #B1B1B1, stop:1 #ccc); - border-radius: 5px; -} - -MainWindow[style="Ambiance"] QSlider::sub-page:horizontal { - border: 1px solid #808080; - height: 8px; - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #6c6c6c, stop:1 #B1B1B1); - border-radius: 5px; -} - -MainWindow[style="Ambiance"] QSlider::handle:horizontal { - border: 1px solid #5c5c5c; - width: 14px; - height: 16px; - margin: -4px 0; - border-radius: 8px; - background: qradialgradient( - cx: .5, cy: .5, - fx: .33, fy: .33, - radius: .5, - stop: 0 #fff, stop: 1 #ccc); -} - -MainWindow[style="Ambiance"] QSlider::handle:pressed { - background: qradialgradient( - cx: .5, cy: .5, - fx: .33, fy: .33, - radius: .5, - stop: 0 #ccc, stop: 1 #9c9c9c); -} - -MainWindow[style="Ambiance"] Phonon--SeekSlider QSlider::sub-page:horizontal { - border: 1px solid #808080; - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #B1B1B1, stop:1 #6c6c6c); +QStatusBar QToolButton::menu-indicator { + image: none; } diff -Nru musique-1.2.1/TODO musique-1.3/TODO --- musique-1.2.1/TODO 2013-02-03 20:22:45.000000000 +0000 +++ musique-1.3/TODO 2013-10-11 07:42:11.000000000 +0000 @@ -1,19 +1,17 @@ -# Minitunes TODO list +# Musique TODO list ## On the Radar - Embedded lyrics: http://developer.kde.org/~wheeler/taglib/api/classTagLib_1_1ID3v2_1_1UnsynchronizedLyricsFrame.html 4.8 USLT Unsynchronised lyric/text transcription +- Playlists + - Smart: All, Last played, Most played, Never played, All, [1-90]'s Music, + - User: Empty, New from play queue, New from play queue selection. ## Known issues - Album years on AudioScrobbler are mostly wrong: http://www.last.fm/group/Last.fm+Web+Services/forum/21604/_/624369 -## Bugs -- Fix long names in finder -- Artist.getTracks() albums not correctly sorted. Year-based album ordering -- Playlist: Restore selection after drag n drop - ## Sorely missing features - CUE file support - Drop area when playlist has a vertical scrollbar @@ -25,8 +23,6 @@ - Ubuntu Sound Menu integration https://wiki.ubuntu.com/SoundMenu#Music%20player%20integration http://askubuntu.com/questions/7859/which-music-players-use-the-soundmenu/7883#7883 -- Gapless playback -- CLI - Browse by Last.fm album tags (new Genres finder tab) - Queue tracks - Playlist: Restore selection after dragndrop @@ -34,10 +30,8 @@ - Finder: Highlight currently playing items (Artists, Albums, Folders) - Artist hover: show number of album, songs & total duration on the status bar - Playlist editing undo -- Scanner: Fetch album and artist images in a separate thread, outside of the scanner thread - Finder: Option to hide items with missing image - Finder: A bit of sorting & filtering on Albums and Artist views ## Funny stuff geeks may ask for - Load/Save playlists as /Playlists/[playlistname].pls. Show "Playlists" tab if there's at least one. -- Last.fm scrobbling