Bug 5712 - Advanced search for an exact duration doesn't find all occurances
: Advanced search for an exact duration doesn't find all occurances
Status: NEW
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 7.0
: PC Windows XP
: P2 trivial (vote)
: Future
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-07 15:37 UTC by Philip Meyer
Modified: 2008-07-31 12:16 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Meyer 2007-10-07 15:37:57 UTC
I searched for all tracks less than 30 seconds, and looked at the details for one track, which was 29 seconds long.  I then searched for tracks that had a duration of 29 seconds, and found that the song from the previous search was not included in the results (other tracks were).
Comment 1 KDF 2007-10-07 17:31:19 UTC
how about an arbitrary duration, does equals x always fail?
Comment 2 KDF 2007-10-07 23:46:45 UTC
I tried this out with a couple tracks that I have at 28 seconds.  both are found.  for comparison, here is the output of database.sql in the log:

[23:41:44.7500] Slim::Schema::Debug::query_start (26) SELECT COUNT( * ) FROM tracks me LEFT JOIN contributor_track contributorTracks ON ( contributorTracks.track = me.id ) WHERE ( ( ( contributorTracks.role = ? ) OR ( contributorTracks.role = ? ) ) AND secs = ? ): '1', '5', '28'
[23:41:44.8722] Slim::Schema::Debug::query_start (26) SELECT me.id, me.url, me.content_type, me.title, me.titlesort, me.titlesearch, me.album, me.tracknum, me.timestamp, me.filesize, me.disc, me.remote, me.audio, me.audio_size, me.audio_offset, me.year, me.secs, me.cover, me.vbr_scale, me.bitrate, me.samplerate, me.samplesize, me.channels, me.block_alignment, me.endian, me.bpm, me.tagversion, me.drm, me.musicmagic_mixable, me.musicbrainz_id, me.playcount, me.lastplayed, me.lossless, me.lyrics, me.rating, me.replay_gain, me.replay_peak FROM tracks me LEFT JOIN contributor_track contributorTracks ON ( contributorTracks.track = me.id ) WHERE ( ( ( contributorTracks.role = ? ) OR ( contributorTracks.role = ? ) ) AND secs = ? ) ORDER BY me.disc, me.titlesort: '1', '5', '28'

Comment 3 Philip Meyer 2007-10-08 16:18:09 UTC
I tried a few other exact equality durations.  eg. I found a track that was 00:07 seconds (reported on song info page), and tried an exact equality search for 7 seconds duration.  This didn't find the track.  Nor did =6 seconds or =8 seconds, so it isn't rounding down or up.

I tried to see the actual duration in various music tagging apps.  Most round up or down to the nearest second, but DBPowerAmp explorer shell properties report this duration as 7.7 seconds.

me.secs column is a float, but it is being passed an integer value.  me.secs should be rounded to nearest second (in the same way as the info page must be rounding it)?
Comment 4 Andy Grundman 2007-11-21 09:40:33 UTC
I will look at this.