1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

announcing jukebox - an mp3 player for pyhme

Discussion in 'Developers Corner' started by jbernardis, Dec 26, 2011.

  1. fxsknr

    fxsknr New Member

    3
    0
    Feb 27, 2010
    Thanks. I appreciate you finding a work around.
     
  2. wmcbrine

    wmcbrine Ziphead

    10,366
    22
    Aug 2, 2003
    Makes no sense, especially since fxsknr said it works from the pyTivo share. Can you send me a more complete log?

    Edit: Oh, before that -- can you confirm that it works for you from the pyTivo share? If not, then you have a different issue from fxsknr. (You're using different OSes, I note, that handle Unicode differently. He's got Windows; you've got some kind of Unix. Which kind would be good to know... I pass Unicode names to os.path.getsize(), and they work in OS X and Ubuntu.)
     
  3. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    I'm not sure what happened, but it now plays fine for me both in pytivo and in jukebox. Here is what I did.

    1) I had left the directory with an ascii name, so I renamed it back to the original name
    2) just to clear out memory, I stopped and then restart pytivo, emptying the debug.log file in between.
    3) I rebuilt the jukebox cache since the old cache pointed to a file with the ascii name
    4) I played the file directly with pytivo, and it played fine.
    5) I then moved into jukebox and selected the file for playing thinking that it would fail, but in fact it played.
    6) I stopped everything, pytivo AND pyhme, and then restarted them, I went back into jukebox, and now it plays.

    I have no idea why this happened!!


    oh - BTW - I run both the HME app and pytivo on my netgear NAS which, I believe, is a debian-based linux.
     
  4. fxsknr

    fxsknr New Member

    3
    0
    Feb 27, 2010
    jbernardis,

    I tried your suggestion and it didn't work for me. I am indeed running Windows with Python 2.7 32 bit on Windows 8 64 bit. I am finding that jukebox quite frequently hangs up my tivo forcing me to reboot. It happens on many songs, not just the one I sent you. This problem doesn't seem to have with pytivo alone. Is there a way to log whats happening so I can send it to you for analysis?

    fxsknr
     
  5. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    jukebox standard output goes to the same place as the hme standard output - so however you started hme (start.py) wherever you redirect your output to - that's the logging information that would be available to you.

    The pytivo log is also of interest. Jukebox is not involved in the playing of the song at all. It passes the URL of the song to the TiVo, and TiVo retrieves the song using that URL. The URL happens to point to pytivo, and pytivo serves up the file. As the song is being played, tivo sends update messages to jukebox which jukebox uses to update its display.

    If your tivo is getting hung up, I doubt there's going to be anything of interest in the log, but it doesn't hurt to look. What model tivo do you use? There have been reported issues with the premier series. I don't own a premier - my tivos are both the original series 3, and I have not noticed any issues.
     
  6. cassiusdrow

    cassiusdrow Member

    130
    0
    May 21, 2003
    NJ
    It looks like the lyrics feature is no longer working when it tries to retrieve lyrics from azlyrics (local files still work). Any ideas?
     
  7. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    That's a feature whose code I haven't touched for months if not longer. Last time I used it it was working fine. It was never able to work 100% of the time. If there's a specific artist/song that it can't find lyrics for let me know the exact artist and song name and I'll see if I can improve the search algorithm.
     
  8. cassiusdrow

    cassiusdrow Member

    130
    0
    May 21, 2003
    NJ
    I haven't been able to get it to retrieve anything in months. I have also verified that azlyrics actually has the lyrics for the songs I was trying and it did. I was thinking maybe either something changed on azlyrics or they are blocking it. Is it working for you?
     
  9. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    It IS working for me - although I only verified for 4 or 5 songs. If you edit the file GetLyrics.py, on about line 119, there is an assignment "verbose=False". Change that to "verbose=True" restart everything, and try to retrieve lyrics. Check and see if the log gives you any important information. You might post it here or send it to me with PM
     
  10. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Actually I should apologize to CassiusDrow for not paying attention to this sooner, but apparently azlyrics.com changed the format of their search HTML so my screen scraping logic broke down. I "fixed" it and it seems to be retrieving lyrics again, but whenever something is reverse-engineered like this, there is always the real possibility that something was missed.

    Try it out - git has been updated. If you are having trouble retrieving lyrics, it would help me to know the exact artist and song title you are looking for. And remember - I never represented that this would work 100% of the time. There are going to be songs, especially those with strange characters and/or punctuation, that my logic will fail on.
     
  11. cassiusdrow

    cassiusdrow Member

    130
    0
    May 21, 2003
    NJ
    The lyrics retrieval is working again. Thanks for looking into it and fixing it. I understand the limitations regarding special characters and such.
     
  12. cassiusdrow

    cassiusdrow Member

    130
    0
    May 21, 2003
    NJ
    I made some changes to how I store my music library and I noticed that the cache building process will not follow symlinked directories on linux. I changed line 106 of BuildCache.py from

    Code:
    	tree = os.walk(root)
    
    to

    Code:
    	tree = os.walk(root, followlinks=True)
    
    and it works now. Just thought you might like to include this change.
     
  13. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ

    GIT has been updated - thanks.
     

Share This Page