1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 05:37:29 +02:00

Merge branch 'master' of github.com:tomahawk-player/tomahawk

This commit is contained in:
Leo Franchi
2011-08-13 17:13:30 -04:00
10 changed files with 81 additions and 37 deletions

View File

@@ -23,26 +23,28 @@ SET( TOMAHAWK_VERSION_RC 1 )
# build options # build options
option(BUILD_GUI "Build Tomahawk with GUI" ON) option(BUILD_GUI "Build Tomahawk with GUI" ON)
option(BUILD_RELEASE "Generate TOMAHAWK_VERSION without GIT info" OFF)
# generate version string # generate version string
IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
# Use the date as the tweak level.
INCLUDE( CMakeDateStamp )
SET( TOMAHAWK_VERSION_TWEAK "${CMAKE_DATESTAMP_YEAR}${CMAKE_DATESTAMP_MONTH}${CMAKE_DATESTAMP_DAY}" )
INCLUDE( CMakeVersionSource )
ENDIF()
# base string used in release and unstable builds
SET( TOMAHAWK_VERSION ${TOMAHAWK_VERSION_MAJOR}.${TOMAHAWK_VERSION_MINOR}.${TOMAHAWK_VERSION_PATCH} ) SET( TOMAHAWK_VERSION ${TOMAHAWK_VERSION_MAJOR}.${TOMAHAWK_VERSION_MINOR}.${TOMAHAWK_VERSION_PATCH} )
IF( ${TOMAHAWK_VERSION_TWEAK} GREATER 0)
SET( TOMAHAWK_VERSION ${TOMAHAWK_VERSION}.${TOMAHAWK_VERSION_TWEAK} )
ENDIF()
IF( TOMAHAWK_VERSION_RC ) IF( TOMAHAWK_VERSION_RC )
SET( CMake_VERSION ${TOMAHAWK_VERSION}rc${TOMAHAWK_VERSION_RC} ) SET( TOMAHAWK_VERSION ${TOMAHAWK_VERSION}rc${TOMAHAWK_VERSION_RC} )
ENDIF() ENDIF()
IF( CMAKE_VERSION_SOURCE )
SET( TOMAHAWK_VERSION ${TOMAHAWK_VERSION}-${CMAKE_VERSION_SOURCE} ) # additional info for non-release builds
IF( NOT BUILD_RELEASE )
INCLUDE( CMakeDateStamp )
SET( TOMAHAWK_VERSION_DATE "${CMAKE_DATESTAMP_YEAR}${CMAKE_DATESTAMP_MONTH}${CMAKE_DATESTAMP_DAY}" )
IF( ${TOMAHAWK_VERSION_DATE} GREATER 0)
SET( TOMAHAWK_VERSION ${TOMAHAWK_VERSION}.${TOMAHAWK_VERSION_DATE} )
ENDIF()
INCLUDE( CMakeVersionSource )
IF( CMAKE_VERSION_SOURCE )
SET( TOMAHAWK_VERSION ${TOMAHAWK_VERSION}-${CMAKE_VERSION_SOURCE} )
ENDIF()
ENDIF() ENDIF()
@@ -54,7 +56,7 @@ SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" ) SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
# installer creation # installer creation
INCLUDE( CPack ) INCLUDE( TomahawkCPack.cmake )
#deps #deps
INCLUDE( MacroOptionalFindPackage ) INCLUDE( MacroOptionalFindPackage )

View File

@@ -28,10 +28,11 @@
; We use official release plugins ; We use official release plugins
; mingw32-vlc from obs misses a lot and has even broken ones probably ; mingw32-vlc from obs misses a lot and has even broken ones probably
!define VLC_PATH "${SOURCE_PATH}\admin\win\vlc" ; SIC! ^ !define VLC_PATH "${SOURCE_PATH}\admin\win\vlc\prefix" ; SIC! ^
!define VLC_PLUGIN_PATH "${VLC_PATH}\plugins" !define VLC_BIN "${VLC_PATH}\bin"
!define VLC_PLUGIN_PATH "${VLC_BIN}\plugins"
!define NSI_PATH "@CMAKE_SOURCE_DIR@/admin/win/nsi" !define NSI_PATH "${SOURCE_PATH}/admin/win/nsi"
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
; Increment installer revision number as part of this script. ; Increment installer revision number as part of this script.
@@ -333,15 +334,15 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
File "${MING_BIN}\libdbus-1-3.dll" File "${MING_BIN}\libdbus-1-3.dll"
File "${MING_BIN}\dbus-daemon.exe" File "${MING_BIN}\dbus-daemon.exe"
File "${MING_BIN}\libphonon.dll" File "${VLC_BIN}\libphonon.dll"
SetOutPath "$INSTDIR\phonon_backend" SetOutPath "$INSTDIR\phonon_backend"
File "${VLC_PATH}\phonon_backend\phonon_vlc.dll" File "${VLC_BIN}\phonon_backend\phonon_vlc.dll"
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
;VLC ;VLC
;SetOutPath "$INSTDIR\phonon_backend" ;SetOutPath "$INSTDIR\phonon_backend"
File "${VLC_PATH}\libvlc.dll" File "${VLC_BIN}\libvlc.dll"
File "${VLC_PATH}\libvlccore.dll" File "${VLC_BIN}\libvlccore.dll"
SetOutPath "$INSTDIR\plugins" SetOutPath "$INSTDIR\plugins"
File /r "${VLC_PLUGIN_PATH}\*.dll" File /r "${VLC_PLUGIN_PATH}\*.dll"
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"

View File

@@ -1,19 +1,45 @@
#!/bin/bash #!/bin/bash
echo "Remove old vlc dir..." echo "Remove old vlc dir..."
mkdir -p vlc/
cd vlc/
#rm -vf vlc-*.7z #rm -vf vlc-*.7z
rm -rf vlc/ #rm -rf vlc/
echo "Download specified binary..." echo "Download specified binary..."
#wget -c "http://downloads.sourceforge.net/project/vlc/1.1.9/win32/vlc-1.1.9-win32.7z?r=http%3A%2F%2Fwww.videolan.org%2Fvlc%2Fdownload-windows.html&ts=1306272584&use_mirror=leaseweb" #wget -c "http://downloads.sourceforge.net/project/vlc/1.1.9/win32/vlc-1.1.9-win32.7z?r=http%3A%2F%2Fwww.videolan.org%2Fvlc%2Fdownload-windows.html&ts=1306272584&use_mirror=leaseweb"
wget -c "http://download.tomahawk-player.org/tomahawk-vlc-0.1.zip" #wget -c "http://download.tomahawk-player.org/tomahawk-vlc-0.1.zip"
wget -c http://people.videolan.org/~jb/phonon/phonon-vlc-last.7z
echo "Extract binary..." echo "Extract binary..."
#7z x vlc-*.7z 7z x phonon-vlc-last.7z
#mv -v vlc-*/ vlc/ #mv -v vlc-*/ vlc/
unzip tomahawk-vlc-0.1.zip #unzip tomahawk-vlc-0.1.zip
#echo "Strip unneeded plugins from vlc/plugins..." echo "Strip unneeded plugins from vlc/plugins..."
# cd vlc/plugins/ cd prefix/bin/plugins
rm -rvf libold* libvcd* libdvd* liblibass* libx264* libschroe* liblibmpeg2* \
libstream_out_* libmjpeg_plugin* libh264_plugin* libzvbi_plugin* lib*sub* \
*qt4* *skins2* libaccess_bd_plugin.dll \
libaudiobargraph_* libball_plugin.dll \
libdirac_plugin.dll \
libgnutls_plugin.dll \
libcaca_plugin.dll \
libfreetype_plugin.dll \
libaccess_output_shout_plugin.dll \
libremoteosd_plugin.dll \
libsdl_image_plugin.dll \
libvout_sdl_plugin.dll \
libpng_plugin.dll \
libgoom_plugin.dll \
libatmo_plugin.dll \
libmux_ts_plugin.dll \
libkate_plugin.dll \
libtaglib_plugin.dll
# this is for vlc-1.2
# rm -rvf video_*/ gui/ */libold* */libvcd* */libdvd* */liblibass* */libx264* */libschroe* */liblibmpeg2* \ # rm -rvf video_*/ gui/ */libold* */libvcd* */libdvd* */liblibass* */libx264* */libschroe* */liblibmpeg2* \
# */libstream_out_* */libmjpeg_plugin* */libh264_plugin* */libzvbi_plugin* */lib*sub* \ # */libstream_out_* */libmjpeg_plugin* */libh264_plugin* */libzvbi_plugin* */lib*sub* \
# services_discover/ visualization/ control/ misc/ # services_discover/ visualization/ control/ misc/

View File

@@ -38,7 +38,7 @@ public:
ModificationTime = 1 ModificationTime = 1
}; };
explicit DatabaseCommand_AllAlbums( const Tomahawk::collection_ptr& collection, const Tomahawk::artist_ptr& artist = Tomahawk::artist_ptr(), QObject* parent = 0 ) explicit DatabaseCommand_AllAlbums( const Tomahawk::collection_ptr& collection = Tomahawk::collection_ptr(), const Tomahawk::artist_ptr& artist = Tomahawk::artist_ptr(), QObject* parent = 0 )
: DatabaseCommand( parent ) : DatabaseCommand( parent )
, m_collection( collection ) , m_collection( collection )
, m_artist( artist ) , m_artist( artist )
@@ -55,6 +55,7 @@ public:
void execForCollection( DatabaseImpl* ); void execForCollection( DatabaseImpl* );
void execForArtist( DatabaseImpl* ); void execForArtist( DatabaseImpl* );
void setArtist( const Tomahawk::artist_ptr& artist ) { m_artist = artist; }
void setLimit( unsigned int amount ) { m_amount = amount; } void setLimit( unsigned int amount ) { m_amount = amount; }
void setSortOrder( DatabaseCommand_AllAlbums::SortOrder order ) { m_sortOrder = order; } void setSortOrder( DatabaseCommand_AllAlbums::SortOrder order ) { m_sortOrder = order; }
void setSortDescending( bool descending ) { m_sortDescending = descending; } void setSortDescending( bool descending ) { m_sortDescending = descending; }

View File

@@ -355,7 +355,6 @@ void
AlbumModel::infoSystemFinished( QString target ) AlbumModel::infoSystemFinished( QString target )
{ {
Q_UNUSED( target ); Q_UNUSED( target );
// qDebug() << Q_FUNC_INFO;
} }

View File

@@ -134,8 +134,6 @@ SourceList::add( const source_ptr& source )
void void
SourceList::removeAllRemote() SourceList::removeAllRemote()
{ {
Q_ASSERT( m_isReady );
foreach( const source_ptr& s, m_sources ) foreach( const source_ptr& s, m_sources )
{ {
qDebug() << "Disconnecting" << s->friendlyName() << s->isLocal() << s->controlConnection() << s->isOnline(); qDebug() << "Disconnecting" << s->friendlyName() << s->isLocal() << s->controlConnection() << s->isOnline();

View File

@@ -20,6 +20,7 @@
#include "ui_AlbumInfoWidget.h" #include "ui_AlbumInfoWidget.h"
#include "viewmanager.h" #include "viewmanager.h"
#include "database/database.h"
#include "playlist/treemodel.h" #include "playlist/treemodel.h"
#include "playlist/albummodel.h" #include "playlist/albummodel.h"
@@ -39,7 +40,6 @@ using namespace Tomahawk;
AlbumInfoWidget::AlbumInfoWidget( const Tomahawk::album_ptr& album, QWidget* parent ) AlbumInfoWidget::AlbumInfoWidget( const Tomahawk::album_ptr& album, QWidget* parent )
: QWidget( parent ) : QWidget( parent )
, ui( new Ui::AlbumInfoWidget ) , ui( new Ui::AlbumInfoWidget )
, m_album( album )
{ {
ui->setupUi( this ); ui->setupUi( this );
@@ -77,13 +77,18 @@ AlbumInfoWidget::~AlbumInfoWidget()
void void
AlbumInfoWidget::load( const album_ptr& album ) AlbumInfoWidget::load( const album_ptr& album )
{ {
m_album = album;
m_title = album->name(); m_title = album->name();
m_description = album->artist()->name(); m_description = album->artist()->name();
m_tracksModel->addTracks( album, QModelIndex() ); m_tracksModel->addTracks( album, QModelIndex() );
QList<album_ptr> al; DatabaseCommand_AllAlbums* cmd = new DatabaseCommand_AllAlbums();
al << album; cmd->setArtist( album->artist() );
m_albumsModel->addAlbums( al );
connect( cmd, SIGNAL( albums( QList<Tomahawk::album_ptr>, QVariant ) ),
SLOT( gotAlbums( QList<Tomahawk::album_ptr> ) ) );
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
Tomahawk::InfoSystem::InfoCriteriaHash trackInfo; Tomahawk::InfoSystem::InfoCriteriaHash trackInfo;
trackInfo["artist"] = album->artist()->name(); trackInfo["artist"] = album->artist()->name();
@@ -99,6 +104,17 @@ AlbumInfoWidget::load( const album_ptr& album )
} }
void
AlbumInfoWidget::gotAlbums( const QList<Tomahawk::album_ptr>& albums )
{
QList<Tomahawk::album_ptr> al = albums;
if ( al.contains( m_album ) )
al.removeAll( m_album );
m_albumsModel->addAlbums( al );
}
void void
AlbumInfoWidget::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output ) AlbumInfoWidget::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output )
{ {

View File

@@ -86,6 +86,8 @@ protected:
void changeEvent( QEvent* e ); void changeEvent( QEvent* e );
private slots: private slots:
void gotAlbums( const QList<Tomahawk::album_ptr>& albums );
void infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output ); void infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output );
void infoSystemFinished( QString target ); void infoSystemFinished( QString target );

View File

@@ -294,7 +294,6 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
painter->restore(); painter->restore();
} }
QPixmap avatar = index.data( WelcomePlaylistModel::PlaylistRole ).value< Tomahawk::playlist_ptr >()->author()->avatar( Source::FancyStyle ); QPixmap avatar = index.data( WelcomePlaylistModel::PlaylistRole ).value< Tomahawk::playlist_ptr >()->author()->avatar( Source::FancyStyle );
if ( avatar.isNull() ) if ( avatar.isNull() )
avatar = m_defaultAvatar; avatar = m_defaultAvatar;