Giter VIP home page Giter VIP logo

matijakolaric-com / django-music-publisher Goto Github PK

View Code? Open in Web Editor NEW
58.0 10.0 39.0 16.28 MB

Software for managing music metadata, registration/licencing of musical works and royalty processing.

Home Page: https://django-music-publisher.readthedocs.io

License: MIT License

Python 87.06% CSS 2.83% HTML 10.09% Procfile 0.02%
music music-publishing common-works-registration ipi cwr cwr2 cwr3 cisac royalty metadata

django-music-publisher's People

Contributors

dependabot[bot] avatar jakosexy avatar matijakolaric avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-music-publisher's Issues

Squash migrations for 21.1

Remove obsolete data migrations not required for new installations and updates from 20.x and on.
There will be no data changes in 21.1.

Remote Files

The goal is to add support images (photos for writers and artists, logos for labels and cover arts for releases), with previews, and mp3 files (for recordings) with HTML5 player.

  • OPTION_FILES setting enables this in code, without it, everything behaves as before
  • S3_ID, S3_KEY, S3_BUCKET and S3_REGION as short alternatives to django-storages settings
  • S3_ENABLED (calculated from previous settings) sets S3Boto3Storage as default storage
  • Extend models
  • Image preview widget
  • Audio player widget
  • Documentation

CWRExport does not defer CWR loading

There are a number of problems here, which must be all solved in order for defer to work properly:

  • CWRExport.created_on must become a proper DateTime field.
  • Migration must include filling out this information from CWR when possible
  • CWRExportAdmin.date must rely on this field
  • All instances of "if obj.cwr" must be changed to "if obj.year"
  • Similar problems with ACKImportAdmin

Import ACK Error 500

I've deployed app on Heroku free tier and after importing several ACK files i'm getting a 500 server error when I try to upload more. This is happening if I select to import ISWC from file

Third-Party Work IDs

Is your feature request related to a problem? Please describe.
CWR 3.0 adds a possibility to transfer third-party work IDs

Describe the solution you'd like
Make a plan, describe in the comments, ask for approval. Then, do it.

Heroku deployment template does not work

I entered all the required fields (PUBLISHER, PUBLISHER_IPI_NAME, PUBLISHER_SOCIETY_PR), but the "Build app" phase failed.

-----> Python app detected
-----> Installing python-3.8.7
-----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
-----> Installing SQLite3
-----> Installing requirements with pip
       Collecting Django<3.2,>=3.1.4
         Downloading Django-3.1.5-py3-none-any.whl (7.8 MB)
       Collecting dj_database_url
         Downloading dj_database_url-0.5.0-py2.py3-none-any.whl (5.5 kB)
       Collecting psycopg2-binary
         Downloading psycopg2_binary-2.8.6-cp38-cp38-manylinux1_x86_64.whl (3.0 MB)
       Collecting waitress
         Downloading waitress-1.4.4-py2.py3-none-any.whl (58 kB)
       Collecting whitenoise
         Downloading whitenoise-5.2.0-py2.py3-none-any.whl (19 kB)
       Collecting asgiref<4,>=3.2.10
         Downloading asgiref-3.3.1-py3-none-any.whl (19 kB)
       Collecting pytz
         Downloading pytz-2020.5-py2.py3-none-any.whl (510 kB)
       Collecting sqlparse>=0.2.2
         Downloading sqlparse-0.4.1-py3-none-any.whl (42 kB)
       Installing collected packages: asgiref, pytz, sqlparse, Django, dj-database-url, psycopg2-binary, waitress, whitenoise
       Successfully installed Django-3.1.5 asgiref-3.3.1 dj-database-url-0.5.0 psycopg2-binary-2.8.6 pytz-2020.5 sqlparse-0.4.1 waitress-1.4.4 whitenoise-5.2.0
-----> $ python manage.py collectstatic --noinput
       Traceback (most recent call last):
         File "manage.py", line 15, in <module>
           execute_from_command_line(sys.argv)
         File "/app/.heroku/python/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
           utility.execute()
         File "/app/.heroku/python/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute
           django.setup()
         File "/app/.heroku/python/lib/python3.8/site-packages/django/__init__.py", line 24, in setup

Is it possible to update the template?

Cheers!

EDIT

Ah, nvm, I was missing a part of the stack trace. Seems like my PUBLISHER_SOCIETY_PR isn't valid (I replaced with X)?

apps.populate(settings.INSTALLED_APPS)
         File "/app/.heroku/python/lib/python3.8/site-packages/django/apps/registry.py", line 122, in populate
           app_config.ready()
         File "/tmp/build_9856883c_/music_publisher/apps.py", line 24, in ready
           validate_settings()
         File "/tmp/build_9856883c_/music_publisher/validators.py", line 202, in validate_settings
           raise ImproperlyConfigured(
       django.core.exceptions.ImproperlyConfigured: PUBLISHER_SOCIETY_PR: Unknown society code "XXXXXXXX".
 !     Error while running '$ python manage.py collectstatic --noinput'.
       See traceback above for details.
       You may need to update application code to resolve this error.
       Or, you can disable collectstatic for this application:
          $ heroku config:set DISABLE_COLLECTSTATIC=1
       https://devcenter.heroku.com/articles/django-assets
 !     Push rejected, failed to compile Python app.
 !     Push failed

Recording artists and ISNI

Is your feature request related to a problem? Please describe.
CWR 3.0 has introduced ISNI numbers for artists, and artists are split into
LIVE artists and artists of recordings.

Describe the solution you'd like
Artists must be added to first recording models
ISNI numbers must be added to artists, both in ArtistInWork and FirstRecording models.
JSON files must be updated accordingly. Only first recording limitation remains.

Multiple Publisher Affiliations and territories

Is your feature request related to a problem? Please describe.
CWR 3.0 adds multiple publisher affiliations, also linked to territories.

Describe the solution you'd like
This has to be well defined, maybe separated into smaller tasks and created. It is linked to the CWR API tasks. This data is in settings, not the database.

Sphinx-based documentation required

Is your feature request related to a problem? Please describe.
Documentation is missing.

Describe the solution you'd like
Ideally, a Sphinx documentation should be written, and it should include auto-generated documentation from doc strings.

Unique blank not null for album title

Describe the bug
Album titles are unique and not required, so they must be null.

To Reproduce
Create two Album/CD instances with blank album titles.

Expected behavior
Can be done.

No module named 'music_metadata'

Describe the bug
Running the app I see an error which says the following:

django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'music_publisher.templatetags.cwr_filters': No module named 'music_metadata'

I checked the template tag on question and I can see where music_metadata imported, but I can't see where it is defined.

music_publisher/templatetags/cwr_filters.py

from music_publisher import models
from music_metadata.territories.territory import Territory

Is it part of this codebase or is it an external dependancy.

Version and deployment

python = "^3.10"
django = "4.1.13"
django-music-publisher = "^23.4"

To Reproduce
Steps to reproduce the behavior:

  1. Install the app in a Django project

Expected behavior

  1. App to run without an error

Screenshots
If applicable, add screenshots to help explain your problem.

Logs

python manage.py runserver_plus 8001
Traceback (most recent call last):
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/template/utils.py", line 69, in __getitem__
    return self._engines[alias]
KeyError: 'django'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/template/backends/django.py", line 128, in get_package_libraries
    module = import_module(entry[1])
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/music_publisher/templatetags/cwr_filters.py", line 10, in <module>
    from music_metadata.territories.territory import Territory
ModuleNotFoundError: No module named 'music_metadata'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "$HOME/workspace/syncedin/manage.py", line 22, in <module>
    main()
  File "$HOME/workspace/syncedin/manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/core/management/__init__.py", line 420, in execute
    django.setup()
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/apps/registry.py", line 116, in populate
    app_config.import_models()
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/apps/config.py", line 269, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/music_publisher/models.py", line 35, in <module>
    from .cwr_templates import (
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/music_publisher/cwr_templates.py", line 13, in <module>
    "HDR": Template(
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/template/base.py", line 147, in __init__
    engine = Engine.get_default()
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/template/engine.py", line 107, in get_default
    for engine in engines.all():
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/template/utils.py", line 94, in all
    return [self[alias] for alias in self]
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/template/utils.py", line 94, in <listcomp>
    return [self[alias] for alias in self]
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/template/utils.py", line 85, in __getitem__
    engine = engine_cls(params)
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/template/backends/django.py", line 24, in __init__
    options["libraries"] = self.get_templatetag_libraries(libraries)
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/template/backends/django.py", line 42, in get_templatetag_libraries
    libraries = get_installed_libraries()
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/template/backends/django.py", line 116, in get_installed_libraries
    return {
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/template/backends/django.py", line 116, in <dictcomp>
    return {
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/template/backends/django.py", line 105, in get_template_tag_modules
    for name in get_package_libraries(pkg):
  File "$HOME/.virtualenvs/syncedin/lib/python3.10/site-packages/django/template/backends/django.py", line 130, in get_package_libraries
    raise InvalidTemplateLibrary(
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'music_publisher.templatetags.cwr_filters': No module named 'music_metadata'

Additional context
Add any other context about the problem here.

Extend DMP data exchange format, both exports and imports

Enhance DMP data exchange format with:

  • More data in CSV exports:
    * recordings, all fields, including recording ID
    * publishers (for controlled writer, name, IPI name #, shares)
    * society work IDs

  • More data in CSV imports:
    * recordings, all fields, including recording ID
    * society work IDs

JSON Export

Is your feature request related to a problem? Please describe.
Users who do not subscribe to the commercial CWR service need a way to export data.

Describe the solution you'd like
Data on selected works must be saved as JSON.

Additional context
Existing JSON format used for CWR generation with the external service must be slightly
extended, in order to make things more general, and compatible with the future "Smart" CWR generator:

  • sender_id and sender_name must be added to root level
  • original publishers must be added to writers in work
  • dicts of writers and publishers must be added, to reduce redundancy, as the external service moves to "Smart", we can really ditch all redundant data.

Release Label

Is your feature request related to a problem? Please describe.
CWR 2.2 Release Label is missing

Describe the solution you'd like
Add it, check also CWR 3.0

work.__str__ must show title in uppercase

Describe the bug
work.str shows title in normal case and list of writers in uppercase.

To Reproduce
Save work, have a look at the message.

Expected behavior
All upeprcase.

Work overview

Is your feature request related to a problem? Please describe.
There should be a simplified overview of the work.

Describe the solution you'd like
Take the output from Work.json and show it in a nice way.

Describe alternatives you've considered
The question is where to show it, whether in a separate view or at the top of the change view.

Works already included in CWR exports can be deleted

Is your feature request related to a problem? Please describe.
Works already included in CWR exports can be deleted, which should not be the case. Happened in the demo.

Describe the solution you'd like
An intermediary model must be explicitly defined with on-delete=models.PROTECTED.

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.