Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scan stuck due to artist field being too long #145

Closed
kudev opened this issue Feb 18, 2017 · 1 comment
Closed

Scan stuck due to artist field being too long #145

kudev opened this issue Feb 18, 2017 · 1 comment
Assignees
Milestone

Comments

@kudev
Copy link

kudev commented Feb 18, 2017

I am trying to scan my files. One of these files is an MP3 with an artist field that's around 300 characters.

Expected behavior

The file is scanned without any issues.

Actual behavior

The scan simply hangs indefinitely. Checking the nextcloud logs revealed that the column's length is limited to 256 in the database.

Steps to reproduce the behavior

  1. Have a song with an artist field longer than 256 characters
  2. Try to scan it

Possible solution (optional)

Basic ideas:

  • Remove character limit
  • Trim artist
  • Handle the error so the user can react

Server configuration

Operating system:
Linux

Web server:
Nginx

Database:
PostgreSQL 9.6.1

PHP version:
7.1.2

ownCloud/Nextcloud version: (see /status.php)
11.0.1.2

Updated from an older ownCloud/Nextcloud or fresh install:
Fresh install

Audio Player version: (see /settings/apps)
1.4.1

Where did you install Audio Player from:
The NextCloud apps page

Are you using external storage, if yes which one: local

Are you using encryption: no

Client configuration

Operating system:
Linux

Browser:
Firefox 51

Logs

ownCloud/Nextcloud log

ownCloud/Nextcloud log (`/data/[owncloud|nextcloud].log`)
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO "oc_audioplayer_artists" ("user_id","name") SELECT ?,? FROM "oc_audioplayer_artists" WHERE "user_id" = ? AND "name" = ? HAVING COUNT(*) = 0' with params ["ori", "<Really long artist name here>"]: SQLSTATE[22001]: String data, right truncated: 7 ERROR: value too long for type character varying(256)
@ghost ghost added the database label Feb 18, 2017
@Rello Rello self-assigned this Feb 22, 2017
@Rello
Copy link
Owner

Rello commented Feb 24, 2017

scanner was adjusted

  • values for year & tracknumber are normalized to a positive integer
  • strings for e.g. titles, artist, genre are truncated to DB size

#137

@ghost ghost modified the milestone: 1.5.0 Feb 24, 2017
ghost pushed a commit that referenced this issue Feb 24, 2017
@ghost ghost closed this as completed Mar 31, 2017
@ghost ghost added metadata and removed pending release labels Mar 31, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants