Ticket #9258: mythplugins-0.24.diff
File mythplugins-0.24.diff, 12.5 KB (added by , 15 years ago) |
---|
-
mythplugins/configure
234 234 for opt do 235 235 optval="${opt#*=}" 236 236 case "$opt" in 237 --targetos=*) targetos=`echo $opt | cut -d '=' -f 2` 238 ;; 237 239 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2` 238 240 ;; 239 241 --libdir-name=*) libdir_name=`echo $opt | cut -d '=' -f 2`; … … 315 317 done 316 318 fi 317 319 318 LIBPATHS="`echo $LIBPATHS $ sysroot$prefix/$libdir_name $sysroot/$libdir_name $sysroot/usr/$libdir_name $sysroot/usr/local/$libdir_name $sysroot/usr/X11R6/$libdir_name | sed s/'\/ '/' '/g` "320 LIBPATHS="`echo $LIBPATHS $prefix/$libdir_name $sysroot/$libdir_name $sysroot/usr/$libdir_name $sysroot/usr/local/$libdir_name $sysroot/usr/X11R6/$libdir_name | sed s/'\/ '/' '/g` " 319 321 320 322 HAS_IT="no" 321 323 for LIBPATH in $LIBPATHS ; do … … 328 330 329 331 has_header() 330 332 { 331 HPATHS="$ sysroot$prefix/include $sysroot/usr/local/include $sysroot/usr/include $sysroot/usr/include/g++-v3 $sysroot/usr/X11R6/include $sysroot/"333 HPATHS="$prefix/include $sysroot/usr/local/include $sysroot/usr/include $sysroot/usr/include/g++-v3 $sysroot/usr/X11R6/include $sysroot/" 332 334 INCL=`echo $DYLD_LIBRARY_PATH $LD_LIBRARY_PATH | sed s/':'/' '/g` 333 335 HPATHS="$HPATHS `echo $INCL | sed s/$libdir_name/include/g` " 334 336 … … 552 554 553 555 if test "$vorbis" = "no" -o "$flac" = "no" -o "$mp3lame" = "no" -o "$taglib" = "no" -o "$cdlibs" = "no" ; then 554 556 echo "Disabling MythMusic due to missing dependencies." 555 music="no"557 #music="no" 556 558 fi 557 559 fi 558 560 … … 585 587 ########################################################### 586 588 587 589 # bring in mythtv config 588 if [ -e $ sysroot$prefix/include/mythtv/mythconfig.mak ] ; then590 if [ -e $prefix/include/mythtv/mythconfig.mak ] ; then 589 591 rm mythconfig.mak 2> /dev/null 590 ln -s $ sysroot$prefix/include/mythtv/mythconfig.mak mythconfig.mak592 ln -s $prefix/include/mythtv/mythconfig.mak mythconfig.mak 591 593 else 592 echo "ERROR: mythconfig.mak not found at $ sysroot$prefix/include/mythtv/mythconfig.mak"594 echo "ERROR: mythconfig.mak not found at $prefix/include/mythtv/mythconfig.mak" 593 595 echo "Did you make AND install MythTV first?" 594 echo "Are you using the correct prefix ($prefix) and sysroot ($sysroot)?"596 echo "Are you using the correct prefix ($prefix)?" 595 597 echo "Bailing out!!" 596 598 exit 597 599 fi -
mythplugins/mythmusic/mythmusic/playbackbox.cpp
468 468 160, 160); 469 469 mainvisual->setVisual(visual_modes[current_visual]); 470 470 bannerDisable(); 471 updateTrackInfo(curMeta); 471 if (curMeta) 472 updateTrackInfo(curMeta); 472 473 473 474 if (!m_parent->IsExitingToMain()) 474 475 handled = true; … … 970 971 971 972 void PlaybackBoxMusic::occasionallyCheckCD() 972 973 { 973 if (!cd_reader_thread ->getLock()->tryLock())974 if (!cd_reader_thread || !cd_reader_thread->getLock()->tryLock()) 974 975 return; 975 976 cd_reader_thread->getLock()->unlock(); 976 977 … … 1068 1069 1069 1070 GenericTree *node = music_tree_list->getCurrentNode(); 1070 1071 curMeta = gMusicData->all_music->getMetadata(node->getInt()); 1071 updateTrackInfo(curMeta); 1072 if (curMeta) 1073 updateTrackInfo(curMeta); 1072 1074 1073 1075 setShuffleMode(gPlayer->getShuffleMode()); 1074 1076 … … 1106 1108 if (scan_for_cd) 1107 1109 updatePlaylistFromCD(); 1108 1110 1111 bool bLocked = cd_reader_thread ? 1112 cd_reader_thread->getLock()->lock(), true : false; 1113 1109 1114 music_tree_list->showWholeTree(show_whole_tree); 1110 1115 Q3ValueList <int> branches_to_current_node; 1111 1116 branches_to_current_node.append(0); // Root node … … 1135 1140 if (curMeta) 1136 1141 updateTrackInfo(curMeta); 1137 1142 1143 if (bLocked && cd_reader_thread) 1144 cd_reader_thread->getLock()->unlock(); 1138 1145 return; // Do not restart Timer 1139 1146 } 1140 1147 else … … 1357 1364 gPlayer->getOutput()->SetTimecode(0); 1358 1365 } 1359 1366 1360 bannerEnable(curMeta, show_album_art); 1367 if (curMeta) 1368 bannerEnable(curMeta, show_album_art); 1361 1369 } 1362 1370 1363 1371 void PlaybackBoxMusic::visEnable() … … 1388 1396 { 1389 1397 if (mainvisual->bannerIsShowing()) 1390 1398 bannerDisable(); 1391 else 1399 else if (mdata) 1392 1400 bannerEnable(mdata, false); 1393 1401 } 1394 1402 … … 1801 1809 if (node) 1802 1810 { 1803 1811 curMeta = gMusicData->all_music->getMetadata(node->getInt()); 1804 updateTrackInfo(curMeta); 1812 if (curMeta) 1813 updateTrackInfo(curMeta); 1805 1814 1806 1815 maxTime = curMeta->Length() / 1000; 1807 1816 … … 1827 1836 if (node) 1828 1837 { 1829 1838 curMeta = gMusicData->all_music->getMetadata(node->getInt()); 1830 updateTrackInfo(curMeta); 1839 if (curMeta) 1840 updateTrackInfo(curMeta); 1831 1841 1832 1842 maxTime = curMeta->Length() / 1000; 1833 1843 … … 2069 2079 2070 2080 void PlaybackBoxMusic::updateTrackInfo(Metadata *mdata) 2071 2081 { 2072 if ( visualizer_status != 2)2082 if (mdata) 2073 2083 { 2074 if (title_text) 2075 title_text->SetText(mdata->FormatTitle()); 2076 if (artist_text) 2077 artist_text->SetText(mdata->FormatArtist()); 2078 if (album_text) 2079 album_text->SetText(mdata->Album()); 2080 if (albumart_image) 2081 showAlbumArtImage(mdata); 2084 if (visualizer_status != 2) 2085 { 2086 if (title_text) 2087 title_text->SetText(mdata->FormatTitle()); 2088 if (artist_text) 2089 artist_text->SetText(mdata->FormatArtist()); 2090 if (album_text) 2091 album_text->SetText(mdata->Album()); 2092 if (albumart_image) 2093 showAlbumArtImage(mdata); 2082 2094 2083 if (showrating) 2084 { 2085 if (ratings_image) 2086 ratings_image->setRepeat(mdata->Rating()); 2095 if (showrating) 2096 { 2097 if (ratings_image) 2098 ratings_image->setRepeat(mdata->Rating()); 2099 } 2087 2100 } 2101 setTrackOnLCD(mdata); 2088 2102 } 2089 setTrackOnLCD(mdata);2090 2103 } 2091 2104 2092 2105 void PlaybackBoxMusic::showAlbumArtImage(Metadata *mdata) … … 2164 2177 } 2165 2178 2166 2179 curMeta = gMusicData->all_music->getMetadata(node_int); 2180 if (curMeta) 2181 updateTrackInfo(curMeta); 2167 2182 2168 updateTrackInfo(curMeta);2169 2170 2183 maxTime = curMeta->Length() / 1000; 2171 2184 2172 2185 QString time_string = getTimeString(maxTime, 0); -
mythplugins/mythmusic/mythmusic/decoderhandler.cpp
266 266 m_playlist_pos = -1; 267 267 m_redirects = 0; 268 268 269 #if QT_VERSION >= 0x040600 270 QUrl url = QUrl::fromUserInput( mdata->Filename()); // Qt >= 4.6 271 #else 269 272 QUrl url; 270 if (mdata->Filename().startsWith('/')) 273 // NB Win32 absolute paths start d:/... 274 if (QFileInfo(mdata->Filename()).isAbsolute()) 271 275 url = QUrl::fromLocalFile(mdata->Filename()); 272 276 else 273 277 url.setUrl(mdata->Filename()); 278 #endif 274 279 275 280 bool result = createPlaylist(url); 276 281 if (m_state == LOADING && result) … … 328 333 PlayListFileEntry *entry = m_playlist.get(m_playlist_pos); 329 334 330 335 QUrl url; 331 if (entry->File().startsWith('/')) 336 // NB Win32 absolute paths start d:/... 337 if (QFileInfo(entry->File()).isAbsolute()) 332 338 url = QUrl::fromLocalFile(entry->File()); 333 339 else 334 340 url.setUrl(entry->File()); … … 398 404 399 405 if (extension == ".pls" || extension == ".m3u") 400 406 { 401 if (url.scheme() == "file" || url.toString().startsWith('/')) 407 // NB Win32 absolute paths start d:/... 408 if (url.scheme() == "file" || QFileInfo(url.toString()).isAbsolute()) 402 409 return createPlaylistFromFile(url); 403 410 else 404 411 return createPlaylistFromRemoteUrl(url); … … 411 418 { 412 419 PlayListFileEntry *entry = new PlayListFileEntry; 413 420 414 if (url.scheme() == "file" || url.toString().startsWith('/')) 421 // NB Win32 absolute paths start d:/... 422 if (QFileInfo(url.toString()).isAbsolute()) 415 423 entry->setFile(url.toLocalFile()); 416 424 else 417 425 entry->setFile(url.toString()); … … 513 521 if (haveIOFactory()) 514 522 deleteIOFactory(); 515 523 516 if (url.scheme() == "file" || url.toString().startsWith('/') || url.toString().endsWith(".cda")) 524 // NB Win32 absolute paths start d:/... 525 if (url.scheme() == "file" || QFileInfo(url.toString()).isAbsolute() || url.toString().endsWith(".cda")) 517 526 m_io_factory = new DecoderIOFactoryFile(this); 518 527 else if (m_meta && m_meta->Format() == "cast") 519 528 m_io_factory = new DecoderIOFactoryShoutCast(this); -
mythplugins/mythmusic/mythmusic/main.cpp
272 272 { 273 273 loadMusic(); 274 274 275 #ifndef USING_MINGW 275 276 MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); 276 277 277 278 Ripper *rip = new Ripper(mainStack, chooseCD()); … … 284 285 QObject::connect(rip, SIGNAL(ripFinished()), 285 286 gMusicData, SLOT(reloadMusic()), 286 287 Qt::QueuedConnection); 288 #endif 287 289 } 288 290 289 291 static void startImport(void) 290 292 { 291 293 loadMusic(); 292 294 295 #ifndef USING_MINGW 293 296 MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); 294 297 295 298 ImportMusicDialog *import = new ImportMusicDialog(mainStack); … … 302 305 QObject::connect(import, SIGNAL(importFinished()), 303 306 gMusicData, SLOT(reloadMusic()), 304 307 Qt::QueuedConnection); 308 #endif 305 309 } 306 310 307 311 static void MusicCallback(void *data, QString &selection) … … 396 400 { 397 401 loadMusic(); 398 402 403 #ifndef USING_MINGW 399 404 MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); 400 405 401 406 Ripper *rip = new Ripper(mainStack, chooseCD()); … … 408 413 QObject::connect(rip, SIGNAL(ripFinished()), 409 414 gMusicData, SLOT(reloadMusic()), 410 415 Qt::QueuedConnection); 416 #endif 411 417 } 412 418 413 419 static void runScan(void) … … 472 478 } 473 479 474 480 if (gCoreContext->GetNumSetting("AutoPlayCD", 0)) 481 { 482 // Empty the playlist to ensure CD is played first 483 if (gMusicData->all_music) 484 gMusicData->all_music->clearCDData(); 485 if (gMusicData->all_playlists) 486 gMusicData->all_playlists->clearCDList(); 487 475 488 runMusicPlayback(); 489 } 476 490 else 477 491 mythplugin_run(); 478 492 } -
mythplugins/mythgallery/mythgallery/iconview.cpp
42 42 #include <mythmainwindow.h> 43 43 #include <mythprogressdialog.h> 44 44 #include <mythmediamonitor.h> 45 #include <mythverbose.h> 45 46 46 47 // MythGallery headers 47 48 #include "galleryutil.h" … … 171 172 172 173 if (err) 173 174 { 174 VERBOSE(VB_IMPORTANT, "Cannot load screen 'gallery'");175 VERBOSE(VB_IMPORTANT, LOC_ERR + "Cannot load screen 'gallery'"); 175 176 return false; 176 177 } 177 178 … … 204 205 m_thumbGen->setSize(thumbWidth, thumbHeight); 205 206 206 207 SetupMediaMonitor(); 208 LoadDirectory(m_galleryDir); 207 209 208 210 return true; 209 211 } … … 370 372 } 371 373 } 372 374 m_currDevice = NULL; 373 LoadDirectory(m_galleryDir);374 375 #endif // _WIN32 375 376 } 376 377 … … 492 493 { 493 494 QDir currentDir(m_currDir); 494 495 QDir rootDir(m_galleryDir); 495 if (currentDir != rootDir) 496 HandleSubDirEscape(m_galleryDir); 497 else 496 if (currentDir == rootDir) 498 497 break; 498 if ( !HandleSubDirEscape(m_galleryDir)) 499 break; 499 500 } 500 501 handled = HandleEscape(); 501 502 }