-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugin: "beets-import-string"!? #3
Comments
http://beets.readthedocs.org/en/v1.3.13/reference/cli.html#list |
http://beets.readthedocs.org/en/v1.3.13/reference/query.html#date-and-date-range-queries man könnte schonmal nach "date added" filtern |
könnte vielleicht sein, aber bisher bin ich pessimistisch was die existierenden sachen angeht aaaallerdings sollte das eigentlich ein relativ simples plugin sein:
|
ich denke wenn wir die initiale config haben, würde ich mich da als erstes dransetzen sofern das nicht schon mit existierendem funktioniert |
sollte einen string im gewünschten format aller alben, die am 10.06.2015 importiert wurden, liefern. |
und den output des terminals in eine datei zu schreiben ist auch sehr simpel:
probier mal aus mit: |
wenn das so klapp -> PROFIT! |
joar, das dürfte definitiv klappen denke ich! und wird erstmal vermutlich auch reichen ;) aber ich will das letztenendes ja nicht von hand machen, dafür braucht es vermutlich ein plugin, sodass man das nach erfolgreichem import direkt angezeigt kriegt. vielleicht könnte man das so realisieren, dass nach jedem import in eine datei angehängt wird. es sei denn sie ist leer, dann legt sie den "header" ( in fernerer zukunft dann dass man an einer bestimmten stelle einfügt, bspw. nach dem ersten auftreten von auch gibt es nicht immer einen aaaber das kann man alles natürlich immernoch entwickeln! |
siehe config und dann
folgender output:
|
das |
doesnt work (yet):
|
|
all of the above - also, it didnt work if i excluded for the record, please post your output from |
try: |
didnt work, but i partially figured it out
but does not work combined yet |
powershell to the rescue! PS C:\Users\Hollberg> beet ls -af 'Musik: $albumartist - $album ($genre - $year) @ $bitrate kBit/s' 'added:2015-06-11'
Musik: Alcest - Shelter (Shoegaze - 2014) @ 320000.0 kBit/s alright, lets consider this working. i'll try to round (or similar) the bitrate, echoing e.g. dont close the issue please, since it was initially intended for a automatic solution, like e.g. a plugin |
as mentioned in #3 first try, probably can be done better by using math instead of string operations
works :) PS C:\Users\Hollberg> beet ls -af 'Musik: $albumartist - $album ($genre - $year) @ $bitrate kBit/s' 'added:2015-06-11'
Musik: Alcest - Shelter (Shoegaze - 2014) @ 320 kBit/s |
a little gimgick for powershell B-) PS C:\Users\Hollberg> beet ls -af 'Musik: $albumartist - $album ($genre - $year) @ $bitrate kBit/s' 'added:$(Get-Date -
Format yyyy-MM-dd)'
Musik: Alcest - Shelter (Shoegaze - 2014) @ 320 kBit/s sure is also possible on osx/unix-like, but i think we really should rather start a plugin, should be not too difficult i'll try it asap :) |
i just found http://beets.readthedocs.org/en/latest/reference/config.html#format-album which we could set to e.g. untested yet, though |
for the future: implement |
is it useful to implement some code that defines
although not strictly correct, this may be a simple solution. |
sounds like a good first start although we had cases in the past where the bit rate was e.g. 192 VBR, 256 VBR even 320 VBR, which would not be accurate by this check. but its a good start for most cases and those i named will be probably only detectable through file properties oooor, just thought of it, add a check to the inital calculation for the bitrate probalby not working code album_fields:
bitrate: |
total = 0
temp = items
firstBitrate = next(temp).bitrate
vbr = 0
for item in items:
total += item.bitrate
if item.bitrate != firstBitrate
vbr = 1
bitrate = total / len(items)
bitratestring = str(bitrate)[:3]
if vbr
bitratestring += ' VBR'
return also, the best way would probalby be to open an issue at beets, asking for a field for the items or, create our own field by somehow reading file properties |
just started https://github.com/Schweinepriester/beets-printimport - a first version is working already (without bitrate though) maybe we can have our "custom string" as entry for |
No description provided.
The text was updated successfully, but these errors were encountered: