This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Gracefully fail when drive not mounted

Tags: None
(comma "," separated)
Preston
Karma
0
I have used amarok for a while now and I must say that I love it. It is my favorite mp3 player of all that I have used on both Windows and Linux. I do have one feature request though. It may be too specific to my situation and if that is the case, I understand. If this is the wrong place to post this or it has already been discussed, forgive me.

Anyway, I store all of my mp3\'s on an external usb hard drive. The problem I have with amarok comes when I go to play a song and for whatever reason the hard drive is not mounted. Amarok begins to cycle through each of my 2000+ songs popping up an error message for each. Usually it ties up my machine so much, I just have to restart X or at least switch to a terminal and manually kill amarok. I understand and appriciate the behaviour of amarok giving an error message if a file is not found, but it might be nice if there was some sort of counter that after say 10 or so failed songs in a row, it stopped trying to play so you could fix the problem. Like I said, I am probably a minority in the way I store my songs (which leads to this situation), but if it could be corrected, it would be great.


Thanks.

Preston
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
I don\'t store my MP3s on a ext. hard drive, so I don\'t know how this looks like. But, in e.g iTunes, it only displays a error for the current song (and a ! before the song). Something similar would be nice? (maybe only set a ! before the song, where ► usually belongs)


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
Preston
Karma
0
Just as a quck update, I fixed the problem for myself, but what I did is not a long term fix and probably shouldn\'t be done by anyone. I use the xine engine for playback and I use amarok 1.0.2 by the way. I commented out line 482 : [code:1]//QApplication::postEvent( xe, new QCustomEvent(QEvent::Type(3001), new QString(message)) );[/code:1] and recompiled. This just stops QT from poping up an error message for a missing song (and lots of other things actually), but in general solves my problem. Now, if my drive is not mounted and I try to play a song, amarok just scrolls quickly through each item in the listview until I hit stop. I no longer end up with hundreds or thousands of pop up error messages, so it really isn\'t a big deal. Anyway, that is a temporary fix for anyone else who has this problem. As I said above, this also prevents other error messages from popping up with could be useful (look at the switch statement
in the same file above the line I commented out for the messages you might be missing out on). Just thought I would share my progress. If I ever take the time to make a proper patch, I will post it here (or where ever the proper place is).

Preston
Preston
Karma
0
For some reason the code didn\'t show up (at least in my brower) . Here is the line of code to comment out/delete: //QApplication::postEvent( xe, new QCustomEvent(QEvent::Type(3001), new QString(message)) );
User avatar
eean
KDE Developer
Posts
1016
Karma
0
OS
1.0.1 is a pretty old version.


Amarok Developer
Preston
Karma
0
eean wrote:
1.0.1 is a pretty old version.


I still use 1.0.2 because it works well and I have had nothing but trouble upgrading to 1.1 or newer. I use gentoo and like to stick with ebuilds so I haven\'t tried just installing straight from source yet. I read on the boards that there are some problems with the ebuilds and that is why it fails. If my problem has been fixed in a newer version, however, I will go back and try to get it installed again. Also, if you don\'t have a usb drive and you want to test my problem, just add a lot of mp3s to you playlist (1000+) and the move them to another location on your hard drive. The same thing should happen.

Preston
User avatar
eean
KDE Developer
Posts
1016
Karma
0
OS
Sometimes I add a directory to the playlist, and then rename the directory. Seems like it just skips through all the non-existant files.

I didn\'t have any problem with the ebuilds myself. Some gentoo ebuilds had a bogus block with gstreamer, you can just edit and remove it.


Amarok Developer


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]