Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
3d697ce4
Kaydet (Commit)
3d697ce4
authored
Şub 01, 1995
tarafından
Sjoerd Mullender
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Support for album.notes and trackN.artist via notes and trackartist
instance variables.
üst
d09b41bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
cddb.py
Lib/irix5/cddb.py
+11
-2
cddb.py
Lib/plat-irix5/cddb.py
+11
-2
No files found.
Lib/irix5/cddb.py
Dosyayı görüntüle @
3d697ce4
...
...
@@ -77,10 +77,12 @@ class Cddb:
self
.
artist
=
''
self
.
title
=
''
self
.
track
=
[
None
]
+
[
''
]
*
ntracks
self
.
trackartist
=
[
None
]
+
[
''
]
*
ntracks
self
.
notes
=
[]
if
not
hasattr
(
self
,
'file'
):
return
import
regex
reg
=
regex
.
compile
(
'^
\\
([^.]*
\\
)
\\
.
\\
([^:]*
\\
):
\t
\\
(.*
\\
)'
)
reg
=
regex
.
compile
(
'^
\\
([^.]*
\\
)
\\
.
\\
([^:]*
\\
):
[
\t
]+
\\
(.*
\\
)'
)
while
1
:
line
=
f
.
readline
()
if
not
line
:
...
...
@@ -101,6 +103,8 @@ class Cddb:
self
.
toc
=
value
if
self
.
toc
!=
value
:
print
'toc
\'
s don
\'
t match'
elif
name2
==
'notes'
:
self
.
notes
.
append
(
value
)
elif
name1
[:
5
]
==
'track'
:
try
:
trackno
=
string
.
atoi
(
name1
[
5
:])
...
...
@@ -112,7 +116,10 @@ class Cddb:
' in file '
+
file
+
\
' out of range'
continue
self
.
track
[
trackno
]
=
value
if
name2
==
'title'
:
self
.
track
[
trackno
]
=
value
elif
name2
==
'artist'
:
self
.
trackartist
[
trackno
]
=
value
f
.
close
()
for
i
in
range
(
2
,
len
(
self
.
track
)):
track
=
self
.
track
[
i
]
...
...
@@ -181,6 +188,8 @@ class Cddb:
f
.
write
(
'album.title:
\t
'
+
self
.
title
+
'
\n
'
)
f
.
write
(
'album.artist:
\t
'
+
self
.
artist
+
'
\n
'
)
f
.
write
(
'album.toc:
\t
'
+
self
.
toc
+
'
\n
'
)
for
note
in
self
.
notes
:
f
.
write
(
'album.notes:
\t
'
+
note
+
'
\n
'
)
prevpref
=
None
for
i
in
range
(
1
,
len
(
self
.
track
)):
track
=
self
.
track
[
i
]
...
...
Lib/plat-irix5/cddb.py
Dosyayı görüntüle @
3d697ce4
...
...
@@ -77,10 +77,12 @@ class Cddb:
self
.
artist
=
''
self
.
title
=
''
self
.
track
=
[
None
]
+
[
''
]
*
ntracks
self
.
trackartist
=
[
None
]
+
[
''
]
*
ntracks
self
.
notes
=
[]
if
not
hasattr
(
self
,
'file'
):
return
import
regex
reg
=
regex
.
compile
(
'^
\\
([^.]*
\\
)
\\
.
\\
([^:]*
\\
):
\t
\\
(.*
\\
)'
)
reg
=
regex
.
compile
(
'^
\\
([^.]*
\\
)
\\
.
\\
([^:]*
\\
):
[
\t
]+
\\
(.*
\\
)'
)
while
1
:
line
=
f
.
readline
()
if
not
line
:
...
...
@@ -101,6 +103,8 @@ class Cddb:
self
.
toc
=
value
if
self
.
toc
!=
value
:
print
'toc
\'
s don
\'
t match'
elif
name2
==
'notes'
:
self
.
notes
.
append
(
value
)
elif
name1
[:
5
]
==
'track'
:
try
:
trackno
=
string
.
atoi
(
name1
[
5
:])
...
...
@@ -112,7 +116,10 @@ class Cddb:
' in file '
+
file
+
\
' out of range'
continue
self
.
track
[
trackno
]
=
value
if
name2
==
'title'
:
self
.
track
[
trackno
]
=
value
elif
name2
==
'artist'
:
self
.
trackartist
[
trackno
]
=
value
f
.
close
()
for
i
in
range
(
2
,
len
(
self
.
track
)):
track
=
self
.
track
[
i
]
...
...
@@ -181,6 +188,8 @@ class Cddb:
f
.
write
(
'album.title:
\t
'
+
self
.
title
+
'
\n
'
)
f
.
write
(
'album.artist:
\t
'
+
self
.
artist
+
'
\n
'
)
f
.
write
(
'album.toc:
\t
'
+
self
.
toc
+
'
\n
'
)
for
note
in
self
.
notes
:
f
.
write
(
'album.notes:
\t
'
+
note
+
'
\n
'
)
prevpref
=
None
for
i
in
range
(
1
,
len
(
self
.
track
)):
track
=
self
.
track
[
i
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment