From a99cd9fd577f30f9ae1831ff4177807fdd0bddf5 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Thu, 3 Aug 2023 11:35:37 +0300 Subject: [PATCH] renamed funkwhale-cli -> funkwlmpv --- README.md | 4 ++-- funkwhale_cli.py => funkwlmpv | 2 +- src/fw_api.py | 2 +- src/fw_instances.py | 2 +- src/mpv_control.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) rename funkwhale_cli.py => funkwlmpv (99%) diff --git a/README.md b/README.md index 142e200..ae24622 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# funkwhale-cli +# funkwlmpv Just for fun. A simple TUI media player for FunkWhale instances. Writen on python Features: @@ -21,7 +21,7 @@ Python dependencies: Optional: brotli ### About cache folder -funkwhale-cli has to cache tracks before playing (default disabled "enable_persistent_cache"). Cache is persistent and you should manage it manually because the (script/program) can't clean it automatically. +funkwlmpv has to cache tracks before playing (default disabled "enable_persistent_cache"). Cache is persistent and you should manage it manually because the (script/program) can't clean it automatically. Cache structure: cache/domain.tld/[track uuid] You can play tracks offline, example: mpv --shuffle cache/*/* cache_helper.sh - it might be useful for compression cache (lossy: vorbis 128 kbps, no thumbnail) diff --git a/funkwhale_cli.py b/funkwlmpv similarity index 99% rename from funkwhale_cli.py rename to funkwlmpv index d4235b8..eede962 100755 --- a/funkwhale_cli.py +++ b/funkwlmpv @@ -94,7 +94,7 @@ def main(): print(f''' If You want sign in, please visit: https://{current_instance.instance}/settings/applications/new -And fill Name funkwhale-cli +And fill Name funkwlmpv Scopes: Read | Write (optional): write:libraries diff --git a/src/fw_api.py b/src/fw_api.py index 1789fb0..09a237f 100644 --- a/src/fw_api.py +++ b/src/fw_api.py @@ -32,7 +32,7 @@ class current_instance: s = requests.Session() s.headers.update({ "Accept-encoding": 'gzip, br, deflate', - "User-Agent": "funkwhale-cli/latest-commit; +https://git.phreedom.club/localhost_frssoft/funkwhale-cli" + "User-Agent": "funkwlmpv/latest-commit; +https://git.phreedom.club/localhost_frssoft/funkwlmpv" }) instance = get_config('instance') token = auth.get(instance) diff --git a/src/fw_instances.py b/src/fw_instances.py index 2fd1d65..4161e87 100644 --- a/src/fw_instances.py +++ b/src/fw_instances.py @@ -77,7 +77,7 @@ def fetch_instances_nodeinfo_and_avalaibility(instances): return requests.get('https://' + instance + '/api/v1/instance/nodeinfo/2.0/', headers={ 'Accept-Encoding': 'gzip, brotli, deflate', - 'User-Agent': 'funkwhale-cli/latest-commit; +https://git.phreedom.club/localhost_frssoft/funkwhale-cli'}, + 'User-Agent': 'funkwlmpv/latest-commit; +https://git.phreedom.club/localhost_frssoft/funkwlmpv'}, timeout=10).json() with concurrent.futures.ThreadPoolExecutor() as executor: # optimally defined number of threads diff --git a/src/mpv_control.py b/src/mpv_control.py index 7f29f95..6602ae8 100644 --- a/src/mpv_control.py +++ b/src/mpv_control.py @@ -69,7 +69,7 @@ def send_listen_activity(): tags = ' '.join(tags) if tags == []: tags = '' - status_obj = {'spoiler_text': 'funkwhale-cli music share', + status_obj = {'spoiler_text': 'funkwlmpv music share', 'visibility': 'unlisted', 'status': f'🎧 {artist} - {album} - {title}\n{fid}\n#NowPlaying {tags}'} requests.post(f'https://{share_to_fediverse_instance}/api/v1/statuses',