Moviebrowser: Display Screenshot

- Delete the image files if the movie is deleted
- Calculation of the adjusted image size on 16:9


git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1993 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 31c9a9a67e
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2011-12-23 (Fri, 23 Dec 2011)

Origin message was:
------------------
* Moviebrowser: Display Screenshot

- Delete the image files if the movie is deleted
- Calculation of the adjusted image size on 16:9


git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1993 e54a6e83-5905-42d5-8d5c-058d10e6a962


------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2011-12-23 21:33:21 +00:00
parent d0dea50015
commit fbf0df5ebb

View File

@@ -1216,9 +1216,8 @@ void CMovieBrowser::refreshMovieInfo(void)
else
{
bool logo_ok = false;
float divx = (float)576 / (float)m_cBoxFrameInfo.iHeight;
int picw = (int)((float)720 / divx);
int pich = (int)((float)576 / divx);
int picw = (int)(((float)16 / (float)9) * (float)m_cBoxFrameInfo.iHeight);
int pich = m_cBoxFrameInfo.iHeight;
std::string fname = getScreenshotName(m_movieSelectionHandler->file.Name);
logo_ok = (fname != "");
@@ -1798,9 +1797,9 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
} else if (msg == CRCInput::RC_topleft) {
if (m_movieSelectionHandler != NULL) {
if(ShowMsgUTF (LOCALE_MESSAGEBOX_INFO, "Remove screenshot ?", CMessageBox::mbrNo, CMessageBox:: mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes) {
std::string fname = m_movieSelectionHandler->file.Name;
strReplace(fname, ".ts", ".bmp");
unlink(fname.c_str());
std::string fname = getScreenshotName(m_movieSelectionHandler->file.Name);
if (fname != "")
unlink(fname.c_str());
refresh();
}
}
@@ -2060,10 +2059,10 @@ void CMovieBrowser::onDeleteFile(MI_MOVIE_INFO& movieSelectionHandler)
}
i++;
} while(1);
std::string fname = movieSelectionHandler.file.Name;
strReplace(fname, ".ts", ".bmp");
unlink(fname.c_str());
#endif
std::string fname = getScreenshotName(movieSelectionHandler.file.Name);
if (fname != "")
unlink(fname.c_str());
CFile file_xml = movieSelectionHandler.file;
if(m_movieInfo.convertTs2XmlName(&file_xml.Name) == true)