pythonでfoobarのalternativeを作る 26 version 4
hogpkayer todo # prog2
hoge
## 連続演奏
- 演奏フラグを立てるのはこれでイケるかな
QStandardItemModel.setItem (self, int row, int column, QStandardItem item)
▶
## ドラッグ
- ドロップされた tree のアイテムから情報を得る
親がいるか、None なら pass
子供がいるかどうか
bool QStandardItem.hasChildren (self)
Returns true if this item has any children; otherwise returns false.
子供の数
QStandardItem.rowCount (self)
Returns the number of child item rows that the item has.
子供の取得
QStandardItem QStandardItem.child (self, int row, int column = 0)
Returns the child item at (row, column) if one has been set; otherwise returns 0.
- 子供がいない
まずアルバム(parent)を取得して挿入、カラムスパン
既に挿入済みなら挿入しないーー>上のアイテムのパスを確認して無ければアルバム、それが一致したらpass
アイテムはタイトルなので、タイトルとパスを挿入
------------------------
プレイリストに表示するタグ情報をvlcからもらうかmutagenで取得するか
速いほうにするか、計測する?
vlcに頼らないで別にしておいた方が後々良い?
再生モジュールは変わる可能性もあるからmutagenにするか
watcdog で変更があったら更新したい、mutagenにしておいた方が軽そう
いずれにしてもタグ取得クラスを別ファイルにしよう、まずはmutagen
タグビュー用とプレイリスト用
- mutagenのアート読み込み
from mutagen import File
file = File("some.mp3") # mutagen can automatically detect format and type of tags
artwork = file.tags["APIC:"].data # access APIC frame and grab the image
with open("image.jpg", "wb") as img:
img.write(artwork) # write artwork to new image
- クラス * watcdog から変更情報があれば呼ばれる予定
・def settagview (self, path,list,panel) <--- from tree, playlist
リストへの文字列設定、パネルへの画像表示
・def artistalbum( self , path ) <--- playlist
プレイリストのアルバム行作成して返す
・def items( self , path )
プレイリストに設定するアイテムをリストで返す
連続演奏
- 演奏フラグを立てるのはこれでイケるかな
QStandardItemModel.setItem (self, int row, int column, QStandardItem item)
▶
ドラッグ
- ドロップされた tree のアイテムから情報を得る
親がいるか、None なら pass
子供がいるかどうか
bool QStandardItem.hasChildren (self)
Returns true if this item has any children; otherwise returns false.
子供の数
QStandardItem.rowCount (self)
Returns the number of child item rows that the item has.
子供の取得
QStandardItem QStandardItem.child (self, int row, int column = 0)
Returns the child item at (row, column) if one has been set; otherwise returns 0.
- 子供がいない
まずアルバム(parent)を取得して挿入、カラムスパン
既に挿入済みなら挿入しないーー>上のアイテムのパスを確認して無ければアルバム、それが一致したらpass
アイテムはタイトルなので、タイトルとパスを挿入
プレイリストに表示するタグ情報をvlcからもらうかmutagenで取得するか
速いほうにするか、計測する?
vlcに頼らないで別にしておいた方が後々良い?
再生モジュールは変わる可能性もあるからmutagenにするか
watcdog で変更があったら更新したい、mutagenにしておいた方が軽そう
いずれにしてもタグ取得クラスを別ファイルにしよう、まずはmutagen
タグビュー用とプレイリスト用
-
mutagenのアート読み込み
from mutagen import File
file = File("some.mp3") # mutagen can automatically detect format and type of tags
artwork = file.tags["APIC:"].data # access APIC frame and grab the image
with open("image.jpg", "wb") as img:
img.write(artwork) # write artwork to new image -
クラス * watcdog から変更情報があれば呼ばれる予定
・def settagview (self, path,list,panel) <--- from tree, playlist
リストへの文字列設定、パネルへの画像表示
・def artistalbum( self , path ) <--- playlist
プレイリストのアルバム行作成して返す
・def items( self , path )
プレイリストに設定するアイテムをリストで返す