mirror of
https://github.com/koel/koel.git
synced 2026-04-26 09:15:59 +03:00
[GH-ISSUE #716] Reading lyrics from id3 medadata #509
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#509
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chawker21 on GitHub (Jan 31, 2018).
Original GitHub issue: https://github.com/koel/koel/issues/716
I am trying to figure out the best way to sync a text file containing the written text of the audio file in the lyrics section for the track.
I see in the code in Media.php
class Media
{
/**
* All applicable tags in a media file that we cater for.
* Note that each isn't necessarily a valid ID3 tag name.
*
* @var array
*/
protected $allTags = [
'artist',
'album',
'title',
'length',
'track',
'disc',
'lyrics',
'cover',
'mtime',
'compilation',
];
which looks like it will search for the lyrics in the ID3 section of the metadata but I put the text in the metadata and it does not show up in the lyrics.
The other way I am thinking of doing this is somehow searching the directory for the corresponding text file that belongs with the song file, They differ only by the word mp3 in the file name. I am having difficulty understanding how this would work.
Are there any ideas on how I can make this work whether there is a way it should be done or how I can implement a fix to make it work?
@chawker21 commented on GitHub (Jan 31, 2018):
after messing with it a little more It seems uploading lyrics from id3 might be broken altogether, not sure if anyone else is having trouble but I cant seem to get lyrics uploaded through metadata at all, I can other metadata though like album and title.
@chawker21 commented on GitHub (Feb 1, 2018):
Got it to work by fixing the label that had a comment saying tag name is misspelled for unsynchronised__lyric.
public function getInfo()
{
$info = $this->getID3->analyze($this->path);
// log::info($info);
if (isset($info['error']) || !isset($info['playtime_seconds'])) {
$this->syncError = isset($info['error']) ? $info['error'][0] : 'No playtime found';
@phanan commented on GitHub (Feb 2, 2018):
So in the end what tag name did you use?
@chawker21 commented on GitHub (Feb 2, 2018):
My metadata uses Lyrics, I was trying to figure out if capitalization matters which it seems to not matter whether its Lyrics lryics or LYRICS, when I used
$info = $this->getID3->analyze($this->path);
// log::info($info);
if (isset($info['error']) || !isset($info['playtime_seconds'])) {
log::infor($info); it showed every metadata key value in the logs and from there I could see that my lyrics where showing under unsynchronised_lyric and so I corrected the spelling in the code and it worked.
@chawker21 commented on GitHub (Feb 2, 2018):
This is in File.php by the way.
@chawker21 commented on GitHub (Feb 2, 2018):
$propertyMap = [
'artist' => 'artist',
'albumartist' => 'band',
'album' => 'album',
'title' => 'title',
'lyrics' => 'unsychronised_lyric', // this tag name is misspelled
'compilation' => 'part_of_a_compilation',
];
this is how the code is in File.php in the app/models. I dont know if it is intentional or not, it has a comment that it is misspelled and that was my problem.
@phanan commented on GitHub (Feb 2, 2018):
Hmm. Indeed, it was "unsynchronised_lyric" in the beginning (just like what you have now) and was changed because of a bug, as documented. Weird.
@chawker21 commented on GitHub (Feb 2, 2018):
I’m glad, I learned a lot about using ID3 with Laravel. I really like how you can scan a directory and input to dB. Many projects I end up imputing each data object individually because I didn’t know you could do that.
@phanan commented on GitHub (Apr 14, 2018):
It seems the getID3 library corrected this bug https://github.com/JamesHeinrich/getID3/issues/136. Will fix it in Koel. Thanks!
@phanan commented on GitHub (Apr 14, 2018):
On second check, the change hasn't landed to a stable version of getID3, so I don't know how you encountered this issue (unless you somehow got a dev/master version of getID3). I've reverted the (broken) fix.
@chawker21 commented on GitHub (Apr 15, 2018):
The error I had was not with the getID3 at all, it was a misspelling in the source code of the Koel master that I had downloaded. unSynchronized lyric was UnSychronised
@chawker21 commented on GitHub (Apr 15, 2018):
I fixed the spelling in the Koel code inside the file.php file and everything worked. even if it is misspelled in getID3 fixing it in Koel solved the problem.

@phanan commented on GitHub (Apr 15, 2018):
That's getID3, as shown in the attached issue.
@phanan commented on GitHub (Apr 15, 2018):
That's very weird.
@chawker21 commented on GitHub (Apr 15, 2018):
it is file.php
@phanan commented on GitHub (Apr 15, 2018):
I know. Indeed, changing the tag fixed the issue with lyrics not being read. I'll look deeper into this.
@phanan commented on GitHub (Apr 15, 2018):
It's very weird that running the integration tests with "unsynchronised_lyric" (correct spelling) will fail.
@phanan commented on GitHub (Apr 15, 2018):
@chawker21 If you open
vendor/james-heinrich/getid3/getid3/write.id3v2.phpat line 1982 and 2057, what do you see?@chawker21 commented on GitHub (Apr 15, 2018):
It is not just getid3 that uses unsynchronised lyric, when you put the metadata into the audio file with a program that is where "unsynchronised" comes from, getID3 is a middleman.
@chawker21 commented on GitHub (Apr 15, 2018):
From my experience debugging this, the id3 tag comes from the program you input the metadata in with, I use adobe audition. when you do a dump on the id3 data it is that data that the metadata is assigned to. getID3 analyzes the metadata but I dont think that the strings you see in that id3v2 table are actually meaningful to the program they are just sort of a directory of common keys. the real tag is assigned to the file itself.
@chawker21 commented on GitHub (Apr 15, 2018):
when doing a pdf i can assign any key value tag I want to using adobe acrobat. but it is tied to the file not the package I use to analyze it.
@phanan commented on GitHub (Apr 15, 2018):
Yeah, I noticed that as well. Looks like different applications write tags
differently (I tried iTunes and kid3 personally). Maybe we should check
both.
chawker21 notifications@github.com schrieb am Mo. 16. Apr. 2018 um 00:34:
@chawker21 commented on GitHub (Apr 15, 2018):
it is a spelling error in getid3 no doubt but it is irrelevant other than you have used their spelling.
@chawker21 commented on GitHub (Apr 15, 2018):
yes Id3 is not nearly all the metadata either, there are a lot of other metadata types. getid3 is mainly for audio tags, for PDF I have to use smalot/pdfparser for those tags, it works similar but there is no way for me to assign lyrics to a pdf, I have to include an audio file with different getid3 tags.
@chawker21 commented on GitHub (Apr 15, 2018):
I cant use getid3 to read pdf tags.
@chawker21 commented on GitHub (Apr 15, 2018):
Lyrics is a nice tag because I can save a whole text file in it.
@kevincaradant commented on GitHub (Dec 9, 2021):
Hi
I recently added musics with lyrics using beets. I can see via VLC the metadata with lyrics:
But I don't see any lyrics on Koel :(
Of the course I realized a scan / sync but nothing :/
Do you any idea why ?
Thank you
@phanan commented on GitHub (Dec 10, 2021):
@kevincaradant can you send me the song in question?
@kevincaradant commented on GitHub (Dec 10, 2021):
Hi
This is the example: https://gofile.io/d/WlQnAi
Regards
Edit: @phanan did you try ? :)
@phanan commented on GitHub (Dec 27, 2021):
@kevincaradant Sorry, holiday time over here :P But yeah, turns out it was a very stupid bug introduced recently with my "refactoring."
@phanan commented on GitHub (Dec 27, 2021):
@kevincaradant Tagged a new release: https://github.com/koel/koel/releases/tag/v5.1.11.
@kevincaradant commented on GitHub (Dec 29, 2021):
@phanan , ok thank you :D, but it is possible to have the docker updated with your release ?
https://hub.docker.com/r/hyzual/koel/tags
Thank you
@phanan commented on GitHub (Dec 29, 2021):
Pinging @Hyzual
@Hyzual commented on GitHub (Dec 30, 2021):
Hi, I was about to bump the docker image but I run into #1397 for both v5.1.10 and v5.1.11. koel crashes to error 500 immediately because it cannot find
mix-manifest.jsonfile (and the related frontend assets) in thepublic/folder.@phanan could you please publish a v5.1.12 including the frontend assets ? I'll push a new docker image version with it.
@phanan commented on GitHub (Dec 30, 2021):
Will do once I get home ;)
On Thu 30. Dec 2021 at 16:37 Joris MASSON @.***> wrote:
@phanan commented on GitHub (Dec 30, 2021):
@Hyzual et al., can you try https://github.com/koel/koel/releases/tag/v5.1.12?
@Hyzual commented on GitHub (Dec 30, 2021):
Thanks for the new release, it runs but while testing I stumbled upon a database issue when syncing music, I've filled an issue at #1400
@Hyzual commented on GitHub (Dec 30, 2021):
The error was due to my environment. The docker image build for v5.1.12 is running, should be pushed shortly
@kevincaradant commented on GitHub (Jan 2, 2022):
It's working thank you