Author: duncan Date: Wed Nov 29 21:46:05 2006 New Revision: 8676 Modified: branches/rel-1-6/freevo/ChangeLog branches/rel-1-6/freevo/src/audio/audioitem.py
Log: [ 1605570 ] DIRECTORY_AUDIO_FORMAT_STRING not working Fix from Frank Naude applied Removed old cvs log Modified: branches/rel-1-6/freevo/ChangeLog ============================================================================== --- branches/rel-1-6/freevo/ChangeLog (original) +++ branches/rel-1-6/freevo/ChangeLog Wed Nov 29 21:46:05 2006 @@ -11,6 +11,11 @@ (F)eature requests http://sourceforge.net/tracker/?group_id=46652&atid=446898 +== Release 1.6.2 (2006-??-??) == +-------------------------------- + + * Fixed audio track name formatting (B#1605570,B#1605042) + == Release 1.6.1 (2006-11-25) == -------------------------------- Modified: branches/rel-1-6/freevo/src/audio/audioitem.py ============================================================================== --- branches/rel-1-6/freevo/src/audio/audioitem.py (original) +++ branches/rel-1-6/freevo/src/audio/audioitem.py Wed Nov 29 21:46:05 2006 @@ -8,42 +8,6 @@ # Todo: # # ----------------------------------------------------------------------- -# $Log$ -# Revision 1.57.2.2 2004/09/10 19:48:17 outlyer -# Fix sorting behaviour to respect rather than ignore TPOS tags. This is the -# expected behaviour, but was missing. Requires latest mmpython to work properly. -# -# Revision 1.57.2.1 2004/07/21 17:12:23 outlyer -# Bugfix. -# -# Revision 1.57 2004/07/17 08:18:55 dischi -# unicode fixes -# -# Revision 1.56 2004/07/10 13:36:07 outlyer -# Handle the situation where track number can't be converted into an int() -# -# Revision 1.55 2004/07/10 12:33:37 dischi -# header cleanup -# -# Revision 1.54 2004/06/25 23:11:43 outlyer -# Fix the advanced sort. Since 'trackno' is a number, but the sort is alphabetical, -# we pad the numbers with 0's to make it sort properly. Fixed my problem with -# '9' showing up at the end of the list. -# -# For some reason, it's still returning -# 01 -# 02 -# 03 -# 04 -# 05 -# 06 -# 07 -# 08 -# 9 -# 10 -# 11 -# -# ----------------------------------------------------------------------- # Freevo - A Home Theater PC framework # Copyright (C) 2002 Krister Lagerstrom, et al. # Please see the file freevo/Docs/CREDITS for a complete list of authors. @@ -62,7 +26,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# ----------------------------------------------------------------------- */ +# ----------------------------------------------------------------------- import os @@ -90,7 +54,9 @@ self.set_url(url, info=scan) if name: - self.name = name + self.name = name + else: + self.name = self.format_track() self.start = 0 self.elapsed = 0 @@ -214,7 +180,7 @@ def format_track(self): - """ Return a formatted string for use in music.py """ + """ Return a formatted string for use in item.py """ # Since we can't specify the length of the integer in the # format string (Python doesn't seem to recognize it) we # strip it out first, when we see the only thing that can be @@ -223,20 +189,20 @@ # Before we begin, make sure track is an integer - if self.track: + if self['trackno']: try: - mytrack = ('%0.2d' % int(self.track)) + mytrack = ('%0.2d' % int(self['trackno'])) except ValueError: - mytrack = None + mytrack = None else: - mytrack = None - - song_info = { 'a' : self.artist, - 'l' : self.album, + mytrack = None + + song_info = { 'a' : self['artist'], + 'l' : self['album'], 'n' : mytrack, - 't' : self.title, - 'y' : self.year, - 'f' : self.name } + 't' : self['title'], + 'y' : self['year'], + 'f' : self['name'] } if self.parent and hasattr(self.parent, 'AUDIO_FORMAT_STRING'): return self.parent.DIRECTORY_AUDIO_FORMAT_STRING % song_info ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Freevo-cvslog mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog
