Giter VIP home page Giter VIP logo

gpodder-android's Introduction

      ___         _    _           ____
 __ _| _ \___  __| |__| |___ _ _  |__ /
/ _` |  _/ _ \/ _` / _` / -_) '_|  |_ \
\__, |_| \___/\__,_\__,_\___|_|   |___/
|___/
        Media aggregator and podcast client

Copyright 2005-2022 The gPodder Team

License

gPodder is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

gPodder is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Dependencies

As an alternative to python-dbus on Mac OS X and Windows, you can use the dummy (no-op) D-Bus module provided in "tools/fake-dbus-module/".

For quick testing, see Run from Git to install dependencies.

GTK3 UI - Additional Dependencies

Optional Dependencies

  • Bluetooth file sending: gnome-obex-send or bluetooth-sendto
  • Size detection on Windows: PyWin32
  • Native OS X support: ige-mac-integration
  • MP3 Player Sync Support: python-eyed3 (0.7 or newer)
  • iPod Sync Support: libgpod (tested with 0.8.3)
  • Clickable links in GTK UI show notes: html5lib
  • HTML show notes: WebKit2 gobject bindings (webkit2gtk, webkitgtk4 or gir1.2-webkit2-4.0 packages).
  • Better Youtube support (> 15 entries in feeds, download audio-only): youtube_dl or yt-dlp

Build Dependencies

  • help2man
  • intltool

Test Dependencies

  • python-minimock
  • pytest
  • pytest-httpserver
  • pytest-cov
  • desktop-file-utils

Testing

To run tests, use...

make unittest

To set a specific python binary set PYTHON:

PYTHON=python3 make unittest

Tests in gPodder are written in two different ways:

If you want to add doctests, simply write the doctest and make sure that the module appears after --doctest-modules in pytest.ini. If you add tests to any module in src/gpodder you have nothing to do.

If you want to add unit tests for a specific module (ex: gpodder.model), you should add the tests as gpodder.test.model, or in other words:

The file:       src/gpodder/model.py
is tested by:   src/gpodder/test/model.py

After you've added the test, make sure that the module appears in "test_modules" in src/gpodder/unittests.py - for the example above, the unittests in src/gpodder/test/model.py are added as 'model'. For unit tests, coverage reporting happens for the tested module (that's why the test module name should mirror the module to be tested).

Running and Installation

To run gPodder from source, use..

bin/gpodder              # for the Gtk+ UI
bin/gpo                  # for the command-line interface

To install gPodder system-wide, use make install. By default, this will install all UIs and all translations. The following environment variables are processed by setup.py:

LINGUAS                  space-separated list of languages to install
GPODDER_INSTALL_UIS      space-separated list of UIs to install
GPODDER_MANPATH_NO_SHARE if set, install manpages to $PREFIX/man/man1

See setup.py for a list of recognized UIs.

Example: Install the CLI and Gtk UI with German and Dutch translations:

export LINGUAS="de nl"
export GPODDER_INSTALL_UIS="cli gtk"
make install

The "make install" target also supports DESTDIR and PREFIX for installing into an alternative root (default /) and prefix (default /usr):

make install DESTDIR=tmp/ PREFIX=/usr/local/

Debian and Ubuntu use dist-packages instead of site-packages for third party installs, so you'll want something like:

sudo python3 setup.py install --root / --prefix /usr/local --optimize=1 --install-lib=/usr/local/lib/python3.10/dist-packages

In fact, first try running python -c "import sys; print(sys.path)" to check what is the exact path. It depends on your version of python.

Portable Mode / Roaming Profiles

The run-time environment variable GPODDER_HOME is used to set the location for storing the database and downloaded files.

This can be used for multiple configurations or to store the download directory directly on a MP3 player or USB disk:

export GPODDER_HOME=/media/usbdisk/gpodder-data/

OS X Specific Notes

  • default GPODDER_HOME="$HOME/Library/Application Support/gPodder"
  • default GPODDER_DOWNLOAD_DIR="$HOME/Library/Application Support/gPodder/download"

These settings may be modified by editing the following file of the .app :

/Applications/gPodder.app/Contents/MacOSX/_launcher

Add and edit the following lines to alter the launch environment on OS X :

export GPODDER_HOME="$HOME/Library/Application Support/gPodder"
export GPODDER_DOWNLOAD_DIR="$HOME/Library/Application Support/gPodder/download"

Changing the Download Directory

The run-time environment variable GPODDER_DOWNLOAD_DIR is used to set the location for storing the downloads only (independent of the data directory GPODDER_HOME):

export GPODDER_DOWNLOAD_DIR=/media/BigDisk/Podcasts/

In this case, the database and settings will be stored in the default location, with the downloads stored in /media/BigDisk/Podcasts/.

Another example would be to set both environment variables:

export GPODDER_HOME=~/.config/gpodder/
export GPODDER_DOWNLOAD_DIR=~/Podcasts/

This will store the database and settings files in ~/.config/gpodder/ and the downloads in ~/Podcasts/. If GPODDER_DOWNLOAD_DIR is not set, $GPODDER_HOME/Downloads/ will be used if it is set.

Logging

By default, gPodder writes log files to $GPODDER_HOME/Logs/ and removes them after a certain amount of times. To avoid this behavior, you can set the environment variable GPODDER_WRITE_LOGS to "no", e.g:

export GPODDER_WRITE_LOGS=no

Extensions

Extensions are normally loaded from gPodder's "extensions/" folder (in share/gpodder/extensions/) and from $GPODDER_HOME/Extensions/ - you can override this by setting an environment variable:

export GPODDER_EXTENSIONS="/path/to/extension1.py extension2.py"

In addition to that, if you want to disable loading of all extensions, you can do this by setting the following environment variable to a non- empty value:

export GPODDER_DISABLE_EXTENSIONS=yes

If you want to report a bug, please try to disable all extensions and check if the bug still appears to see if an extension causes the bug.

More Information

gpodder-android's People

Contributors

thp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gpodder-android's Issues

opml import export

Hi
It would be great if one could import and export opml feeds.

Thanks

Building everything (Python 3, PyOtherSide and GPodder) from source

So I've decided to find out how to get from the source code up to a working Android package & to put together a guide documenting how I did it. The guide follows (feel free to include it in a suitable place :) ):

Building GPodder as an example Python 3 + PyOtherSide + QtQuick 2.0 application

Environment:

  • Fedora 20
  • Qt 5.3.1 Android SDK
  • latest Android SDK with API level 14 installed
  • OpenJDK 1.7
  • a few GB of harddrive space
  • and Android device connected to the computer

The build is going to be done in a folder called "build" in the users home directory,
lets say that the use is named "user" (replace accordingly for your environment).

We start in the home directory:

mkdir build
cd build

Now clone the needed projects, load submodules and switch to correct branches.

git clone https://github.com/thp/python3-android
git clone https://github.com/thp/pyotherside
git clone https://github.com/gpodder/gpodder-android
cd python3-android
git checkout fixes
cd ..
cd gpodder-android
git checkout fixes
git submodule init
git submodule update
cd ..

Next we will build Python 3 for Android. This will first download the Android NDK, then Python 3 source code, followed by crosscompiling the Python 3 code for Android on ARM.

cd python3-android
make all

As the next step we modify the python.pri.android file to point to our Python build. If should look like this as a result (remember to modify it for your environment):

QMAKE_LIBS += -L/home/user/build/python3-android/build/9d-14-arm-linux-androideabi-4.8/lib -lpython3.3m -ldl -lm -lc -lssl -lcrypto
QMAKE_CXXFLAGS += -I/home/user/build/python3-android/build/9d-14-arm-linux-androideabi-4.8/include/python3.3m/

Then copy the file over the python.pri file in PyOtherSide:

cd ..
cp python3-android/python.pri.android pyotherside/python.pri

PyOtherSide can also help us ship & load the Python standard library if we can provide it a suitable zip bundle, which can be created like this:

cd python3-android/build/9d-14-arm-linux-androideabi-4.8/lib/python3.3/
zip -r pythonlib.zip *
cd ../../../../..

For PyOtherSide to include the packed Python standard library it needs to be placed in its src subfolder:

mv python3-android/build/9d-14-arm-linux-androideabi-4.8/lib/python3.3/pythonlib.zip pyotherside/src/

PyOtherSide will then use the qrc mechanism to compile the compressed standard library during inside it's own binary, removes the need for us to handle its shipping & loading ourself.

Now you will build PyOtherSide with QtCreator from the Qt 5.3 Android SDK, so make sure that the Qt 5.3 Android kit is using the exact same NDK that has been used to build Python 3 for Android. To do that go to settings, find kits, select the Android kit and make sure that the NDK path points to:

/home/user/build/python3-android/sdk/android-ndk-r9d

Next open the pyotherside/pyotherside.pro project file on QtCreator, select the Android kit and once the project loads go to the project view and under "run" make sure that API level is set to 14 (Android 4.0 and later). The Android Python 3 build has been built for API level 14 and our PyOtherSide build should do the same to be compatible.

Also make sure that shadow build is disabled (TODO: check if this is needed)

Once done with the configuration got to the "build" menu and select the "built pyotherside" options - this should build PyOtherSide for Android and statically
compile in our Python build and the Python standard library.

As the next step we need to move the PyOtherSide binary to the plugin folder for the Qt Android SDK, so that it can be fetched by the SDK when building GPodder.

Let's say we have the SDK installed in the /data directory, giving us this path to the plugin folder:

/data/Qt5.3/5.3/android_armv7/qml

So create the folder structure for the pyotherside plugin:

mkdir -p /data/Qt5.3/5.3/android_armv7/qml/io/thp/pyotherside

And a corresponding qmldir file for the plugin:

echo "module io.thp.pyotherside" > /data/Qt5.3/5.3/android_armv7/qml/io/thp/pyotherside/qmldir
echo "plugin pyothersideplugin" >> /data/Qt5.3/5.3/android_armv7/qml/io/thp/pyotherside/qmldir

Then copy the pyotherside binary:

cp build-pyotherside-Android_for_armeabi_v7a_GCC_4_8_Qt_5_3_2-Debug/src/libpyothersideplugin.so /data/Qt5.3/5.3/android_armv7/qml/io/thp/pyotherside/

(NOTE: The path to the build folder might be slightly different as it depending on Qt SDK version)

Next open the gpodder project in QtCreator (gpodder-android/gpodder-android.pro) and again make sure the Android kit is selected and the API level 14 is used. Then just press the "Run" button and the SDK should build an Android APK that includes the libpyotherside binary (as it is referenced in the GPodder QML source code) and deploy it to the device where GPodder should be started.

But unfortunately

The resulting application crashes once deployed. :-P
The application output before the crash looks like this:

*FIXED - WORKS NOW * - see comment below for more info.

Starting remote process.D/dalvikvm(13794): Late-enabling CheckJNI
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/lib/libgnustl_shared.so 0x2b80ca18
D/dalvikvm(13794): Added shared lib /data/data/org.gpodder.android/lib/libgnustl_shared.so 0x2b80ca18
D/dalvikvm(13794): No JNI_OnLoad found in /data/data/org.gpodder.android/lib/libgnustl_shared.so 0x2b80ca18, skipping init
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/lib/libQt5Core.so 0x2b80ca18
D/dalvikvm(13794): Added shared lib /data/data/org.gpodder.android/lib/libQt5Core.so 0x2b80ca18
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/lib/libQt5Network.so 0x2b80ca18
D/dalvikvm(13794): Added shared lib /data/data/org.gpodder.android/lib/libQt5Network.so 0x2b80ca18
D/dalvikvm(13794): No JNI_OnLoad found in /data/data/org.gpodder.android/lib/libQt5Network.so 0x2b80ca18, skipping init
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/lib/libQt5Qml.so 0x2b80ca18
D/dalvikvm(13794): Added shared lib /data/data/org.gpodder.android/lib/libQt5Qml.so 0x2b80ca18
D/dalvikvm(13794): No JNI_OnLoad found in /data/data/org.gpodder.android/lib/libQt5Qml.so 0x2b80ca18, skipping init
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/lib/libQt5Gui.so 0x2b80ca18
D/dalvikvm(13794): Added shared lib /data/data/org.gpodder.android/lib/libQt5Gui.so 0x2b80ca18
D/dalvikvm(13794): No JNI_OnLoad found in /data/data/org.gpodder.android/lib/libQt5Gui.so 0x2b80ca18, skipping init
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/lib/libQt5Quick.so 0x2b80ca18
D/dalvikvm(13794): Added shared lib /data/data/org.gpodder.android/lib/libQt5Quick.so 0x2b80ca18
D/dalvikvm(13794): No JNI_OnLoad found in /data/data/org.gpodder.android/lib/libQt5Quick.so 0x2b80ca18, skipping init
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/lib/libQt5QuickParticles.so 0x2b80ca18
D/dalvikvm(13794): Added shared lib /data/data/org.gpodder.android/lib/libQt5QuickParticles.so 0x2b80ca18
D/dalvikvm(13794): No JNI_OnLoad found in /data/data/org.gpodder.android/lib/libQt5QuickParticles.so 0x2b80ca18, skipping init
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/lib/libQt5Multimedia.so 0x2b80ca18
D/dalvikvm(13794): Added shared lib /data/data/org.gpodder.android/lib/libQt5Multimedia.so 0x2b80ca18
D/dalvikvm(13794): No JNI_OnLoad found in /data/data/org.gpodder.android/lib/libQt5Multimedia.so 0x2b80ca18, skipping init
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/lib/libQt5MultimediaQuick_p.so 0x2b80ca18
D/dalvikvm(13794): Added shared lib /data/data/org.gpodder.android/lib/libQt5MultimediaQuick_p.so 0x2b80ca18
D/dalvikvm(13794): No JNI_OnLoad found in /data/data/org.gpodder.android/lib/libQt5MultimediaQuick_p.so 0x2b80ca18, skipping init
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/qt-reserved-files/plugins/platforms/android/libqtforandroid.so 0x2b80ca18
D/dalvikvm(13794): Added shared lib /data/data/org.gpodder.android/qt-reserved-files/plugins/platforms/android/libqtforandroid.so 0x2b80ca18
I/Qt      (13794): qt start
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/lib/libQt5QuickParticles.so 0x2b80ca18
D/dalvikvm(13794): Shared lib '/data/data/org.gpodder.android/lib/libQt5QuickParticles.so' already loaded in same CL 0x2b80ca18
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/qt-reserved-files/plugins/mediaservice/libqtmedia_android.so 0x2b80ca18
D/dalvikvm(13794): Added shared lib /data/data/org.gpodder.android/qt-reserved-files/plugins/mediaservice/libqtmedia_android.so 0x2b80ca18
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/lib/libQt5MultimediaQuick_p.so 0x2b80ca18
D/dalvikvm(13794): Shared lib '/data/data/org.gpodder.android/lib/libQt5MultimediaQuick_p.so' already loaded in same CL 0x2b80ca18
D/dalvikvm(13794): Trying to load lib /data/data/org.gpodder.android/lib/libgpodder-android.so 0x2b80ca18
D/Qt      (13794): qml/qqmlengine.cpp:1453 (QQmlDebuggingEnabler::QQmlDebuggingEnabler(bool)): QML debugging is enabled. Only use this in a safe environment.
D/dalvikvm(13794): Added shared lib /data/data/org.gpodder.android/lib/libgpodder-android.so 0x2b80ca18
D/dalvikvm(13794): No JNI_OnLoad found in /data/data/org.gpodder.android/lib/libgpodder-android.so 0x2b80ca18, skipping init
D/libEGL  (13794): loaded /system/lib/egl/libGLES_android.so
D/libEGL  (13794): loaded /system/lib/egl/libEGL_adreno200.so
D/libEGL  (13794): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
D/libEGL  (13794): loaded /system/lib/egl/libGLESv2_adreno200.so
D/OpenGLRenderer(13794): Enabling debug mode 0
F/libc    (13794): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)


"org.gpodder.android" died.

Any pointer on what might be wrong ? Thanks in advance! :)

Remove unneeded permission

Remove permissions that are not needed by not letting Qt generate the permissions, but maintain a list manually. For example, remove voice recording and camera permissions (coming from QtMultimedia), as we don't need those.

Play button out-of-screen on Nexus 4

With the setup

  • Device: Google Nexus 4
  • OS: Android 5.1.1
  • App: gPodder 4.6.0
  • Podcast: any episode with chapters (e.g. FS166)
  • View: "Now Playing" in portrait

the "Chapters" button will be visible, pushing the "Play / Pause" button beyond the left screen edge into invisibility.

One can still access all buttons, when switching to landscape view.

No Gpodder.net listing?

Hi
I cant get any listing from Gpodder.net. Neither from the Android nor from the Desktop version.

thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.