diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1126ed0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +Makefile +themenop +config.ep +config.pro +config.log +mythconfig.mak diff --git a/mytharchive/i18n/.gitignore b/mytharchive/i18n/.gitignore new file mode 100644 index 0000000..5669308 --- /dev/null +++ b/mytharchive/i18n/.gitignore @@ -0,0 +1 @@ +i18n diff --git a/mytharchive/i18n/mytharchive_fi.qm b/mytharchive/i18n/mytharchive_fi.qm index 2fc0f91..f95c6cc 100644 Binary files a/mytharchive/i18n/mytharchive_fi.qm and b/mytharchive/i18n/mytharchive_fi.qm differ diff --git a/mytharchive/i18n/mytharchive_fi.ts b/mytharchive/i18n/mytharchive_fi.ts index 1a10407..e6c8686 100644 --- a/mytharchive/i18n/mytharchive_fi.ts +++ b/mytharchive/i18n/mytharchive_fi.ts @@ -530,6 +530,12 @@ Aseta tyhjä DVD asemaan ja valitse alla oleva optio.</translation> <context> <name>RecordingSelector</name> <message> + <source>Retrieving Recording List. +Please Wait...</source> + <translation>Listaa tallenteet. +Odota...</translation> + </message> + <message> <source>Clear All</source> <translation>Tyhjennä Kaikki</translation> </message> @@ -547,7 +553,7 @@ Aseta tyhjä DVD asemaan ja valitse alla oleva optio.</translation> </message> <message> <source>Retrieving Recording List. Please Wait...</source> - <translation>Hakee nauhoitusluetteloa...</translation> + <translation type="obsolete">Hakee nauhoitusluetteloa...</translation> </message> <message> <source>Either you don't have any recordings or no recordings are available locally!</source> diff --git a/mytharchive/mytharchive/recordingselector.cpp b/mytharchive/mytharchive/recordingselector.cpp index 4344b27..5e0d69c 100644 --- a/mytharchive/mytharchive/recordingselector.cpp +++ b/mytharchive/mytharchive/recordingselector.cpp @@ -116,7 +116,7 @@ bool RecordingSelector::Create(void) void RecordingSelector::Init(void) { - QString message = tr("Retrieving Recording List. Please Wait..."); + QString message = tr("Retrieving Recording List.\nPlease Wait..."); MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); diff --git a/mytharchive/mytharchivehelper/.gitignore b/mytharchive/mytharchivehelper/.gitignore new file mode 100644 index 0000000..f6bfbdb --- /dev/null +++ b/mytharchive/mytharchivehelper/.gitignore @@ -0,0 +1 @@ +mytharchivehelper diff --git a/mytharchive/mythburn/scripts/mythburn.py b/mytharchive/mythburn/scripts/mythburn.py index be923a5..72d56dd 100755 --- a/mytharchive/mythburn/scripts/mythburn.py +++ b/mytharchive/mythburn/scripts/mythburn.py @@ -38,7 +38,7 @@ #****************************************************************************** # version of script - change after each update -VERSION="0.1.20101006-1" +VERSION="0.1.20101206-1" # keep all temporary files for debugging purposes # set this to True before a first run through when testing @@ -400,7 +400,7 @@ def getThemeFile(theme,file): # Returns the path where we can find our fonts def getFontPathName(fontname): - return os.path.join(sharepath, fontname) + return os.path.join(sharepath, "fonts", fontname) ############################################################# # Creates a file path where the temp files for a video file can be created @@ -2677,12 +2677,16 @@ def deMultiplexMPEG2File(folder, mediafile, video, audio1, audio2): command += "-a %d " % (audio1[AUDIO_ID]) elif audio1[AUDIO_CODEC] == 'AC3': command += "-c %d " % (audio1[AUDIO_ID]) + elif audio1[AUDIO_CODEC] == 'EAC3': + command += "-c %d " % (audio1[AUDIO_ID]) if audio2[AUDIO_ID] != -1: if audio2[AUDIO_CODEC] == 'MP2': command += "-a %d " % (audio2[AUDIO_ID]) elif audio2[AUDIO_CODEC] == 'AC3': command += "-c %d " % (audio2[AUDIO_ID]) + elif audio2[AUDIO_CODEC] == 'EAC3': + command += "-c %d " % (audio2[AUDIO_ID]) else: command = "mythreplex --demux --fix_sync -o %s " % (folder + "/stream") @@ -2693,12 +2697,17 @@ def deMultiplexMPEG2File(folder, mediafile, video, audio1, audio2): command += "-a %d " % (audio1[AUDIO_ID] & 255) elif audio1[AUDIO_CODEC] == 'AC3': command += "-c %d " % (audio1[AUDIO_ID] & 255) + elif audio1[AUDIO_CODEC] == 'EAC3': + command += "-c %d " % (audio1[AUDIO_ID] & 255) + if audio2[AUDIO_ID] != -1: if audio2[AUDIO_CODEC] == 'MP2': command += "-a %d " % (audio2[AUDIO_ID] & 255) elif audio2[AUDIO_CODEC] == 'AC3': command += "-c %d " % (audio2[AUDIO_ID] & 255) + elif audio2[AUDIO_CODEC] == 'EAC3': + command += "-c %d " % (audio2[AUDIO_ID] & 255) mediafile = quoteFilename(mediafile) command += mediafile diff --git a/mytharchive/theme/default-wide/mytharchive-ui.xml b/mytharchive/theme/default-wide/mytharchive-ui.xml index ebd7e21..41d6e71 100644 --- a/mytharchive/theme/default-wide/mytharchive-ui.xml +++ b/mytharchive/theme/default-wide/mytharchive-ui.xml @@ -147,7 +147,7 @@ Common MythArchive window definitions </statetype> </state> <state name="selectedactive" from="active"> - <shape name="buttonbackground"> + <shape name="background"> <area>0,0,100%,100%</area> <fill style="gradient"> <gradient start="#52CA38" end="#349838" /> @@ -155,7 +155,7 @@ Common MythArchive window definitions </shape> </state> <state name="selectedinactive" from="active"> - <shape name="buttonbackground"> + <shape name="background"> <area>0,0,100%,100%</area> <fill style="gradient"> <gradient start="#52CA38" end="#349838" alpha="100" /> @@ -261,7 +261,7 @@ Common MythArchive window definitions </statetype> </state> <state name="selectedactive" from="active"> - <shape name="buttonbackground"> + <shape name="background"> <area>0,0,100%,100%</area> <fill style="gradient"> <gradient start="#52CA38" end="#349838" /> @@ -269,7 +269,7 @@ Common MythArchive window definitions </shape> </state> <state name="selectedinactive" from="active"> - <shape name="buttonbackground"> + <shape name="background"> <area>0,0,100%,100%</area> <fill style="gradient"> <gradient start="#52CA38" end="#349838" alpha="100" /> @@ -333,7 +333,7 @@ Common MythArchive window definitions </statetype> </state> <state name="selectedactive" from="active"> - <shape name="buttonbackground"> + <shape name="background"> <area>0,0,100%,100%</area> <fill style="gradient"> <gradient start="#52CA38" end="#349838" /> @@ -341,7 +341,7 @@ Common MythArchive window definitions </shape> </state> <state name="selectedinactive" from="active"> - <shape name="buttonbackground"> + <shape name="background"> <area>0,0,100%,100%</area> <fill style="gradient"> <gradient start="#52CA38" end="#349838" alpha="100" /> diff --git a/mytharchive/theme/default-wide/mythburn-ui.xml b/mytharchive/theme/default-wide/mythburn-ui.xml index cdf3a86..039a965 100644 --- a/mytharchive/theme/default-wide/mythburn-ui.xml +++ b/mytharchive/theme/default-wide/mythburn-ui.xml @@ -10,9 +10,10 @@ MythArchive GUI theme <window name="profilepopup"> <area>-1,-1,413,426</area> - <imagetype name="box"> - <filename>mz_function_popup.png</filename> - </imagetype> + <shape name="background" from="basebackground"> + <area>0,0,413,426</area> + <fill color="#000000" alpha="220" /> + </shape> <textarea name="title" from="basetextarea"> <area>20,20,360,40</area> diff --git a/mytharchive/theme/default/mytharchive-ui.xml b/mytharchive/theme/default/mytharchive-ui.xml index 8a001b6..0a021cb 100644 --- a/mytharchive/theme/default/mytharchive-ui.xml +++ b/mytharchive/theme/default/mytharchive-ui.xml @@ -146,7 +146,7 @@ Common MythArchive window definitions </statetype> </state> <state name="selectedactive" from="active"> - <shape name="buttonbackground"> + <shape name="background"> <area>0,0,100%,100%</area> <fill style="gradient"> <gradient start="#52CA38" end="#349838" /> @@ -154,7 +154,7 @@ Common MythArchive window definitions </shape> </state> <state name="selectedinactive" from="active"> - <shape name="buttonbackground"> + <shape name="background"> <area>0,0,100%,100%</area> <fill style="gradient"> <gradient start="#52CA38" end="#349838" alpha="100" /> @@ -259,7 +259,7 @@ Common MythArchive window definitions </statetype> </state> <state name="selectedactive" from="active"> - <shape name="buttonbackground"> + <shape name="background"> <area>0,0,100%,100%</area> <fill style="gradient"> <gradient start="#52CA38" end="#349838" /> @@ -267,7 +267,7 @@ Common MythArchive window definitions </shape> </state> <state name="selectedinactive" from="active"> - <shape name="buttonbackground"> + <shape name="background"> <area>0,0,100%,100%</area> <fill style="gradient"> <gradient start="#52CA38" end="#349838" alpha="100" /> @@ -330,7 +330,7 @@ Common MythArchive window definitions </statetype> </state> <state name="selectedactive" from="active"> - <shape name="buttonbackground"> + <shape name="background"> <area>0,0,100%,100%</area> <fill style="gradient"> <gradient start="#52CA38" end="#349838" /> @@ -338,7 +338,7 @@ Common MythArchive window definitions </shape> </state> <state name="selectedinactive" from="active"> - <shape name="buttonbackground"> + <shape name="background"> <area>0,0,100%,100%</area> <fill style="gradient"> <gradient start="#52CA38" end="#349838" alpha="100" /> diff --git a/mytharchive/theme/default/mythburn-ui.xml b/mytharchive/theme/default/mythburn-ui.xml index d7b09d1..129540b 100644 --- a/mytharchive/theme/default/mythburn-ui.xml +++ b/mytharchive/theme/default/mythburn-ui.xml @@ -10,9 +10,10 @@ MythArchive GUI theme <window name="profilepopup"> <area>-1,-1,413,426</area> - <imagetype name="box"> - <filename>mz_function_popup.png</filename> - </imagetype> + <shape name="background" from="basebackground"> + <area>0,0,413,426</area> + <fill color="#000000" alpha="220" /> + </shape> <textarea name="title" from="basetextarea"> <area>20,20,360,40</area> diff --git a/mythbrowser/i18n/.gitignore b/mythbrowser/i18n/.gitignore new file mode 100644 index 0000000..5669308 --- /dev/null +++ b/mythbrowser/i18n/.gitignore @@ -0,0 +1 @@ +i18n diff --git a/mythbrowser/theme/default-wide/browser-ui.xml b/mythbrowser/theme/default-wide/browser-ui.xml index 3de5c7b..d927166 100644 --- a/mythbrowser/theme/default-wide/browser-ui.xml +++ b/mythbrowser/theme/default-wide/browser-ui.xml @@ -61,9 +61,8 @@ <statetype name="buttonitem"> <area>0,0,180,40</area> <state name="active"> - <imagetype name="buttonbackground"> - <filename>horiz_selector.png</filename> - </imagetype> + <area>0,0,180,40</area> + <shape name="background" from="basewidgetshape" /> <textarea name="buttontext" from="basetextarea"> <area>0,0,180,40</area> <font>basesmall</font> @@ -73,14 +72,12 @@ </textarea> </state> <state name="selectedactive" from="active"> - <imagetype name="buttonbackground"> - <filename>horiz_selector_selected.png</filename> - </imagetype> + <shape name="background" from="baseselectedwidgetshape" /> </state> <state name="selectedinactive" from="active"> - <imagetype name="buttonbackground"> - <filename>horiz_selector_inactive.png</filename> - </imagetype> + <textarea name="buttontext"> + <font>basesmallgrey</font> + </textarea> </state> </statetype> <statetype name="downscrollarrow"> diff --git a/mythbrowser/theme/default/browser-ui.xml b/mythbrowser/theme/default/browser-ui.xml index 11b5ed0..ae30dff 100644 --- a/mythbrowser/theme/default/browser-ui.xml +++ b/mythbrowser/theme/default/browser-ui.xml @@ -53,9 +53,8 @@ <statetype name="buttonitem"> <area>0,0,180,40</area> <state name="active"> - <imagetype name="buttonbackground"> - <filename>horiz_selector.png</filename> - </imagetype> + <area>0,0,180,40</area> + <shape name="background" from="basewidgetshape" /> <textarea name="buttontext" from="basetextarea"> <area>0,0,180,40</area> <font>basesmall</font> @@ -63,14 +62,12 @@ </textarea> </state> <state name="selectedactive" from="active"> - <imagetype name="buttonbackground"> - <filename>horiz_selector_selected.png</filename> - </imagetype> + <shape name="background" from="baseselectedwidgetshape" /> </state> <state name="selectedinactive" from="active"> - <imagetype name="buttonbackground"> - <filename>horiz_selector_inactive.png</filename> - </imagetype> + <textarea name="buttontext"> + <font>basesmallgrey</font> + </textarea> </state> </statetype> <statetype name="downscrollarrow"> diff --git a/mythgallery/dcrawplugin/.gitignore b/mythgallery/dcrawplugin/.gitignore new file mode 100644 index 0000000..0e56cf2 --- /dev/null +++ b/mythgallery/dcrawplugin/.gitignore @@ -0,0 +1 @@ +config.h diff --git a/mythgallery/i18n/.gitignore b/mythgallery/i18n/.gitignore new file mode 100644 index 0000000..5669308 --- /dev/null +++ b/mythgallery/i18n/.gitignore @@ -0,0 +1 @@ +i18n diff --git a/mythgallery/i18n/mythgallery_fi.qm b/mythgallery/i18n/mythgallery_fi.qm index 38ce686..49d1c17 100644 Binary files a/mythgallery/i18n/mythgallery_fi.qm and b/mythgallery/i18n/mythgallery_fi.qm differ diff --git a/mythgallery/i18n/mythgallery_fi.ts b/mythgallery/i18n/mythgallery_fi.ts index cc61a4b..7fdb12d 100644 --- a/mythgallery/i18n/mythgallery_fi.ts +++ b/mythgallery/i18n/mythgallery_fi.ts @@ -281,6 +281,14 @@ <translation>Tämä on kaksoispisteillä erotettu lista tietopoluista. Jos listassa oleva polku on hakemisto, sen sisältö kopioidaan. Jos se on ajettava ohjelma, se ajetaan.</translation> </message> <message> + <source>Automatically load MythGallery to display pictures</source> + <translation>Automaattisesti käynnistä MythGallery näyttämään kuvat</translation> + </message> + <message> + <source>When a new CD-Rom or removable storage device containing pictures is detected then load MythGallery to display the content.</source> + <translation>Käynnistä MythGallery näyttämään kuvat kun huomataan kuvia sisältävä CD-Rom tai irroitettava muistilaite.</translation> + </message> + <message> <source>Type of transition</source> <translation>Diaesityksen kuvanvaihtotyyli</translation> </message> diff --git a/mythgallery/mythgallery/.gitignore b/mythgallery/mythgallery/.gitignore new file mode 100644 index 0000000..0e56cf2 --- /dev/null +++ b/mythgallery/mythgallery/.gitignore @@ -0,0 +1 @@ +config.h diff --git a/mythgallery/mythgallery/gallerysettings.cpp b/mythgallery/mythgallery/gallerysettings.cpp index 1da908c..d32fec6 100644 --- a/mythgallery/mythgallery/gallerysettings.cpp +++ b/mythgallery/mythgallery/gallerysettings.cpp @@ -78,6 +78,15 @@ static HostLineEdit *MythGalleryImportDirs() return gc; }; +static HostCheckBox *MythGalleryAutoLoad() +{ + HostCheckBox *gc = new HostCheckBox("GalleryAutoLoad"); + gc->setLabel(QObject::tr("Automatically load MythGallery to display pictures")); + gc->setValue(false); + gc->setHelpText(QObject::tr("When a new CD-Rom or removable storage device containing pictures is detected then load MythGallery to display the content.")); + return gc; +} + #ifdef USING_OPENGL static HostCheckBox *SlideshowUseOpenGL() @@ -217,6 +226,7 @@ GallerySettings::GallerySettings() general->addChild(MythGalleryThumbnailLocation()); general->addChild(MythGallerySortOrder()); general->addChild(MythGalleryImportDirs()); + general->addChild(MythGalleryAutoLoad()); general->addChild(MythGalleryMoviePlayerCmd()); addChild(general); diff --git a/mythgallery/mythgallery/galleryutil.cpp b/mythgallery/mythgallery/galleryutil.cpp index b47c9e0..b4a3b3e 100644 --- a/mythgallery/mythgallery/galleryutil.cpp +++ b/mythgallery/mythgallery/galleryutil.cpp @@ -98,7 +98,7 @@ bool GalleryUtil::IsImage(const QString &filePath) QStringList::const_iterator it = filt.begin(); for (; it != filt.end(); ++it) { - if ((*it).toLower().contains(fi.suffix())) + if ((*it).contains(fi.suffix().toLower())) return true; } @@ -115,7 +115,7 @@ bool GalleryUtil::IsMovie(const QString &filePath) QStringList::const_iterator it = filt.begin(); for (; it != filt.end(); ++it) { - if ((*it).toLower().contains(fi.suffix())) + if ((*it).contains(fi.suffix().toLower())) return true; } diff --git a/mythgallery/mythgallery/main.cpp b/mythgallery/mythgallery/main.cpp index 82146ef..c93f575 100644 --- a/mythgallery/mythgallery/main.cpp +++ b/mythgallery/mythgallery/main.cpp @@ -59,6 +59,9 @@ static void runGallery(void) static void handleMedia(MythMediaDevice *dev) { + if (! gCoreContext->GetNumSetting("GalleryAutoLoad", 0)) + return; + if (dev && dev->isUsable()) run(dev); } diff --git a/mythgame/i18n/.gitignore b/mythgame/i18n/.gitignore new file mode 100644 index 0000000..5669308 --- /dev/null +++ b/mythgame/i18n/.gitignore @@ -0,0 +1 @@ +i18n diff --git a/mythgame/mythgame/.gitignore b/mythgame/mythgame/.gitignore new file mode 100644 index 0000000..d6585ba --- /dev/null +++ b/mythgame/mythgame/.gitignore @@ -0,0 +1 @@ +gameui.moc diff --git a/mythmusic/i18n/.gitignore b/mythmusic/i18n/.gitignore new file mode 100644 index 0000000..5669308 --- /dev/null +++ b/mythmusic/i18n/.gitignore @@ -0,0 +1 @@ +i18n diff --git a/mythmusic/mythmusic/.gitignore b/mythmusic/mythmusic/.gitignore new file mode 100644 index 0000000..0e56cf2 --- /dev/null +++ b/mythmusic/mythmusic/.gitignore @@ -0,0 +1 @@ +config.h diff --git a/mythmusic/mythmusic/cdrip.cpp b/mythmusic/mythmusic/cdrip.cpp index 72f1d33..d6f522c 100644 --- a/mythmusic/mythmusic/cdrip.cpp +++ b/mythmusic/mythmusic/cdrip.cpp @@ -945,8 +945,6 @@ QString Ripper::filenameFromMetadata(Metadata *track, bool createDir) VERBOSE(VB_GENERAL, QString("Invalid file storage definition.")); } - filename = QString(filename.toLocal8Bit().constData()); - QStringList directoryList = filename.split("/"); for (int i = 0; i < (directoryList.size() - 1); i++) { diff --git a/mythmusic/mythmusic/filescanner.cpp b/mythmusic/mythmusic/filescanner.cpp index 958f219..f956d25 100644 --- a/mythmusic/mythmusic/filescanner.cpp +++ b/mythmusic/mythmusic/filescanner.cpp @@ -22,7 +22,7 @@ FileScanner::FileScanner () MSqlQuery query(MSqlQuery::InitCon()); // Cache the directory ids from the database - query.prepare("SELECT directory_id, LOWER(path) FROM music_directories"); + query.prepare("SELECT directory_id, path FROM music_directories"); if (query.exec()) { while(query.next()) @@ -109,12 +109,12 @@ void FileScanner::BuildFileList(QString &directory, MusicLoadedMap &music_files, QString dir(filename); dir.remove(0, m_startdir.length()); - newparentid = m_directoryid[QString(dir.toUtf8()).toLower()]; + newparentid = m_directoryid[dir]; if (newparentid == 0) { int id = GetDirectoryId(dir, parentid); - m_directoryid[QString(dir.toUtf8()).toLower()] = id; + m_directoryid[dir] = id; if (id > 0) { @@ -252,8 +252,7 @@ void FileScanner::AddFileToDB(const QString &filename) query.prepare("INSERT INTO music_albumart SET filename = :FILE, " "directory_id = :DIRID, imagetype = :TYPE;"); query.bindValue(":FILE", name); - query.bindValue(":DIRID", m_directoryid[ - QString(directory.toUtf8()).toLower()]); + query.bindValue(":DIRID", m_directoryid[directory]); query.bindValue(":TYPE", AlbumArtImages::guessImageType(name)); if (!query.exec() || query.numRowsAffected() <= 0) @@ -274,24 +273,24 @@ void FileScanner::AddFileToDB(const QString &filename) QString album_cache_string; // Set values from cache - int did = m_directoryid[QString(directory.toUtf8()).toLower()]; + int did = m_directoryid[directory]; if (did > 0) data->setDirectoryId(did); - int aid = m_artistid[QString(data->Artist().toUtf8()).toLower()]; + int aid = m_artistid[data->Artist().toLower()]; if (aid > 0) { data->setArtistId(aid); // The album cache depends on the artist id album_cache_string = data->getArtistId() + "#" - + QString(data->Album().toUtf8()).toLower(); + + data->Album().toLower(); if (m_albumid[album_cache_string] > 0) data->setAlbumId(m_albumid[album_cache_string]); } - int gid = m_genreid[QString(data->Genre().toUtf8()).toLower()]; + int gid = m_genreid[data->Genre().toLower()]; if (gid > 0) data->setGenreId(gid); @@ -299,14 +298,14 @@ void FileScanner::AddFileToDB(const QString &filename) data->dumpToDatabase(); // Update the cache - m_artistid[QString(data->Artist().toUtf8()).toLower()] = + m_artistid[data->Artist().toLower()] = data->getArtistId(); - m_genreid[QString(data->Genre().toUtf8()).toLower()] = + m_genreid[data->Genre().toLower()] = data->getGenreId(); album_cache_string = data->getArtistId() + "#" - + QString(data->Album().toUtf8()).toLower(); + + data->Album().toLower(); m_albumid[album_cache_string] = data->getAlbumId(); delete data; } @@ -445,8 +444,7 @@ void FileScanner::RemoveFileFromDB (const QString &filename) query.prepare("DELETE FROM music_albumart WHERE filename= :FILE AND " "directory_id= :DIRID;"); query.bindValue(":FILE", sqlfilename); - query.bindValue(":DIRID", m_directoryid[ - QString(directory.toUtf8()).toLower()]); + query.bindValue(":DIRID", m_directoryid[directory]); if (!query.exec() || query.numRowsAffected() <= 0) { @@ -491,24 +489,24 @@ void FileScanner::UpdateFileInDB(const QString &filename) QString album_cache_string; // Set values from cache - int did = m_directoryid[QString(directory.toUtf8()).toLower()]; + int did = m_directoryid[directory]; if (did > 0) disk_meta->setDirectoryId(did); - int aid = m_artistid[QString(disk_meta->Artist().toUtf8()).toLower()]; + int aid = m_artistid[disk_meta->Artist().toLower()]; if (aid > 0) { disk_meta->setArtistId(aid); // The album cache depends on the artist id album_cache_string = disk_meta->getArtistId() + "#" + - QString(disk_meta->Album().toUtf8()).toLower(); + disk_meta->Album().toLower(); if (m_albumid[album_cache_string] > 0) disk_meta->setAlbumId(m_albumid[album_cache_string]); } - int gid = m_genreid[QString(disk_meta->Genre().toUtf8()).toLower()]; + int gid = m_genreid[disk_meta->Genre().toLower()]; if (gid > 0) disk_meta->setGenreId(gid); @@ -516,12 +514,12 @@ void FileScanner::UpdateFileInDB(const QString &filename) disk_meta->dumpToDatabase(); // Update the cache - m_artistid[QString(disk_meta->Artist().toUtf8()).toLower()] + m_artistid[disk_meta->Artist().toLower()] = disk_meta->getArtistId(); - m_genreid[QString(disk_meta->Genre().toUtf8()).toLower()] + m_genreid[disk_meta->Genre().toLower()] = disk_meta->getGenreId(); album_cache_string = disk_meta->getArtistId() + "#" + - QString(disk_meta->Album().toUtf8()).toLower(); + disk_meta->Album().toLower(); m_albumid[album_cache_string] = disk_meta->getAlbumId(); } diff --git a/mythmusic/mythmusic/musicplayer.cpp b/mythmusic/mythmusic/musicplayer.cpp index fd03249..9f92a42 100644 --- a/mythmusic/mythmusic/musicplayer.cpp +++ b/mythmusic/mythmusic/musicplayer.cpp @@ -993,8 +993,9 @@ void MusicPlayer::decoderHandlerReady(void) VERBOSE(VB_PLAYBACK, QString ("decoder handler is ready, decoding %1"). arg(getDecoder()->getFilename())); - if (getDecoder()->getFilename().contains("cda") == 1) - dynamic_cast<CdDecoder*>(getDecoder())->setDevice(m_CDdevice); + CdDecoder *cddecoder = dynamic_cast<CdDecoder*>(getDecoder()); + if (cddecoder) + cddecoder->setDevice(m_CDdevice); getDecoder()->setOutput(m_output); //getDecoder()-> setBlockSize(2 * 1024); diff --git a/mythmusic/theme/default-wide/music-ui.xml b/mythmusic/theme/default-wide/music-ui.xml index 81c4f4b..a4dcd12 100644 --- a/mythmusic/theme/default-wide/music-ui.xml +++ b/mythmusic/theme/default-wide/music-ui.xml @@ -1277,19 +1277,19 @@ </imagetype> <progressbar name="progress"> - <area>170,150,10,10</area> - <layout>horizontal</layout> - <style>reveal</style> - <imagetype name="background"> - <filename>mm_progress-bg.png</filename> - </imagetype> - <imagetype name="progressimage"> - <filename>mm_progress-fg.png</filename> - </imagetype> - </progressbar> + <area>170,150,10,10</area> + <layout>horizontal</layout> + <style>reveal</style> + <imagetype name="background"> + <filename>mm_progress-bg.png</filename> + </imagetype> + <imagetype name="progressimage"> + <filename>mm_progress-fg.png</filename> + </imagetype> + </progressbar> </window> - <window name="volume_popup"> + <window name="volume_popup"> <area>-1,-1,620,165</area> <imagetype name="backimg"> <area>0,0,620,165</area> diff --git a/mythmusic/theme/default/music-ui.xml b/mythmusic/theme/default/music-ui.xml index ac445a0..7d56717 100644 --- a/mythmusic/theme/default/music-ui.xml +++ b/mythmusic/theme/default/music-ui.xml @@ -1539,4 +1539,169 @@ </progressbar> </window> + <window name="volume_popup"> + <area>-1,-1,620,165</area> + <imagetype name="backimg"> + <area>0,0,620,165</area> + <filename>mythprogressdialog-background.png</filename> + </imagetype> + + <textarea name="message" from="basetextarea"> + <area>20,20,540,60</area> + <multiline>yes</multiline> + <align>allcenter</align> + <value>Volume</value> + </textarea> + + <statetype name="mute_state"> + <position>20,90</position> + <state name="off"> + <imagetype name="statusimage"> + <filename>mm_volume.png</filename> + </imagetype> + </state> + <state name="on"> + <imagetype name="statusimage"> + <filename>mm_volume_muted.png</filename> + </imagetype> + </state> + </statetype> + + <progressbar name="volume_progress" from="baseprogressbar"> + <position>60,80</position> + </progressbar> + + <textarea name="volume_text" from="basetextarea"> + <area>70,120,300,30</area> + <align>left,top</align> + <value>0%</value> + </textarea> + </window> + + <window name="trackdetail_popup"> + <area>-1,-1,800,600</area> + + <shape name="background" from="basebackground"> + <area>0,0,800,600</area> + <type>roundbox</type> + <fill color="#303030" alpha="255" /> + <line color="#FFFFFF" alpha="255" width="2" /> + <cornerradius>12</cornerradius> + </shape> + + <imagetype name="coverart"> + <area>10,100,180,180</area> + <filename>mm_nothumb.png</filename> + <preserveaspect>true</preserveaspect> + </imagetype> + + <textarea name="titlelbl" from="basetextarea"> + <area>170,50,150,35</area> + <font>basemediumyellow</font> + <value>Title:</value> + <align>right</align> + </textarea> + + <textarea name="title" from="basetextarea"> + <area>330,50,460,40</area> + <font>basemedium</font> + </textarea> + + <textarea name="artistlbl" from="titlelbl"> + <area>170,100,150,35</area> + <value>Artist:</value> + </textarea> + + <textarea name="artist" from="title"> + <area>330,100,460,35</area> + </textarea> + + <textarea name="albumlbl" from="titlelbl"> + <area>170,150,150,35</area> + <value>Album:</value> + </textarea> + + <textarea name="album" from="title"> + <area>330,150,460,90</area> + </textarea> + + <textarea name="genrelbl" from="titlelbl"> + <area>170,250,150,35</area> + <value>Genre:</value> + </textarea> + + <textarea name="genre" from="title"> + <area>330,250,460,90</area> + </textarea> + + <textarea name="tracknumlbl" from="titlelbl"> + <area>410,200,150,35</area> + <value>Track No.:</value> + </textarea> + + <textarea name="tracknum" from="title"> + <area>570,200,100,290</area> + </textarea> + + <textarea name="lenlbl" from="titlelbl"> + <area>170,200,150,35</area> + <value>Length:</value> + </textarea> + + <textarea name="length" from="title"> + <area>330,200,177,35</area> + </textarea> + + <textarea name="yearlbl" from="titlelbl"> + <area>170,300,150,35</area> + <value>Year:</value> + </textarea> + + <textarea name="year" from="title"> + <area>330,300,80,35</area> + </textarea> + + <textarea name="ratinglbl" from="titlelbl"> + <area>170,350,150,35</area> + <align>right,top</align> + <value>Rating:</value> + </textarea> + + <statetype name="rating_state" from="baseratingstate"> + <position>330,355</position> + </statetype> + + <textarea name="lastplaylbl" from="titlelbl"> + <area>110,400,210,35</area> + <value>Last Played:</value> + </textarea> + + <textarea name="lastplayed" from="title"> + <area>330,400,460,35</area> + <value>Last Value</value> + </textarea> + + <textarea name="playcountlbl" from="titlelbl"> + <area>170,450,150,35</area> + <value>Played:</value> + </textarea> + + <textarea name="playcount" from="title"> + <area>330,450,460,35</area> + <template>%playcount% times</template> + </textarea> + + <textarea name="filenamelbl" from="titlelbl"> + <area>170,500,150,35</area> + <value>Filename:</value> + </textarea> + + <textarea name="filename" from="title"> + <area>330,505,460,90</area> + <font>basesmall</font> + <multiline>yes</multiline> + </textarea> + + </window> + </mythuitheme> diff --git a/mythnetvision/i18n/.gitignore b/mythnetvision/i18n/.gitignore new file mode 100644 index 0000000..5669308 --- /dev/null +++ b/mythnetvision/i18n/.gitignore @@ -0,0 +1 @@ +i18n diff --git a/mythnetvision/mythfillnetvision/.gitignore b/mythnetvision/mythfillnetvision/.gitignore new file mode 100644 index 0000000..9e8a404 --- /dev/null +++ b/mythnetvision/mythfillnetvision/.gitignore @@ -0,0 +1 @@ +mythfillnetvision diff --git a/mythnews/i18n/.gitignore b/mythnews/i18n/.gitignore new file mode 100644 index 0000000..5669308 --- /dev/null +++ b/mythnews/i18n/.gitignore @@ -0,0 +1 @@ +i18n diff --git a/mythnews/mythnews/main.cpp b/mythnews/mythnews/main.cpp index e18a4e1..f6bc741 100644 --- a/mythnews/mythnews/main.cpp +++ b/mythnews/mythnews/main.cpp @@ -69,7 +69,7 @@ int mythplugin_init(const char *libversion) "Couldn't upgrade database to new schema, exiting."); return -1; } - gCoreContext->ActivateSettingsCache(false); + gCoreContext->ActivateSettingsCache(true); setupKeys(); diff --git a/mythvideo/i18n/.gitignore b/mythvideo/i18n/.gitignore new file mode 100644 index 0000000..5669308 --- /dev/null +++ b/mythvideo/i18n/.gitignore @@ -0,0 +1 @@ +i18n diff --git a/mythvideo/mtd/.gitignore b/mythvideo/mtd/.gitignore new file mode 100644 index 0000000..96dc6e7 --- /dev/null +++ b/mythvideo/mtd/.gitignore @@ -0,0 +1 @@ +mtd diff --git a/mythvideo/mythvideo/.gitignore b/mythvideo/mythvideo/.gitignore new file mode 100644 index 0000000..e978b10 --- /dev/null +++ b/mythvideo/mythvideo/.gitignore @@ -0,0 +1 @@ +*.moc diff --git a/mythvideo/mythvideo/scripts/jamu.py b/mythvideo/mythvideo/scripts/jamu.py index 0ac03a8..fe5a9f8 100755 --- a/mythvideo/mythvideo/scripts/jamu.py +++ b/mythvideo/mythvideo/scripts/jamu.py @@ -306,6 +306,8 @@ __version__=u"v0.7.7" # 0.7.5 Added the TMDB MovieRating as videometadata table "rating" field # 0.7.6 Modifications to support MythTV python bindings changes # 0.7.7 Pull hostname from python bindings instead of socket libraries + # Added support of unicode characters within a jamu.conf file + # Replace 'xml' module version check with generic Python version, to correct failure in Python 2.7 usage_txt=u''' @@ -476,14 +478,10 @@ class OutStreamEncoder(object): sys.stdout = OutStreamEncoder(sys.stdout, 'utf8') sys.stderr = OutStreamEncoder(sys.stderr, 'utf8') -try: - import xml -except Exception, e: - print '''The python module xml must be installed. error(%s)''' % e +if sys.version_info <= (2,5): + print '''JAMU requires Python 2.5 or newer to run.''' sys.exit(1) -if xml.__version__ < u'41660': - print ''' -\n! Warning - The module xml (v41660 or greater) must be installed. Your version is different (v%s) than what Jamu was tested with. Jamu may not work on your installation.\nIt is recommended that you upgrade.\n''' % xml.__version__ + import xml.etree.cElementTree as ElementTree @@ -1246,7 +1244,7 @@ class Configuration(object): ) sys.exit(1) cfg = ConfigParser.SafeConfigParser() - cfg.read(useroptions) + cfg.readfp(codecs.open(useroptions, "r", "utf8")) for section in cfg.sections(): if section[:5] == 'File ': self.config['config_file'] = section[5:] diff --git a/mythweather/i18n/.gitignore b/mythweather/i18n/.gitignore new file mode 100644 index 0000000..5669308 --- /dev/null +++ b/mythweather/i18n/.gitignore @@ -0,0 +1 @@ +i18n diff --git a/mythweather/mythweather/scripts/ca_envcan/envcan_animaps.pl b/mythweather/mythweather/scripts/ca_envcan/envcan_animaps.pl index 373d7aa..8b89bf0 100755 --- a/mythweather/mythweather/scripts/ca_envcan/envcan_animaps.pl +++ b/mythweather/mythweather/scripts/ca_envcan/envcan_animaps.pl @@ -1,4 +1,5 @@ #!/usr/bin/perl +# vim:ts=4:sw=4:ai:et:si:sts=4 # # Animated satellite map grabber for Environment Canada. # @@ -13,6 +14,7 @@ use strict; use warnings; use English; +use File::Path; use File::Basename; use Cwd 'abs_path'; use lib dirname(abs_path($0 or $PROGRAM_NAME)), @@ -23,17 +25,18 @@ use Getopt::Std; use LWP::Simple; use Date::Manip; use ENVCANMapSearch; +use Image::Magick; our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d); my $name = 'ENVCAN-Animated-Map'; -my $version = 0.3; +my $version = 0.4; my $author = 'Joe Ripley'; my $email = 'vitaminjoe@gmail.com'; my $updateTimeout = 10*60; my $retrieveTimeout = 30; -my @types = ('amdesc', 'updatetime', 'animatedimage'); -my $dir = "./"; +my @types = ('amdesc', 'updatetime', 'animatedimage', 'copyright'); +my $dir = "/tmp/envcan"; getopts('Tvtlu:d:'); @@ -66,6 +69,10 @@ if (defined $opt_d) { $dir = $opt_d; } +if (!-d $dir) { + mkpath( $dir, {mode => 0755} ); +} + my $loc = shift; if (!defined $loc || $loc eq "") { @@ -97,24 +104,27 @@ foreach my $line (split(/\n/, $response)) { # Download map files, if necessary (maps are stale after 15 minutes) my $i = 0; +my $outimage = Image::Magick->new; foreach my $image (@image_list) { my $getImage = 1; - if (-f $path . $i) { + if (-f "$path$i" ) { my @stats = stat(_); - if ($stats[9] > (time - 900)) { $i++; next; } + if ($stats[9] > (time - 900)) { + $outimage->Read( "$path$i" ); + $i++; + next; + } } - getstore($base_url . $image, $path . $i); + getstore($base_url . $image, "$path$i"); + $outimage->Read( "$path$i" ); $i++; } -# Determine image size -if (!$size) { - use Image::Size; - my ($x, $y) = imgsize("${path}0"); - $size = "${x}x$y" if ($x && $y); -} +$outimage->Write( filename => "$dir/$file.gif", delay => 75 ); -print "amdesc::$desc\n"; -printf "animatedimage::${path}%%1-$i%s\n", ($size && "-$size" || ''); -print "updatetime::Last Updated on " . UnixDate("now", "%b %d, %I:%M %p %Z") . "\n"; +print "amdesc::$desc\n"; +print "animatedimage::$dir/$file.gif\n"; +print "updatetime::Last Updated on " . + UnixDate("now", "%b %d, %I:%M %p %Z") . "\n"; +print "copyright::Environment Canada\n"; diff --git a/mythweather/mythweather/scripts/ca_envcan/envcan_maps.pl b/mythweather/mythweather/scripts/ca_envcan/envcan_maps.pl new file mode 100755 index 0000000..a20607d --- /dev/null +++ b/mythweather/mythweather/scripts/ca_envcan/envcan_maps.pl @@ -0,0 +1,127 @@ +#!/usr/bin/perl +# vim:ts=4:sw=4:ai:et:si:sts=4 +# +# Static satellite map grabber for Environment Canada. +# +# This script downloads satellite map data from the Environment Canada +# website. It uses the lists of JPEG images supplied by the page at +# http://www.weatheroffice.gc.ca/satellite/index_e.html. +# +# The bulk of the code in this script was originally authored by +# Lucien Dunning (ldunning@gmail.com). +# Based on envcan_animaps.pl by Joe Ripley <vitaminjoe@gmail.com> + +use strict; +use warnings; + +use English; +use File::Path; +use File::Basename; +use Cwd 'abs_path'; +use lib dirname(abs_path($0 or $PROGRAM_NAME)), + '/usr/share/mythtv/mythweather/scripts/ca_envcan', + '/usr/local/share/mythtv/mythweather/scripts/ca_envcan'; + +use Getopt::Std; +use LWP::Simple; +use Date::Manip; +use ENVCANMapSearch; +use Image::Magick; + +our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d); + +my $name = 'ENVCAN-Static-Map'; +my $version = 0.1; +my $author = 'Gavin Hurlbut'; +my $email = 'gjhurlbu@gmail.com'; +my $updateTimeout = 10*60; +my $retrieveTimeout = 30; +my @types = ('smdesc', 'updatetime', 'map', 'copyright'); +my $dir = "/tmp/envcan"; + +getopts('Tvtlu:d:'); + +if (defined $opt_v) { + print "$name,$version,$author,$email\n"; + exit 0; +} + +if (defined $opt_T) { + print "$updateTimeout,$retrieveTimeout\n"; + exit 0; +} +if (defined $opt_l) { + my $search = shift; + ENVCANMapSearch::AddSatSearch($search); + ENVCANMapSearch::AddSatClassSearch($search); + ENVCANMapSearch::AddImageTypeSearch($search); + foreach my $result (@{ENVCANMapSearch::doSearch()}) { + print "$result->{entry_id}::($result->{satellite_class}) $result->{satellite} $result->{image_type}\n"; + } + exit 0; +} + +if (defined $opt_t) { + foreach (@types) {print; print "\n";} + exit 0; +} + +if (defined $opt_d) { + $dir = $opt_d; +} + +if (!-d $dir) { + mkpath( $dir, {mode => 0755} ); +} + +my $loc = shift; + +if (!defined $loc || $loc eq "") { + die "Invalid usage"; +} + +# Get map info +ENVCANMapSearch::AddAniSearch($loc); +my $results = ENVCANMapSearch::doSearch(); +my $desc = $results->[0]->{satellite}; + +# Get HTML and find image list +my $response = get $results->[0]->{animated_url}; +die unless defined $response; + +my @image_list; +my $size; +my $base_url = "http://www.weatheroffice.gc.ca"; +my $file = $loc; +my $path = "$dir/$file"; + +# Get list of images (at most 10) +foreach my $line (split(/\n/, $response)) { + if ($line =~ /theImagesComplete\[\d*\] \= \"(.*)\"\;/) { + push (@image_list, $1); + if ($#image_list >= 1) { shift @image_list; } + } +} + +# Download map file, if necessary (maps are stale after 15 minutes) +my $image = shift @image_list; +my $ext = $image; +$ext =~ s/.*\.(.*?)$/$1/; + +my $cached = 0; +if (-f "$path.$ext" ) { + my @stats = stat(_); + if ($stats[9] > (time - 900)) { + $cached = 1; + } +} + +if (!$cached) { + getstore($base_url . $image, "$path.$ext"); +} + +print "smdesc::$desc\n"; +print "map::$path.$ext\n"; +print "updatetime::Last Updated on " . + UnixDate("now", "%b %d, %I:%M %p %Z") . "\n"; +print "copyright::Environment Canada\n"; diff --git a/mythweather/mythweather/scripts/uk_bbc/bbccurrentxml.pl b/mythweather/mythweather/scripts/uk_bbc/bbccurrentxml.pl index 84bc7e5..45fd8c5 100755 --- a/mythweather/mythweather/scripts/uk_bbc/bbccurrentxml.pl +++ b/mythweather/mythweather/scripts/uk_bbc/bbccurrentxml.pl @@ -154,14 +154,14 @@ elsif ($weather_string =~ /^heavy rain$/i || } elsif ($weather_string =~ /^thundery rain$/i || $weather_string =~ /^thunder storm$/i || - $weather_string =~ /^thundery showers$/i) { + $weather_string =~ /^thundery showers?$/i) { printf "weather_icon::thunshowers.png\n"; } elsif ($weather_string =~ /^heavy snow$/i) { printf "weather_icon::snowshow.png\n"; } elsif ($weather_string =~ /^light snow$/i || - $weather_string =~ /^light snow showers$/i) { + $weather_string =~ /^light snow showers?$/i) { printf "weather_icon::flurries.png\n"; } elsif ($weather_string =~ /^sleet$/i || diff --git a/mythweather/mythweather/scripts/uk_bbc/bbcthreedayxml.pl b/mythweather/mythweather/scripts/uk_bbc/bbcthreedayxml.pl index 8c99c4e..1998c00 100755 --- a/mythweather/mythweather/scripts/uk_bbc/bbcthreedayxml.pl +++ b/mythweather/mythweather/scripts/uk_bbc/bbcthreedayxml.pl @@ -179,14 +179,14 @@ foreach $item (@{$xml->{channel}->{item}}) { } elsif ($weather_string =~ /^thundery rain$/i || $weather_string =~ /^thunder storm$/i || - $weather_string =~ /^thundery showers$/i) { + $weather_string =~ /^thundery showers?$/i) { printf "icon-" . $i . "::thunshowers.png\n"; } elsif ($weather_string =~ /^heavy snow$/i) { printf "icon-" . $i . "::snowshow.png\n"; } elsif ($weather_string =~ /^light snow$/i || - $weather_string =~ /^light snow showers$/i) { + $weather_string =~ /^light snow showers?$/i) { printf "icon-" . $i . "::flurries.png\n"; } elsif ($weather_string =~ /^sleet$/i || diff --git a/mythweather/mythweather/scripts/wunderground/wunderground-animaps.pl b/mythweather/mythweather/scripts/wunderground/wunderground-animaps.pl index a77c36b..2530c14 100755 --- a/mythweather/mythweather/scripts/wunderground/wunderground-animaps.pl +++ b/mythweather/mythweather/scripts/wunderground/wunderground-animaps.pl @@ -5,6 +5,7 @@ use English; use strict; use warnings; +use File::Path; use File::Basename; use Cwd 'abs_path'; use lib dirname(abs_path($0 or $PROGRAM_NAME)), diff --git a/mythweather/mythweather/scripts/wunderground/wunderground-maps.pl b/mythweather/mythweather/scripts/wunderground/wunderground-maps.pl index 7c86878..98ff5e5 100755 --- a/mythweather/mythweather/scripts/wunderground/wunderground-maps.pl +++ b/mythweather/mythweather/scripts/wunderground/wunderground-maps.pl @@ -5,6 +5,7 @@ use English; use strict; use warnings; +use File::Path; use File::Basename; use Cwd 'abs_path'; use lib dirname(abs_path($0 or $PROGRAM_NAME)), diff --git a/mythzoneminder/i18n/.gitignore b/mythzoneminder/i18n/.gitignore new file mode 100644 index 0000000..5669308 --- /dev/null +++ b/mythzoneminder/i18n/.gitignore @@ -0,0 +1 @@ +i18n diff --git a/mythzoneminder/mythzmserver/.gitignore b/mythzoneminder/mythzmserver/.gitignore new file mode 100644 index 0000000..c59dcbf --- /dev/null +++ b/mythzoneminder/mythzmserver/.gitignore @@ -0,0 +1 @@ +mythzmserver diff --git a/mythzoneminder/mythzoneminder/zmliveplayer.cpp b/mythzoneminder/mythzoneminder/zmliveplayer.cpp index 9b8fc8a..1bc0cf9 100644 --- a/mythzoneminder/mythzoneminder/zmliveplayer.cpp +++ b/mythzoneminder/mythzoneminder/zmliveplayer.cpp @@ -12,10 +12,6 @@ * * ============================================================ */ -#include <iostream> -#include <sys/shm.h> -#include <cstdlib> - // qt #include <QDateTime> #include <QTimer> diff --git a/mythzoneminder/theme/default-wide/zoneminder-ui.xml b/mythzoneminder/theme/default-wide/zoneminder-ui.xml index 4f59b76..a4c42c9 100644 --- a/mythzoneminder/theme/default-wide/zoneminder-ui.xml +++ b/mythzoneminder/theme/default-wide/zoneminder-ui.xml @@ -652,23 +652,23 @@ <window name="zmplayer"> - <font name="label" from="basesmall"> + <fontdef name="label" from="basesmall"> <color>#ffff00</color> <size>16</size> <weight>bold</weight> - </font> + </fontdef> - <font name="data" from="basesmall"> + <fontdef name="data" from="basesmall"> <color>#ffffff</color> <size>14</size> <weight>bold</weight> - </font> + </fontdef> - <font name="buttons" from="basesmall"> + <fontdef name="buttons" from="basesmall"> <color>#ffffff</color> <size>12</size> <weight>bold</weight> - </font> + </fontdef> <textarea name="pagetitle" from="basetextarea"> <area>30,10,570,40</area>