Commit graph

731 commits

Author SHA1 Message Date
Thomas Perl 7d61477215 Fix channel deletion in CLI mode (-d)
Channel deletion did not work in CLI mode, because
we were only saving the OPML file, and did not
remove the channel from the database. This patch
fixes it by calling delete() on the channel object.

Thanks to Markus Golser (elmargol) for testing
the CLI mode and bringing this to my attention.
2009-05-07 13:21:29 +02:00
Thomas Perl 0f24910055 Truncate partial download file if resume is unsupported (bug 409)
When downloading files, make sure that the server sends
the correct content-range response header for the request.
If not, truncate the file and start from the beginning.
2009-05-05 10:22:12 +02:00
Shane Huntley d4c3e47b08 Update minimize behavior when no tray icon (bug 258)
"Auto download new episodes when gPodder is minimized" and "Start gPodder minimized"
options now work when gPodder is minimized to task list rather than tray icon.
2009-05-05 09:43:04 +02:00
Shane Huntley b06f6751e1 Part played episodes no longer marked new on iPod (bug 403)
When syncing to iPod if an epsode has been partially played making
the unplayed blue dot disappear, then the status is now maintained
by not marking as unplayed if the bookmark_time > 0.
2009-05-05 09:30:06 +02:00
Markus Golser 5cf2c41d4f Fetch the best YouTube video format available (bug 428)
Not every youtube video has a mp4 version. This patch
fetches the best version known (except for Maemo).
2009-05-05 09:23:36 +02:00
Shane Huntley 4572dbf29a Ipod sync behaviour changes
When syncing to ipod, played episodes are marked as
played in gPodder and optionally deleted from new option
ipod_delete_played_from_db.
Checkbox added for this new option.
2009-04-27 18:39:18 +02:00
Torbjörn Wassberg 6e445eecdc Better column sizing for the episode dialog (bug 131)
A better approach to sizing the additional columns of
the gPodderEpisodeDialog, so that more of the data is
displayed while still leaving enough space for the
episode and podcast titles.
2009-04-27 17:03:06 +02:00
Thomas Perl 302436f89e Sync episodes ordered by publishing date (bug 388)
The episodes that are queued to sync are now ordered
by the pubDate attribute, so that MP3 Players (like
the Sansa Fuze) sort podcasts in the correct order.

Some podcasts such as NPR's Science Friday podcast do
break up a single episode in several parts, which has
led to parts playing in reverse order.

Thanks to Abraham D Smith for the bug report and an
initial patch to solve this issue.
2009-04-27 15:54:15 +02:00
Thomas Perl 36b75deb3e Use proxy server settings for feed downloads (bug 371)
Use the configured proxy server settings if available for
adding a ProxyHandler to the feedcache download request.

This makes feed updates work over HTTP and FTP proxy servers
configured in the preferences dialog.

Based on a patch by Carlo Mandelli.
2009-04-27 15:44:28 +02:00
Shane Huntley f133a757c8 Refresh episode status from db before reusing a DownloadTask (bug 414) 2009-04-27 15:14:31 +02:00
Thomas Perl 5398c1f3e9 Save the database after deletion and transfer (bug 293)
The database was not committed after episodes have been
deleted or files transferred to a portable device.

This patch adds a db.commit() call after both scenarios.

Thanks to Peter Cherriman for the bug report.
2009-04-27 14:54:02 +02:00
Bernd Schlapsi ac0552b294 Fix "mp3_player_delete_played" config option (bug 398)
Added a new field to the SyncTrack object. For my this patch
works, but I couldn't test it with a MTPDevice or an iPod.
2009-04-11 13:02:58 +02:00
Jim Nygård deaee8d29d Added Norwegian bokmål translation
Added nb.po, updated setup.py and gpodder.desktop
2009-04-11 11:53:29 +02:00
Torbjörn Wassberg cc36294fc8 Update episode list on "transfer to MP3 player" (bug 320)
The episode status icons were not updated after
transferring episodes to an MP3 player.

Thanks to Andrew Bennett for reporting this bug.
2009-04-11 11:17:52 +02:00
nikosapi ec6fc3d5f3 Add a description for every configuration option
The descriptions are displayed in the advanced configuration editor.
2009-04-11 11:13:42 +02:00
Thomas Perl ce70212ce4 Remove bogus sender=self keyword arguments
Thanks to Tim Barlotta in LP bug 341474 for the report.
2009-04-08 16:04:19 +02:00
Thomas Perl 84347eeaea Make feed updates on Desktop more like on Maemo (bug 392)
Do not display a "no new episodes" dialog, but show
it in the update progress bar and/or tray icon tooltip.

This allows for a more pleasant user experience :)

Also fix a problem with the update progress bar not
going away after an update when the window is minimized.
2009-04-02 15:27:15 +02:00
Thomas Perl 918fe70cb7 Fix minor UI issues in the downloads tab
Do not expand the progress column, so we have more
space for displaying the episode name.

Only allow the "Remove from list" context menu item
when the selection is finished, failed or cancelled.
2009-04-02 11:13:00 +02:00
Thomas Perl 510c784e29 Maemo UI fixes for the new downlaod task code
Make the UI finger-friendly and remove some columns
and UI elements that just waste space on Maemo.
2009-04-02 02:22:09 +02:00
Thomas Perl d0cbbf55ed Clean-up tray icon; re-enable download reporting
Clean up the gPodder tray icon module and remove
unncessary stuff that has become obsolete.

Handle the displaying of download status from
within the gPodder main window and push all download
notifications to the tray icon object for display.
2009-04-02 01:46:22 +02:00
Thomas Perl 48ddd44166 Remove cancelled and failed downloads on exit
Cancelled and failed downloads should have their
partial download files removed when gPodder is
closed, while all other (non-finished) files should
be paused to be resumed in the next session.
2009-04-02 00:33:49 +02:00
Thomas Perl a8e53f6076 Disable context menu items in downloads list
For some running download tasks, some actions in the
context menu of the downloads list do not make sense
given a specific status. We disable these actions.
2009-04-02 00:21:08 +02:00
Thomas Perl ed7a71dd97 Add status_changed to DownloadTask for monitoring
This allows our UI to directly monitor the status
of all running DownloadTask objects by checking the
truth value of the status_changed attribute and
updating the UI for all relevant episodes.
2009-04-02 00:02:07 +02:00
Thomas Perl 3f6b04ccca Do not hide, but disable (popup) menu items
We might change this in the future, but for now,
hiding menu items is considered bad.
2009-04-01 21:54:17 +02:00
Thomas Perl 65a70d37dc Figure out columns of the ListStore for episode lists
This will be helpful for refactoring the liststore later.
2009-04-01 21:04:29 +02:00
Thomas Perl d0b3537c34 Adapt episode shownotes window to new download code
Make progress indication and buttons work again.
2009-04-01 18:46:19 +02:00
Thomas Perl 38a1bf5c88 DownloadStatusManager it not a global object anymore
This lets us get rid of global state and also makes the
code more readable and less interdependent, and allows
us to more easily refactor code in the future.

Obviously, this still breaks some things that need
re-thinking - these parts have been marked with FIXMEs.
2009-04-01 13:34:19 +02:00
Thomas Perl 0c3b31563f Use symbolic status names from DownloadTask
In the DownloadStatusManager, use symbolic names
from the DownloadTask class, so as to not duplicate
code and to always pick the right icon, even when
the status IDs in the DownloadTask change.
2009-04-01 13:05:53 +02:00
Thomas Perl aa4eb0b4d0 Move ext_command_thread from gPodderLib to util
We want to get rid of gPodderLib in the end, so move
the utility function out of gPodderLib and correct
its uses accordingly. Also add a unittest for it.
2009-04-01 12:53:13 +02:00
Thomas Perl e3a8795a3e Initial work on the new download manager code
This is still a work-in-progress, and many things
have been broken by introducing it, but the new
code is easier to understand and maintain, and
should also prove performance-enhancing on Maemo.

Last but not least, when it's done, it will fix
these bugs: 242, 361 (http://bugs.gpodder.org)
2009-04-01 01:12:17 +02:00
Paul Rudkin 9a3c45f082 Added advanced option to reverse m3u playlist order (bug 401) 2009-03-31 13:14:55 +02:00
Thomas Perl 866712a765 Add Fabio to the list of contributors (translation)
Fabio now takes care of the Italian translation.
2009-03-31 13:03:38 +02:00
Thomas Perl f7e3e555fe More detailed retrieval of episode description (bug 394)
In case there are multiple fields, prefer "summary",
but fallback to "subtitle" in case "summary" is empty.

Thanks to kiko for reporting this bug.
2009-03-30 20:42:33 +02:00
Thomas Perl 3212ba8080 Improve sanitize_filename and sanitize_encoding (bug 389)
Make sure to always decode non-unicode strings in
these functions, so to not get an UnicodeDecodeError
when trying to decode/encode strings to/from unicode.

Thanks to Andy Owen for reporting this bug.
2009-03-30 20:30:19 +02:00
Thomas Perl a388a992a2 Fix raising of ContentTooShortError (from urllib)
Previously, this has not worked, because the name
was not defined in this scope (we based the code on
urllib, which was allowed to use it like this).
2009-03-30 18:59:50 +02:00
Thomas Perl 27b660ac29 Doctest for util.username_password_from_url
Add doctests for the username/password from URL
function and raise a ValueError when the input
data is invalid (wrong type or format - see below).

Had a look at RFC1738 (Section 3.1) how username
and password are specified in URLs. According to
that RFC, "@", ":" and "/" have to be encoded in
the username and password field.
2009-03-24 20:44:37 +01:00
Thomas Perl 3aab8c1b87 More doctests; test "find_mount_point" (using MiniMock)
Add doctests for the find_mount_point() utility method
and make it more robust while finding shortcomings of
the current implementation by unexpected behaviour that
has been checked with the doctest and mock objects.

Note the unittest requirements (minimock + coverage) in
the README file and rm the ".coverage" file on "make clean".
2009-03-24 19:53:19 +01:00
Thomas Perl 9572c573d4 Support Coverage reporting in gpodder.unittests
If "python-coverage" is installed, report the test
coverage for all currently-tested modules in gPodder
while doing the unittest with "make unittest".
2009-03-24 15:42:39 +01:00
Thomas Perl 8b5fc60bd6 Avoid race condition when refreshing podcast list (bug 387)
On at least Mac OS X, this bug could happen as a result of
a race condition. We can avoid this by checking if the
tree model is already set, and if not, just ignore it.

Thanks to neric27 for reporting this bug in our bug tracker.
2009-03-23 22:49:37 +01:00
Marco Antonio Villegas Vega 22d4ce19d5 let search on treeChannels
thanks thp to help me on do not waste lines repeating code and use set_cursor() instead of on_treeChannels_cursor_changed()
thanks to diegoe to point me to the initial right method
2009-03-23 22:35:27 +01:00
Torbjörn Wassberg 8b246ef484 Display MP3 tags when removing episodes (sync module)
I have made a small patch to make the Remove episodes
dialog look for tag-tiles in MP3-devices.
2009-03-23 22:31:25 +01:00
Thomas Perl 79f1278f80 Allow pasting URLs from the clipboard (bug 395)
Add a "paste from clipboard" button to the add new
podcast via URL dialog to make it easier for users
to subscribe to new podcasts when using copy'n'paste.

Thanks to ad for suggesting this enhancement.
2009-03-23 22:18:26 +01:00
Steven Oxley 6619fc5a79 Added the ability to resize episode columns
* Added ability to resize episode columns in the main episode list
* Added ability to resize episode columns in the downloads list
2009-03-23 22:04:46 +01:00
Thomas Perl d23bdd0067 Migrate to subprocess; add unittests (LP bug #345003)
Migrate the usage of the popen2 module to subprocess,
as popen2 is deprecated in Python 2.6.

Add unittests (doctests) for both MP3 and OGG tag
reading, and add corresponding test data files.
2009-03-21 21:10:46 +01:00
Thomas Perl 4c97930177 Support Vim movement keys in shownotes window (bug 328)
You can now use "j" and "k" to scroll through the
shownotes, just like in vi/Vim :)
2009-03-18 21:33:50 +01:00
Thomas Perl 973d6ff0d2 Retrieve size also for zero-value length fields
This does retrieve file lengths when the length
attribute is available, but set to zero (which is
not really useful; zero-length files are not funny).
2009-03-11 11:05:21 +01:00
Marco Antonio Villegas Vega 5ede570f6f Add get_length_from_http_header_if_empty option
Let the user decide about this feature; default disabled.
2009-03-11 10:43:25 +01:00
Marco Antonio Villegas Vega 03ae704bd2 Let retrieve length metadata when length=0 (bug 24) 2009-03-11 10:38:40 +01:00
Jérôme Chabod 7fbf04d54c Fix a regression in the MTP synchronization code
I'm sorry but mtp device synchronisation is broken with this
new version. Here is small patch to fix it.
2009-03-11 10:30:37 +01:00
Thomas Perl f500f586ca Fix "You must not use 8-bit bytestrings" (bug 375)
This happens for new versions of PySQLite that are available
with Python 2.6 (i.e. Ubuntu Jaunty).

Thanks to Fabian Scherschel and Tyler Rick for reporting this.
2009-03-11 10:18:51 +01:00