The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
润良 马 <billno... @gmail.com>
Date: Sun, 2 Aug 2009 03:37:17 -0700 (PDT)
Local: Sun, Aug 2 2009 6:37 am
Subject: Exaile-cn开发小组
这个主要用来记录一些开发动态和相关的信息,其实目前看来用途还不算特别的大,因为我的开发速度、时间、精力、能力实在有限,这个项目也是只有
我一个人知道,基本等于无人问津……
不管怎么样,希望这个项目以后能够做好、做大,给中国Linuxer提供一个好的播放器,从而增加Linux在中国的普及程度!
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
润良 马 <billno... @gmail.com>
Date: Sun, 2 Aug 2009 05:36:13 -0700 (PDT)
Local: Sun, Aug 2 2009 8:36 am
Subject: Re: Exaile-cn开发小组
这个帖子可以用来专门写一些动态......现在微博客比较靠不住,干脆用这个
On 8月2日, 下午6时37分, 润良 马 <billno... @gmail.com> wrote:
> 这个主要用来记录一些开发动态和相关的信息,其实目前看来用途还不算特别的大,因为我的开发速度、时间、精力、能力实在有限,这个项目也是只有 > 我一个人知道,基本等于无人问津...... > 不管怎么样,希望这个项目以后能够做好、做大,给中国Linuxer提供一个好的播放器,从而增加Linux在中国的普及程度!
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
润良 马 <billno... @gmail.com>
Date: Sun, 2 Aug 2009 05:38:03 -0700 (PDT)
Local: Sun, Aug 2 2009 8:38 am
Subject: Re: Exaile-cn开发小组
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Mon, 3 Aug 2009 01:37:22 -0700 (PDT)
Local: Mon, Aug 3 2009 4:37 am
Subject: Re: Exaile-cn开发小组
今天没怎么写这玩意,说一下下一步的计划:
1.用glade做一个显示歌词的界面,需要有4-5行,其中突出显示一行,作为同步使用,这个是字体方面的功夫,具体要用的,应该是
pango.FontDescription()这个东西和textView.modify_font()
2.还要做一个歌词选择的界面,当初先多个歌词时,用来选择(现在默认是选择一个)……这个应该不难实现
3.存储歌词的功能,就是一个保存吧,从最简单的直接保存做起就可以了
4.安装功能,目前这个先不考虑,具体的安装功能,实际上现在看来,就是将歌词插件拷贝到插件目录下,让exaile支持中文……
5.错误处理,有很多的try,expect没有写,这是个大问题,主要是我不太会使用这个……以后再写的时候,工作量会很大,现在写又没有精力……苦
恼啊
详细的说一下计划1: 界面上要有五行歌词,自动载入(当没有歌词时,可以直接弹出一个框显示没有歌词……)一行结束换一行,其中一行的字体设置与别的不同,使得这一 行可以突出显示,作为当前行,所以要有一个时间工具,不断的获取播放的歌词的时间,用来同步歌词 On 8月2日, 下午8时38分, 润良 马 <billno... @gmail.com> wrote:
> 不过感觉google的论坛反应速度严重值得怀疑
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Mon, 3 Aug 2009 01:38:23 -0700 (PDT)
Local: Mon, Aug 3 2009 4:38 am
Subject: Re: Exaile-cn开发小组
实在不行就把现在的成果发出去,找别人做……不过还是有点舍不得,不到最后一个,不用这个计划!
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Mon, 3 Aug 2009 01:40:36 -0700 (PDT)
Local: Mon, Aug 3 2009 4:40 am
Subject: Re: Exaile-cn开发小组
知识不足,还得回去看python tutorial……,另外还有一个顾虑,就是一旦exaile到3,那么2的很多东西的可能被改掉,这个可能会很
恐怖!
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Mon, 3 Aug 2009 07:53:58 -0700 (PDT)
Local: Mon, Aug 3 2009 10:53 am
Subject: Re: Exaile-cn开发小组
一点对lrc文件的成果,主要就是使用正则表达式,抓出所有的时间来……之前看了些代码跟lrc文件,发现并不是所有的lrc都是一行一个时间的,例如
我去2000年里面,就是一行有两个时间,这个据我猜测,应该是那种repeat……,用findall()列举所有的时间
[04:20.00][01:57.00]泥锅泥碗你滚蛋
[04:20.00][01:57.00]sdfsdga
bill@bill-desktop:~$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re >>> part = r'\[[0-9]+:[0-9]+\.[0-9]+\]' >>> parOb = re.compile(part) >>> m = parOb.findall('[04:20.00][01:57.00]sdfsdga') >>> m
['[04:20.00]', '[01:57.00]']
>>> m = parOb.match('[04:20.00]') >>> m
<_sre.SRE_Match object at 0xb7d5e218>
>>> m.group() '[04:20.00]' >>> m.group(0) '[04:20.00]' >>> m.span() (0, 10) >>> part = r'\[[0-9]+:[0-9]+\.[0-9]+\]' >>> part = r"^\[[0-9][0-9][:.][0-5][0-9][:.][0-9][0-9]\]" >>> parOb = re.compile(part) >>> m = parOb.findall('[04:20.00][01:57.00]sdfsdga') >>> m ['[04:20.00]'] >>> part = r"\[[0-9][0-9][:.][0-5][0-9][:.][0-9][0-9]\]" >>> m = parOb.findall('[04:20.00][01:57.00]sdfsdga') >>> m ['[04:20.00]'] >>> parOb = re.compile(part) >>> m = parOb.findall('[04:20.00][01:57.00]sdfsdga') >>> m
['[04:20.00]', '[01:57.00]']
下一步,应该继续用正则表达式,抓出时间来,然后加起来,得出毫秒的时间(因为ms记得exaile里面的时间都是毫秒的)
稍候,再写这段
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Wed, 5 Aug 2009 00:12:29 -0700 (PDT)
Local: Wed, Aug 5 2009 3:12 am
Subject: Re: Exaile-cn开发小组
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Wed, 5 Aug 2009 00:29:19 -0700 (PDT)
Local: Wed, Aug 5 2009 3:29 am
Subject: Re: Exaile-cn开发小组
exaile3 乱码的处理,刚刚看了一下exaile3的代码,基本上跟2一样,但是结构更加清晰了,很好!
乱码的处理,跟2一样
def _get_tag(self, raw, t):
if not raw.tags: return []
if t not in self.tag_mapping.itervalues():
t = "TXXX:" + t
field = raw.tags.getall(t)
if len(field) <= 0:
return []
ret = []
if t == 'TDRC' or t == 'TDOR': # values are ID3TimeStamps
for value in field:
ret.extend([unicode(x.encode('iso-8859-1').decode
('gb2312')) for x in value.text])
elif t == 'USLT': # Lyrics are stored in plain old strings
for value in field:
ret.append(unicode(value.text.encode
('iso-8859-1').decode('gb2312')))
elif t == 'WOAR': # URLS are stored in url not text
for value in field:
ret.extend([unicode(x.replace('\n','').replace
('\r','').encode('iso-8859-1').decode('gb2312')) \
for x in value.url])
else:
for value in field:
try:
ret.extend([unicode(x.replace('\n','').replace
('\r','').encode('iso-8859-1').decode('gb2312')) \
for x in value.text])
except:
logger.warning("Can't parse ID3 field")
common.log_exception(logger)
return ret
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Wed, 5 Aug 2009 00:35:26 -0700 (PDT)
Local: Wed, Aug 5 2009 3:35 am
Subject: Re: Exaile-cn开发小组
值得称赞的,在exaile3中,对id3 tags的读取的操作是通过一个统一的文件进行的,这样就方便了许多
exaile2中是把不同的文件类型的音乐用不同的文件操作的,这样比较混乱!哈哈,2to3,进步不小
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Wed, 5 Aug 2009 01:55:45 -0700 (PDT)
Local: Wed, Aug 5 2009 4:55 am
Subject: Re: Exaile-cn开发小组
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Wed, 5 Aug 2009 02:03:20 -0700 (PDT)
Local: Wed, Aug 5 2009 5:03 am
Subject: Re: Exaile-cn开发小组
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Bill Ma <billno... @gmail.com>
Date: Wed, 05 Aug 2009 17:20:53 +0800
Local: Wed, Aug 5 2009 5:20 am
Subject: Re: Exaile-cn开发小组
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Bill Ma <billno... @gmail.com>
Date: Thu, 06 Aug 2009 18:59:11 +0800
Local: Thurs, Aug 6 2009 6:59 am
Subject: Re: Exaile-cn开发小组
不知道该做什么了……有点晕,这几天都没有什么动作,有点消极怠工……
想把这个项目送出去,可是还是觉得有点拿不出手……
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Bill Ma <billno... @gmail.com>
Date: Thu, 06 Aug 2009 20:57:34 +0800
Local: Thurs, Aug 6 2009 8:57 am
Subject: Re: Exaile-cn开发小组
开始收集一些有用的数据
xl.event.add_callback(self.progress_update, 'progress_update', thread)
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Thu, 6 Aug 2009 05:59:22 -0700 (PDT)
Local: Thurs, Aug 6 2009 8:59 am
Subject: Re: Exaile-cn开发小组
exaile-devel还很不完整,很多的功能都还没有……真的很无奈……
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Bill Ma <billno... @gmail.com>
Date: Fri, 07 Aug 2009 22:05:55 +0800
Local: Fri, Aug 7 2009 10:05 am
Subject: Re: Exaile-cn开发小组
在xlmisc中有这个类,ms很好使,是用来构造时间器的
class MiscTimer(object):
"""
Creates a timer that executes a function
"""
def __init__(self, func, time, runonce=False):
"""
Expects the function to call. If runonce is True, the
timer only runs one time
"""
self.func = func
self.time = time
self.runonce = runonce
self.connect_id = None
def start(self): """ Starts the timer """ self.connect_id = gobject.timeout_add(self.time, self.notify)
def stop(self): """ Stops the timer """ if not self.connect_id: return gobject.source_remove(self.connect_id) self.connect_id = None
def notify(self): """ Called when the timer time has elapsed """ self.func() if self.runonce: return False else: return True gui.main中有使用self.timer = xlmisc.MiscTimer(self.timer_update, 1000) def timer_update(self, event=None): """ Fired every half second. Updates the seeker position, the "now playing" title, and submits the track to last.fm when appropriate """ status_text = "" track_count = len(self.songs)
if track_count: #TRANSLATORS: Number of tracks in the playlist status_text += _("%d showing") % track_count
total_time = self.songs.get_total_length() if total_time: status_text += " (" + total_time + ")"
status_text += ", "
#TRANSLATORS: Number of tracks in the collection status_text += _("%d in collection") % len(self.all_songs) self.status.set_track_count(status_text)
track = self.player.current
self.rewind_track += 1
if track is None: return True duration = track.duration
# update the progress bar/label value = self.player.get_current_position() if duration == -1: real = 0 else: real = value * duration / 100 seconds = real
if not self.seeking and not self.player.is_paused(): self.new_progressbar = self.xml.get_widget('new_progressbar') fraction = value / 100 if fraction > 1: fraction = 1 self.new_progressbar.set_fraction(fraction)
if track.type == 'stream': if track.start_time and self.player.is_playing(): seconds = time.time() - track.start_time self.new_progressbar.set_text("%d:%02d" % # TODO: i18n (seconds // 60, seconds % 60))
else: remaining_seconds = duration - seconds self.new_progressbar.set_text("%d:%02d / %d:%02d" % # TODO: i18n (seconds // 60, seconds % 60, remaining_seconds // 60, remaining_seconds % 60))
if not self.player.is_paused(): self.submit_time_played += 1
self.emit('timer_update')
return True
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Bill Ma <billno... @gmail.com>
Date: Fri, 07 Aug 2009 22:06:56 +0800
Local: Fri, Aug 7 2009 10:06 am
Subject: Re: Exaile-cn开发小组
很好,可以通过gobject.add_timeout来不断获得播放的时间已经成功了,下一
步,是对歌词文件的进一步分析……
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Bill Ma <billno... @gmail.com>
Date: Sat, 08 Aug 2009 14:10:35 +0800
Local: Sat, Aug 8 2009 2:10 am
Subject: Re: Exaile-cn开发小组
更新了Google Code,现在的这个plugin适用于exaile 2,可以在终端同步显示歌
词了
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Fri, 7 Aug 2009 23:53:00 -0700 (PDT)
Subject: Re: Exaile-cn开发小组
下一步该写一个歌词显示的界面了,天,最讨厌的东西最终还是来了
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Bill Ma <billno... @gmail.com>
Date: Mon, 10 Aug 2009 16:23:52 +0800
Local: Mon, Aug 10 2009 4:23 am
Subject: Re: Exaile-cn开发小组
实现同步显示歌词的功能,已知Bug:在调整进度条后,歌词显示不能及时跟进
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Tue, 11 Aug 2009 07:32:47 -0700 (PDT)
Local: Tues, Aug 11 2009 10:32 am
Subject: Re: Exaile-cn开发小组
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Tue, 11 Aug 2009 07:34:54 -0700 (PDT)
Local: Tues, Aug 11 2009 10:34 am
Subject: Re: Exaile-cn开发小组
在GUI上做了很多工作……这样一来,以后的行动就比较有计划性了,不错……
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Bill Ma <billno... @gmail.com>
Date: Wed, 12 Aug 2009 17:47:04 +0800
Local: Wed, Aug 12 2009 5:47 am
Subject: Re: Exaile-cn开发小组
真个的插件已经完成了很多内容,下一步想停下来,整理一下代码,因为发现代码
太乱了,在设计的开始并没有考虑到一些使用中与exaile配合的实际问题,再往下
做很困难了,需要不停的改……所以还不如停下来整理一下,看了一些别人写的插件
的代码,知道该怎么与exaile配合了
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
BillMa <billno... @gmail.com>
Date: Thu, 13 Aug 2009 06:11:57 -0700 (PDT)
Local: Thurs, Aug 13 2009 9:11 am
Subject: Re: Exaile-cn开发小组
整理工作暂时到此为止,现在基本上大部分功能都已经实现了,只剩下三个要做的功能:字体选择、手动搜索、对手动调整时间的反应(这个问题最重要,不太好
解决,主要是不想使代码太复杂)
歌词插件一直是尽量减少对CPU的使用,从而增大反应速度的所以,不想让它太大了
下一步想增加一些Mp3文件改名功能(这个在千千静听里也有)
You must
Sign in before you can post messages.
You do not have the permission required to post.