[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gap-dev-discuss] Cynthiune - shuffle playlist
From: |
Philippe Roussel |
Subject: |
Re: [Gap-dev-discuss] Cynthiune - shuffle playlist |
Date: |
Sun, 13 May 2012 22:42:07 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 |
Le 13/05/2012 19:27, Sebastian Reitenbach a écrit :
>
> On Sunday, May 13, 2012 19:01 CEST, Philippe Roussel <address@hidden> wrote:
>> Yes, I saw that yesterday, I spoke too fast...
>>
>> Can you save and load playlists on your setup ? With the small patch I
>> sent it works quite well here.
>
> Here too. However, I recognized in the Code of Playlist.m and
> PlaylistController.m
> there are checks to not load a file twice tot the playlist, which is just not
> working.
> It is comparing the new Song Object, with the Objects in the playlist. But
> since they
> have different Object IDs, this fails. I think it should better compare the
> filename
> attribute of a Song instance?
Yep. The following might help :
Index: Song.m
===================================================================
RCS file: /sources/gap/gap/user-apps/Cynthiune/Song.m,v
retrieving revision 1.2
diff -u -r1.2 Song.m
--- Song.m 13 May 2012 16:56:42 -0000 1.2
+++ Song.m 13 May 2012 20:40:36 -0000
@@ -73,6 +73,15 @@
return self;
}
+- (BOOL)isEqual:(id)object
+{
+ if (object == self)
+ return YES;
+ if ([object class] != [self class])
+ return NO;
+ return [filename isEqualToString:[object filename]];
+}
+
- (id) initWithFilename: (NSString *) aFilename
{
self = [self init];
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist, (continued)
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist, Philippe Roussel, 2012/05/08
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist, Riccardo Mottola, 2012/05/11
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist, Philippe Roussel, 2012/05/11
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist, Riccardo Mottola, 2012/05/11
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist, Philippe Roussel, 2012/05/11
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist, Riccardo Mottola, 2012/05/11
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist, Philippe Roussel, 2012/05/13
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist, Sebastian Reitenbach, 2012/05/13
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist, Philippe Roussel, 2012/05/13
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist, Sebastian Reitenbach, 2012/05/13
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist,
Philippe Roussel <=
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist, Riccardo Mottola, 2012/05/13
- Re: [Gap-dev-discuss] Cynthiune - shuffle playlist, Philippe Roussel, 2012/05/14
- [Gap-dev-discuss] Broken GORM file - Was Cynthiune - shuffle playlist, Riccardo Mottola, 2012/05/14
- Re: [Gap-dev-discuss] Broken GORM file - Was Cynthiune - shuffle playlist, Philippe Roussel, 2012/05/14
- Re: [Gap-dev-discuss] Broken GORM file - Was Cynthiune - shuffle playlist, Sebastian Reitenbach, 2012/05/14