Giter VIP home page Giter VIP logo

jack's Issues

We need more disambiguation options

--add-disambiguation is a boolean option. It currently means to append the disambiguation string from MusicBrainz to the album filename only.

Ideally, we would have four types of disambiguation

  • album filename
  • album name tag
  • artist filename
  • artist name tag

@zzarne what would you propose for the option names?
We could change --add-disambiguation to require an option argument with some string that encodes all four possibilities.
We could load the boolean value that is currently saved in jack,musicbrainz, and save that into a string.

python3-mb: MusicBrainz fuzzy toc matching does not work

MusicBrainz may return a number of releases if there is a fuzzy match with the submitted toc.
Jack will then present the user a choice, but this will not be processed, since other code requires a perfect match.

This is because a release may contain multiple media, and the discid is used to match the current medium.

python3-mb: group vocal and instrumental performers separately

The MusicBrainz tagging code was designed with the goal to achieve the exact same results as MusicBrainz Picard would do.

Picard appears to create separate performer tags, when a performer is both credited as vocal performer, and an instrumental performer. Jack currently tags differently.

This can be seen in this release.
https://musicbrainz.org/release/94bc2804-ff37-32d0-9d01-6c5f63185d2f

Jack creates these vorbiscomment tags:

PERFORMER=John Acock (harmonium, mellotron and piano)
PERFORMER=Phil Collins (guest, membranophone, percussion, vibraphone and additional)
PERFORMER=John Hackett (bell, flute, guest and synthesizer)
PERFORMER=Steve Hackett (acoustic guitar, autoharp, bell, electric guitar, harmonium, mellotron and vocals)
PERFORMER=Robin Miller (cor anglais and oboe)
PERFORMER=Mike Rutherford (12 string guitar, bass guitar, bass pedals and guest)
PERFORMER=Nigel Warren-Green (cello and solo)

Picard would use these tags:

PERFORMER=John Acock (harmonium, mellotron and piano)
PERFORMER=Phil Collins (guest membranophone, percussion and vibraphone)
PERFORMER=John Hackett (guest bell, flute and synthesizer)
PERFORMER=Steve Hackett (acoustic guitar, autoharp, bell, electric guitar, harmonium and mellotron)
PERFORMER=Robin Miller (cor anglais and oboe)
PERFORMER=Mike Rutherford (guest 12 string guitar, bass guitar and bass pedals)
PERFORMER=Nigel Warren-Green (solo cello)
PERFORMER=Phil Collins (additional vocals)
PERFORMER=Steve Hackett (vocals)

Note the special handling of the word "guest".

Default to the Python 3 version of jack

I want to discuss two issues here:

  1. Are we ready to default the Python 3 version?
  2. How do we do it?

I think we are ready, but maybe we want to fix #16 first.

I've never done this, but it should be as simple as

git checkout python3-mb
git checkout -b main
git push --set-upstream origin main

and then change the default branch in github Settings->Branches to main.

We then could rename the master branch to e.g. python2 to avoid confusion.

What do you say? Comments welcome.

switch from dateparser to dateutil

Jack (python3-mb) uses dateparser to parse the Last-Modified date string from album art downloads.

Current dateparser is broken and is taking forever to get fixed, even though a solution has been proposed.
See scrapinghub/dateparser#1052
This mostly affects users that install their python libraries using their Linux distro.

dateparser can be replaced with dateutil which appears to be a more popular library.

setuptools-scm is failing

I currently can't install any change in my local git repo,

sudo python setup.py install
 
Traceback (most recent call last):
  File "/home/pim/os/linux/sound/jack/jack-cli-cd-ripper/jack/setup.py", line 28, in <module>
    setup(
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.10/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 459, in __init__
    _Distribution.__init__(
  File "/usr/lib64/python3.10/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 837, in finalize_options
    ep(self)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 858, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/integration.py", line 75, in version_keyword
    _assign_version(dist, config)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/integration.py", line 51, in _assign_version
    _version_missing(config)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/__init__.py", line 106, in _version_missing
    raise LookupError(
LookupError: setuptools-scm was unable to detect version for /home/pim/os/linux/sound/jack/jack-cli-cd-ripper/jack.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj

m4a encoded files are not optimized for streaming

Some streaming applications, such as play:Sub for iOS, need to download m4a files completely before they start playing.
This happens with m4a tracks encoded by jack, but not with tracks purchased from Apple.

This can be solved by adding the "--moov-before-mdat " option to the fdkaac command line.
This will cause the tags and album art to be placed in front of the encoded music data.

It's likely possible to add this option using a custom jack4rc, but this option should be added to the default command line.

Album art embedding

Jack should be able to embed local and remote album art into audio files.

support only python-discid as Python libdiscid wrapper

The python3-mb branch of Jack depends on a C library called libdiscid (https://musicbrainz.org/doc/libdiscid).
There are two competing Python wrappers for this library:

python-discid, using ctypes (no compilation)
python-libdiscid, using cython (compiled)

@pimzand started coding using python-libdiscid, because that was available as a package in the distro he was using (Fedora).
@zzarne added python-discid, because apparently, python-libdiscid cannot be installed using pip.

As a result, both libraries are now supported using a wrapper.

I propose we remove this wrapper and support python-discid directly, as the only supported wrapper.
Because:

  • python-discid is now available as a package in Fedora
  • python-discid is the wrapper used by MusicBrainz Picard
  • python-discid can be installed with pip

The benefits are:

  • easier to read code
  • easier documentation
  • easier to detect that requirements are met at runtime and install time

python3-mb: should not use the artist name as credited for directory names

MusicBrainz provides three names for the album artiist. As credited, as in MusicBrainz, and as a sortable name.
Jack currently uses the album artist as credited for tagging purposes, just like MusicBrainz Picard.
Jack currently also uses the name as credited for constructing the path to store files.
This makes less sense, as it will cause lots of differently spelled names for the same artist.
If the spelling just differs in case, it could cause problems with sharing the data to Windows or storing it on case-insensitive filesystems.

The default should be the artist name as in MusicBrainz. Ideally the choice should be user configurable.

download album art in the background, in parallel

Downloading album art in the original size can take quite a while, and currently ripping is not started until all downloads finish.

Using the concurrent library, these downloads could be performed in parallel, in the background.
The downloads should be waited for after ripping and encoding, when they can be needed for embedding.

wav support missing?

If I do a "jack -Q -g *wav" with the python3 version I get:
error unsupported format SndHeaders(filetype='wav', framerate=44100,
nchannels=2, nframes=14427756, sampwidth=16)....
it worked with the python2 version, is there an easy fix?

python3-mb: get rid of exec()

Concept draft:

  • define an interface
  • convert helpers.py to separate modules for each helper
  • allow custom helper modules in ~/.jack_plugins

python3-mb: transcoding

It should be possible to encode to mp3, m4a and ogg from flac files instead of from wav files only.

This could be a two-step process, ie decode to wav first, or a single command line.

python3-mb: encoder progress is broken

I did not understand the encoder progress code when porting to Python 3, and had to disable it.
It should be restored for lame, oggenc and flac, and implemented for fdk-aac.

Increase the level of PEP8 compliance

In the .travis.yml file, there are many exclusions of PEP8 conformance points: --ignore=E501,W604,W601,E721,E402,E711,E713,E741

Those exclusions have no reason apart from the lack of time when this repository was setup in GitHub.

Since the pep8 tool is at the moment the only safeguard, it would be better to use it to its full extent.

python3-mb: musicbrainz_template() breaks smart metadata selection

Before commit 4f709db, jack would use the most recently modified cached metadata (ie, jack.freedb or jack.musicbrainz), regardless of the default metadata provider. This behaviour is now broken when musicbrainz is the default metadata provider, yet jack.freedb is the only available cached metadata. Jack now creates an empty jack.musicbrainz which will then be selected because of its newer modification date, leading to failure.

python3-mb: force clean refresh of MusicBrainz data

Whenever a user queries MusicBrainz, jack first reads the old MusicBrainz data and will remember the choice of release.
If the new query again presents multiple releases, jack will automatically pick the choice the user made previously.
There should be a way to force jack to present the user a new choice, without manually deleting the jack.musicbrainz file.

Reading the TOC of a disc can be slow

Reading the TOC of a disc can be very slow, especially when extracting MCN and ISRC, which is done by default.

There are a number of strategies that could improve the speed, preferably without disabling MCN and ISRC extraction.

  • add debug statements to measure the time that (lib)discid and cdparanoia are taking to list the contents of a CD.
  • measure discid vs libdiscid speed
  • never enable MCN and ISRC extraction when we are only looking for a matching existing jack.toc
  • use the read_sparse() instead of the read() method of libdiscid, and check whether discid has such a method

python3-mb: exception message when using an unknown option

unknown option `--whatever'
Traceback (most recent call last):
File "/usr/local/bin/jack", line 80, in
help, argv_cf = jack.argv.parse_argv(cf, sys.argv)
File "/usr/local/lib/python3.8/site-packages/jack/argv.py", line 229, in parse_argv
show_usage(cf)
TypeError: show_usage() missing 1 required positional argument: 'longhelp'

Build fails on current releases of Debian/Ubuntu systems.

The latest version from this repository fails to build on

PRETTY_NAME="Ubuntu 23.10"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"
VERSION_CODENAME=mantic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=mantic
LOGO=ubuntu-logo

/usr/lib/python3/dist-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
[12/08/23 11:58:48] WARNING  toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section' pyproject_reading.py:42
Traceback (most recent call last):
  File "/home/amon/Desktop/TASK-JackPython3/20230919-jack-python3/jack-python3-mb/./setup.py", line 28, in <module>
    setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 147, in setup
    _setup_distribution = dist = klass(attrs)
                                 ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 485, in __init__
    _Distribution.__init__(
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 283, in __init__
    self.finalize_options()
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 926, in finalize_options
    ep(self)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 946, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "/home/amon/Desktop/TASK-JackPython3/20230919-jack-python3/jack-python3-mb/.eggs/setuptools_scm-8.0.4-py3.11.egg/setuptools_scm/_integration/setuptools.py", line 101, in version_keyword
    _assign_version(dist, config)
  File "/home/amon/Desktop/TASK-JackPython3/20230919-jack-python3/jack-python3-mb/.eggs/setuptools_scm-8.0.4-py3.11.egg/setuptools_scm/_integration/setuptools.py", line 56, in _assign_version
    _version_missing(config)
  File "/home/amon/Desktop/TASK-JackPython3/20230919-jack-python3/jack-python3-mb/.eggs/setuptools_scm-8.0.4-py3.11.egg/setuptools_scm/_get_version_impl.py", line 112, in _version_missing
    raise LookupError(
LookupError: setuptools-scm was unable to detect version for /home/amon/Desktop/TASK-JackPython3/20230919-jack-python3/jack-python3-mb.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj

port to python 3

How hard would it be to port this application to python 3?
I am still using this on Fedora, and Fedora 32, released today has deprecated python 2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.