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. Apr 30, 2012 #81 of 153
    wmcbrine

    wmcbrine Ziphead

    10,368
    22
    Aug 2, 2003
    I decided to test this, and actually iso8859-1 is better. I made a file with byte values 0-255, and tried it with various decodes. iso8859-1 gave no errors. (So, it's true, there's no need to check it; all byte values are accepted.) But windows-1252 threw an exception, since there still are a few "undefined" characters in that set.
     
  2. Apr 30, 2012 #82 of 153
    wmcbrine

    wmcbrine Ziphead

    10,368
    22
    Aug 2, 2003
    On third thought, I should probably go with "decode('cp1252', 'replace')".
     
  3. Apr 30, 2012 #83 of 153
    species8472jj

    species8472jj New Member

    56
    0
    Dec 23, 2009
    I was incorrect above (partially)

    When Dolby Digital is enabled, you will get the Tivo sound effects. If you have Dolby Digital to PCM enabed, you don't get the sound effects.

    My guess is that TiVo cannot play music in Dolby Digital mode which is why I am getting silence. So, when TiVo needs to play music, it must temporarily disable the Dolby Digital.

    The only thing I can think of in reference to Harmonium is it does use SD menus, so I assume Tivo has some association of SD menus with Dolby Digital to PCM.

    Again, I could be wrong, but I don't know if you can tell TiVo to switch to Dolby Digital to PCM in the code. I am thinking the SD menus default to this. Although, sometimes it works, and sometimes it doesn't, and that I am not sure about except perhaps a tivo quirk.
     
  4. May 1, 2012 #84 of 153
    jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    I have posted verion 1.0k of jukebox on git. I have hopefully made the lyrics retrieval code a little more robust. If nothing else, I have wrapped the problem areas with try blocks so that if errors DO occur, the app does not crash and you are told that lyrics retrieval couldn't be done. But I also put in some improvements. The logic now tries to retrieve the lyrics using the given artist and title as is. If this fails, it tries again after stripping out punctuation. I think this should increase the liklihood of successful lyrics retrieval.

    Thanks to species8472jj for acting as a tester for me on this, and thanks to wmcbrine for giving me pointers for dealing with different character encodings. I think it's starting to sink in.
     
  5. May 10, 2012 #85 of 153
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    What controls the sort order of playlists in the list? I have two playlists that for some reason sort to the end of the list, after Z. No special characters or anything like that ...
     
  6. May 15, 2012 #86 of 153
    jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Good question :)

    I just checked myself, and it seems that the playlists are in the order as returned by os.listdir which is probably based on the order in which files are created/deleted. I could very easily sort that alphabetically if people wanted that. I hadn't thought about it because I don't have many playlists, but I guess if the list grows, then some ordering discipline would make life easier.
     
  7. May 15, 2012 #87 of 153
    jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    For those interested, I just did a quick check of jukebox with the new HME for Python 0.20 and encountered no problems.
     
  8. May 15, 2012 #88 of 153
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Yeah, that would be nice. Here's my list, for example (please don't judge me by my playlist names ;)):

    Code:
    -rwxrwxrwx 1 jeremy users   15807 May  9 22:44 Chex Party Mix.m3u
    -rwxrwxrwx 1 jeremy users   10653 May 10 16:19 Classic Rockin.m3u
    -rwxrwxrwx 1 jeremy users    2522 May  9 21:40 Disco Dancing.m3u
    -rwxrwxrwx 1 jeremy users     577 May  9 21:40 Flyer Pep Band.m3u
    -rwxrwxrwx 1 jeremy users   10667 May  9 22:49 Folk You.m3u
    -rwxrwxrwx 1 jeremy users    6589 May 10 16:23 Head Bangers Ball.m3u
    -rwxrwxrwx 1 jeremy users    9583 May  9 21:40 Jazz it Up.m3u
    -rwxrwxrwx 1 jeremy users    4628 May  9 21:40 Nerdcore Rising.m3u
    -rwxrwxrwx 1 jeremy users    1042 May  9 22:07 Polka Party.m3u
    -rwxrwxrwx 1 jeremy users   26692 May 15 20:12 Pop Goes the Weasel.m3u
    -rwxrwxrwx 1 jeremy users    3337 May  9 22:07 Road Trippin.m3u
    -rwxrwxrwx 1 jeremy users    1638 May  9 21:40 Skydiving Mix.m3u
    -rwxrwxrwx 1 jeremy users    3185 May  9 21:40 Spring Training.m3u
    -rwxrwxrwx 1 jeremy users   63975 May 10 16:42 The BIG 80s.m3u
    -rwxrwxrwx 1 jeremy users   17259 May 10 16:32 Under the Covers.m3u
    -rwxrwxrwx 1 jeremy users    1906 May  9 21:40 Wedding Mix.m3u
    -rwxrwxrwx 1 jeremy users   14439 May  9 21:40 zChristmas Mix.m3u
    -rwxrwxrwx 1 jeremy users    5757 May  9 21:40 zChristmas Slow Mix.m3u
    -rwxrwxrwx 1 jeremy users    4220 May  9 21:40 zHalloween.m3u
    
    And here's how they appear in jukebox:

    [​IMG]

    It's those last two that are bugging me.
     

    Attached Files:

  9. May 15, 2012 #89 of 153
    jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    As requested by windracer, I have just made version 1.0l of jukebox available. This version maintains the list of playlists in alphabetical order. Also, with this version, I have introduced a new icon. I like the new one better, but if you prefer the old one, just preserve the icon.png file that is in the vidmgr directory.
     
  10. May 16, 2012 #90 of 153
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    That worked, thanks! :up:
     
  11. May 17, 2012 #91 of 153
    lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Too late. :D
     
  12. Jul 16, 2012 #92 of 153
    jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    I know I've been preoccupied with other projects recently, but I have a couple of jukebox enhancements in the works:

    1) a virtual DJ that would allow you to specify artists and/or genre to include and/or exclude in the selection of a random playlist. You will also have control over how many tracks to add.

    2) a new feature that silences sound effects if music is playing

    3) support for the slide remote when navigating menus - use the 'n' key, for example, to jump to the first artist that starts with 'n'

    4) as an offshoot of this, I am thinking of adding an option to be case insensitive in sorting.

    5) one last thing I am thinking of - a few months ago I added logic to ignore leading 'the', 'a', and 'an' at the beginning of artist names. I am thinking of extending that logic to include album and track names

    Give me some feedback on the last two items. Does anybody have and argument for or against either of them?
     
  13. Jul 18, 2012 #93 of 153
    lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    'Sounds like a nice feature for the way some folks like to listen to music. I don't think I would be likely to make use of it myself, but I can see its value for others.

    Oh, definitely!

    Well... I don't have a slide remote. It sounds like a nice feature for those who do.

    Hmm. That one sounds a lot less important, to me.

    Um, what about "The"?

    Well, eliminating "The" seems a requirement for (5), and if so, I would say it is more important than (4). Being perfectly self-centered about it, I would say the order of importance is 2 - 5 - 1 - 3 - 4.
     
  14. Aug 21, 2012 #94 of 153
    jcthorne

    jcthorne Active Member

    2,723
    3
    Jan 28, 2002
    Houston


    The virtual DJ and slide remote functions would be very useful to me. As far as leading a an and THE, I agree they should be ignored in sorts for albums and track names as well.

    A quick question, Is there any way to have Jukebox appear under the Music and Photos menu item rather than Showcases? Its very counter intuitive for the spousal unit.....:)

    Thanks!
     
  15. Aug 21, 2012 #95 of 153
    jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    I will be posting these changes in the next few days - just a bit more testing.

    Regarding the placement within the menu - I have no control over that (that I am aware of). I just present myself as an HME app and TiVo takes over from there. I guess you have a premiere though - because on my series 3, it shows up under "Music, Photos, & Showcases"
     
  16. Aug 23, 2012 #96 of 153
    lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Ho boy. That's never a good thing. It is, of course, your fault, too. Right? ;)
     
  17. Aug 29, 2012 #97 of 153
    jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    I finally posted the changes up on git - follow the link in my signature. This is for version 1.1. Here is a quick summary of the changes:

    - logic to skip articles (a, an, the) has been extended to ALL titles - songs, albums, and artists
    - added an option to ignore letter case when sorting and searching
    - added virtual DJ to allow selection of random playlists based on artist an/or genre
    - suppress sound effects during music playback
    - added support for the slider remote control - letters can be used when searching through the menu structure
     
  18. Sep 15, 2012 #98 of 153
    elenaran

    elenaran New Member

    42
    0
    Oct 17, 2006
    Hi, I just installed jukebox and am having trouble - no audio plays.

    pyHME and jukebox open up fine, and I can see all my music and the tags & album art show up fine, but it's completely silent (no sound effects, music, nothing). When I play a song, it looks like it's playing, but no audio comes out.

    This is on a Tivo Premiere, with HME/jukebox/pytivo running on a Win7 machine & Python 2.7.

    The audio works fine when I stream the music files to the Tivo directly from pyTivo, just not in jukebox.

    Any thoughts?
     
  19. Sep 15, 2012 #99 of 153
    jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Not offhand. The fact that the progress bar is moving indicates that the TiVo thinks it is playing. Jukebox only reports the status that the TiVo reports. Could it be some audio setting in either the TiVo or in your sound system?
     
  20. elenaran

    elenaran New Member

    42
    0
    Oct 17, 2006
    I doubt it's Tivo or the sound system, as streaming the same music files from pyTivo or TivoDesktop works fine. I even tried Harmonium and it worked fine too.
     

Share This Page