Patch: MusicImport/mp3: Small fixes and enhancements

Discussion in 'General Development (no feature request here!)' started by scoop, November 26, 2005.

  1. scoop
    • Premium Supporter

    scoop Retired Team Member

    Joined:
    November 14, 2004
    Messages:
    614
    Likes Received:
    7
    Ratings:
    +7 / 0
    Hi,

    I know it's not even a 24 hours ago since the music import feature has been added to current CVS, but since I'm in need of this functionality I started testing with it right away :)

    The file names and directory names created by the music import feature are derived from the album info / metadata from the inserted CD. Some times, the album information may contain characters which cannot be used as file and directory names. If this is the case, then nothing happens. Nothing happens, because the try/catch block which saves a track to MP3 doesn't do anything with a generated exception.



    To work around this problem, I've added a function to MusicImport.cs which filters out those invalid characters from the variables used to created the file names and directory names. During debugging I also added a Log.Write() in the catch-part for saving a track.

    The patch is submitted @ sourceforge here.

    Kind regards,
    Michel
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. mzemina
    • Premium Supporter

    mzemina Retired Team Member

    Joined:
    February 23, 2005
    Messages:
    2,065
    Likes Received:
    13
    Occupation:
    Project Manager
    Location:
    Tulsa, OK
    Ratings:
    +13 / 0
    Home Country:
    United States of America United States of America
    Re: Patch: MusicImport/mp3: remove invalid chars from Album

    That is GREAT that you are working to get the best out of the plugin. I clap my hands to you. Good job!

    Mike
     
  4. scoop
    • Premium Supporter

    scoop Retired Team Member

    Joined:
    November 14, 2004
    Messages:
    614
    Likes Received:
    7
    Ratings:
    +7 / 0
    Hi,

    I just added another small fix, which should solve the issue that the CD drive isn't unlocked if you cancel the import process.

    I also added the possibility to control the CD Import feature with the remote or mouse by adding the actions to the context menu. The additions to the context menu are dynamic in a sense that they only show up if the current drive is a CD-ROM drive and the current selected item isn't a folder. The option to cancel the ripping appears only in the context menu when ripping.

    I had to add 3 new strings to the language strings.xml file for the texts in the context menu. Those are:
    Code (Text):
    1.  
    2. <string><id>3101</id><value>Import CD</value></string>
    3. <string><id>3102</id><value>Import Track</value></string>
    4. <string><id>3103</id><value>Cancel Import</value></string>
    5.  
    The updated patch is available at the same place. For those who are on current CVS and want to give it a try, the modified windowplugins.dll plus required language update is available here.

    Kind regards,
    Michel
     
  5. SiLenTYL
    • Premium Supporter

    SiLenTYL Retired Team Member

    Joined:
    April 23, 2004
    Messages:
    1,144
    Likes Received:
    144
    Gender:
    Male
    Location:
    Melbourne
    Ratings:
    +153 / 0
    Home Country:
    Australia Australia
    hi there

    great work mPod and scoop !

    i understand it runs with hardware error correction, but if a track isnt picked up (ie. scratched disc, whatever) ....it will just keep trying to read the track forever....except if i press "c" (cancel), which results in an exception and MP to crash to desktop.....so can we force a "skip" if it takes too long?

    also a "completed" or "completed - 1 track skipped" dialogue popup(or something like that), would be great
     
  6. egonspengleruk
    • Premium Supporter

    egonspengleruk Retired Team Member

    Joined:
    June 30, 2005
    Messages:
    250
    Likes Received:
    0
    Occupation:
    Embedded Software Engineer
    Ratings:
    +0 / 0
    Thought I might try out the competition :)

    How do I select the tracks to import? I saw from the website note that you have to
    "mark a track, hit "i" to import track, "d" to import whole disc, "c" to cancel import."
    How do I mark a track?
    And after looking through the code, I saw that a context menu option has been added to remove the need for a keyboard.....but how do I bring that up?
    I have clicked on PlayCD and then on Playlist to show all the files on the CD...but if I right click on any of these tracks then nothing happens....I would expect the context menu to appear here.

    Also, as far as my attempt at the ripping plugin went, the only thing mPod's is missing is a Rip CD button under the Play CD. This gives the user a very simple one click way to rip an entire CD. From a GUI perspective the user should only (IMHO) have to worry about selecting tracks if they only want to rip particular tracks.
     
  7. scoop
    • Premium Supporter

    scoop Retired Team Member

    Joined:
    November 14, 2004
    Messages:
    614
    Likes Received:
    7
    Ratings:
    +7 / 0
    Hi,
    After entering My Music, you see the configured folders on the right. Click on your CD-ROM to enter the drive. Next, it'll do an artist/album/track lookup. After that, you're presented with all the tracks on the CD. There, just highlight the desired track with the arrow keys. Next, press F9 or the button that brings up the context menu on the remote. You can also right click with the mouse to bring up the context menu. From the context menu, you can choose to rip the highlighted track, or the entire CD.

    The context menu changes to only contain "Cancel Import" if ripping is in progress.

    I avoided adding a button on the left, since that would require a change to all the skins. I chose the easy way out: the context menu. ;)

    Kind regards,
    Michel
     
  8. egonspengleruk
    • Premium Supporter

    egonspengleruk Retired Team Member

    Joined:
    June 30, 2005
    Messages:
    250
    Likes Received:
    0
    Occupation:
    Embedded Software Engineer
    Ratings:
    +0 / 0
    Cheers for that Scoop. Have it ripping a CD now.
    Personally I would prefer a Rip CD button....:p :p
    Also, there is no progress bar or anyway to letting the user know how the ripping is going. Thats the only other thing I had done differently to mPod's version.
    Also got a bug report for yer :) Jack Johnson's "In Between Dreams" album has a hidden track that doesnt appear via the FreeDB lookup. It just calls the track "?". When this is ripped, because you cant have "?" in a filename, your code replaces it with a space. Might be worth adding a check to see if the string of the track title = " "...and if so then force the title to be "unknown"

    Egon
     
  9. Smirnuff

    Smirnuff Portal Pro

    Joined:
    December 7, 2004
    Messages:
    630
    Likes Received:
    3
    Occupation:
    Software Developer
    Location:
    United Kingdom
    Ratings:
    +3 / 0
    Guys you do realize that mPod isn't done with this yet? I feel as though you are critiquing something way before the developer has finished. Maybe I'm wrong but wanted my $0.02...
     
  10. egonspengleruk
    • Premium Supporter

    egonspengleruk Retired Team Member

    Joined:
    June 30, 2005
    Messages:
    250
    Likes Received:
    0
    Occupation:
    Embedded Software Engineer
    Ratings:
    +0 / 0
    In my defence there isnt anything to say this on any forum post I could find....so we werent to know :)
     
  11. scoop
    • Premium Supporter

    scoop Retired Team Member

    Joined:
    November 14, 2004
    Messages:
    614
    Likes Received:
    7
    Ratings:
    +7 / 0
    Hi Smirnuff,

    I understand submitting patches within 24 hours after something has been added to CVS can be seen by the developer as interfering with his/her work. If that's the case then I apologise and blame my enthusiasm for this feature. By no means it is meant as criticizing mPod's work.

    Kind regards,
    Michel
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!