AmarokQuilt
Utilities
Score 66%
Last changelog:

9 years ago

* Version 0.0.2 (8 September 2008)
- Border around covers
- Screensaver support
- Picks album size with regards to screensize
- Reduces the chances of showing an album cover more than once
- Unicode support
* Version 0.0.1 (16 June 2008)
- Initial release featuring basic animations

skajoeska

8 years ago

I was trying to install this script in Amarok under Ubuntu but I got an error when running make.

$make
g++ -c -pipe -g -w -O0 -D_REENTRANT -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -I/usr/share/qt3/mkspecs/default -I. -I. -I/usr/include/qt3 -o main.o main.cpp
main.cpp:15:24: error: QApplication: No such file or directory
main.cpp:16:17: error: QTime: No such file or directory
main.cpp:17:26: error: QDesktopWidget: No such file or directory
In file included from main.cpp:20:
amarokquilt.h:18:25: error: QGraphicsView: No such file or directory
amarokquilt.h:19:26: error: QGraphicsScene: No such file or directory
amarokquilt.h:20:19: error: QThread: No such file or directory
In file included from amarokquilt.h:22,
from main.cpp:20:
nowplayingitem.h:18:19: error: QString: No such file or directory
nowplayingitem.h:19:19: error: QObject: No such file or directory
nowplayingitem.h:20:19: error: QPixmap: No such file or directory
nowplayingitem.h:21:31: error: QGraphicsPixmapItem: No such file or directory
In file included from amarokquilt.h:23,
from main.cpp:20:
albumartworkitem.h:19:21: error: QTimeLine: No such file or directory
albumartworkitem.h:20:18: error: QImage: No such file or directory
albumartworkitem.h:21:16: error: QMap: No such file or directory
In file included from amarokquilt.h:22,
from main.cpp:20:
nowplayingitem.h:25: error: expected class-name before ‘,’ token
nowplayingitem.h:25: error: expected class-name before ‘{’ token
nowplayingitem.h:26: error: ISO C++ forbids declaration of ‘Q_OBJECT’ with no type
nowplayingitem.h:32: error: ‘QTimerEvent’ has not been declared
nowplayingitem.h:38: error: ‘QString’ does not name a type
nowplayingitem.h:40: error: ‘QGraphicsPixmapItem’ does not name a type
nowplayingitem.h:41: error: ‘QGraphicsPixmapItem’ does not name a type
nowplayingitem.h:42: error: ‘QPixmap’ does not name a type
nowplayingitem.h:43: error: ‘QPixmap’ does not name a type
nowplayingitem.h:46: error: ‘QString’ does not name a type
nowplayingitem.h:47: error: ‘QString’ does not name a type
In file included from amarokquilt.h:23,
from main.cpp:20:
albumartworkitem.h:23: error: expected class-name before ‘,’ token
albumartworkitem.h:23: error: expected class-name before ‘{’ token
albumartworkitem.h:24: error: ISO C++ forbids declaration of ‘Q_OBJECT’ with no type
albumartworkitem.h:30: error: expected `:' before ‘slots’
albumartworkitem.h:31: error: expected primary-expression before ‘void’
albumartworkitem.h:31: error: ISO C++ forbids declaration of ‘slots’ with no type
albumartworkitem.h:31: error: expected ‘;’ before ‘void’
albumartworkitem.h:34: error: expected `:' before ‘slots’
albumartworkitem.h:35: error: expected primary-expression before ‘void’
albumartworkitem.h:35: error: ISO C++ forbids declaration of ‘slots’ with no type
albumartworkitem.h:35: error: expected ‘;’ before ‘void’
albumartworkitem.h:41: error: ‘QPixmap’ does not name a type
albumartworkitem.h:42: error: ‘QPixmap’ does not name a type
albumartworkitem.h:43: error: ‘QTimeLine’ does not name a type
albumartworkitem.h:50: error: ISO C++ forbids declaration of ‘QMap’ with no type
albumartworkitem.h:50: error: expected ‘;’ before ‘<’ token
albumartworkitem.h:51: error: ‘QString’ does not name a type
albumartworkitem.h:52: error: ‘QString’ does not name a type
In file included from main.cpp:20:
amarokquilt.h:25: error: expected class-name before ‘{’ token
amarokquilt.h:26: error: ISO C++ forbids declaration of ‘Q_OBJECT’ with no type
amarokquilt.h:29: error: expected `)' before ‘window’
amarokquilt.h:30: error: ‘QTimerEvent’ has not been declared
amarokquilt.h:34: error: ‘QGraphicsScene’ does not name a type
amarokquilt.h:35: error: ISO C++ forbids declaration of ‘QList’ with no type
amarokquilt.h:35: error: expected ‘;’ before ‘<’ token
amarokquilt.h:39: error: expected class-name before ‘{’ token
main.cpp: In function ‘int main(int, char**)’:
main.cpp:23: error: ‘QApplication’ was not declared in this scope
main.cpp:23: error: expected `;' before ‘app’
main.cpp:24: error: ‘QTime’ was not declared in this scope
main.cpp:24: error: ‘QTime’ is not a class or namespace
main.cpp:26: error: ‘QString’ was not declared in this scope
main.cpp:26: error: expected `;' before ‘mode’
main.cpp:27: error: ‘WId’ was not declared in this scope
main.cpp:27: error: expected `;' before ‘window’
main.cpp:29: error: ‘app’ was not declared in this scope
main.cpp:30: error: ‘mode’ was not declared in this scope
main.cpp:32: error: ‘mode’ was not declared in this scope
main.cpp:33: error: ‘window’ was not declared in this scope
main.cpp:33: error: ‘QApplication’ is not a class or namespace
main.cpp:34: error: ‘app’ was not declared in this scope
main.cpp:35: error: ‘window’ was not declared in this scope
main.cpp:37: error: ‘window’ was not declared in this scope
main.cpp:38: error: ‘class AmarokQuilt’ has no member named ‘show’
main.cpp:40: error: ‘app’ was not declared in this scope
make: *** [main.o] Error 1

make: *** [main.o] Error 127

do you have any ideas on how to get it to work for ubuntu? thanks.

Report

C

keegancsmith

8 years ago

Hi, you need to use qt4 dev tools. Not sure what the package is called in ubuntu.

Report

skajoeska

8 years ago

Thanks. That got it to compile. Now I have the problem of that it displays the current playing song and album art fine but the album art in the background is the same one over and over.

Also the readme says to add amarokquilt.desktop to the kde screensaver location. I don't have an amarokquilt.desktop file. Do I just rename the amarokquilt executable to a .desktop extension? or am I missing something?

thanks.

Report

C

keegancsmith

8 years ago

I'll check out the cover issue. Oops, it seems i forgot to include the desktop file. Here is a link to it: http://freehg.org/u/casted/amarokquilt/raw-file/21cdf5c2436a/src/AmarokQuilt.desktop

Report

skajoeska

8 years ago

Thanks for the link.

I got the album covers to work properly. It seems amarokquilt was referencing ~/.kde/share/apps/amarok/albumcovers/large which only had the one picture that kept showing up. In the albumcovers directory was the folder "cache" (~/.kde/share/apps/amarok/albumcovers/cache" which had just some of my album art. So I made a link to "cache" and renamed it "large" and voila! I got more than one album art.

now my problem is finding the rest of my album art. I also can't get amarokquilt.desktop to show up as a screensaver in gnome-screensaver so I can only use it in fullscreen mode, not a screensaver.

thanks for the help. great program.

p.s.
is there a way to change the number of columns/rows that appear?

Report

C

keegancsmith

8 years ago

Cool :) I think i need to get the images from more than one folder.

The only way currently to change the number of rows and columns is to edit

int item_size = std::min(width / 12, height / 8);

in amarokquilt.cpp

that roughly translates to 12 columns and 8 rows

Report

mattsmith1616

7 years ago

Could update this link? It doesn't appear to be working. I would love to use this as a screensaver.. Thanks!!

Report

sokopok

9 years ago

Your code only checks covers downloaded by amarok. I modified the source so it also uses the covers stored inside the audio files. If you like you can merge this with your version of the code.
Seems like I can't attch files here, so I'll just paste the modifications below. The only changes are in AlbumArtworkItem::_updateArtwork()

-----------------------------------

void AlbumArtworkItem::_updateArtwork() {
// Get a list of cached amarok albums
QStringList coverList;

// get covers from "albumcovers/large"
QDir dirLarge(QDir::homePath() + "/.kde/share/apps/amarok/albumcovers/large/");
foreach(QString fileName, dirLarge.entryList(QDir::Files)) {
coverList << "large/"+ fileName;
}

// get covers from "albumcovers/tagcover"
QDir dirTagcover(QDir::homePath() + "/.kde/share/apps/amarok/albumcovers/tagcover/");
foreach(QString fileName, dirTagcover.entryList(QDir::Files)) {
coverList << "tagcover/"+ fileName;
}

// Try five times to find non-conflicting images. This reduces the chances
// of displaying an image twice at the same time greatly.
for (int i = 0; i < 5; i++) {
m_artworkFileTmp = coverList[std::rand() % coverList.size()];
if (AlbumArtworkItem::m_usedArtworks[m_artworkFileTmp] == 0)
break;
}
AlbumArtworkItem::m_usedArtworks[m_artworkFileTmp]++;

// Load selected cover into the temporary pixmap m_artworktmp
qDebug() << "Loading " << m_artworkFileTmp
<< AlbumArtworkItem::m_usedArtworks[m_artworkFileTmp];
QImage image(QDir::homePath() +"/.kde/share/apps/amarok/albumcovers/"+ m_artworkFileTmp);
image = image.scaled(QSize(m_size,m_size),
Qt::KeepAspectRatioByExpanding,
Qt::SmoothTransformation);

// Load pixmap in GUI thread
QMetaObject::invokeMethod(this, "updatePixmap", Qt::QueuedConnection,
Q_ARG(QImage, image));
}

--------------------------------------

Report

Israphel

9 years ago

There're problems with songs' names which have non utf8 symbols, like "ción" "shôjo" "cheriè", the char is replaced by a strange "A".

Report

Israphel

9 years ago

Works great!

It's a bit slower to charge the thumbnails, it needs a kind of Cache for the initial view.
Or maybe, it can starts completely black and then rotate the covers to complete the screen.

The roatation effect is a bit laggy, but nice.

The font is just too big for large titles.

The principal cover of the current track could be inside a square, or a border line.

In kde-look there's an excellent PNG wich is a CD-Box, it can work.

Also, it would be great a way to use it as a screensaver, and a way to configure the font.

Excellent and keep going!

Report

C

keegancsmith

9 years ago

Thanks for the constructive critism. I'll implement the features requested :)

It should be easy to extend to Amarok2, if it doesnt work. I just need to know which folder all the artwork is stored. Will look into it.

Report

Israphel

9 years ago

What I need to build?
libqt4-dev and qt4-dev-tools ?

Works for amarok 2 too?

Report

9 years ago

* Version 0.0.2 (8 September 2008)
- Border around covers
- Screensaver support
- Picks album size with regards to screensize
- Reduces the chances of showing an album cover more than once
- Unicode support
* Version 0.0.1 (16 June 2008)
- Initial release featuring basic animations

product-maker 7 19

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
0.0.2
updated Sep 08 2008
added Jun 16 2008
downloads today
0
page views today 0