Skip to content

Commit

Permalink
Add to pip
Browse files Browse the repository at this point in the history
  • Loading branch information
kernitus committed Jan 25, 2023
1 parent 97395bb commit a74f27b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,4 @@ ENV/

# Rope project settings
.ropeproject
/.idea/
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Beets plugin that fetches oldest recording or release date for each track. This is especially useful when tracks are from best-of compilations, remasters, or re-releases. Originally based on `beets-recordingdate` by tweitzel, but almost entirely rewritten to actually work with MusicBrainz's incomplete information. The only thing left intact is the `recording_` MP3 tags, for compatibility with `beets-recordingdate`.

# Installation
Clone the repo and run `python setup.py install`, then add `oldestdate` to the list of active plugins in beets and configure as necessary. The plugin is intended to be used in singleton mode. Undefined behaviour may occur otherwise.
Simply run `pip install beets-oldestdate` then add `oldestdate` to the list of active plugins in beets and configure as necessary. The plugin is intended to be used in singleton mode. Undefined behaviour may occur otherwise.

# Configuration

Expand Down Expand Up @@ -34,8 +34,6 @@ Clone the repo and run `python setup.py install`, then add `oldestdate` to the l
filter_recordings: yes
approach: 'releases'



## How it works
The plugin will take the recording that was chosen and get its `work_id`. From this, it gets all recordings associated with said work. If using the `recordings` approach, it will look through these recordings' dates and find the oldest. If using the `releases` approach, it will instead go through the dates for all releases for all recordings and find the oldest (*much* more accurate). The difference between these two approaches is that with `recordings` it only takes one API call to get the necessary data, while with `releases` it takes *n* calls, where *n* is the number of recordings. This takes significantly longer due to MusicBrainz's default ratelimit of 1 API call per second. Due to this, the option `filter_recordings` exists to cut down on the amount of calls needed.

Expand Down
3 changes: 0 additions & 3 deletions beetsplug/__init__.py

This file was deleted.

31 changes: 31 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "beets-oldestdate"
version = "1.1.3"
authors = [
{ name="kernitus" },
]
description = "Beets plugin that finds oldest possible track recording or release date"
readme = "README.md"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"mediafile~=0.9",
"musicbrainzngs~=0.7",
"python-dateutil~=2.8",
"beets~=1.6",
]

[project.entry-points.beetsplug]
beets-oldestdate = "beets.oldestdate"

[project.urls]
"Homepage" = "https://github.com/kernitus/beets-oldestdate"
"Bug Tracker" = "https://github.com/kernitus/beets-oldestdate/issues"
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

6 changes: 0 additions & 6 deletions setup.py

This file was deleted.

0 comments on commit a74f27b

Please sign in to comment.