Commit Graph

50 Commits

Author SHA1 Message Date
Teemu Ikonen d87ac85506 Fix 'W504 line break after binary operator' flake8 warnings
Fixed by running

autopep8 -i -r --select=W504 .

and some hand tuning.
2022-11-14 18:32:09 +02:00
Teemu Ikonen 6bd0bb0530 Remove unused imports and pass statements
Fixes flake8 error F401.
Most errors were fixed by running

autoflake -i -r --remove-all-unused-imports .

which also removes unnecessary 'pass' statements, some by hand-editing.
2022-11-14 18:32:09 +02:00
auouymous 41c312dd68 Change deprecated logger.warn() to logger.warning(). 2022-04-29 02:54:32 -06:00
auouymous 389d096854 Close extension file after reading metadata.
Prevents a ResourceWarning when all warnings are enabled.
2022-04-29 02:54:32 -06:00
Teemu Ikonen 0e94386bd3 Use raw strings in regexp patterns, fix DeprecationWarnings 2021-01-15 13:48:21 +02:00
auouymous 52dfba1d08 allow extensions to add tabs to preferences and channel settings dialogs 2020-01-30 22:25:37 -07:00
Eric Le Lay d5118d972b Fix #658 update feeds on startup extension conflicts with resume download
new on_find_partial_downloads_done() hook for update_feeds_on_startup extension.
It's the only way to prevent a race condition between adding downloads
from new episodes when set to download immediatly and adding back
partial downloads.
2019-09-23 20:10:18 +02:00
Eric Le Lay 2f67507a4c fix default extensions disabled when (de)activating any other extension 2018-10-14 17:34:50 +02:00
MarkusHackspacher 82f41f4c21 sorting imports
with isort -y -rc
see #393
2018-07-24 11:08:10 +02:00
MarkusHackspacher 039ffba236 fix E731 do not assign a lambda expression, use a def 2018-05-06 22:26:54 +02:00
MarkusHackspacher 0c18a43d13 fix E302 and E303, only blank line change 2018-02-11 00:22:00 +01:00
Eric Le Lay 60d458f3cc use specified encoding when reading extension metadata
fixes #351
2018-02-06 16:13:21 +01:00
MarkusHackspacher fcbaee227c Fix W291 trailing whitespace 2018-02-01 07:59:22 +01:00
MarkusHackspacher c1c841c08c Fix W293 blank line contains whitespace 2018-01-30 14:04:28 +01:00
Eric Le Lay 56ad895cb8 Merge branch 'master' into gtk3
on_application_started
2017-09-17 18:57:23 +02:00
Eric Le Lay b18431d002 new extension hook: on_application_started
called after on_ui_object_available and on_ui_initialized
at application startup
2017-09-13 20:32:23 +02:00
Eric Le Lay ab7b97e830 add generic Extras menu contribution extension point
gtk2 implementation.
2017-06-25 09:43:36 +02:00
Eric Le Lay ef05dda9f3 add generic Extras menu contribution extension point
gtk3 implementation.
2017-06-25 09:25:35 +02:00
Eric Le Lay bf9d11c8d1 ImportError.name instead of parsing ImportError.message
ImportError.message from python2 is now ImportError.msg.
ut since we move to python3, we might as well use the
`name` field (since 3.3).

See d41e165915
2016-11-26 15:25:00 +01:00
Thomas Perl 5a7c30b359 Port to Python 3 2016-11-21 23:13:46 +01:00
Thomas Perl 28075c09dd Remove QML UI 2016-02-03 19:54:33 +01:00
Alex Mayer 432bf5ba5f Extensions: Add on_episode_synced Extension Call
on_episode_synced pararms:
device: gpodder.sync.Device instance
episode: gpodder.model.PodcastEpisode instance

replace on_episode_downloaded with on_episode_synced in sync.py

This will allow users to make extensions that are triggered
after a file has been synced to a device
2014-04-10 10:45:49 -04:00
Bernd Schlapsi bbfcd58ba6 Add option to flattr an extensions and to show documentation
If an extension author adds an flattr url to the extensions metadata
gPodder shows the "Flattr this" menu entry in the popup menu for an
extension in the preference dialog.
Alternative the extension author can add an url to the extensions
metadata to link to the authors donation page (Support the author).

Also the extension author can add an url to the extensions metadata
to link to the extensions user documentation.
2013-04-13 12:27:13 +02:00
Bernd Schlapsi 062cef7696 Extensions: Support both libav and ffmpeg (bug 1773)
Dear libav and ffmpeg developers, thanks for having two
different codebases, and thanks for making it even harder
to use a single command (either "ffmpeg" or "avconv") from
third party applications. If it weren't for you, we would
not have spend some quality time fixing this bug...
2013-02-16 15:38:56 +01:00
Thomas Perl d8b70eeda5 Extensions: New on_episode_playback function 2013-01-19 17:07:00 +01:00
Bernd Schlapsi d5eae16b9f Improvements to the extension system
- Add category metadata in every extension
- Show this category in the extension list gui
- Add "mandatory_in" and "disable-in" configuration for an extension
- Add Ubuntu unity check to enable/disable unity specific extensions
- Move "gpodder.win32" and "gpodder.osx" setting to the "gpodder.ui" namespace to be able to use it in the extensions category settings
- Only show metadata information in the right-click dialog of an extension
2012-12-07 10:30:28 +01:00
Nick Stevens f08e0b13c2 Add "on_channel_context_menu" callback
Add an extension callback for reacting to a user activating the context
menu on a channel. Allows the extension developer to add menu items to
the channel context menu if desired.
2012-06-25 09:07:17 -05:00
Thomas Perl 140fdeda57 Extensions: Error reporting on load
Report errors if required commands are not
found or if modules cannot be imported.
2012-03-22 14:53:24 +01:00
Thomas Perl 9c147cf980 Extensions: Various fixes and clean-ups from review 2012-03-22 14:53:24 +01:00
Thomas Perl e787bef4e3 Extensions: New environment variables 2012-03-22 14:53:24 +01:00
Bernd Schlapsi bca9751b75 Add default extensions (ported from hooks) 2012-03-22 14:53:24 +01:00
Bernd Schlapsi 9a896b7472 Extensions: Testing support, defaults
save default_value of an extension when loading them for the first time;
add option to start the ExtensionManager with only one file (used in the
extensions tests)
2012-03-22 14:53:24 +01:00
Thomas Perl c9c71d2f0c Extensions: Experimental AppIndicator support
The way how we access the gPodder "GUI" object is
very hack-ish. We should find a better way for that.
2012-02-24 00:44:16 +01:00
Thomas Perl 556cc0fab4 Ubuntu: Make the Unity integration an extension
This is still not perfect (has to launch as new process),
but it works for the normal use case as an extension.

Also added support for localized metadata in extensions.
2012-02-24 00:12:00 +01:00
Thomas Perl 2f91e98ecc Restructure the source tree, modular installs
Restructure the source tree to be more like the
target installation directory (share/...).

Rewrite setup.py to only install a subset of the
available UIs and to be more flexible and cleaner
in general.

I hope this doesn't cause too much breakage, but
should result in a cleaner build/install system and
more happy developers and packagers in the long run.
2012-02-23 20:38:55 +01:00
Thomas Perl 7c35131876 Extensions: Add on_load() / on_unload() support
This allows extensions to hook into stuff and remove
the hooks when the extension is unloaded.
2012-02-21 15:13:18 +01:00
Thomas Perl 8c19f52b9a Extensions: Expose the "core" object to the manager 2012-02-21 14:12:46 +01:00
Thomas Perl 4218497599 Extensions/Gtk: Move manager to preferences dialog
Move manager to preferences dialog.

Make the manager listen on config changes to enable
and disable extensions/containers on the fly.

Move the "enabled" flag into the container as an
attribute (+ add set_enabled() method for loading).
2012-02-21 13:50:33 +01:00
Thomas Perl d52719f947 Extensions: Look also in $GPODDER_HOME/Extensions 2012-02-21 11:28:18 +01:00
Thomas Perl 03772ddcd7 Extensions: Implement UI restriction metadata
Extension scripts can now define for which UIs of
gPodder they work. This can be used to e.g. disable
certain extensions when the CLI is running.
2012-02-21 10:14:23 +01:00
Thomas Perl ca45890b6a Cleanup/simplify extensions system and GUI 2012-02-20 23:55:36 +01:00
Thomas Perl 39cf766792 Extensions: Enabled/disabled should be a boolean 2012-02-20 21:51:06 +01:00
Bernd Schlapsi 1f39c2ab35 a few small bugfixes for the extension system 2012-02-20 21:37:20 +01:00
Bernd Schlapsi efb6bceeea refactor notification.py. Now it is a gpodder plug-in 2012-02-20 21:37:20 +01:00
Bernd Schlapsi c29dc7056a worked again on the review feedback from thp -> one file per extension
Conflicts:

	src/gpodder/extensions.py
2012-02-20 21:37:20 +01:00
Bernd Schlapsi c83994b4b0 worked on the review feedback from thp 2012-02-20 21:37:20 +01:00
Thomas Perl d01cf417ff Cleanup wording of extension module docstring 2012-02-20 21:37:20 +01:00
Bernd Schlapsi 263c9092b5 add work for the new extension system (bugs #1491, #1500, #1555) 2012-02-20 21:37:20 +01:00
Thomas Perl 3caa9858dd Refactor user extensions into "hooks" (bug 425)
Refactor Justin's "User extensions" code to make it
a bit more cleaner and documented, and rename it to
"hooks", as this more precisely describes the nature
of the mechanism.
2010-07-05 16:08:22 +02:00
Justin Forest ef81517f6d Initial support for user extensions (bug 435)
Currently this only lets you do something with
channels and episodes before they are saved,
e.g. modify titles. Can be extended easily to
provide more functions.

Loads $GPODDER_HOME/extensions/*.py, see src/gpodder/userext.py
for details.
2010-07-05 15:03:32 +02:00