Ticket #3579: mythvideo.diff
File mythvideo.diff, 1.5 KB (added by , 17 years ago) |
---|
-
mythvideo/mythvideo/videogallery.cpp
371 371 test_files.append(filename + ".png"); 372 372 test_files.append(filename + ".jpg"); 373 373 test_files.append(filename + ".gif"); 374 bool hasImage = 0; 374 375 for (QStringList::const_iterator tfp = test_files.begin(); 375 376 tfp != test_files.end(); ++tfp) 376 377 { 377 378 if (QFile::exists(*tfp)) 378 379 { 379 380 icon_file = *tfp; 381 hasImage = 1; 380 382 break; 381 383 } 382 384 } 385 if(!hasImage) 386 { 387 int list_count = curTreePos->childCount(); 388 if (list_count > 0) // should be 389 { 390 GenericTree* tmp; 391 tmp = curTreePos->getChildAt(1,0); 392 if(tmp > 0) // check if it is a regular file 393 { 394 // get metadata to extract image 395 meta = m_video_list->getVideoListMetadata(tmp->getInt()); 396 if (meta) 397 { 398 icon_file = meta->CoverFile(); 399 } 400 } 401 } 402 } 383 403 } 384 404 else if (curTreePos->getInt() == kUpFolder) // up-directory 385 405 {