mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
Use file name for song title if such is missing
This commit is contained in:
parent
1919df1e20
commit
cc975996af
1 changed files with 4 additions and 2 deletions
|
@ -133,7 +133,7 @@ class File
|
|||
'artist' => '',
|
||||
'album' => '',
|
||||
'compilation' => false,
|
||||
'title' => '',
|
||||
'title' => basename($this->path, '.'.pathinfo($this->path, PATHINFO_EXTENSION)), // default to be file name
|
||||
'length' => $info['playtime_seconds'],
|
||||
'track' => (int) $track,
|
||||
'lyrics' => '',
|
||||
|
@ -168,7 +168,9 @@ class File
|
|||
}
|
||||
|
||||
// Fixes #323, where tag names can be htmlentities()'ed
|
||||
$props['title'] = html_entity_decode(trim($title));
|
||||
if ($title) {
|
||||
$props['title'] = html_entity_decode(trim($title));
|
||||
}
|
||||
$props['album'] = html_entity_decode(trim($album));
|
||||
$props['artist'] = html_entity_decode(trim($artist));
|
||||
$props['albumartist'] = html_entity_decode(trim($albumArtist));
|
||||
|
|
Loading…
Reference in a new issue