Opened 19 years ago
Closed 18 years ago
#3334 closed patch (fixed)
Allow mythtv-setup to use the downloadable icons from the new online database
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.21 |
| Component: | mythtv | Version: | head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
This feature allows you to access the online database (services.mythtv.org) in order for you to download the icon files.
As far as I'm aware, there is only one problem with it. The code in ImportIcons::initialLoad may be slightly incorrect (no way of testing this with non DVB channels).
The patch file applies from the top The two importicons.* files live in libmythtv
Attachments (20)
Change History (42)
by , 19 years ago
| Attachment: | importicons.patch added |
|---|
by , 19 years ago
| Attachment: | importicons.cpp added |
|---|
by , 19 years ago
| Attachment: | importicons.h added |
|---|
comment:1 by , 19 years ago
comment:2 by , 19 years ago
John, if you use "svn add importicons.cpp importicons.h" before svn diff the two new files will be included in the patch.
by , 19 years ago
| Attachment: | importicons1.patch added |
|---|
Created and added new file (as suggested by stuartm)
comment:4 by , 19 years ago
| Owner: | changed from to |
|---|
comment:5 by , 19 years ago
| Version: | unknown → head |
|---|
comment:6 by , 19 years ago
John, I've just tried the patch. After selecting one of the icon options in the first dialogue (rescan/find missing) nothing happens and when I leave the channel editor, mythtv-setup appears to hang. I killed it after 2 1/2 minutes.
I've attached a backtrace. Looks to me as though it's waiting on a response from the httpcomms, which is not timing out as it should.
comment:7 by , 19 years ago
Sorry, seems I need to change my description of the problem. When I press "Import all icons.." the dialogue doesn't appear immediately (takes upto 30 seconds) - if I hit Escape before it appears we get the above hanging problem.
When the dialogue does appear it's empty. Icons have been imported in the background but there isn't anything telling me that this happened or was happening while I waited for the dialogue.
by , 19 years ago
| Attachment: | importicons-libmyth-29092007.diff added |
|---|
libmyth changes for import icons
by , 19 years ago
| Attachment: | importicons-libmythtv-29092007.diff added |
|---|
libmythtv changes for import icons
comment:8 by , 19 years ago
Updated patches for import icons. This is still not fully working (see below) but I think it fixes all of Stuart's issues except for the hang on exit.
importicons-libmyth-29092007
Suggest this patch could be applied now, as is. It provides supporting changes for the import icons dialog:
- Adds currentItem() method to MythListBox to retrieve currently selected item.
- Adds definition for TransListBoxSetting()
- Modifies MythProgressDialog:
- Allows a cancel button to be displayed on the progress dialog (optional)
- Adds a new method setLabel() to allow changing the progress dialog text while running. Used in import icons to display current scanned icon, total to scan and number of icons found. Would be useful in any scanning type situation when the user wants additional feedback as well as the progress indicator.
- Allows a cancel button to be displayed on the progress dialog (optional)
importicons-libmythtv-29092007
This patch contains the actual import icons dialog. It's been changed a little since the initial patch and will download all icons it can find automatically - well worth applying to your tree, just have to manually kill mythtv-setup when it completes...
- When clicking "Import Icons" in the channel editor a progress dialog "Initialising" appears. This then changes to a progress dialog with cancel button which indicates progress and shows current icon, total icons and number of icons that could not be downloaded.
- In the current patch the cancel button action has been cancelled out (lines 295,296) because I have more than 1000 channels and it was taking too long to get to the actual dialog for debugging.
Issues with this patch
- When the dialog exits mythtv-setup hangs. Think this is something to do with the dialog not been properly destroyed or something but can't work out what. Stuart, I don't think this is a http timeout issue.
- Dialog does not exit when all icons have been skipped over. Controls are greyed out and you have to manually click finish.
- There is loads of extra debugging in this patch which could probably be removed for the release (enable mythtv-setup -v channel to utilise it).
- Look for FIXME tag for issues...
This works well enough for me and I've spent a lot of time trying to find the hang on exit so I'm hoping someone else will take a look at this bit...
by , 19 years ago
| Attachment: | importicons-libmyth-04102007.diff added |
|---|
Update to set focus to cancel button
comment:9 by , 19 years ago
New patch for libmythtv.
Cleans up code, less changes to channeleditor.cpp, more logical layout in importicons.cpp.
Preparatory work for allowing a single icon to be imported.
Still doesn't enable channeleditor dialog when importiconswizard closes. It's not an http issue because it happens even if I remove all reference to http stuff from the code. :(
comment:10 by , 19 years ago
As if by prophecy I just fixed the hang on return from the dialog. Seems I fixed the original problem ages ago and introduced my own with the progressdialogs. Just needed to call progressDialog->deleteLater() on them both and it's fine[[BR]]
Issues
- Should exit the dialog after submitting data / reaching end of missing icon list.
- Should exit / not start dialog if cancel button is pressed on progress dialog.
by , 19 years ago
| Attachment: | importicons-libmyth-09102007.diff added |
|---|
Changes to widgets to support icon import dialog
by , 19 years ago
| Attachment: | importicons-libmythtv-09102007.diff added |
|---|
Import Icons patch - ready for full testing
comment:11 by , 19 years ago
The latest versions of these patches should now be fully working.
- There's now an additional feature such that you can import an icon for a single channel by selecting it in the list and clicking "Icon Import".
- Patch http://svn.mythtv.org/trac/ticket/4045 for videosource filter is included.
- Another additional feature is that the channel selection dialog now remembers the last selected channel so you don't have to scroll up/down each time. This has appeared on the feature requests a few times.
I think all of the bugs are now fixed and this is ready for testing with a view to merging.
by , 18 years ago
| Attachment: | importicons-libmythtv-23102007.diff added |
|---|
Small fix for importSingleIcon where m_iter was not getting filled
by , 18 years ago
| Attachment: | importicons-libmythtv-23102007-2.diff added |
|---|
More friendly messages about what it's doing
by , 18 years ago
| Attachment: | #3334 libmyth-importicons-18122007.patch added |
|---|
Update for svn. no changes
by , 18 years ago
| Attachment: | #3334 libmythtv-importicons-18122007.patch added |
|---|
Update for svn. no changes
comment:12 by , 18 years ago
| Status: | new → accepted |
|---|
comment:13 by , 18 years ago
| Status: | accepted → started |
|---|
comment:14 by , 18 years ago
comment:15 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | started → closed |
comment:16 by , 18 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → new |
I think that this needs to be tweaked to use QDir so that it will compile under Windows.
g++ -c -march=k8 -g -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -DSTDC_CONSTANT_MACROS -I/mingw/include/freetype2 -I/mingw/include -mthreads -fexceptions -frtti -DUSING_MINGW -DUSING_WINAUDIO -DUSING_D3D -DUSING_DIRECTX -DMMX -Di386 -DUSING_DIRECTX -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr\" -DLIBDIR=\"/usr/lib\" -D_LARGEFILE_SOURCE -DUSING_H264TOOLS -DUSING_OPENGL -DUSING_FRONTEND -DUSING_BACKEND -DUSING_D3D -DQT_DLL -DQT_THREAD_SUPPORT -I"/usr/include" -I"../.." -I".." -I"." -I"../libmyth" -I"../libavcodec" -I"../libavutil" -I"../libmythmpeg2" -I"dvbdev" -I"mpeg" -I"iptv" -I"../libmythlivemedia/BasicUsageEnvironment/include" -I"../libmythlivemedia/groupsock/include" -I"../libmythlivemedia/liveMedia/include" -I"../libmythlivemedia/UsageEnvironment/include" -I"/qt-3.3.x-p8/include" -I"C:/msys/1.0/qt-3.3.x-p8/mkspecs/win32-g++" -o importicons.o importicons.cpp In file included from C:/msys/1.0/qt-3.3.x-p8/include/qiconset.h:43,
from C:/msys/1.0/qt-3.3.x-p8/include/qpushbutton.h:43, from ../libmyth/mythwidgets.h:10, from ../libmyth/mythwizard.h:41, from importicons.cpp:7:
C:/msys/1.0/qt-3.3.x-p8/include/qpixmap.h:249: warning: 'void bitBlt(QPaintDevice*, int, int, const QPaintDevice*, int, int, int, int, Qt::RasterOp, bool)' redeclared without dllimport attribute after being referenced with dllimport linkage importicons.cpp: In member function `int ImportIconsWizard::exec()': importicons.cpp:33: error: `mkdir' was not declared in this scope
comment:17 by , 18 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:18 by , 18 years ago
| Owner: | removed |
|---|---|
| Status: | assigned → new |
Simon, try the patch I've just attached. It's untested and at least if it doesn't work you've got a starting point for a working patch of your own.
comment:19 by , 18 years ago
Simon, glad you noticed and fixed my deliberate mistakes (qdir variables undefined).
Can you confirm that the patch works as intended under windows and not just that it compiles? You might need to move/delete the directories if they already exist.
comment:20 by , 18 years ago
As per your instructions, the channel downloader is now tested and works well on win32 with this latest patch. Icons were created here: "C:\Documents and Settings\buzz\.mythtv\channels\" It was unable to download all icons, but some of them clearly worked because the Icon field was populated when it wasnt previously. My guess is that the other icons just don't exist in the services.mythtv.org database? Here's the text emited when it doesnt find the icon: 2008-01-10 17:49:46.890 Error from findmissing : # 2008-01-10 17:49:47.796 Error from findmissing : # 2008-01-10 17:49:48.703 Error from findmissing : #
comment:21 by , 18 years ago
changeset http://svn.mythtv.org/trac/changeset/15554 is supposed to have closed this trac, as it applied the last patch importicons_windows_2.diff. I don't know wht it didn't close it?
comment:22 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |

The email address should be mine : john at pullan dot org