1
0
Fork 0

Fixing zero length tracks

This commit is contained in:
magnolia-fan 2011-10-05 15:27:45 +04:00
parent 0071d476ae
commit 1cdf75281e
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
class Album < ActiveRecord::Base
belongs_to :artist
has_many :tracks, :conditions => ['length > 0'], :order => 'bonus ASC, position ASC', :dependent => :destroy
has_many :tracks, :conditions => ['position > 0'], :order => 'bonus ASC, position ASC', :dependent => :destroy
has_many :album_formats
has_many :release_formats, :through => :album_formats

View File

@ -28,5 +28,5 @@
%tr
%td.song-title= track[:name]
%td.song-duration
.s-duration= track[:duration]
.s-duration= (track[:duration] unless track[:duration] == '0:00')
.s-add{ :data_id => track[:id] }= I18n.t 'player.add_one'