diff --git a/.builds/build-flatpak.yml b/.builds/build-flatpak.yml index a11d57a..1dd10dd 100644 --- a/.builds/build-flatpak.yml +++ b/.builds/build-flatpak.yml @@ -15,6 +15,8 @@ sources: - https://git.sr.ht/~sumner/sublime-music environment: REPO_NAME: sublime-music +artifacts: + - sublime-music/flatpak/sublime-music.flatpak # triggers: # - action: email # condition: failure diff --git a/.envrc b/.envrc index 5f77a24..446206f 100644 --- a/.envrc +++ b/.envrc @@ -1,7 +1,17 @@ -# Run poetry install and activate the virtualenv -poetry install -E chromecast -E keyring -E server +use nix + +# Run poetry install if there's not a virtualenv already. +if [[ ! -d .venv ]]; then + echo "No virtualenv found, installing dependencies using Poetry..." + poetry install -E chromecast -E keyring -E server +fi + +# Activate the virtualenv source .venv/bin/activate watch_file pyproject.toml watch_file poetry.lock watch_file setup.py +watch_file shell.nix + +unset PS1 diff --git a/.gitignore b/.gitignore index dfdcb48..63f0105 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.direnv flatpak/flatpak_build_dir/ flatpak/sublime-music.flatpak flatpak/repo diff --git a/.vim/coc-settings.json b/.vim/coc-settings.json index eb8897c..cc71be6 100644 --- a/.vim/coc-settings.json +++ b/.vim/coc-settings.json @@ -1,5 +1,4 @@ { - "python.jediEnabled": false, "python.analysis.openFilesOnly": false, "python.linting.pylintEnabled": false, "python.linting.flake8Enabled": true, diff --git a/poetry.lock b/poetry.lock index efe467e..312db9f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -21,7 +21,6 @@ description = "Atomic file writes." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -marker = "sys_platform == \"win32\"" [[package]] name = "attrs" @@ -32,10 +31,10 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.extras] -dev = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "sphinx", "sphinx-rtd-theme", "pre-commit"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "sphinx", "sphinx-rtd-theme", "pre-commit"] docs = ["sphinx", "sphinx-rtd-theme", "zope.interface"] -tests = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] -tests_no_zope = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six"] [[package]] name = "babel" @@ -56,10 +55,6 @@ category = "dev" optional = false python-versions = ">=3.6" -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.3.2)", "aiohttp-cors"] - [package.dependencies] appdirs = "*" click = ">=7.1.2" @@ -70,6 +65,10 @@ toml = ">=0.10.1" typed-ast = ">=1.4.0" typing-extensions = ">=3.7.4" +[package.extras] +colorama = ["colorama (>=0.4.3)"] +d = ["aiohttp (>=3.3.2)", "aiohttp-cors"] + [[package]] name = "bleach" version = "3.2.1" @@ -117,7 +116,6 @@ description = "Foreign Function Interface for Python calling C code." category = "main" optional = true python-versions = "*" -marker = "sys_platform == \"linux\"" [package.dependencies] pycparser = "*" @@ -145,7 +143,6 @@ description = "Cross-platform colored terminal text." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -marker = "sys_platform == \"win32\"" [[package]] name = "coverage" @@ -165,7 +162,10 @@ description = "cryptography is a package which provides cryptographic recipes an category = "main" optional = true python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" -marker = "sys_platform == \"linux\"" + +[package.dependencies] +cffi = ">=1.8,<1.11.3 || >1.11.3" +six = ">=1.4.1" [package.extras] docs = ["sphinx (>=1.6.5,<1.8.0 || >1.8.0,<3.1.0 || >3.1.0,<3.1.1 || >3.1.1)", "sphinx-rtd-theme"] @@ -174,10 +174,6 @@ pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] ssh = ["bcrypt (>=3.1.5)"] test = ["pytest (>=3.6.0,<3.9.0 || >3.9.0,<3.9.1 || >3.9.1,<3.9.2 || >3.9.2)", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,<3.79.2 || >3.79.2)"] -[package.dependencies] -cffi = ">=1.8,<1.11.3 || >1.11.3" -six = ">=1.4.1" - [[package]] name = "dataclasses-json" version = "0.5.2" @@ -186,15 +182,15 @@ category = "main" optional = false python-versions = ">=3.6" -[package.extras] -dev = ["pytest", "ipython", "mypy (>=0.710)", "hypothesis", "portray", "flake8", "simplejson"] - [package.dependencies] marshmallow = ">=3.3.0,<4.0.0" marshmallow-enum = ">=1.5.1,<2.0.0" stringcase = "1.2.0" typing-inspect = ">=0.4.0" +[package.extras] +dev = ["pytest", "ipython", "mypy (>=0.710)", "hypothesis", "portray", "flake8", "simplejson"] + [[package]] name = "deepdiff" version = "5.0.2" @@ -203,12 +199,12 @@ category = "main" optional = false python-versions = ">=3.5" -[package.extras] -murmur = ["mmh3"] - [package.dependencies] ordered-set = ">=4.0.1" +[package.extras] +murmur = ["mmh3"] + [[package]] name = "docutils" version = "0.16" @@ -219,7 +215,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "flake8" -version = "3.8.3" +version = "3.8.4" description = "the modular source code checker: pep8 pyflakes and co" category = "dev" optional = false @@ -232,7 +228,7 @@ pyflakes = ">=2.2.0,<2.3.0" [[package]] name = "flake8-annotations" -version = "2.4.0" +version = "2.4.1" description = "Flake8 Type Annotation Checks" category = "dev" optional = false @@ -274,7 +270,6 @@ python-versions = "*" [package.dependencies] pycodestyle = "*" -setuptools = "*" [[package]] name = "flake8-pep3101" @@ -284,12 +279,12 @@ category = "dev" optional = false python-versions = "*" -[package.extras] -test = ["pytest", "testfixtures"] - [package.dependencies] flake8 = ">=3.0" +[package.extras] +test = ["pytest", "testfixtures"] + [[package]] name = "flake8-print" version = "3.1.4" @@ -365,7 +360,6 @@ description = "Low-level, pure Python DBus protocol wrapper." category = "main" optional = true python-versions = ">=3.5" -marker = "sys_platform == \"linux\"" [package.extras] dev = ["testpath"] @@ -378,12 +372,12 @@ category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -[package.extras] -i18n = ["Babel (>=0.8)"] - [package.dependencies] MarkupSafe = ">=0.23" +[package.extras] +i18n = ["Babel (>=0.8)"] + [[package]] name = "keyring" version = "21.4.0" @@ -392,15 +386,15 @@ category = "main" optional = true python-versions = ">=3.6" +[package.dependencies] +jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} +pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} +SecretStorage = {version = ">=3", markers = "sys_platform == \"linux\""} + [package.extras] docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black (>=0.3.7)", "pytest-cov", "pytest-mypy"] -[package.dependencies] -jeepney = ">=0.4.2" -pywin32-ctypes = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1" -SecretStorage = ">=3" - [[package]] name = "markupsafe" version = "1.1.1" @@ -442,14 +436,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "more-itertools" -version = "8.5.0" -description = "More routines for operating on iterables, beyond itertools" -category = "dev" -optional = false -python-versions = ">=3.5" - [[package]] name = "mypy" version = "0.782" @@ -458,14 +444,14 @@ category = "dev" optional = false python-versions = ">=3.5" -[package.extras] -dmypy = ["psutil (>=4.0)"] - [package.dependencies] mypy-extensions = ">=0.4.3,<0.5.0" typed-ast = ">=1.4.0,<1.5.0" typing-extensions = ">=3.7.4" +[package.extras] +dmypy = ["psutil (>=4.0)"] + [[package]] name = "mypy-extensions" version = "0.4.3" @@ -530,7 +516,6 @@ optional = true python-versions = "*" [package.dependencies] -setuptools = "*" six = ">=1.9" [[package]] @@ -543,15 +528,15 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pycairo" -version = "1.19.1" +version = "1.20.0" description = "Python interface for cairo" category = "main" optional = false -python-versions = ">=3.5, <4" +python-versions = ">=3.6, <4" [[package]] name = "pychromecast" -version = "7.3.0" +version = "7.5.0" description = "Python module to talk to Google Chromecast." category = "main" optional = true @@ -578,7 +563,6 @@ description = "C parser in Python" category = "main" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -marker = "sys_platform == \"linux\"" [[package]] name = "pyflakes" @@ -617,27 +601,26 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "pytest" -version = "6.0.2" +version = "6.1.1" description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.5" -[package.extras] -checkqa_mypy = ["mypy (0.780)"] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] - [package.dependencies] -atomicwrites = ">=1.0" +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} attrs = ">=17.4.0" -colorama = "*" +colorama = {version = "*", markers = "sys_platform == \"win32\""} iniconfig = "*" -more-itertools = ">=4.0.0" packaging = "*" pluggy = ">=0.12,<1.0" py = ">=1.8.2" toml = "*" +[package.extras] +checkqa_mypy = ["mypy (0.780)"] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] + [[package]] name = "pytest-cov" version = "2.10.1" @@ -646,13 +629,13 @@ category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -[package.extras] -testing = ["fields", "hunter", "process-tests (2.0.2)", "six", "pytest-xdist", "virtualenv"] - [package.dependencies] coverage = ">=4.4" pytest = ">=4.6" +[package.extras] +testing = ["fields", "hunter", "process-tests (2.0.2)", "six", "pytest-xdist", "virtualenv"] + [[package]] name = "python-dateutil" version = "2.8.1" @@ -672,9 +655,6 @@ category = "main" optional = false python-versions = "*" -[package.dependencies] -setuptools = "*" - [[package]] name = "python-mpv" version = "0.5.2" @@ -701,11 +681,10 @@ description = "" category = "main" optional = true python-versions = "*" -marker = "sys_platform == \"win32\"" [[package]] name = "regex" -version = "2020.7.14" +version = "2020.10.11" description = "Alternative regular expression module, to replace re." category = "dev" optional = false @@ -719,16 +698,16 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -[package.extras] -security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"] -socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"] - [package.dependencies] certifi = ">=2017.4.17" chardet = ">=3.0.2,<4" idna = ">=2.5,<3" urllib3 = ">=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26" +[package.extras] +security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"] +socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"] + [[package]] name = "requirements-parser" version = "0.2.0" @@ -757,7 +736,6 @@ description = "Python bindings to FreeDesktop.org Secret Service API" category = "main" optional = true python-versions = ">=3.5" -marker = "sys_platform == \"linux\"" [package.dependencies] cryptography = "*" @@ -795,22 +773,16 @@ category = "dev" optional = false python-versions = ">=3.5" -[package.extras] -docs = ["sphinxcontrib-websupport"] -lint = ["flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.780)", "docutils-stubs"] -test = ["pytest", "pytest-cov", "html5lib", "typed-ast", "cython"] - [package.dependencies] alabaster = ">=0.7,<0.8" babel = ">=1.3" -colorama = ">=0.3.5" +colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""} docutils = ">=0.12" imagesize = "*" Jinja2 = ">=2.3" packaging = "*" Pygments = ">=2.0" requests = ">=2.5.0" -setuptools = "*" snowballstemmer = ">=1.1" sphinxcontrib-applehelp = "*" sphinxcontrib-devhelp = "*" @@ -819,6 +791,11 @@ sphinxcontrib-jsmath = "*" sphinxcontrib-qthelp = "*" sphinxcontrib-serializinghtml = "*" +[package.extras] +docs = ["sphinxcontrib-websupport"] +lint = ["flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.780)", "docutils-stubs"] +test = ["pytest", "pytest-cov", "html5lib", "typed-ast", "cython"] + [[package]] name = "sphinx-rtd-theme" version = "0.5.0" @@ -827,12 +804,12 @@ category = "dev" optional = false python-versions = "*" -[package.extras] -dev = ["transifex-client", "sphinxcontrib-httpdomain", "bump2version"] - [package.dependencies] sphinx = "*" +[package.extras] +dev = ["transifex-client", "sphinxcontrib-httpdomain", "bump2version"] + [[package]] name = "sphinxcontrib-applehelp" version = "1.0.2" @@ -994,7 +971,7 @@ keyring = ["keyring"] server = ["bottle"] [metadata] -lock-version = "1.0" +lock-version = "1.1" python-versions = "^3.8" content-hash = "8f2347fd5d6fb642a38a353623b5176a1c6766317c5bb165ef48779663b31d38" @@ -1161,12 +1138,12 @@ docutils = [ {file = "docutils-0.16.tar.gz", hash = "sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc"}, ] flake8 = [ - {file = "flake8-3.8.3-py2.py3-none-any.whl", hash = "sha256:15e351d19611c887e482fb960eae4d44845013cc142d42896e9862f775d8cf5c"}, - {file = "flake8-3.8.3.tar.gz", hash = "sha256:f04b9fcbac03b0a3e58c0ab3a0ecc462e023a9faf046d57794184028123aa208"}, + {file = "flake8-3.8.4-py2.py3-none-any.whl", hash = "sha256:749dbbd6bfd0cf1318af27bf97a14e28e5ff548ef8e5b1566ccfb25a11e7c839"}, + {file = "flake8-3.8.4.tar.gz", hash = "sha256:aadae8761ec651813c24be05c6f7b4680857ef6afaae4651a4eccaef97ce6c3b"}, ] flake8-annotations = [ - {file = "flake8-annotations-2.4.0.tar.gz", hash = "sha256:09fe1aa3f40cb8fef632a0ab3614050a7584bb884b6134e70cf1fc9eeee642fa"}, - {file = "flake8_annotations-2.4.0-py3-none-any.whl", hash = "sha256:5bda552f074fd6e34276c7761756fa07d824ffac91ce9c0a8555eb2bc5b92d7a"}, + {file = "flake8-annotations-2.4.1.tar.gz", hash = "sha256:0bcebb0792f1f96d617ded674dca7bf64181870bfe5dace353a1483551f8e5f1"}, + {file = "flake8_annotations-2.4.1-py3-none-any.whl", hash = "sha256:bebd11a850f6987a943ce8cdff4159767e0f5f89b3c88aca64680c2175ee02df"}, ] flake8-bugbear = [ {file = "flake8-bugbear-20.1.4.tar.gz", hash = "sha256:bd02e4b009fb153fe6072c31c52aeab5b133d508095befb2ffcf3b41c4823162"}, @@ -1270,10 +1247,6 @@ mccabe = [ {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, ] -more-itertools = [ - {file = "more-itertools-8.5.0.tar.gz", hash = "sha256:6f83822ae94818eae2612063a5101a7311e68ae8002005b5e05f03fd74a86a20"}, - {file = "more_itertools-8.5.0-py3-none-any.whl", hash = "sha256:9b30f12df9393f0d28af9210ff8efe48d10c94f73e5daf886f10c4b0b0b4f03c"}, -] mypy = [ {file = "mypy-0.782-cp35-cp35m-macosx_10_6_x86_64.whl", hash = "sha256:2c6cde8aa3426c1682d35190b59b71f661237d74b053822ea3d748e2c9578a7c"}, {file = "mypy-0.782-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9c7a9a7ceb2871ba4bac1cf7217a7dd9ccd44c27c2950edbc6dc08530f32ad4e"}, @@ -1337,11 +1310,17 @@ py = [ {file = "py-1.9.0.tar.gz", hash = "sha256:9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342"}, ] pycairo = [ - {file = "pycairo-1.19.1.tar.gz", hash = "sha256:2c143183280feb67f5beb4e543fd49990c28e7df427301ede04fc550d3562e84"}, + {file = "pycairo-1.20.0-cp36-cp36m-win32.whl", hash = "sha256:e5a3433690c473e073a9917dc8f1fc7dc8b9af7b201bf372894b8ad70d960c6d"}, + {file = "pycairo-1.20.0-cp36-cp36m-win_amd64.whl", hash = "sha256:a942614923b88ae75c794506d5c426fba9c46a055d3fdd3b8db7046b75c079cc"}, + {file = "pycairo-1.20.0-cp37-cp37m-win32.whl", hash = "sha256:8cfa9578b745fb9cf2915ec580c2c50ebc2da00eac2cf4c4b54b63aa19da4b77"}, + {file = "pycairo-1.20.0-cp37-cp37m-win_amd64.whl", hash = "sha256:273a33c56aba724ec42fe1d8f94c86c2e2660c1277470be9b04e5113d7c5b72d"}, + {file = "pycairo-1.20.0-cp38-cp38-win32.whl", hash = "sha256:2088100a099c09c5e90bf247409ce6c98f51766b53bd13f96d6aac7addaa3e66"}, + {file = "pycairo-1.20.0-cp38-cp38-win_amd64.whl", hash = "sha256:ceb1edcbeb48dabd5fbbdff2e4b429aa88ddc493d6ebafe78d94b050ac0749e2"}, + {file = "pycairo-1.20.0.tar.gz", hash = "sha256:5695a10cb7f9ae0d01f665b56602a845b0a8cb17e2123bfece10c2e58552468c"}, ] pychromecast = [ - {file = "PyChromecast-7.3.0-py2.py3-none-any.whl", hash = "sha256:182ee414f7de227f2e55d6444bd59d31282bac4d1d63f0f3ca1f19725c5ba4bf"}, - {file = "PyChromecast-7.3.0.tar.gz", hash = "sha256:f594231efb34b86eeb463611662bca21a6962793885d3ad68195286940f7473d"}, + {file = "PyChromecast-7.5.0-py2.py3-none-any.whl", hash = "sha256:5dba13fa47ee83b08511231bcb35bdec0394a9f1338059e416e28047548795e4"}, + {file = "PyChromecast-7.5.0.tar.gz", hash = "sha256:2f346a88ddc27a19cc68bc2d3e8929d89276298cb1c11871b82a87fbdafb95a8"}, ] pycodestyle = [ {file = "pycodestyle-2.6.0-py2.py3-none-any.whl", hash = "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367"}, @@ -1367,8 +1346,8 @@ pyparsing = [ {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, ] pytest = [ - {file = "pytest-6.0.2-py3-none-any.whl", hash = "sha256:0e37f61339c4578776e090c3b8f6b16ce4db333889d65d0efb305243ec544b40"}, - {file = "pytest-6.0.2.tar.gz", hash = "sha256:c8f57c2a30983f469bf03e68cdfa74dc474ce56b8f280ddcb080dfd91df01043"}, + {file = "pytest-6.1.1-py3-none-any.whl", hash = "sha256:7a8190790c17d79a11f847fba0b004ee9a8122582ebff4729a082c109e81a4c9"}, + {file = "pytest-6.1.1.tar.gz", hash = "sha256:8f593023c1a0f916110285b6efd7f99db07d59546e3d8c36fc60e2ab05d3be92"}, ] pytest-cov = [ {file = "pytest-cov-2.10.1.tar.gz", hash = "sha256:47bd0ce14056fdd79f93e1713f88fad7bdcc583dcd7783da86ef2f085a0bb88e"}, @@ -1393,27 +1372,33 @@ pywin32-ctypes = [ {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, ] regex = [ - {file = "regex-2020.7.14-cp27-cp27m-win32.whl", hash = "sha256:e46d13f38cfcbb79bfdb2964b0fe12561fe633caf964a77a5f8d4e45fe5d2ef7"}, - {file = "regex-2020.7.14-cp27-cp27m-win_amd64.whl", hash = "sha256:6961548bba529cac7c07af2fd4d527c5b91bb8fe18995fed6044ac22b3d14644"}, - {file = "regex-2020.7.14-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:c50a724d136ec10d920661f1442e4a8b010a4fe5aebd65e0c2241ea41dbe93dc"}, - {file = "regex-2020.7.14-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:8a51f2c6d1f884e98846a0a9021ff6861bdb98457879f412fdc2b42d14494067"}, - {file = "regex-2020.7.14-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:9c568495e35599625f7b999774e29e8d6b01a6fb684d77dee1f56d41b11b40cd"}, - {file = "regex-2020.7.14-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:51178c738d559a2d1071ce0b0f56e57eb315bcf8f7d4cf127674b533e3101f88"}, - {file = "regex-2020.7.14-cp36-cp36m-win32.whl", hash = "sha256:9eddaafb3c48e0900690c1727fba226c4804b8e6127ea409689c3bb492d06de4"}, - {file = "regex-2020.7.14-cp36-cp36m-win_amd64.whl", hash = "sha256:14a53646369157baa0499513f96091eb70382eb50b2c82393d17d7ec81b7b85f"}, - {file = "regex-2020.7.14-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:1269fef3167bb52631ad4fa7dd27bf635d5a0790b8e6222065d42e91bede4162"}, - {file = "regex-2020.7.14-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:d0a5095d52b90ff38592bbdc2644f17c6d495762edf47d876049cfd2968fbccf"}, - {file = "regex-2020.7.14-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:4c037fd14c5f4e308b8370b447b469ca10e69427966527edcab07f52d88388f7"}, - {file = "regex-2020.7.14-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:bc3d98f621898b4a9bc7fecc00513eec8f40b5b83913d74ccb445f037d58cd89"}, - {file = "regex-2020.7.14-cp37-cp37m-win32.whl", hash = "sha256:46bac5ca10fb748d6c55843a931855e2727a7a22584f302dd9bb1506e69f83f6"}, - {file = "regex-2020.7.14-cp37-cp37m-win_amd64.whl", hash = "sha256:0dc64ee3f33cd7899f79a8d788abfbec168410be356ed9bd30bbd3f0a23a7204"}, - {file = "regex-2020.7.14-cp38-cp38-manylinux1_i686.whl", hash = "sha256:5ea81ea3dbd6767873c611687141ec7b06ed8bab43f68fad5b7be184a920dc99"}, - {file = "regex-2020.7.14-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:bbb332d45b32df41200380fff14712cb6093b61bd142272a10b16778c418e98e"}, - {file = "regex-2020.7.14-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:c11d6033115dc4887c456565303f540c44197f4fc1a2bfb192224a301534888e"}, - {file = "regex-2020.7.14-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:75aaa27aa521a182824d89e5ab0a1d16ca207318a6b65042b046053cfc8ed07a"}, - {file = "regex-2020.7.14-cp38-cp38-win32.whl", hash = "sha256:d6cff2276e502b86a25fd10c2a96973fdb45c7a977dca2138d661417f3728341"}, - {file = "regex-2020.7.14-cp38-cp38-win_amd64.whl", hash = "sha256:7a2dd66d2d4df34fa82c9dc85657c5e019b87932019947faece7983f2089a840"}, - {file = "regex-2020.7.14.tar.gz", hash = "sha256:3a3af27a8d23143c49a3420efe5b3f8cf1a48c6fc8bc6856b03f638abc1833bb"}, + {file = "regex-2020.10.11-cp27-cp27m-win32.whl", hash = "sha256:4f5c0fe46fb79a7adf766b365cae56cafbf352c27358fda811e4a1dc8216d0db"}, + {file = "regex-2020.10.11-cp27-cp27m-win_amd64.whl", hash = "sha256:39a5ef30bca911f5a8a3d4476f5713ed4d66e313d9fb6755b32bec8a2e519635"}, + {file = "regex-2020.10.11-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:7c4fc5a8ec91a2254bb459db27dbd9e16bba1dabff638f425d736888d34aaefa"}, + {file = "regex-2020.10.11-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d537e270b3e6bfaea4f49eaf267984bfb3628c86670e9ad2a257358d3b8f0955"}, + {file = "regex-2020.10.11-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:a8240df4957a5b0e641998a5d78b3c4ea762c845d8cb8997bf820626826fde9a"}, + {file = "regex-2020.10.11-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:4302153abb96859beb2c778cc4662607a34175065fc2f33a21f49eb3fbd1ccd3"}, + {file = "regex-2020.10.11-cp36-cp36m-win32.whl", hash = "sha256:c077c9d04a040dba001cf62b3aff08fd85be86bccf2c51a770c77377662a2d55"}, + {file = "regex-2020.10.11-cp36-cp36m-win_amd64.whl", hash = "sha256:46ab6070b0d2cb85700b8863b3f5504c7f75d8af44289e9562195fe02a8dd72d"}, + {file = "regex-2020.10.11-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:d629d750ebe75a88184db98f759633b0a7772c2e6f4da529f0027b4a402c0e2f"}, + {file = "regex-2020.10.11-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:8e7ef296b84d44425760fe813cabd7afbb48c8dd62023018b338bbd9d7d6f2f0"}, + {file = "regex-2020.10.11-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:e490f08897cb44e54bddf5c6e27deca9b58c4076849f32aaa7a0b9f1730f2c20"}, + {file = "regex-2020.10.11-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:850339226aa4fec04916386577674bb9d69abe0048f5d1a99f91b0004bfdcc01"}, + {file = "regex-2020.10.11-cp37-cp37m-win32.whl", hash = "sha256:60c4f64d9a326fe48e8738c3dbc068e1edc41ff7895a9e3723840deec4bc1c28"}, + {file = "regex-2020.10.11-cp37-cp37m-win_amd64.whl", hash = "sha256:8ba3efdd60bfee1aa784dbcea175eb442d059b576934c9d099e381e5a9f48930"}, + {file = "regex-2020.10.11-cp38-cp38-manylinux1_i686.whl", hash = "sha256:2308491b3e6c530a3bb38a8a4bb1dc5fd32cbf1e11ca623f2172ba17a81acef1"}, + {file = "regex-2020.10.11-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:b8806649983a1c78874ec7e04393ef076805740f6319e87a56f91f1767960212"}, + {file = "regex-2020.10.11-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:a2a31ee8a354fa3036d12804730e1e20d58bc4e250365ead34b9c30bbe9908c3"}, + {file = "regex-2020.10.11-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:d9d53518eeed12190744d366ec4a3f39b99d7daa705abca95f87dd8b442df4ad"}, + {file = "regex-2020.10.11-cp38-cp38-win32.whl", hash = "sha256:3d5a8d007116021cf65355ada47bf405656c4b3b9a988493d26688275fde1f1c"}, + {file = "regex-2020.10.11-cp38-cp38-win_amd64.whl", hash = "sha256:f579caecbbca291b0fcc7d473664c8c08635da2f9b1567c22ea32311c86ef68c"}, + {file = "regex-2020.10.11-cp39-cp39-manylinux1_i686.whl", hash = "sha256:8c8c42aa5d3ac9a49829c4b28a81bebfa0378996f9e0ca5b5ab8a36870c3e5ee"}, + {file = "regex-2020.10.11-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:c529ba90c1775697a65b46c83d47a2d3de70f24d96da5d41d05a761c73b063af"}, + {file = "regex-2020.10.11-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:6cf527ec2f3565248408b61dd36e380d799c2a1047eab04e13a2b0c15dd9c767"}, + {file = "regex-2020.10.11-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:671c51d352cfb146e48baee82b1ee8d6ffe357c292f5e13300cdc5c00867ebfc"}, + {file = "regex-2020.10.11-cp39-cp39-win32.whl", hash = "sha256:a63907332531a499b8cdfd18953febb5a4c525e9e7ca4ac147423b917244b260"}, + {file = "regex-2020.10.11-cp39-cp39-win_amd64.whl", hash = "sha256:1a16afbfadaadc1397353f9b32e19a65dc1d1804c80ad73a14f435348ca017ad"}, + {file = "regex-2020.10.11.tar.gz", hash = "sha256:463e770c48da76a8da82b8d4a48a541f314e0df91cbb6d873a341dbe578efafd"}, ] requests = [ {file = "requests-2.24.0-py2.py3-none-any.whl", hash = "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898"}, diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..62d9fb6 --- /dev/null +++ b/shell.nix @@ -0,0 +1,35 @@ +{ pkgs ? import {} }: with pkgs; +pkgs.mkShell { + nativeBuildInputs = [ + gobject-introspection + python3Packages.setuptools + wrapGAppsHook + ]; + + buildInputs = [ + flatpak + flatpak-builder + gcc + git + glib + gobjectIntrospection + gtk3 + libnotify + pango + pkgconfig + ]; + + propagatedBuildInputs = with pkgs; [ + cairo + mpv + poetry + python38 + rnix-lsp + ]; + + shellHook = '' + export LD_LIBRARY_PATH=${pkgs.mpv}/lib + export XDG_DATA_DIRS="$GSETTINGS_SCHEMA_PATH:${pkgs.arc-theme}/share:${pkgs.arc-icon-theme}/share" + export SOURCE_DATE_EPOCH=315532800 + ''; +} diff --git a/sublime_music/__main__.py b/sublime_music/__main__.py index a4a18e7..6cfb557 100644 --- a/sublime_music/__main__.py +++ b/sublime_music/__main__.py @@ -39,7 +39,7 @@ def main(): min_log_level = getattr(logging, args.loglevel.upper(), None) if not isinstance(min_log_level, int): - logging.error(f"Invalid log level: {args.loglevel.upper()}.") + print(f"Invalid log level: {args.loglevel.upper()}.") # noqa: T001 min_log_level = logging.WARNING logging.basicConfig( diff --git a/sublime_music/adapters/subsonic/adapter.py b/sublime_music/adapters/subsonic/adapter.py index 2d47d97..dd2ad77 100644 --- a/sublime_music/adapters/subsonic/adapter.py +++ b/sublime_music/adapters/subsonic/adapter.py @@ -52,9 +52,6 @@ try: except Exception: # I really don't care what kind of exception it is, all that matters is the # import failed for some reason. - logging.warning( - "Unable to import NM from GLib. Detection of SSID will be disabled." - ) networkmanager_imported = False REQUEST_DELAY: Optional[Tuple[float, float]] = None diff --git a/sublime_music/players/chromecast.py b/sublime_music/players/chromecast.py index 0c72fe4..7240a91 100644 --- a/sublime_music/players/chromecast.py +++ b/sublime_music/players/chromecast.py @@ -116,7 +116,7 @@ class ChromecastPlayer(Player): return if self.stop_get_chromecasts is not None: - self.stop_get_chromecasts() + self.stop_get_chromecasts.cancel() for id_, chromecast in self._chromecasts.items(): self.player_device_change_callback(