Verified Commit 2cb964dc authored by Sumner Evans's avatar Sumner Evans 💬

Cleanup

parent 51b0e3d4
Pipeline #193161000 passed with stages
in 16 minutes and 40 seconds
......@@ -11,10 +11,10 @@ secrets:
- 2fb5fd72-fa96-46c6-ab90-6b7cabebba16
environment:
REPO_NAME: sublime-music
# triggers:
# - action: email
# condition: failure
# to: ~sumner/sublime-music-devel@lists.sr.ht
triggers:
- action: email
condition: failure
to: ~sumner/sublime-music-devel@lists.sr.ht
tasks:
- setup: |
echo "cd ${REPO_NAME}" >> ~/.buildenv
......
v0.11.10
========
v0.11.9
=======
**The wait is over!** Thanks to help from jlanda_, the Flatpak is back!
**The wait is over!** Thanks to help from jlanda_, the **Flatpak** is back! The
Flatpak requires ``org.gnome.SDK//3.38`` and ``org.gnome.Platform//3.38``.
.. _jlanda: https://gitlab.com/jlanda
v0.11.9
=======
**Bug Fixes**
* Fixed regressions with Chromecast playback.
**Infrastructure**
* Switched from Pipenv to Poetry because Poetry is so much faster.
* Added a ``.envrc`` file for direnv users.
* Started migrating from GitLab to sr.ht due to usability regressions in GitLab.
* **Package name change:** The package name is now ``sublime_music`` instead of
``sublime``.
v0.11.8
=======
......
......@@ -117,6 +117,7 @@ before knowing if your code is the correct style.
* ``flake8-importorder`` (with the ``edited`` import style): enforce ordering
of import statements.
* ``flake8-pep3101``: no ``%`` string formatting.
* ``flake8-print``: to prevent using the ``print`` function.
* `mypy`_ is used for type checking. All type errors must be resolved.
......
......@@ -141,7 +141,7 @@ toml = ["toml"]
[[package]]
name = "cryptography"
version = "3.1"
version = "3.1.1"
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
category = "main"
optional = true
......@@ -211,6 +211,79 @@ mccabe = ">=0.6.0,<0.7.0"
pycodestyle = ">=2.6.0a1,<2.7.0"
pyflakes = ">=2.2.0,<2.3.0"
[[package]]
name = "flake8-annotations"
version = "2.4.0"
description = "Flake8 Type Annotation Checks"
category = "dev"
optional = false
python-versions = ">=3.6.1,<4.0.0"
[package.dependencies]
flake8 = ">=3.7,<3.9"
[[package]]
name = "flake8-bugbear"
version = "20.1.4"
description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle."
category = "dev"
optional = false
python-versions = ">=3.6"
[package.dependencies]
attrs = ">=19.2.0"
flake8 = ">=3.0.0"
[[package]]
name = "flake8-comprehensions"
version = "3.2.3"
description = "A flake8 plugin to help you write better list/set/dict comprehensions."
category = "dev"
optional = false
python-versions = ">=3.5"
[package.dependencies]
flake8 = ">=3.0,<3.2.0 || >3.2.0,<4"
[[package]]
name = "flake8-import-order"
version = "0.18.1"
description = "Flake8 and pylama plugin that checks the ordering of import statements."
category = "dev"
optional = false
python-versions = "*"
[package.dependencies]
pycodestyle = "*"
setuptools = "*"
[[package]]
name = "flake8-pep3101"
version = "1.3.0"
description = "Checks for old string formatting."
category = "dev"
optional = false
python-versions = "*"
[package.extras]
test = ["pytest", "testfixtures"]
[package.dependencies]
flake8 = ">=3.0"
[[package]]
name = "flake8-print"
version = "3.1.4"
description = "print statement checker plugin for flake8"
category = "dev"
optional = false
python-versions = "*"
[package.dependencies]
flake8 = ">=1.5"
pycodestyle = "*"
six = "*"
[[package]]
name = "fuzzywuzzy"
version = "0.18.0"
......@@ -708,7 +781,7 @@ server = ["bottle"]
[metadata]
lock-version = "1.0"
python-versions = "^3.8"
content-hash = "8cc15955b68459eeec39b5401c1433195033006da356b290b3a0f49e58f8bf06"
content-hash = "abe35e775940ba850be46b8e53b3d54cfc19bdac69d44e62d4a8024bbe90cc8b"
[metadata.files]
appdirs = [
......@@ -829,28 +902,28 @@ coverage = [
{file = "coverage-5.3.tar.gz", hash = "sha256:280baa8ec489c4f542f8940f9c4c2181f0306a8ee1a54eceba071a449fb870a0"},
]
cryptography = [
{file = "cryptography-3.1-cp27-cp27m-macosx_10_10_x86_64.whl", hash = "sha256:969ae512a250f869c1738ca63be843488ff5cc031987d302c1f59c7dbe1b225f"},
{file = "cryptography-3.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:b45ab1c6ece7c471f01c56f5d19818ca797c34541f0b2351635a5c9fe09ac2e0"},
{file = "cryptography-3.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:247df238bc05c7d2e934a761243bfdc67db03f339948b1e2e80c75d41fc7cc36"},
{file = "cryptography-3.1-cp27-cp27m-win32.whl", hash = "sha256:10c9775a3f31610cf6b694d1fe598f2183441de81cedcf1814451ae53d71b13a"},
{file = "cryptography-3.1-cp27-cp27m-win_amd64.whl", hash = "sha256:9f734423eb9c2ea85000aa2476e0d7a58e021bc34f0a373ac52a5454cd52f791"},
{file = "cryptography-3.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e7563eb7bc5c7e75a213281715155248cceba88b11cb4b22957ad45b85903761"},
{file = "cryptography-3.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:94191501e4b4009642be21dde2a78bd3c2701a81ee57d3d3d02f1d99f8b64a9e"},
{file = "cryptography-3.1-cp35-abi3-macosx_10_10_x86_64.whl", hash = "sha256:dc3f437ca6353979aace181f1b790f0fc79e446235b14306241633ab7d61b8f8"},
{file = "cryptography-3.1-cp35-abi3-manylinux1_x86_64.whl", hash = "sha256:725875681afe50b41aee7fdd629cedbc4720bab350142b12c55c0a4d17c7416c"},
{file = "cryptography-3.1-cp35-abi3-manylinux2010_x86_64.whl", hash = "sha256:321761d55fb7cb256b771ee4ed78e69486a7336be9143b90c52be59d7657f50f"},
{file = "cryptography-3.1-cp35-abi3-manylinux2014_aarch64.whl", hash = "sha256:2a27615c965173c4c88f2961cf18115c08fedfb8bdc121347f26e8458dc6d237"},
{file = "cryptography-3.1-cp35-cp35m-win32.whl", hash = "sha256:e7dad66a9e5684a40f270bd4aee1906878193ae50a4831922e454a2a457f1716"},
{file = "cryptography-3.1-cp35-cp35m-win_amd64.whl", hash = "sha256:4005b38cd86fc51c955db40b0f0e52ff65340874495af72efabb1bb8ca881695"},
{file = "cryptography-3.1-cp36-abi3-win32.whl", hash = "sha256:cc6096c86ec0de26e2263c228fb25ee01c3ff1346d3cfc219d67d49f303585af"},
{file = "cryptography-3.1-cp36-abi3-win_amd64.whl", hash = "sha256:2e26223ac636ca216e855748e7d435a1bf846809ed12ed898179587d0cf74618"},
{file = "cryptography-3.1-cp36-cp36m-win32.whl", hash = "sha256:7a63e97355f3cd77c94bd98c59cb85fe0efd76ea7ef904c9b0316b5bbfde6ed1"},
{file = "cryptography-3.1-cp36-cp36m-win_amd64.whl", hash = "sha256:4b9e96543d0784acebb70991ebc2dbd99aa287f6217546bb993df22dd361d41c"},
{file = "cryptography-3.1-cp37-cp37m-win32.whl", hash = "sha256:eb80a288e3cfc08f679f95da72d2ef90cb74f6d8a8ba69d2f215c5e110b2ca32"},
{file = "cryptography-3.1-cp37-cp37m-win_amd64.whl", hash = "sha256:180c9f855a8ea280e72a5d61cf05681b230c2dce804c48e9b2983f491ecc44ed"},
{file = "cryptography-3.1-cp38-cp38-win32.whl", hash = "sha256:fa7fbcc40e2210aca26c7ac8a39467eae444d90a2c346cbcffd9133a166bcc67"},
{file = "cryptography-3.1-cp38-cp38-win_amd64.whl", hash = "sha256:548b0818e88792318dc137d8b1ec82a0ab0af96c7f0603a00bb94f896fbf5e10"},
{file = "cryptography-3.1.tar.gz", hash = "sha256:26409a473cc6278e4c90f782cd5968ebad04d3911ed1c402fc86908c17633e08"},
{file = "cryptography-3.1.1-cp27-cp27m-macosx_10_10_x86_64.whl", hash = "sha256:65beb15e7f9c16e15934569d29fb4def74ea1469d8781f6b3507ab896d6d8719"},
{file = "cryptography-3.1.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:983c0c3de4cb9fcba68fd3f45ed846eb86a2a8b8d8bc5bb18364c4d00b3c61fe"},
{file = "cryptography-3.1.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:e97a3b627e3cb63c415a16245d6cef2139cca18bb1183d1b9375a1c14e83f3b3"},
{file = "cryptography-3.1.1-cp27-cp27m-win32.whl", hash = "sha256:cb179acdd4ae1e4a5a160d80b87841b3d0e0be84af46c7bb2cd7ece57a39c4ba"},
{file = "cryptography-3.1.1-cp27-cp27m-win_amd64.whl", hash = "sha256:b372026ebf32fe2523159f27d9f0e9f485092e43b00a5adacf732192a70ba118"},
{file = "cryptography-3.1.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:680da076cad81cdf5ffcac50c477b6790be81768d30f9da9e01960c4b18a66db"},
{file = "cryptography-3.1.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:5d52c72449bb02dd45a773a203196e6d4fae34e158769c896012401f33064396"},
{file = "cryptography-3.1.1-cp35-abi3-macosx_10_10_x86_64.whl", hash = "sha256:f0e099fc4cc697450c3dd4031791559692dd941a95254cb9aeded66a7aa8b9bc"},
{file = "cryptography-3.1.1-cp35-abi3-manylinux1_x86_64.whl", hash = "sha256:a7597ffc67987b37b12e09c029bd1dc43965f75d328076ae85721b84046e9ca7"},
{file = "cryptography-3.1.1-cp35-abi3-manylinux2010_x86_64.whl", hash = "sha256:4549b137d8cbe3c2eadfa56c0c858b78acbeff956bd461e40000b2164d9167c6"},
{file = "cryptography-3.1.1-cp35-abi3-manylinux2014_aarch64.whl", hash = "sha256:89aceb31cd5f9fc2449fe8cf3810797ca52b65f1489002d58fe190bfb265c536"},
{file = "cryptography-3.1.1-cp35-cp35m-win32.whl", hash = "sha256:559d622aef2a2dff98a892eef321433ba5bc55b2485220a8ca289c1ecc2bd54f"},
{file = "cryptography-3.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:451cdf60be4dafb6a3b78802006a020e6cd709c22d240f94f7a0696240a17154"},
{file = "cryptography-3.1.1-cp36-abi3-win32.whl", hash = "sha256:762bc5a0df03c51ee3f09c621e1cee64e3a079a2b5020de82f1613873d79ee70"},
{file = "cryptography-3.1.1-cp36-abi3-win_amd64.whl", hash = "sha256:b12e715c10a13ca1bd27fbceed9adc8c5ff640f8e1f7ea76416352de703523c8"},
{file = "cryptography-3.1.1-cp36-cp36m-win32.whl", hash = "sha256:21b47c59fcb1c36f1113f3709d37935368e34815ea1d7073862e92f810dc7499"},
{file = "cryptography-3.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:48ee615a779ffa749d7d50c291761dc921d93d7cf203dca2db663b4f193f0e49"},
{file = "cryptography-3.1.1-cp37-cp37m-win32.whl", hash = "sha256:b2bded09c578d19e08bd2c5bb8fed7f103e089752c9cf7ca7ca7de522326e921"},
{file = "cryptography-3.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:f99317a0fa2e49917689b8cf977510addcfaaab769b3f899b9c481bbd76730c2"},
{file = "cryptography-3.1.1-cp38-cp38-win32.whl", hash = "sha256:ab010e461bb6b444eaf7f8c813bb716be2d78ab786103f9608ffd37a4bd7d490"},
{file = "cryptography-3.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:99d4984aabd4c7182050bca76176ce2dbc9fa9748afe583a7865c12954d714ba"},
{file = "cryptography-3.1.1.tar.gz", hash = "sha256:9d9fc6a16357965d282dd4ab6531013935425d0dc4950df2e0cf2a1b1ac1017d"},
]
dataclasses-json = [
{file = "dataclasses-json-0.5.2.tar.gz", hash = "sha256:56ec931959ede74b5dedf65cf20772e6a79764d20c404794cce0111c88c085ff"},
......@@ -868,6 +941,29 @@ flake8 = [
{file = "flake8-3.8.3-py2.py3-none-any.whl", hash = "sha256:15e351d19611c887e482fb960eae4d44845013cc142d42896e9862f775d8cf5c"},
{file = "flake8-3.8.3.tar.gz", hash = "sha256:f04b9fcbac03b0a3e58c0ab3a0ecc462e023a9faf046d57794184028123aa208"},
]
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"},
]
flake8-bugbear = [
{file = "flake8-bugbear-20.1.4.tar.gz", hash = "sha256:bd02e4b009fb153fe6072c31c52aeab5b133d508095befb2ffcf3b41c4823162"},
{file = "flake8_bugbear-20.1.4-py36.py37.py38-none-any.whl", hash = "sha256:a3ddc03ec28ba2296fc6f89444d1c946a6b76460f859795b35b77d4920a51b63"},
]
flake8-comprehensions = [
{file = "flake8-comprehensions-3.2.3.tar.gz", hash = "sha256:d5751acc0f7364794c71d06f113f4686d6e2e26146a50fa93130b9f200fe160d"},
{file = "flake8_comprehensions-3.2.3-py3-none-any.whl", hash = "sha256:44eaae9894aa15f86e0c86df1e218e7917494fab6f96d28f96a029c460f17d92"},
]
flake8-import-order = [
{file = "flake8-import-order-0.18.1.tar.gz", hash = "sha256:a28dc39545ea4606c1ac3c24e9d05c849c6e5444a50fb7e9cdd430fc94de6e92"},
{file = "flake8_import_order-0.18.1-py2.py3-none-any.whl", hash = "sha256:90a80e46886259b9c396b578d75c749801a41ee969a235e163cfe1be7afd2543"},
]
flake8-pep3101 = [
{file = "flake8-pep3101-1.3.0.tar.gz", hash = "sha256:86e3eb4e42de8326dcd98ebdeaf9a3c6854203a48f34aeb3e7e8ed948107f512"},
{file = "flake8_pep3101-1.3.0-py2.py3-none-any.whl", hash = "sha256:a5dae1caca1243b2b40108dce926d97cf5a9f52515c4a4cbb1ffe1ca0c54e343"},
]
flake8-print = [
{file = "flake8-print-3.1.4.tar.gz", hash = "sha256:324f9e59a522518daa2461bacd7f82da3c34eb26a4314c2a54bd493f8b394a68"},
]
fuzzywuzzy = [
{file = "fuzzywuzzy-0.18.0-py2.py3-none-any.whl", hash = "sha256:928244b28db720d1e0ee7587acf660ea49d7e4c632569cad4f1cd7e68a5f0993"},
{file = "fuzzywuzzy-0.18.0.tar.gz", hash = "sha256:45016e92264780e58972dca1b3d939ac864b78437422beecebb3095f8efd00e8"},
......
......@@ -48,6 +48,12 @@ pychromecast = {version = "^7.3.0", optional = true}
black = "^20.8b1"
docutils = "^0.16"
flake8 = "^3.8.3"
flake8-annotations = "^2.4.0"
flake8-bugbear = "^20.1.4"
flake8-comprehensions = "^3.2.3"
flake8-import-order = "^0.18.1"
flake8-pep3101 = "^1.3.0"
flake8-print = "^3.1.4"
mypy = "^0.782"
pytest-cov = "^2.10.1"
termcolor = "^1.1.0"
......
__version__ = "0.11.10"
__version__ = "0.11.9"
......@@ -10,6 +10,7 @@ gi.require_version("Gtk", "3.0")
from gi.repository import Gtk # noqa: F401
import sublime_music
from .app import SublimeMusicApp
......
......@@ -12,11 +12,10 @@ from uuid import UUID
from gi.repository import GLib
from .base import Player, PlayerDeviceEvent, PlayerEvent
from ..adapters import AdapterManager
from ..adapters.api_objects import Song
from .base import Player, PlayerDeviceEvent, PlayerEvent
try:
import pychromecast
......
......@@ -2,11 +2,10 @@ import logging
from datetime import timedelta
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from ..adapters.api_objects import Song
from .base import PlayerDeviceEvent, PlayerEvent
from .chromecast import ChromecastPlayer # noqa: F401
from .mpv import MPVPlayer # noqa: F401
from ..adapters.api_objects import Song
class PlayerManager:
......
......@@ -4,9 +4,8 @@ from typing import Callable, cast, Dict, Optional, Tuple, Type, Union
import mpv
from ..adapters.api_objects import Song
from .base import Player, PlayerDeviceEvent, PlayerEvent
from ..adapters.api_objects import Song
REPLAY_GAIN_KEY = "Replay Gain"
......
......@@ -211,11 +211,6 @@ class PlayerControls(Gtk.ActionBar):
self.current_play_queue = app_config.state.play_queue
self.current_playing_index = app_config.state.current_song_index
print("DIFF STORE")
from time import time
s = time()
# Set the Play Queue button popup.
play_queue_len = len(app_config.state.play_queue)
if play_queue_len == 0:
......@@ -286,13 +281,10 @@ class PlayerControls(Gtk.ActionBar):
if filename:
self.play_queue_store[idx][1] = filename
print("A", time() - s)
current_play_queue = [x[-1] for x in self.play_queue_store]
if app_config.state.play_queue != current_play_queue:
self.play_queue_update_order_token += 1
print("B", time() - s)
ohea = {1: 0.0, 2: 0.0, 3: 0.0}
song_details_results = []
for i, (song_id, cached_status) in enumerate(
zip(
......@@ -300,9 +292,7 @@ class PlayerControls(Gtk.ActionBar):
AdapterManager.get_cached_statuses(app_config.state.play_queue),
)
):
f = time()
song_details_result = AdapterManager.get_song_details(song_id)
ohea[1] += time() - f
cover_art_filename = ""
label = "\n"
......@@ -319,7 +309,6 @@ class PlayerControls(Gtk.ActionBar):
cover_art_filename = filename
else:
song_details_results.append((i, song_details_result))
ohea[2] += time() - f
new_store.append(
[
......@@ -334,16 +323,8 @@ class PlayerControls(Gtk.ActionBar):
song_id,
]
)
ohea[3] += time() - f
print(
"ohea",
ohea,
list(map(lambda x: x / len(app_config.state.play_queue), ohea.values())),
)
print("C", time() - s)
util.diff_song_store(self.play_queue_store, new_store)
print("FOO", time() - s)
# Do this after the diff to avoid race conditions.
for idx, song_details_result in song_details_results:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment