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

Media app : all songs listed as "unknown artist" #26

Closed
MorrisJobke opened this issue May 23, 2013 · 5 comments
Closed

Media app : all songs listed as "unknown artist" #26

MorrisJobke opened this issue May 23, 2013 · 5 comments

Comments

@MorrisJobke
Copy link
Contributor

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

@MorrisJobke
Copy link
Contributor Author

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)

@MorrisJobke
Copy link
Contributor Author

Are you running 32bit OS?
owncloud/core#3084
owncloud-archive/apps#963


Original comment by @VicDeo at owncloud-archive/apps#1056 (comment)

@MorrisJobke
Copy link
Contributor Author

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)

@MorrisJobke
Copy link
Contributor Author

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)

@MorrisJobke
Copy link
Contributor Author

hi.
i have a small workaround for the shared music and the files listed as "unknown" issues.
this is dirty, and will be just for using local storages.

make the following changes:

  1. owncloud\3rdparty\getid3.php
    // Check whether file is larger than 2GB and thus not supported by 32-bit PHP (null: auto-detect based on PHP_INT_MAX)
    public $option_max_2gb_check     = false;
    
  2. owncloud\apps\media\lib\extractor.php (workaround over oc-protocoll bug?)
    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;
    }
  1. owncloud\apps\media\lib\scanner.php (add shared music)
    /**
     * 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 ;).
good luck guys

thanks to: https://gist.github.com/Jan1337z/5554266


Original comment by @ueni at owncloud-archive/apps#1056 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant