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 library not scanning #17

Closed
phorward opened this issue Sep 21, 2016 · 7 comments
Closed

Media library not scanning #17

phorward opened this issue Sep 21, 2016 · 7 comments

Comments

@phorward
Copy link

Hello again,

this is another issue I have when I tried to use epymc on the Arch Linux ARM device. There is a USB hard drive connected, I can access all its files using the command-line or even other programs. But when I give it as music source to epymc, nothing happens, except 3 songs are loaded? I cannot be a rights problem! Surely the amount of files is very high. The connected device is an ext4 device. Is there any possibility to trace or debug why nothing happens here?

Cheers!

@phorward phorward changed the title Media library not really scanning? Media library not scanning Sep 21, 2016
@phorward
Copy link
Author

Hello, I found the reason. Its a bug in the music.py, I'm checking out if I can fix it by myself.

@phorward phorward reopened this Sep 22, 2016
@phorward
Copy link
Author

Hey folks, I now checked it out, but was unable to fix the bug.

This is the traceback that occurs:

Traceback (most recent call last):
File "efl/ecore/efl.ecore.pyx", line 341, in efl.ecore._ecore_task_cb (efl/ecore/efl.ecore.c:3308)
File "efl/ecore/efl.ecore_idler.pxi", line 77, in efl.ecore.Idler._task_exec (efl/ecore/efl.ecore.c:9356)
File "efl/ecore/efl.ecore_idler.pxi", line 78, in efl.ecore.Idler._task_exec (efl/ecore/efl.ecore.c:9305)
File "/usr/lib/python3.5/site-packages/epymc/plugins/music/music.py", line 356, in rebuild_db_idler
if self._songs_db.id_exists('file://' + full_path):
File "/usr/lib/python3.5/site-packages/epymc/sdb.py", line 122, in id_exists
return key in self._sh
File "/usr/lib/python3.5/shelve.py", line 102, in contains
return key.encode(self.keyencoding) in self.dict
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcf3' in position 69: surrogates not allowed

The problem is, that os.listdir() returns a filename from my media library that is "/tmp/Taraxacum/Rainmaker/Taraxacum - 12 - Lo Que Faltó.mp3": The "ó" is converted by os.listdir() to a UTF-8 representation. I tried several fixes to handle it, but my knowledge is too less on Python's string encodings and the file system behavior, maybe you have a quicker solution?

@phorward
Copy link
Author

Hello, I started a pull request, got a working version right now at my local box (I use the epymc package from arch linux aur)

@DaveMDS
Copy link
Owner

DaveMDS commented Sep 28, 2016

Hi, thanks for reporting!
I'm not really sure the pull request is the best way to fix the issue, we shouldn't handle the encoding in sdb.py... but I need to dig a bit more on this issue. Will do in the next few days

@phorward
Copy link
Author

Yeah, I really was not sure if this would be the best way, but it was a way to get it work for me. Indeed, handling these encoding errors with Python is annoying.

@DaveMDS
Copy link
Owner

DaveMDS commented Sep 28, 2016

I'm not able to reproduce your issue :/
I tried with a file named "Test File àèìòùó asd asd.mp3", in my local harddisk, in an ntfs share and in a fat32 usb key.
EpyMC always scanned the file correctly (using python 3.5 like your)

I can think at 2 different problems:

  1. your mp3 file is strange (can you send it to me? maybe via email)
  2. your system locale is not well configured, please paste here the output of the locale command.

@DaveMDS
Copy link
Owner

DaveMDS commented Aug 16, 2017

well, no more activitiy, I'm closing this.
Please reopen if it still occur

@DaveMDS DaveMDS closed this as completed Aug 16, 2017
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

2 participants