waasilzamri / scrobbledroid

Automatically exported from code.google.com/p/scrobbledroid
MIT License
0 stars 0 forks source link

Patch to add manual scrobble-list filtering, and fix a force-close bug #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I've been using your app for some time now (love it, btw), and a little
while back I decided to add a bit of functionality so I could:

1) have items not get scrobbled until I hit the button
2) remove tracks from the list of items waiting to be scrobbled

Also, while doing this I (crudely) fixed a bug that caused force-close
messages when repeatedly skipping track rapidly.

Anyway, patch file is attached, and here's the full list of changes I made:

 - Refactored some stuff out of the ScrobblerService into separate
files/classes (Track, ScrobbleQueue).

 - Shuffled GUI elements around a bit to make space, changed one of the
radio buttons into a spinner to include a third option:

- Added a third option on top of immediate or delayed scrobbling - manual.
Items will go into a list and not be scrobbled until you hit the button.

- Added a new activity, ScrobbleListActivity, (and a button to get to it)
that shows all the items awaiting scrobbling. You can delete items by
tapping them (and confirming).

- Changed the back-end of the to-be-scrobbled queue to be a
ContentProvider, rather than a directory of files. Makes concurrent access
simpler for ScorbbleListActivity.

- Fixed possible resource-leak & force-close message when skipping tracks
rapidly. I've just made MusicStatusFetcher not bind again if it's still
bound from last time, but maybe it should queue up and bind when the other
one unbinds. Seems to work OK for me though with this simplistic (rather
naive?) fix.

I think that's it. Anyway, I've been using it with these changes for a
while now, doing "tst" client scrobbles, and I think it's OK. Would love to
see this stuff added for others to use, so I've tried not to mess with your
style too much. Hope you can make use of it. Maybe if I find myself with
some spare time on my hands I could tackle one or two of the other items on
here if you like.

Original issue reported on code.google.com by themightyjon on 26 Apr 2009 at 7:27

Attachments:

GoogleCodeExporter commented 9 years ago
Hello. Thanks very much for the patch; it sounds great. I'm busy with another 
project
at the moment, but in a few weeks it'll be done and I'm planning to do some 
work on
Scrobble Droid then. Sorry for the delay, but I will get to it eventually.

Can you tell me why you wanted manual scrobbling? Is it just so that you can 
check
the list before you submit it?

Original comment by jjc1...@gmail.com on 27 Apr 2009 at 6:41

GoogleCodeExporter commented 9 years ago
Yeah, that's basically it. Every now and then I would look at Scrobble Droid's 
config
screen and see it had a few songs waiting to be scrobbled, and I'd wonder what 
they
were, so I decided I'd like a list. Then I figured I might as well be able to 
remove
things from that list, if I noticed something in there like a podcast, or a
language-learning audio lesson, or whatever, or just if I'd listened to a track 
and
didn't like it, so didn't want it added to my profile.

I suppose the manual thing is also useful if you want to do the batch submit 
over
wifi or something, but yeah, I basically didn't want things scrobbling without 
my
seeing the list first.

Original comment by themightyjon on 27 Apr 2009 at 7:23