mirror of
https://github.com/koel/koel.git
synced 2026-04-26 09:15:59 +03:00
[GH-ISSUE #366] Exception when running sync in koel 2.2.1 #264
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#264
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 @loop0 on GitHub (Jun 26, 2016).
Original GitHub issue: https://github.com/koel/koel/issues/366
Hi, I'm having some trouble running the sync command, it was working fine until I put more music in the folder and tried to run as stated in the upgrade guide:
It gives me this error:
And if I run without the
--tags=trackit gives me the following error:I couldn't figure out why the path is being set as null.
@phanan commented on GitHub (Jun 27, 2016):
What happens if you remove the new media files and re-run
sync?@loop0 commented on GitHub (Jun 28, 2016):
If I remove the new media it works. I noticed that some of the new media directories have
'and&on its names. Could this be the source of the problem?@loop0 commented on GitHub (Jun 28, 2016):
I have managed to track down what line of code is causing the problem:
File:
koel-2.2.1/app/Models/File.phpIf I comment this
array_intersect_keyline the sync works, but I don't know if it has a side-effect.@phanan commented on GitHub (Jun 29, 2016):
Can you help
var_dump()both$infoand$tagsbefore that line?@loop0 commented on GitHub (Jun 29, 2016):
$info$tagsFunny thing is that now it works, but the media is already in the database, so instead of insert is an update being made.
@loop0 commented on GitHub (Jun 30, 2016):
I do think the problem here is the
if ($this->isChanged() || $force), because if it's a new file being created, usingarray_intersect_keyyou're losing a lot of required information. Probably if I run without--forceit will work. I'm gonna try to have a more reproducible environment at home, and also give a shot using the master version.@phanan commented on GitHub (Jul 1, 2016):
Hmm… I got what you mean. So this seems to be the case:
php artisan koel:sync --tags=track --forceis run--tagsastrack, onlytrackandmtime(required) are catered. This causes the problem with the files in step 1, as they are new and would require other tags as well.I'll work on a fix. Meanwhile, I think it makes more sense if you don't force to sync only several tags if there are new files.