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

Exception thrown when title number is too high #140

Closed
nickvergessen opened this issue Feb 11, 2017 · 5 comments
Closed

Exception thrown when title number is too high #140

nickvergessen opened this issue Feb 11, 2017 · 5 comments
Assignees
Milestone

Comments

@nickvergessen
Copy link

For one of my files the tracknumber was set to 4294967295
This through an exception on the scan and aborted it.
When the value is too high, it should just use 0 or 1 or something useful instead of -1 which fails hard:

 /schilljs/files//Musik/Club/Others/Beyonce feat. Jay-Z - Crazy In Love.mp3


  [Doctrine\DBAL\Exception\DriverException]
  An exception occurred while executing 'INSERT INTO `oc_audioplayer_tracks` (`user_id`,`title`,`number`,`artist_i
  d`,`album_id`,`length`,`file_id`,`bitrate`,`mimetype`,`genre_id`,`year`,`folder_id`) VALUES(?,?,?,?,?,?,?,?,?,?,
  ?,?)' with params ["schilljs", "Crazy In Love", -1, 813, 356, "3:58", 77425, 256000, "audio\/mpeg", 17, 2003, 76
  608]:
  SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'number' at row 1

  [Doctrine\DBAL\Driver\PDOException]
  SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'number' at row 1

  [PDOException]
  SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'number' at row 1
@ghost
Copy link

ghost commented Feb 11, 2017

See #137

@Rello
Copy link
Owner

Rello commented Feb 11, 2017

@nickvergessen
can you provide this file to me for testing?

when I try to create a file with that number in the track, the getID3 only returns a 42. I am not able to reproduce this case of error.

and: which SQL version are you using?
on my test-instances with MariaDB 10, a "-1" is inserted as "0". thats why I did not see this error so far. nevertheless, your conversion of the high-number would be interesting.

@Rello
Copy link
Owner

Rello commented Feb 11, 2017

@nickvergessen can you tell me if you are using MySQL in strict-mode?

https://dev.mysql.com/doc/refman/5.5/en/out-of-range-and-overflow.html

@nickvergessen
Copy link
Author

Yes, I might have strict mode on

@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

@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