Kodi Community Forum
Make Party Mode remember the last X (10-20?) tracks - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: Make Party Mode remember the last X (10-20?) tracks (/showthread.php?tid=28273)

Pages: 1 2


Make Party Mode remember the last X (10-20?) tracks - pygmyrhinovirus - 2007-09-01

I love party mode, and it is what I use exclusively in my car xbox setup to play music. Sometimes when I am skipping through tracks, I skip past a track that I (or another passenger: "wait wait!") would like to hear, but when I try to go back a track, it plays another random track.

Could Party Mode be enhanced to keep a list of say the last 10-20 tracks in memory so that one could go back a few tracks in the playlist history if one wanted to?


- jmarshall - 2007-09-01

Probably - a patch is welcome.


- pygmyrhinovirus - 2007-09-01

Man, I was afraid of something like that.

Anyways, it shouldn't be that hard. If Party Mode relies on something, like a Next10Tracks queue, then create a Last10Tracks queue and when the next song plays, pop the last-played track from Next10Tracks and push it into Last10Tracks.

Can someone give me a starter on which source files control partymode? This may be the day that I actually submit a patch.


- jmarshall - 2007-09-01

PartyModeManager.cpp or something similar does the queuing, but that's probably not where you have to alter stuff. PlaylistPlayer.cpp is probably where it actually does the work of moving stuff off the queue.

The idea would be to just have the previous 5 or so tracks still available, so that it's always playing track 6 for instance, rather than track 1 (once you've played 5 already obviously!)

Feel free to ask questions if there's anything you don't understand (or that's just plain wrong!)

Cheers,
Jonathan


- chadoe - 2007-09-01

CPartyModeManager::ReapSongs() and CPartyModeManager::MovePlaying() is the place to be i think.


- pygmyrhinovirus - 2007-09-02

I'm looking through the PartyModeManager.cpp and I'm feeling a little lost, naturally. The idea would be to make the queue size (playlist.size?) twice as large, and play from the middle of that list. The reaper would have to change to make sure that it only reaps from the top of the list, and not read all old songs, since the point is to have old songs in the queue.

Or instead of playing from the middle of the list, make the reaper put the old songs into a new stack, and pull from that stack when trying to go back past 0 in the track listing.

I have a feeling I'm not going to be able to help much, given my inexperience with the XBMC codebase and lack of compiling tools to test things with. VS.Net should be easy enough to get from work, but the XDK will not be possible for me to use, given my work situation.


- jmarshall - 2007-09-02

Fortunately that problem is mitigated with the fact that it builds under win32 only (directx SDK required) or under win32 with opengl/sdl, or under linux with opengl/sdl. The opengl/sdl version requires you checking out the linuxport branch.

The idea is correct, yeah - I'd just make the queue size 5 + current queue size, and adjust the reaper accordingly, but given that I'm about as familiar with this code as you are (well, I have at least played around with this bit before), I'm guessing. Various things (such as moving songs or deleting songs from the now playing window) will need consideration, but ofcourse they're a lower priority.

Cheers,
Jonathan


- pygmyrhinovirus - 2007-09-02

Oh, that's right, one could just use the win32 port.

It seems that a few other things rely on adding/removing/playing from the top of the list, so it may be easier to make a second queue for old playlist items. I saw home references to a "History" in partymodemanager, do you know what that is all about?


- jmarshall - 2007-09-02

The history was something that used to be used to store the last couple of hundred songs (in the db) so that it wouldn't re-select these when choosing the next song. Now it's just a vector of song ids.

This could I suppose be used, but really what you are wanting to do is keep the songs in the now playing list, so the ReapSongs() routine is what I'd personally be touching (as well as the MoveSong() routine, which doesn't appear to do anything if executed after ReapSongs() as it is currently setup, but may be used elsewhere I guess).

Cheers,
Jonathan


- pygmyrhinovirus - 2007-09-02

Something else I've noticed with Party Mode is that while it does select randomly, it sometimes does so predictably. Sometimes it follow the same pattern of songs, which is odd. They are all "random" in that they have nothing to do with one another, but about one in ten times, Party Mode will queue up the same lineup of songs it has done in the past.

What is used to seed rand()? If it is the system clock, then it will fail in cases like mine, where the xbox clock is reset every time it launches due to not having power.


- jmarshall - 2007-09-02

Probably the system clock, yes, though if it's done via timeGetTime() when partymode is actually invoked, there's little chance of repeats I should think.

I believe there's a XNetRandom() function in the XDK that could be used as an alternative.

Cheers,
Jonathan


- Ribero - 2010-11-21

Hi all,

I'm just discovering XMBC 10b4 (using it on a Mac) and this tools is amazing !

Most of the time I'm using the Party Mode but I feel very annoyed by the fact that there is no simple way to get back to previous songs using the |<< button.

Is there any solution for this ?

Does someone knows how to open a official Request For Enhancement (where ? How ?). I would be more than happy to help on this (open the case, test). Unfortunately I have no skills in software development.


- Ribero - 2010-11-27

Bump !

No one sharing this need ?


- MarkTaunton - 2010-11-27

The thing about party mode is just that, why do you want the last tracks to be remembered for?

Every party you want the same music put on? How boring would that be?

I have touchscreen specific software http://www.zenpoint.org and that does party mode, but what is more ideal is having a random song play rather than just the same boring 10 songs listened to last time.

That is a play list.


- Ribero - 2010-11-28

MarkTaunton Wrote:The thing about party mode is just that, why do you want the last tracks to be remembered for?

Every party you want the same music put on? How boring would that be?

I have touchscreen specific software http://www.zenpoint.org and that does party mode, but what is more ideal is having a random song play rather than just the same boring 10 songs listened to last time.

That is a play list.

Not each time but you start a party mode : new random mix of songs : OK
Then you want to replay a song that just has been played : you can't
You skip forward a song and by mistake forwarded two songs and want to get back to the previous one : you can't
you wan't to go back to two or x songs played previously : you can't


but the more annoying : pressing the "previous" (or skip back) button (sorry english is not my native language and I do not not how this button/function is named) just does not work as expected every where else in the program : it does not allows you to go back to the previous title in the list.

For end user having coherence in the GUI, buttons, function is something, I think, very important. So I can imaging a lot of way of why having the ability to go back to previous titles of the randomly generated list is useful but I think more than theses use case : coherence is more important.

Hope my explanation / examples are clear enough. Please fill free to ask for more explanation/details.