-
Notifications
You must be signed in to change notification settings - Fork 199
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
Media app : all songs listed as "unknown artist" #26
Comments
I am facing the same issue after upgrading from 5.0.5 (my initial install) to 5.0.6, however all my files are mp3. I tried clearing oc_media_albums in the sqlite database and rescanning the library but it did not fix the issue. After upgrading, I only found a couple of messages {"app":"search_lucene","message":"need mimetype for content extraction","level":3,"time":1368657223} in owncloud.log, which occurred before the update anyway, and no other error messages. Original comment by @aroquen at owncloud-archive/apps#1056 (comment) |
Are you running 32bit OS? Original comment by @VicDeo at owncloud-archive/apps#1056 (comment) |
Yes sorry, I forgot to reapply the fix for the size limit. Problem solved, thank you @VicDeo! Original comment by @aroquen at owncloud-archive/apps#1056 (comment) |
Thanks for your comments and the link to the issues #3084 and #963 . I applied the patch but unfortunately there are still 567 music files listed as "unknown" after refreshing the music collection. Is there a cache or a table I should clear to get everything work correctly ? Original comment by @edappere at owncloud-archive/apps#1056 (comment) |
hi. make the following changes:
public function extract($path) {
$absolutePath = \OC\Files\Filesystem::getView()->getAbsolutePath($path);
$absolutePath = \OC\Files\Filesystem::normalizePath($absolutePath);
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($absolutePath);
$file = $storage->getLocalFile($internalPath);//let's get the phys. path
$data = @$this->getID3->analyze($file);
\getid3_lib::CopyTagsToComments($data);
return $data;
}
/**
* get a list of all music files of the user
*
* @return array
*/
public function getMusic() {
$music = \OC\Files\Filesystem::searchByMime('audio');
$ogg = \OC\Files\Filesystem::searchByMime('application/ogg');
$shared = $this->getSharedMusic("//Shared");
$music = array_merge($music, $ogg, $shared);
//$music = array_merge($music, $ogg);
foreach ($music as &$file) {
$file = $file['path'];
}
return $music;
}
/**
* get a list of all shared music files
* @param path to Shared Folder $sharedFolder
* @return array
*/
public function getSharedMusic($sharedFolderPath) {
$sharedFolder = \OC\Files\Filesystem::getDirectoryContent($sharedFolderPath);
$files = array();
$this->getSharedMusicREK($sharedFolder,$sharedFolderPath,$files);
return $files;
}
/**
* helper function for getSharedMusic
*
* @return void
*/
private function getSharedMusicREK($array,$path,&$files) {
foreach($array as $key => $value) {
if($value["mimepart"] == 'audio') {
$value["path"] = $path."/".$value["name"];
$files[] = $value;
} elseif($value["type"] == 'dir') {
$this->getSharedMusicREK(\OC\Files\Filesystem::getDirectoryContent($path."/".$value["name"]),$path."/".$value["name"],$files);
}
}
} i hope this bugs will be fixed soon ;). thanks to: https://gist.github.com/Jan1337z/5554266 Original comment by @ueni at owncloud-archive/apps#1056 (comment) |
Hi,
Since I updated my owncloud installation from 5.0.0 to 5.0.2 (or .3, I don't remember !), all the music I have in my music collection is listed as an unknown artist. My 811 tracks are now just in a single list by artist "unknown", ordered by song title.
Previously the media app worked well but now is no longer usefull anymore.
My entire music library is made of OGG files.
Is there some cache I have to clear somewhere ?
Hope someone finds a solution.
Originally reported by @edappere at owncloud-archive/apps#1056
The text was updated successfully, but these errors were encountered: