home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Area 51 - Testing Area
Last.FM Rework and Auto DJ mode
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="jameson_uk" data-source="post: 973438" data-attributes="member: 11220"><p>I removed the logging yes but this should not make any difference to adding tracks. Odd thing is that log message shows that it is attempting to add five tracks and that means there are five to add I am struggling to see why nothing gets added <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite5" alt=":confused:" title="Confused :confused:" loading="lazy" data-shortname=":confused:" /></p><p>[code=c#] Log.Info("Auto DJ: Matched {0} local songs. Attempting to add {1} tracks", dbTracks.Count, numTracksToAdd);</p><p> </p><p> for (var i = 0; i < numTracksToAdd; i++)</p><p> {</p><p> var maxSize = Math.Min(dbTracks.Count, _randomness);</p><p> var trackNo = Randomizer.Next(0, maxSize);</p><p> pl.Add(dbTracks[trackNo].ToPlayListItem());</p><p> Log.Info("Auto DJ: Added to playlist: {0} - {1}", dbTracks[trackNo].Artist, dbTracks[trackNo].Title);</p><p> dbTracks.RemoveAt(trackNo); // remove song after adding to playlist to prevent the same sone being added twice</p><p> }[/code]</p><p> </p><p>Will do some more digging...</p></blockquote><p></p>
[QUOTE="jameson_uk, post: 973438, member: 11220"] I removed the logging yes but this should not make any difference to adding tracks. Odd thing is that log message shows that it is attempting to add five tracks and that means there are five to add I am struggling to see why nothing gets added :confused: [code=c#] Log.Info("Auto DJ: Matched {0} local songs. Attempting to add {1} tracks", dbTracks.Count, numTracksToAdd); for (var i = 0; i < numTracksToAdd; i++) { var maxSize = Math.Min(dbTracks.Count, _randomness); var trackNo = Randomizer.Next(0, maxSize); pl.Add(dbTracks[trackNo].ToPlayListItem()); Log.Info("Auto DJ: Added to playlist: {0} - {1}", dbTracks[trackNo].Artist, dbTracks[trackNo].Title); dbTracks.RemoveAt(trackNo); // remove song after adding to playlist to prevent the same sone being added twice }[/code] Will do some more digging... [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Area 51 - Testing Area
Last.FM Rework and Auto DJ mode
Contact us
RSS
Top
Bottom