Ticket #1699: mfd.5.patch
File mfd.5.patch, 25.7 KB (added by , 19 years ago) |
---|
-
settings.pro
2 2 #CONFIG += release 3 3 4 4 isEmpty( PREFIX ) { 5 PREFIX = /usr /local5 PREFIX = /usr 6 6 } 7 7 8 LIBVERSION = 0.1 88 LIBVERSION = 0.19 9 9 10 10 INCLUDEPATH += $${PREFIX}/include 11 11 -
mfd/plugins/audio/audio.cpp
45 45 // thr RTSP streamer can use to get PCM bits to send out. 46 46 // 47 47 48 output = AudioOutput::OpenAudio("NULL", 16, 2, 44100, AUDIOOUTPUT_MUSIC, true );48 output = AudioOutput::OpenAudio("NULL", 16, 2, 44100, AUDIOOUTPUT_MUSIC, true, false ); 49 49 output->bufferOutputData(true); 50 50 output->setBufferSize(output_buffer_size * 1024); 51 51 output->SetBlocking(false); … … 516 516 #else 517 517 QString adevice = gContext->GetSetting("AudioDevice"); 518 518 // TODO: Error checking that device is opened correctly! 519 output = AudioOutput::OpenAudio(adevice, 16, 2, 44100, AUDIOOUTPUT_MUSIC, true );519 output = AudioOutput::OpenAudio(adevice, 16, 2, 44100, AUDIOOUTPUT_MUSIC, true, false ); 520 520 output->setBufferSize(output_buffer_size * 1024); 521 521 output->SetBlocking(false); 522 522 output->addListener(audio_listener); -
mfd/plugins/mmusic/mmusic.cpp
77 77 // This is a "magic" number signifying what we want to see 78 78 // 79 79 80 desired_database_version = "100 5";80 desired_database_version = "1007"; 81 81 82 82 // 83 83 // Initialize our container and set things up for a clean slate … … 526 526 527 527 MSqlQuery query(MSqlQuery::InitCon()); 528 528 529 query.exec("SELECT intid, filename FROM musicmetadata;");529 query.exec("SELECT song_id, filename FROM music_songs ;"); 530 530 531 531 if(query.isActive()) 532 532 { … … 544 544 545 545 ++count; 546 546 MSqlQuery delete_query(MSqlQuery::InitCon()); 547 delete_query.prepare("DELETE FROM music metadata WHERE intid = ?");547 delete_query.prepare("DELETE FROM music_songs WHERE song_id = ?"); 548 548 delete_query.bindValue(0, query.value(0).toUInt()); 549 549 delete_query.exec(); 550 550 log(QString("removed item %1 (\"%2\") from the database") … … 556 556 } 557 557 else 558 558 { 559 warning("something wrong with your music metadatatable");559 warning("something wrong with your music_songs table"); 560 560 } 561 561 562 562 if(count > 0) … … 638 638 639 639 MSqlQuery query(MSqlQuery::InitCon()); 640 640 641 query.exec("SELECT COUNT(filename) FROM music metadata;");641 query.exec("SELECT COUNT(filename) FROM music_songs;"); 642 642 643 643 if(!query.isActive()) 644 644 { 645 645 if(!sent_musicmetadata_table_warning) 646 646 { 647 warning("cannot get data from a table called music metadata");647 warning("cannot get data from a table called music_songs"); 648 648 sent_musicmetadata_table_warning = true; 649 649 } 650 650 return false; 651 651 652 652 } 653 653 654 query.exec("SELECT COUNT(playlist id) FROM musicplaylist");654 query.exec("SELECT COUNT(playlist_id) FROM music_saved_playlists "); 655 655 656 656 if(!query.isActive()) 657 657 { 658 658 if(!sent_playlist_table_warning) 659 659 { 660 warning("cannot get data from a table called musi splaylist");660 warning("cannot get data from a table called music_saved_playlists"); 661 661 sent_playlist_table_warning = true; 662 662 } 663 663 return false; … … 977 977 978 978 MSqlQuery query(MSqlQuery::InitCon()); 979 979 980 query.prepare("SELECT intid, artist, album, title, genre, " 981 "year, tracknum, length, rating, " 982 "lastplay, playcount, mythdigest, size, date_added, " 983 "date_modified, format, description, comment, " 984 "compilation, composer, disc_count, disc_number, " 985 "track_count, start_time, stop_time, eq_preset, " 986 "relative_volume, sample_rate, bpm " 987 "FROM musicmetadata WHERE filename = ? ;"); 980 query.prepare("SELECT music_songs.song_id, music_artists.artist_name, " 981 "music_albums.album_name, music_songs.name, " 982 "music_genres.genre, music_songs.year, " 983 "music_songs.track, music_songs.length, " 984 "music_songs.rating, music_songs.lastplay, " 985 "music_songs.numplays, music_songs.mythdigest," 986 "music_songs.size, music_songs.date_entered, " 987 "music_songs.date_modified, music_songs.format, " 988 "music_songs.description, music_songs.comment, " 989 "music_songs.compilation, music_comp_artits.artist_name AS composer, " 990 "music_songs.disc_count, music_songs.disc_number, " 991 "music_songs.track_count, music_songs.start_time, " 992 "music_songs.stop_time, music_songs.eq_preset, " 993 "music_songs.relative_volume, music_songs.bitrate, " 994 "music_songs.bpm " 995 "FROM music_songs " 996 "LEFT JOIN music_artists ON music_songs.artist_id=music_artists.artist_id " 997 "LEFT JOIN music_artists AS music_comp_artists ON music_songs.compilationartist_id=music_comp_artists.artist_id " 998 "LEFT JOIN music_albums ON music_songs.album_id=music_albums.album_id " 999 "LEFT JOIN music_genres ON music_songs.genre_id=music_genres.genre_id " 1000 "WHERE filename = ?;"); 988 1001 989 1002 query.bindValue(0, sqlfilename.utf8()); 990 1003 … … 1198 1211 1199 1212 MSqlQuery query(MSqlQuery::InitCon()); 1200 1213 1201 query.prepare("INSERT INTO music metadata(filename, mythdigest) "1214 query.prepare("INSERT INTO music_songs(filename, mythdigest) " 1202 1215 "values ( ? , ?)"); 1203 1216 1204 1217 query.bindValue(0, sqlfilename.utf8()); … … 1213 1226 return NULL; 1214 1227 } 1215 1228 1216 query.prepare("SELECT intid FROM musicmetadata"1229 query.prepare("SELECT song_id FROM music_songs " 1217 1230 "WHERE mythdigest = ? ;"); 1218 1231 query.bindValue(0, new_item->getMythDigest()); 1219 1232 query.exec(); … … 1322 1335 1323 1336 MSqlQuery query(MSqlQuery::InitCon()); 1324 1337 1325 query.prepare("UPDATE musicmetadata SET " 1326 "title = ? , " 1327 "artist = ? , " 1328 "album = ? , " 1329 "genre = ? , " 1338 1339 //Genrecheck 1340 //Albumcheck 1341 //Artist 1342 int ArtistID; 1343 query.prepare("SELECT music_artists.artist_id FROM music_artists " 1344 " WHERE (((music_artists.artist_name)=:ARTIST));"); 1345 query.bindValue(":ARTIST", an_item->getArtist().utf8()); 1346 query.exec(); 1347 // cout << query.executedQuery() << endl; 1348 if (query.size() > 0) 1349 { 1350 query.next(); 1351 ArtistID = query.value(0).toInt(); 1352 } 1353 else 1354 { 1355 query.prepare("INSERT INTO music_artists (artist_name) VALUES (:ARTIST);"); 1356 query.bindValue(":ARTIST", an_item->getArtist().utf8()); 1357 query.exec(); 1358 // cout << query.executedQuery() << endl; 1359 query.prepare("SELECT music_artists.artist_id FROM music_artists " 1360 " WHERE (((music_artists.artist_name)=:ARTIST));"); 1361 query.bindValue(":ARTIST", an_item->getArtist().utf8()); 1362 query.exec(); 1363 // cout << query.executedQuery() << endl; 1364 query.next(); 1365 ArtistID = query.value(0).toInt(); 1366 } 1367 1368 //Compilation Artist 1369 int CoArtistID; 1370 query.prepare("SELECT music_artists.artist_id FROM music_artists " 1371 " WHERE (((music_artists.artist_name)=:ARTIST));"); 1372 query.bindValue(":ARTIST", an_item->getComposer().utf8()); 1373 query.exec(); 1374 // cout << query.executedQuery() << endl; 1375 if (query.size() > 0) 1376 { 1377 query.next(); 1378 CoArtistID = query.value(0).toInt(); 1379 } 1380 else 1381 { 1382 query.prepare("INSERT INTO music_artists (artist_name) VALUES (:ARTIST);"); 1383 query.bindValue(":ARTIST", an_item->getComposer().utf8()); 1384 query.exec(); 1385 // cout << query.executedQuery() << endl; 1386 query.prepare("SELECT music_artists.artist_id FROM music_artists " 1387 " WHERE (((music_artists.artist_name)=:ARTIST));"); 1388 query.bindValue(":ARTIST", an_item->getComposer().utf8()); 1389 query.exec(); 1390 // cout << query.executedQuery() << endl; 1391 query.next(); 1392 CoArtistID = query.value(0).toInt(); 1393 } 1394 1395 //Album 1396 int AlbumID; 1397 query.prepare("SELECT music_albums.album_id FROM music_albums " 1398 " WHERE (((music_albums.album_name)=:ALBUM));"); 1399 query.bindValue(":ALBUM", an_item->getAlbum().utf8()); 1400 query.exec(); 1401 // cout << query.executedQuery() << endl; 1402 if (query.size() > 0) 1403 { 1404 query.next(); 1405 AlbumID = query.value(0).toInt(); 1406 } 1407 else 1408 { 1409 query.prepare("INSERT INTO music_albums (album_name) VALUES (:ALBUM);"); 1410 query.bindValue(":ALBUM", an_item->getAlbum().utf8()); 1411 query.exec(); 1412 // cout << query.executedQuery() << endl; 1413 1414 query.prepare("SELECT music_albums.album_id FROM music_albums " 1415 " WHERE (((music_albums.album_name)=:ALBUM));"); 1416 query.bindValue(":ALBUM", an_item->getAlbum().utf8()); 1417 query.exec(); 1418 // cout << query.executedQuery() << endl; 1419 query.next(); 1420 1421 AlbumID = query.value(0).toInt(); 1422 } 1423 1424 //Genres 1425 int GenreID; 1426 query.prepare("SELECT music_genres.genre_id FROM music_genres " 1427 " WHERE (((music_genres.genre)=:GENRE));"); 1428 query.bindValue(":GENRE", an_item->getGenre().utf8()); 1429 query.exec(); 1430 // cout << query.executedQuery() << endl; 1431 if (query.size() > 0) 1432 { 1433 query.next(); 1434 GenreID = query.value(0).toInt(); 1435 } 1436 else 1437 { 1438 query.prepare("INSERT INTO music_genres (genre) VALUES (:GENRE);"); 1439 query.bindValue(":GENRE", an_item->getGenre().utf8()); 1440 query.exec(); 1441 // cout << query.executedQuery() << endl; 1442 1443 query.prepare("SELECT music_genres.genre_id FROM music_genres " 1444 " WHERE (((music_genres.genre)=:GENRE));"); 1445 query.bindValue(":GENRE", an_item->getGenre().utf8()); 1446 query.exec(); 1447 // cout << query.executedQuery() << endl; 1448 query.next(); 1449 GenreID = query.value(0).toInt(); 1450 } 1451 1452 query.prepare("UPDATE music_songs SET " 1453 "name = ? , " 1454 "artist_id = ? , " 1455 "album_id = ? , " 1456 "genre_id = ? , " 1330 1457 "year = ? , " 1331 "track num= ? , "1458 "track = ? , " 1332 1459 "length = ? , " 1333 1460 "rating = ? , " 1334 1461 "lastplay = ? , " 1335 " playcount= ? , "1462 "numplays = ? , " 1336 1463 "mythdigest = ? , " 1337 1464 "size = ? , " 1338 "date_ added = ? , "1465 "date_entered = ? , " 1339 1466 "date_modified = ? , " 1340 1467 "format = ? , " 1341 1468 "description = ? , " 1342 1469 "comment = ? , " 1343 1470 "compilation = ? , " 1344 "comp oser= ? , "1471 "compilationartist_id = ? , " 1345 1472 "disc_count = ? , " 1346 1473 "disc_number = ? , " 1347 1474 "track_count = ? , " … … 1349 1476 "stop_time = ? , " 1350 1477 "eq_preset = ? , " 1351 1478 "relative_volume = ? , " 1352 " sample_rate = ? , "1479 "bitrate = ? , " 1353 1480 "bpm = ? " 1354 "WHERE intid = ? ;");1481 "WHERE song_id = ? ;"); 1355 1482 1356 1483 query.bindValue(0, an_item->getTitle().utf8()); 1357 query.bindValue(1, an_item->getArtist().utf8());1358 query.bindValue(2, an_item->getAlbum().utf8());1359 query.bindValue(3, an_item->getGenre().utf8());1484 query.bindValue(1, ArtistID); 1485 query.bindValue(2, AlbumID); 1486 query.bindValue(3, GenreID); 1360 1487 query.bindValue(4, an_item->getYear()); 1361 1488 query.bindValue(5, an_item->getTrack()); 1362 1489 query.bindValue(6, an_item->getLength()); … … 1371 1498 query.bindValue(15, an_item->getDescription().utf8()); 1372 1499 query.bindValue(16, an_item->getComment().utf8()); 1373 1500 query.bindValue(17, an_item->getCompilation()); 1374 query.bindValue(18, an_item->getComposer().utf8());1501 query.bindValue(18, CoArtistID); 1375 1502 query.bindValue(19, an_item->getDiscCount()); 1376 1503 query.bindValue(20, an_item->getDiscNumber()); 1377 1504 query.bindValue(21, an_item->getTrackCount()); … … 1467 1594 1468 1595 MSqlQuery query(MSqlQuery::InitCon()); 1469 1596 1470 query.prepare("SELECT name, songlist, playlistid FROM musicplaylist " 1471 "WHERE name != ? " 1472 "AND name != ? " 1473 "AND hostname = ? ;"); 1597 query.prepare("SELECT playlist_name, playlist_songs, playlist_id FROM music_saved_playlists " 1598 "WHERE playlist_name != ? " 1599 "AND playlist_name != ? ;"); 1474 1600 1475 1601 query.bindValue(0, "backup_playlist_storage"); 1476 1602 query.bindValue(1, "default_playlist_storage"); 1477 query.bindValue(2, hostname);1478 1603 1479 1604 query.exec(); 1480 1605 … … 1617 1742 1618 1743 MSqlQuery query(MSqlQuery::InitCon()); 1619 1744 1620 query.prepare("UPDATE musicplaylist SET songlist = ?, name = ? WHERE " 1621 "playlistid = ? ;"); 1745 int songcount = 0, playtime = 0, an_int; 1746 QStringList list = QStringList::split(",", db_song_list_string); 1747 QStringList::iterator it = list.begin(); 1748 for (; it != list.end(); it++) 1749 { 1750 an_int = QString(*it).toInt(); 1751 if (an_int != 0) 1752 { 1753 songcount++; 1754 query.prepare("SELECT length FROM music_songs WHERE song_id = :ID ;"); 1755 query.bindValue(":ID", an_int); 1756 query.exec(); 1757 query.next(); 1758 playtime += query.value(0).toInt(); 1759 } 1760 } 1622 1761 1762 query.prepare("UPDATE music_saved_playlists SET playlist_songs = ?, playlist_name = ? WHERE " 1763 "playlist_id = ?, songcount = ?, time = ? ;"); 1764 1623 1765 query.bindValue(0, db_song_list_string); 1624 1766 query.bindValue(1, a_playlist->getName().utf8()); 1625 1767 query.bindValue(2, a_playlist->getDbId()); 1768 query.bindValue(3, songcount); 1769 query.bindValue(4, playtime); 1626 1770 1627 1771 query.exec(); 1628 1772 … … 1665 1809 1666 1810 MSqlQuery query(MSqlQuery::InitCon()); 1667 1811 1668 query.prepare("INSERT INTO musicplaylist (name, hostname, songlist) values (?, ?, ?) ; "); 1812 int songcount = 0, playtime = 0, an_int; 1813 QStringList list = QStringList::split(",", db_song_list_string); 1814 QStringList::iterator it = list.begin(); 1815 for (; it != list.end(); it++) 1816 { 1817 an_int = QString(*it).toInt(); 1818 if (an_int != 0) 1819 { 1820 songcount++; 1821 query.prepare("SELECT length FROM music_songs WHERE song_id = :ID ;"); 1822 query.bindValue(":ID", an_int); 1823 query.exec(); 1824 query.next(); 1825 playtime += query.value(0).toInt(); 1826 } 1827 } 1669 1828 1829 query.prepare("INSERT INTO music_saved_playlists (playlist_name, hostname, playlist_songs, songcount, time) values (?, ?, ?, ?, ?) ; "); 1830 1670 1831 query.bindValue(0, a_playlist->getName().utf8()); 1671 1832 query.bindValue(1, hostname); 1672 1833 query.bindValue(2, db_song_list_string); 1834 query.bindValue(3, songcount); 1835 query.bindValue(4, playtime); 1673 1836 1674 1837 query.exec(); 1675 1838 … … 1681 1844 return; 1682 1845 } 1683 1846 1684 query.prepare("SELECT playlistid FROM musicplaylist WHERE name = ? AND hostname = ? AND songlist = ? ; "); 1847 if (a_playlist->getName() == "default_playlist_storage" || a_playlist->getName() == "backup_playlist_storage") 1848 { 1849 query.prepare("SELECT playlist_id FROM music_saved_playlists WHERE playlist_name = ? AND hostname = ? AND playlist_songs = ? ; "); 1850 query.bindValue(0, a_playlist->getName().utf8()); 1851 query.bindValue(1, hostname); 1852 query.bindValue(2, db_song_list_string); 1853 } 1854 else 1855 { 1856 query.prepare("SELECT playlist_id FROM music_saved_playlists WHERE playlist_name = ? AND playlist_songs = ? ; "); 1857 query.bindValue(0, a_playlist->getName().utf8()); 1858 query.bindValue(1, db_song_list_string); 1859 } 1685 1860 1686 query.bindValue(0, a_playlist->getName().utf8());1687 query.bindValue(1, hostname);1688 query.bindValue(2, db_song_list_string);1689 1861 1690 1862 query.exec(); 1691 1863 … … 1776 1948 1777 1949 MSqlQuery query(MSqlQuery::InitCon()); 1778 1950 1779 query.prepare("DELETE FROM music playlist WHERE playlistid = ? ; ");1951 query.prepare("DELETE FROM music_saved_playlists WHERE playlist_id = ? ; "); 1780 1952 1781 1953 query.bindValue(0, playlist_database_id); 1782 1954 -
mfd/dbcheck.cpp
9 9 #include "mythtv/mythcontext.h" 10 10 #include "mythtv/mythdbcon.h" 11 11 12 const QString currentDatabaseVersion = "100 5";12 const QString currentDatabaseVersion = "1007"; 13 13 14 14 static void UpdateDBVersionNumber(const QString &newnumber) 15 15 { … … 323 323 324 324 performActualUpdate(updates, "1005", dbver); 325 325 } 326 327 328 if (dbver == "1005") 329 { 330 const QString updates[] = { 331 "CREATE TABLE music_albums (" 332 " album_id int(11) unsigned NOT NULL auto_increment PRIMARY KEY," 333 " album_name varchar(255) NOT NULL default ''," 334 " album_art text NOT NULL default ''," 335 " INDEX idx_album_name(album_name)" 336 ");", 337 "CREATE TABLE music_artists (" 338 " artist_id int(11) unsigned NOT NULL auto_increment PRIMARY KEY," 339 " artist_name varchar(255) NOT NULL default ''," 340 " INDEX idx_artist_name(artist_name)" 341 ");", 342 "CREATE TABLE music_currentsong (" 343 " song_id int(11) unsigned NOT NULL default '0'," 344 " pl_id int(11) unsigned NOT NULL default '0'," 345 " random tinyint(3) NOT NULL default '0'" 346 ");", 347 "CREATE TABLE music_genres (" 348 " genre_id int(11) unsigned NOT NULL auto_increment PRIMARY KEY," 349 " genre varchar(25) NOT NULL default ''," 350 " INDEX idx_genre(genre)" 351 ");", 352 "CREATE TABLE music_playhistory (" 353 " play_id int(11) unsigned NOT NULL auto_increment PRIMARY KEY," 354 " song_id int(11) unsigned NOT NULL default '0'," 355 " date_played datetime default NULL" 356 ");", 357 "CREATE TABLE music_playlist (" 358 " pl_id int(11) unsigned NOT NULL auto_increment PRIMARY KEY," 359 " song_id int(11) unsigned NOT NULL default '0'" 360 ");", 361 "CREATE TABLE music_saved_playlists (" 362 " playlist_id int(11) unsigned NOT NULL auto_increment PRIMARY KEY," 363 " playlist_name varchar(255) NOT NULL default ''," 364 " playlist_songs text NOT NULL default ''," 365 " date_created datetime default NULL," 366 " time int(11) default NULL," 367 " songcount smallint(8) unsigned NOT NULL default ''," 368 " hostname VARCHAR(255) NOT NULL default ''" 369 ");", 370 "CREATE TABLE music_songs (" 371 " song_id int(11) unsigned NOT NULL auto_increment PRIMARY KEY," 372 " artist_id int(11) unsigned NOT NULL default '0'," 373 " compilationartist_id int(11) unsigned NOT NULL default '0'," 374 " album_id int(11) unsigned NOT NULL default '0'," 375 " genre_id int(11) unsigned NOT NULL default '0'," 376 " year smallint(6) NOT NULL default '0'," 377 " lastplay datetime default NULL," 378 " date_entered datetime default NULL," 379 " date_modified datetime default NULL," 380 " name varchar(255) NOT NULL default ''," 381 " track smallint(6) unsigned NOT NULL default '0'," 382 " length int(11) unsigned NOT NULL default '0'," 383 " size int(11) unsigned NOT NULL default '0'," 384 " bitrate int(11) unsigned NOT NULL default '0'," 385 " type varchar(4) default NULL," 386 " numplays int(11) unsigned NOT NULL default '0'," 387 " rating tinyint(4) unsigned NOT NULL default '0'," 388 " filename text NOT NULL default ''," 389 " format varchar(4) NOT NULL default '0'," 390 " compilation tinyint(1) unsigned NOT NULL default '0'," 391 " mythdigest VARCHAR(255)," 392 " description VARCHAR(255)," 393 " comment VARCHAR(255)," 394 " disc_count SMALLINT(5) UNSIGNED DEFAULT '0'," 395 " disc_number SMALLINT(5) UNSIGNED DEFAULT '0'," 396 " track_count SMALLINT(5) UNSIGNED DEFAULT '0'," 397 " start_time INT(10) UNSIGNED DEFAULT '0'," 398 " stop_time INT(10) UNSIGNED," 399 " eq_preset VARCHAR(255)," 400 " relative_volume TINYINT DEFAULT '0'," 401 " bpm SMALLINT(5) UNSIGNED," 402 // The following field is temporary for schema conversion and is removed in a later query. 403 " compilation_artist VARCHAR(128) NOT NULL," 404 " INDEX idx_tmp(compilation_artist)," 405 // The rest is standard 406 " INDEX idx_name(name)," 407 " INDEX idx_mythdigest(mythdigest)" 408 ");", 409 "CREATE TABLE music_stats (" 410 " num_artists smallint(5) unsigned NOT NULL default '0'," 411 " num_albums smallint(5) unsigned NOT NULL default '0'," 412 " num_songs mediumint(8) unsigned NOT NULL default '0'," 413 " num_genres tinyint(3) unsigned NOT NULL default '0'," 414 " total_time varchar(12) NOT NULL default '0'," 415 " total_size varchar(10) NOT NULL default '0'" 416 ");", 417 "RENAME TABLE smartplaylist TO music_smartplaylist;", 418 "RENAME TABLE smartplaylistitem TO music_smartplaylistitem;", 419 "RENAME TABLE smartplaylistcategory TO music_smartplaylistcategory;", 420 // Run necessary SQL to migrate the table structure 421 "INSERT INTO music_artists (artist_name) SELECT DISTINCT artist FROM musicmetadata;", 422 "INSERT INTO music_albums (album_name) SELECT DISTINCT album FROM musicmetadata;", 423 "INSERT INTO music_genres (genre) SELECT DISTINCT genre FROM musicmetadata;", 424 "INSERT INTO music_songs " 425 " (song_id, artist_id, compilationartist_id, album_id, genre_id, year, lastplay," 426 " date_entered, date_modified, name, track, length, size, numplays," 427 " rating, filename, compilation, compilation_artist)" 428 " SELECT intid, ma.artist_id, 0, mb.album_id, mg.genre_id, year, lastplay," 429 " date_added, date_modified, title, tracknum, length, IFNULL(size,0), playcount," 430 " rating, filename, compilation, compilation_artist" 431 " FROM musicmetadata AS mmd, music_artists AS ma, music_albums AS mb, music_genres AS mg" 432 " WHERE mmd.artist=ma.artist_name AND mmd.album=mb.album_name AND mmd.genre=mg.genre;", 433 "UPDATE music_songs AS ms, music_artists AS ma " 434 " SET ms.compilationartist_id=ma.artist_id, compilation_artist=''" 435 " WHERE ms.compilation_artist=ma.artist_name;", 436 "INSERT INTO music_artists (artist_name)" 437 " SELECT DISTINCT compilation_artist FROM music_songs" 438 " WHERE compilation_artist <> '';", 439 "UPDATE music_songs AS ms,music_artists AS ma" 440 " SET ms.compilationartist_id=ma.artist_id, compilation_artist=''" 441 " WHERE ms.compilation_artist=ma.artist_name;", 442 "ALTER TABLE music_songs DROP COLUMN compilation_artist;", 443 "INSERT INTO music_saved_playlists" 444 " (playlist_name,playlist_songs,date_created,hostname)" 445 " SELECT name AS playlist_name, songlist AS playlist_songs,NOW() AS date_created,hostname" 446 " FROM musicplaylist;", 447 //"DROP TABLE musicmetadata;", 448 //"DROP TABLE musicplaylist;", 449 "" 450 }; 451 performActualUpdate(updates, "1006", dbver); 452 } 326 453 } 327 454 -
mfd/mfd.pro
24 24 TARGET = mfd 25 25 26 26 LIBS += -lmyth-$$LIBVERSION 27 LIBS += -lmythui-$$LIBVERSION -lGL 27 28 28 29 29 !isEmpty(USE_WMA_AUDIO){ 30 30 LIBS += -lmythavformat-$$LIBVERSION 31 31 LIBS += -lmythavcodec-$$LIBVERSION -
mfdlib/avfdecoder.cpp
232 232 233 233 if (output()) 234 234 { 235 output()->Reconfigure(16, audio_dec->channels, audio_dec->sample_rate );235 output()->Reconfigure(16, audio_dec->channels, audio_dec->sample_rate, false); 236 236 output()->SetSourceBitrate(audio_dec->bit_rate); 237 237 } 238 238 -
mfdlib/aacdecoder.cpp
383 383 384 384 if (output()) 385 385 { 386 output()->Reconfigure(16, channels, sample_rate );386 output()->Reconfigure(16, channels, sample_rate, false); 387 387 output()->SetSourceBitrate(bitrate); 388 388 } 389 389 -
mfdlib/wavdecoder.cpp
146 146 147 147 if (output()) 148 148 { 149 output()->Reconfigure(bits_per_sample, chan, freq );149 output()->Reconfigure(bits_per_sample, chan, freq, false); 150 150 output()->SetSourceBitrate(bitrate); 151 151 } 152 152 -
mfdlib/flacdecoder.cpp
157 157 158 158 if (output()) 159 159 { 160 output()->Reconfigure(bitspersample, chan, freq );160 output()->Reconfigure(bitspersample, chan, freq, false); 161 161 output()->SetSourceBitrate(44100 * 2 * 16); 162 162 } 163 163 -
mfdlib/cddecoder.cpp
175 175 176 176 if (output()) 177 177 { 178 output()->Reconfigure(16, chan, freq );178 output()->Reconfigure(16, chan, freq, false); 179 179 output()->SetSourceBitrate(44100 * 2 * 16); 180 180 } 181 181 -
mfdlib/maddecoder.cpp
132 132 133 133 if (output()) 134 134 { 135 output()->Reconfigure(16, channels, freq );135 output()->Reconfigure(16, channels, freq, false); 136 136 output()->SetSourceBitrate(bitrate); 137 137 } 138 138 -
mfdlib/vorbisdecoder.cpp
233 233 234 234 if (output()) 235 235 { 236 output()->Reconfigure(16, chan, freq);236 output()->Reconfigure(16, chan, freq, false); 237 237 output()->SetSourceBitrate(bitrate); 238 238 } 239 239