
Changes: - added --transcode yes/no to enable transcoding .off into .mp3 for handicapped devices which do not support open codes (iOS, looking at you here) - added webcron endpoint to run feed updates in situations where the system scheduler can not be used - feed manager is now mostly a single page app with live updates - added -v (version) option - added versioned updatees for feed and index manager Fixes: - direct login now works as intended New install requirements: - ffmpeg-python - setuptools The change to a SPA was necessitated by the introduction of the `--transcode yes/no` option which (when activated) causes feed updates to take much more time, especially on less powerful hardware. This would cause the feed manager process to timeout before the feeds were updated. This problem is mostly fixed but can still occur in the webcron update process. If this happens the php-fpm and/or web server timeout needs to be increased. This should only happen on slower hardware and/or slow links.
46 lines
1.6 KiB
Python
46 lines
1.6 KiB
Python
import argparse
|
|
import pkg_resources
|
|
|
|
from spodcast.app import client
|
|
from spodcast.config import CONFIG_VALUES
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(prog='spodcast', description='A caching Spotify podcast to RSS proxy.')
|
|
parser.add_argument('-c', '--config-location',
|
|
type=str,
|
|
help='Specify the spodcast.json location')
|
|
|
|
parser.add_argument('-p', '--prepare-feed',
|
|
action='store_true',
|
|
help='Installs RSS feed server code in ROOT_PATH.')
|
|
|
|
parser.add_argument('-v', '--version',
|
|
action='version',
|
|
version = '%(prog)s ' + pkg_resources.require("Spodcast")[0].version)
|
|
|
|
group = parser.add_mutually_exclusive_group(required=True)
|
|
group.add_argument('urls',
|
|
type=str,
|
|
# action='extend',
|
|
default='',
|
|
nargs='*',
|
|
help='Download podcast episode(s) from a url. Can take multiple urls.')
|
|
|
|
group.add_argument('-l', '--login',
|
|
type=str,
|
|
help='Reads username and password from file passed as argument and stores credentials for later use.')
|
|
|
|
for configkey in CONFIG_VALUES:
|
|
parser.add_argument(CONFIG_VALUES[configkey]['arg'],
|
|
type=str,
|
|
default=None,
|
|
help=CONFIG_VALUES[configkey]['help'])
|
|
|
|
parser.set_defaults(func=client)
|
|
|
|
args = parser.parse_args()
|
|
args.func(args)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|