Compare commits

..

6 commits
5.3.0 ... main

Author SHA1 Message Date
Hirad 88bb8ea789 Update README.md
Some checks failed
Release drafter / update_release_draft (push) Has been cancelled
Deploy / Build & verify package (push) Has been cancelled
Deploy / Publish in-dev package to test.pypi.org (push) Has been cancelled
Deploy / Publish released package to pypi.org (push) Has been cancelled
Lint / lint (push) Has been cancelled
Test / test (ubuntu-latest, 3.10) (push) Has been cancelled
Test / test (ubuntu-latest, 3.11) (push) Has been cancelled
Test / test (ubuntu-latest, 3.12) (push) Has been cancelled
Test / test (ubuntu-latest, 3.13) (push) Has been cancelled
Test / test (ubuntu-latest, 3.8) (push) Has been cancelled
Test / test (ubuntu-latest, 3.9) (push) Has been cancelled
Test / test (ubuntu-latest, pypy3.10) (push) Has been cancelled
Test / Test successful (push) Has been cancelled
2024-07-07 09:16:54 +03:30
Hirad 6ae051157f Update README.md
Some checks are pending
Deploy / Build & verify package (push) Waiting to run
Deploy / Publish in-dev package to test.pypi.org (push) Blocked by required conditions
Deploy / Publish released package to pypi.org (push) Blocked by required conditions
Lint / lint (push) Waiting to run
Release drafter / update_release_draft (push) Waiting to run
Test / test (ubuntu-latest, 3.10) (push) Waiting to run
Test / test (ubuntu-latest, 3.11) (push) Waiting to run
Test / test (ubuntu-latest, 3.12) (push) Waiting to run
Test / test (ubuntu-latest, 3.13) (push) Waiting to run
Test / test (ubuntu-latest, 3.8) (push) Waiting to run
Test / test (ubuntu-latest, 3.9) (push) Waiting to run
Test / test (ubuntu-latest, pypy3.10) (push) Waiting to run
Test / Test successful (push) Blocked by required conditions
2024-07-07 09:16:25 +03:30
Hirad c260d7b83f change libre.fm to music.lonestar.it
Some checks are pending
Deploy / Build & verify package (push) Waiting to run
Deploy / Publish in-dev package to test.pypi.org (push) Blocked by required conditions
Deploy / Publish released package to pypi.org (push) Blocked by required conditions
Lint / lint (push) Waiting to run
Release drafter / update_release_draft (push) Waiting to run
Test / test (ubuntu-latest, 3.10) (push) Waiting to run
Test / test (ubuntu-latest, 3.11) (push) Waiting to run
Test / test (ubuntu-latest, 3.12) (push) Waiting to run
Test / test (ubuntu-latest, 3.13) (push) Waiting to run
Test / test (ubuntu-latest, 3.8) (push) Waiting to run
Test / test (ubuntu-latest, 3.9) (push) Waiting to run
Test / test (ubuntu-latest, pypy3.10) (push) Waiting to run
Test / Test successful (push) Blocked by required conditions
2024-07-07 09:03:18 +03:30
Hugo van Kemenade 25904371de
[pre-commit.ci] pre-commit autoupdate (#458) 2024-07-02 05:34:35 -06:00
Hugo van Kemenade 184d0328a9 Configure pyproject-fmt to add Python 3.13 classifier 2024-07-02 14:29:20 +03:00
pre-commit-ci[bot] aceaa69c9a
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.4 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.4...v0.5.0)
- [github.com/asottile/blacken-docs: 1.16.0 → 1.18.0](https://github.com/asottile/blacken-docs/compare/1.16.0...1.18.0)
- [github.com/python-jsonschema/check-jsonschema: 0.28.4 → 0.28.6](https://github.com/python-jsonschema/check-jsonschema/compare/0.28.4...0.28.6)
- [github.com/rhysd/actionlint: v1.7.0 → v1.7.1](https://github.com/rhysd/actionlint/compare/v1.7.0...v1.7.1)
- [github.com/tox-dev/pyproject-fmt: 1.7.0 → 2.1.3](https://github.com/tox-dev/pyproject-fmt/compare/1.7.0...2.1.3)
2024-07-01 17:24:06 +00:00
4 changed files with 60 additions and 58 deletions

View file

@ -1,6 +1,6 @@
repos: repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4 rev: v0.5.0
hooks: hooks:
- id: ruff - id: ruff
args: [--exit-non-zero-on-fix] args: [--exit-non-zero-on-fix]
@ -11,7 +11,7 @@ repos:
- id: black - id: black
- repo: https://github.com/asottile/blacken-docs - repo: https://github.com/asottile/blacken-docs
rev: 1.16.0 rev: 1.18.0
hooks: hooks:
- id: blacken-docs - id: blacken-docs
args: [--target-version=py38] args: [--target-version=py38]
@ -33,21 +33,20 @@ repos:
exclude: .github/(ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE).md exclude: .github/(ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE).md
- repo: https://github.com/python-jsonschema/check-jsonschema - repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.4 rev: 0.28.6
hooks: hooks:
- id: check-github-workflows - id: check-github-workflows
- id: check-renovate - id: check-renovate
- repo: https://github.com/rhysd/actionlint - repo: https://github.com/rhysd/actionlint
rev: v1.7.0 rev: v1.7.1
hooks: hooks:
- id: actionlint - id: actionlint
- repo: https://github.com/tox-dev/pyproject-fmt - repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0 rev: 2.1.3
hooks: hooks:
- id: pyproject-fmt - id: pyproject-fmt
additional_dependencies: [tox]
- repo: https://github.com/abravalheri/validate-pyproject - repo: https://github.com/abravalheri/validate-pyproject
rev: v0.18 rev: v0.18

View file

@ -15,22 +15,16 @@ Use the pydoc utility for help on usage or see [tests/](tests/) for examples.
## Installation ## Installation
Install via pip:
```sh
python3 -m pip install pylast
```
Install latest development version: Install latest development version:
```sh ```sh
python3 -m pip install -U git+https://github.com/pylast/pylast python3 -m pip install -U git+https://git.hirad.it/Hirad/pylast
``` ```
Or from requirements.txt: Or from requirements.txt:
```txt ```txt
-e https://github.com/pylast/pylast.git#egg=pylast -e https://git.hirad.it/Hirad/pylast#egg=pylast
``` ```
Note: Note:

View file

@ -15,9 +15,13 @@ keywords = [
"scrobble", "scrobble",
"scrobbling", "scrobbling",
] ]
license = {text = "Apache-2.0"} license = { text = "Apache-2.0" }
maintainers = [{name = "Hugo van Kemenade"}] maintainers = [
authors = [{name = "Amr Hassan <amr.hassan@gmail.com> and Contributors", email = "amr.hassan@gmail.com"}] { name = "Hugo van Kemenade" },
]
authors = [
{ name = "Amr Hassan <amr.hassan@gmail.com> and Contributors", email = "amr.hassan@gmail.com" },
]
requires-python = ">=3.8" requires-python = ">=3.8"
classifiers = [ classifiers = [
"Development Status :: 5 - Production/Stable", "Development Status :: 5 - Production/Stable",
@ -41,18 +45,16 @@ dynamic = [
dependencies = [ dependencies = [
"httpx", "httpx",
] ]
[project.optional-dependencies] optional-dependencies.tests = [
tests = [
"flaky", "flaky",
"pytest", "pytest",
"pytest-cov", "pytest-cov",
"pytest-random-order", "pytest-random-order",
"pyyaml", "pyyaml",
] ]
[project.urls] urls.Changelog = "https://github.com/pylast/pylast/releases"
Changelog = "https://github.com/pylast/pylast/releases" urls.Homepage = "https://github.com/pylast/pylast"
Homepage = "https://github.com/pylast/pylast" urls.Source = "https://github.com/pylast/pylast"
Source = "https://github.com/pylast/pylast"
[tool.hatch] [tool.hatch]
version.source = "vcs" version.source = "vcs"
@ -60,8 +62,10 @@ version.source = "vcs"
[tool.hatch.version.raw-options] [tool.hatch.version.raw-options]
local_scheme = "no-local-version" local_scheme = "no-local-version"
[tool.ruff.lint] [tool.ruff]
select = [ fix = true
lint.select = [
"C4", # flake8-comprehensions "C4", # flake8-comprehensions
"E", # pycodestyle errors "E", # pycodestyle errors
"EM", # flake8-errmsg "EM", # flake8-errmsg
@ -70,19 +74,24 @@ select = [
"ISC", # flake8-implicit-str-concat "ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging "LOG", # flake8-logging
"PGH", # pygrep-hooks "PGH", # pygrep-hooks
"RUF100", # unused noqa (yesqa)
"RUF022", # unsorted-dunder-all "RUF022", # unsorted-dunder-all
"RUF100", # unused noqa (yesqa)
"UP", # pyupgrade "UP", # pyupgrade
"W", # pycodestyle warnings "W", # pycodestyle warnings
"YTT", # flake8-2020 "YTT", # flake8-2020
] ]
extend-ignore = [ lint.extend-ignore = [
"E203", # Whitespace before ':' "E203", # Whitespace before ':'
"E221", # Multiple spaces before operator "E221", # Multiple spaces before operator
"E226", # Missing whitespace around arithmetic operator "E226", # Missing whitespace around arithmetic operator
"E241", # Multiple spaces after ',' "E241", # Multiple spaces after ','
] ]
lint.isort.known-first-party = [
"pylast",
]
lint.isort.required-imports = [
"from __future__ import annotations",
]
[tool.ruff.lint.isort] [tool.pyproject-fmt]
known-first-party = ["pylast"] max_supported_python = "3.13"
required-imports = ["from __future__ import annotations"]

View file

@ -1,6 +1,6 @@
# #
# pylast - # pylast -
# A Python interface to Last.fm and Libre.fm # A Python interface to Last.fm and music.lonestar.it
# #
# Copyright 2008-2010 Amr Hassan # Copyright 2008-2010 Amr Hassan
# Copyright 2013-2021 hugovk # Copyright 2013-2021 hugovk
@ -705,7 +705,7 @@ class LastFMNetwork(_Network):
class LibreFMNetwork(_Network): class LibreFMNetwork(_Network):
""" """
A preconfigured _Network object for Libre.fm A preconfigured _Network object for music.lonestar.it
api_key: a provided API_KEY api_key: a provided API_KEY
api_secret: a provided API_SECRET api_secret: a provided API_SECRET
@ -727,27 +727,27 @@ class LibreFMNetwork(_Network):
password_hash: str = "", password_hash: str = "",
) -> None: ) -> None:
super().__init__( super().__init__(
name="Libre.fm", name="music.lonestar.it",
homepage="https://libre.fm", homepage="https://music.lonestar.it",
ws_server=("libre.fm", "/2.0/"), ws_server=("music.lonestar.it", "/2.0/"),
api_key=api_key, api_key=api_key,
api_secret=api_secret, api_secret=api_secret,
session_key=session_key, session_key=session_key,
username=username, username=username,
password_hash=password_hash, password_hash=password_hash,
domain_names={ domain_names={
DOMAIN_ENGLISH: "libre.fm", DOMAIN_ENGLISH: "music.lonestar.it",
DOMAIN_GERMAN: "libre.fm", DOMAIN_GERMAN: "music.lonestar.it",
DOMAIN_SPANISH: "libre.fm", DOMAIN_SPANISH: "music.lonestar.it",
DOMAIN_FRENCH: "libre.fm", DOMAIN_FRENCH: "music.lonestar.it",
DOMAIN_ITALIAN: "libre.fm", DOMAIN_ITALIAN: "music.lonestar.it",
DOMAIN_POLISH: "libre.fm", DOMAIN_POLISH: "music.lonestar.it",
DOMAIN_PORTUGUESE: "libre.fm", DOMAIN_PORTUGUESE: "music.lonestar.it",
DOMAIN_SWEDISH: "libre.fm", DOMAIN_SWEDISH: "music.lonestar.it",
DOMAIN_TURKISH: "libre.fm", DOMAIN_TURKISH: "music.lonestar.it",
DOMAIN_RUSSIAN: "libre.fm", DOMAIN_RUSSIAN: "music.lonestar.it",
DOMAIN_JAPANESE: "libre.fm", DOMAIN_JAPANESE: "music.lonestar.it",
DOMAIN_CHINESE: "libre.fm", DOMAIN_CHINESE: "music.lonestar.it",
}, },
urls={ urls={
"album": "artist/%(artist)s/album/%(album)s", "album": "artist/%(artist)s/album/%(album)s",