Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading creates empty files #57

Open
alphapapa opened this issue Oct 12, 2012 · 12 comments
Open

Downloading creates empty files #57

alphapapa opened this issue Oct 12, 2012 · 12 comments
Labels

Comments

@alphapapa
Copy link

When I click "FREE" to download an enclosure.mp3 file, Tunesviewer creates a zero-byte file, correctly named, but doesn't download it. I can stream the file and I can download it manually outside of Tunesviewer.

@programmin1
Copy link
Collaborator

Seems to be downloading fine here. Can you give the url to a page and download that fails?

@alphapapa
Copy link
Author

Yes, sorry. Any of the items on this page seem to create empty files:

https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewGrouping?cc=us&id=27753&mt=10

I launched it from a terminal, but don't see any messages when I click to download a file.

tunesviewer:
Installed: 1.4.99.3-11.gbpd5c606
Candidate: 1.4.99.3-1
1.gbpd5c606
Version table:
*** 1.4.99.3-1~1.gbpd5c606 0
100 /var/lib/dpkg/status

Thanks for your help.

@programmin1
Copy link
Collaborator

That url seems to be the main page, can you post the url it tries to download? Are you trying to download from the upper panel or lower panel?

@alphapapa
Copy link
Author

Ah, that must be the problem then: I'm trying to download it from the upper panel because the lower panel is empty. The only way I can download them is to get the URLs out of the HTML manually, or stream it and right-click the player to get the URL of the MP3.

@programmin1
Copy link
Collaborator

What are you trying to download from the main page? Can you post a screenshot?

-----Original Message-----

From: alphapapa
Sent: 13 Oct 2012 17:00:18 GMT
To: rbrito/tunesviewer
Cc: programmin1
Subject: Re: [tunesviewer] Downloading creates empty files (#57)

Ah, that must be the problem then: I'm trying to download it from the upper panel because the lower panel is empty.


Reply to this email directly or view it on GitHub:
#57 (comment)

@alphapapa
Copy link
Author

Any of the items on the page. Here is a screenshot: http://imgur.com/Q1COr

@programmin1
Copy link
Collaborator

I found that exact page and was able to download that file, no problem. Preview also worked on that file.
It looks like your url bar isn't updating, my guess is there is an exception in the code sometime before you're trying to download?
Can you make sure you are using the latest 1.5 beta, from here?
https://sourceforge.net/projects/tunesviewer/files/

Also, what operating system/version are you on? Can you run "tunesviewer --verbose" and post the output/errors?
That would be helpful in finding the source of this bug, thanks.

@alphapapa
Copy link
Author

I'm on Ubuntu Precise using Tunesviewer 1.4.99.3-1~1.gbpd5c606, from the 1.5-beta deb package on that page.

I don't understand why no files show up in the media pane.

I don't seem to be able to attach a file, but here's what seems to be the part of the log from when I try to download one of the files by clicking the "FREE" button:

DEBUG:root:webkit-request.
DEBUG:root:<webkit.NetworkRequest object at 0x8f370f4 (WebKitNetworkRequest at 0x8fdb4b0)>
DEBUG:root:Noload
DEBUG:root:http://deimos3.apple.com/WebObjects/Core.woa/DownloadTrack/harding.edu-dz.19133860429.019133860431.19210450119/enclosure.mp3
DEBUG:root:http://deimos3.apple.com/WebObjects/Core.woa/DownloadTrack/harding.edu-dz.19133860429.019133860431.19210450119/enclosure.mp3
DEBUG:root:PARSING http://deimos3.apple.com/WebObjects/Core.woa/DownloadTrack/harding.edu-dz.19133860429.019133860431.19210450119/enclosure.mp3 text/xml; charset=UTF-8; encoding=UTF-8
DEBUG:root:Special end page after html link?1
DEBUG:root:tag Document
DEBUG:root:Podcast: http://deimos3.apple.com/WebObjects/Core.woa/Feed/harding.edu-dz.19133860429.019133860431
DEBUG:root:Parse took 0.00212407112122s.
DEBUG:root:Update took 0.01713514328seconds
DEBUG:root:LOCAL=2012 Harding University Lectureship - Faith for a New Place  Time/KEYNOTE LECTURE Number 4 - Faith That Survives Our Failure, Dale Manor 45;01.mp3
DEBUG:root:/home/me/Downloads/Harding iTunesU/2012 Harding University Lectureship - Faith for a New Place  Time/KEYNOTE LECTURE Number 4 - Faith That Survives Our Failure, Dale Manor 45;01.mp3
Traceback (most recent call last):
  File "/usr/bin/tunesviewer", line 1472, in update
    self.startDownload(parser.mediaItems[0])
  File "/usr/bin/tunesviewer", line 1173, in startDownload
    self.downloadFile(name, artist, duration, extType, comment, url)
  File "/usr/bin/tunesviewer", line 1206, in downloadFile
    self.downloadbox.newDownload(self.iconOfType(extType), url, final_file, self.opener)
  File "/usr/bin/tunesviewer", line 1594, in iconOfType
    '.pdf': self.icon_pdf,
AttributeError: TunesViewer instance has no attribute 'icon_pdf'

@programmin1
Copy link
Collaborator

It appears to be the GTK theme causing problems. Which theme are you using, and do you notice this problem on a different theme?

@alphapapa
Copy link
Author

I use QtCurve, but I changed to Clearlooks and the problem remains.

The problem is not actually the missing icons, but that self.icon_pdf is not initialized. This fixes it in updateListIcons():

...
self.icon_video = None
self.icon_pdf = None  # tada
self.icon_book = None
...

After doing that, the downloads pane works fine.

As for the icons, that seems to be another problem, but I can live with that. :)

WARNING:root:Could not set up all the icons: Icon 'sound' not present in theme

Of course, the other icon lines are not run because it hits an exception, but I started commenting them out, and it seems like all of the icon types fail like this.

As for my system, the icons seem to be present:

$ locate /usr/share/icons/*sound.png
/usr/share/icons/Crystal/16x16/filesystems/folder_sound.png
/usr/share/icons/Crystal/16x16/mimetypes/sound.png
/usr/share/icons/Crystal/32x32/filesystems/folder2_sound.png
/usr/share/icons/Crystal/32x32/filesystems/folder_sound.png
/usr/share/icons/Crystal/32x32/mimetypes/sound.png
/usr/share/icons/Crystal/48x48/filesystems/folder2_sound.png
/usr/share/icons/Crystal/48x48/filesystems/folder_sound.png
/usr/share/icons/Crystal/48x48/mimetypes/mime_sound.png
/usr/share/icons/Crystal/48x48/mimetypes/sound.png
/usr/share/icons/Tango/16x16/mimetypes/sound.png
/usr/share/icons/Tango/22x22/mimetypes/sound.png
/usr/share/icons/Tango/24x24/mimetypes/sound.png
/usr/share/icons/Tango/32x32/mimetypes/sound.png
/usr/share/icons/nuoveXT2/128x128/mimetypes/sound.png
/usr/share/icons/nuoveXT2/16x16/mimetypes/sound.png
/usr/share/icons/nuoveXT2/22x22/mimetypes/sound.png
/usr/share/icons/nuoveXT2/24x24/mimetypes/sound.png
/usr/share/icons/nuoveXT2/32x32/mimetypes/sound.png
/usr/share/icons/nuoveXT2/36x36/mimetypes/sound.png
/usr/share/icons/nuoveXT2/48x48/mimetypes/sound.png
/usr/share/icons/nuoveXT2/64x64/mimetypes/sound.png
/usr/share/icons/nuoveXT2/72x72/mimetypes/sound.png
/usr/share/icons/nuoveXT2/96x96/mimetypes/sound.png
/usr/share/icons/nuvola/128x128/apps/preferences-desktop-sound.png
/usr/share/icons/nuvola/128x128/places/folder-sound.png
/usr/share/icons/nuvola/16x16/actions/playsound.png
/usr/share/icons/nuvola/16x16/apps/preferences-desktop-sound.png
/usr/share/icons/nuvola/16x16/places/folder-sound.png
/usr/share/icons/nuvola/22x22/actions/playsound.png
/usr/share/icons/nuvola/22x22/apps/preferences-desktop-sound.png
/usr/share/icons/nuvola/22x22/places/folder-sound.png
/usr/share/icons/nuvola/32x32/apps/preferences-desktop-sound.png
/usr/share/icons/nuvola/32x32/places/folder-sound.png
/usr/share/icons/nuvola/48x48/apps/preferences-desktop-sound.png
/usr/share/icons/nuvola/48x48/places/folder-sound.png
/usr/share/icons/nuvola/64x64/apps/preferences-desktop-sound.png
/usr/share/icons/nuvola/64x64/places/folder-sound.png
/usr/share/icons/oxygen/128x128/apps/preferences-desktop-sound.png
/usr/share/icons/oxygen/128x128/places/folder-sound.png
/usr/share/icons/oxygen/16x16/apps/preferences-desktop-sound.png
/usr/share/icons/oxygen/16x16/places/folder-sound.png
/usr/share/icons/oxygen/22x22/apps/preferences-desktop-sound.png
/usr/share/icons/oxygen/22x22/places/folder-sound.png
/usr/share/icons/oxygen/256x256/places/folder-sound.png
/usr/share/icons/oxygen/32x32/apps/preferences-desktop-sound.png
/usr/share/icons/oxygen/32x32/places/folder-sound.png
/usr/share/icons/oxygen/48x48/apps/preferences-desktop-sound.png
/usr/share/icons/oxygen/48x48/places/folder-sound.png
/usr/share/icons/oxygen/64x64/apps/preferences-desktop-sound.png
/usr/share/icons/oxygen/64x64/places/folder-sound.png

@programmin1
Copy link
Collaborator

Thanks for helping to debug this issue. Can you please test with the latest git version here and verify everything's working properly? https://github.com/programmin1/tunesviewer/commits/master

@rbrito
Copy link
Owner

rbrito commented Feb 3, 2013

@alphapapa, can you see if installing another icon theme helps with this issue? For instance, the Faenza theme?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants