You are not logged in.

#76 2012-01-24 20:56:24

rejoin
Member
Registered: 2011-06-06
Posts: 43

Re: Albumbler - A psychic playlist generator

I've been using albumbler for the past 6 months and it's great! Unfortunately, today I've stumbled upon a problem. First of all i have no idea how to clean my db, because I scanned my /. And second of all I get this error after upgrading to mpd-git

error adding <something here>: Not found 

PS: Reverted back to mpd from the repositories, the problem persists.
PS2: Never mind. I deleted ~/.local/share/albumbler/albumbler.pickle, ran albumbler sync and everything is back to normal! smile

Last edited by rejoin (2012-01-24 21:19:35)

Offline

#77 2012-01-24 23:30:34

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

Sadly that means it has forgotten the past 6 months of training.  For future reference, here is a python2 snippet that will nuke the cached paths while preserving the skip history.

import cPickle as pickle
cache="~/.local/share/albumbler/albumbler.pickle"
paths, skips = pickle.load(open(cache, 'rb'))
pickle.dump(([], skips), open(cache, 'wb'), -1)

Offline

#78 2012-08-03 12:14:25

ldolse
Member
Registered: 2012-01-18
Posts: 7

Re: Albumbler - A psychic playlist generator

I just ran into a different sort of situation which I believe killed all my training.  I was doing some housekeeping and moved my music share to a different server.  As a side effect the root music directory became deeper by one level.  I updated albumbler's config after moving the directory, but then discovered that all of Albumbler's cached paths are full paths. Because of this I'm pretty sure my next sync threw out all my training and created brand new set of paths with no skip data.  Storing cached paths so that they're relative to the configured music root rather than storing absolute paths would avoid this.

Offline

#79 2012-08-03 13:35:08

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

> I'm pretty sure my next sync threw out all my training

Yes and no.  All of the training is still there (nothing is ever deleted) but you are correct that it won't be found.  It is certainly fixable.  Let me see what I can do.

Offline

#80 2012-08-03 16:30:59

ldolse
Member
Registered: 2012-01-18
Posts: 7

Re: Albumbler - A psychic playlist generator

Thanks, good to know the data is still there.  I'm stuck with the directory change as the new server is limited to sharing by volume vs. directory.  I'm happy to use a snippet along the lines of what you posted above to fix my current situation, but using relative paths in general probably makes sense as a long term fix, as I can potentially see myself (and other users) using albumbler for many years, and housekeeping changes like this one are pretty likely to occur at some point.

Offline

#81 2012-08-03 17:52:00

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

And feature added! Please try the git version.

Just do an
albumbler relative sync
and everything should carry over.

Note that 'relative' is a mildly destructive operation.  It will remove the base paths from everything, including your training history.

I wrote it this way because your problem is congruent to a minor hassle that has been bothering me.  Basically, if you have the same music in two places, such as a network share (at home) and a mounted mp3 player (on the go), all the information is duplicated and Albumbler can't share information between the two.  With relative paths it can, so two features with one stone.  Side note: if you have multiple paths like this, place the highest quality paths first in your config file.

Before doing the relative sync, take a look at your cache with
albumbler dump | less
and then back up the ~/.local/share/albumbler/albumbler.pickle file.  Do the relative sync and then dump the cache again to see how it has changed.

Offline

#82 2012-08-04 04:05:41

ldolse
Member
Registered: 2012-01-18
Posts: 7

Re: Albumbler - A psychic playlist generator

Wow, that was fast, glad it had some overlap with the other issue. It might take me a bit longer to test it, have a bit of other housekeeping to do with my linux install.  I took a quick glance at the code, couple of questions:
- do I need to worry about whether I remember to use a trailing slash in the configuration?
- will relative sync will be required for all future sync actions, or just this first one?
- Will the hard sync option that's been added delete cached paths that no longer exist?

Offline

#83 2012-08-04 11:13:25

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

Trailing slash is optional in the config.

You'd have to continue to use relative sync in the future.  If you forgot and use normal sync, nothing bad will happen.  What does happen will go away on the next relative sync.

Regarding hard sync, you are correct.  The deleted paths will however remain in your training history.

Offline

#84 2012-08-06 01:40:50

ldolse
Member
Registered: 2012-01-18
Posts: 7

Re: Albumbler - A psychic playlist generator

Ok, I gave this a shot and diff'ed the two files.  In terms of converting the present-day paths to relative paths, it did do this.  But all of the 'old' directories are still there in an absolute form, and 'albumbler best' still lists the old directories, which makes me suspect the training still isn't pointing to the right place.

Maybe relative vs. absolute sync can be a config option vs. expecting the user to remember each time?  Perhaps make the new default setting relative (by writing it to the configuration file), but for backward compatibility with existing installations continue to use absolute - you could check as to whether a config item exists, and unconfigured would be absolute.

Offline

#85 2012-08-09 21:41:20

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

I'm going to guess it did not remove the paths because you had already removed the old prefix from your music_paths list.  Put that back in, temporarily, for the relative sync.  It can not remove a prefix if it can not identify it.

Offline

#86 2012-10-24 01:42:16

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: Albumbler - A psychic playlist generator

Hi again

it seems that for certian artist, albumbler adds all of the albums into the playlist (using mpd).

IE here is a short output of the 'best' albums':

/home/zeltak/Zmusic/Y/Yes/Relayer
/home/zeltak/Zmusic/W/Who/Tommy
/home/zeltak/Zmusic/T/The New Pornographers/Mass Romantic
/home/zeltak/Zmusic/R/Rolling stones/Hot Rocks
/home/zeltak/Zmusic/R/Randy Newman/12 Songs
/home/zeltak/Zmusic/P/Porcupine Tree/ Up The Downstair 
/home/zeltak/Zmusic/P/Porcupine Tree/ Insignificance
/home/zeltak/Zmusic/P/Pink Floyd/A Momentary Lapse of Reason
/home/zeltak/Zmusic/P/Pernice Brothers/Live a Little
/home/zeltak/Zmusic/O/Orphand land
/home/zeltak/Zmusic/M/Muse/The Resistance
/home/zeltak/Zmusic/M/Metallica/Load
/home/zeltak/Zmusic/J/Jethro Tull/Catfish Rising
/home/zeltak/Zmusic/G/Gentle Giant/Acquiring The Taste
/home/zeltak/Zmusic/C/Crosby & Nash/wind on the water
/home/zeltak/Zmusic/C/Cranberries/Stars (The Best of 1992-2002)
/home/zeltak/Zmusic/B/Billy Joel/Piano man
/home/zeltak/Zmusic/B/Beach Boys/20-20
/home/zeltak/Zmusic/W/Weezer/Hurley/00-weezer-hurley_(deluxe_edition)-2010.m3u
/home/zeltak/Zmusic/S/Stevie Wonder/1980 - Hotter Than July
/home/zeltak/Zmusic/S/Sparks/1974 - Propaganda
/home/zeltak/Zmusic/R/Red Hot Chili Peppers/Californication
/home/zeltak/Zmusic/N/No Doubt/Z-Hits
/home/zeltak/Zmusic/N/Neil Young

Note above that in the cases of 'neil young' and 'orphandland' it added the whole discography (even thoght thier albums are in Exactly the sane file structure as all other artist/albums).
does this mean that when i move on with these albums all of the artists albums would be in the worse section? is there any fix to that?

thx alot

Z

Last edited by zeltak (2012-10-24 01:42:47)

Offline

#87 2022-09-28 12:57:17

parakovsky
Member
Registered: 2018-08-12
Posts: 3

Re: Albumbler - A psychic playlist generator

this script is pure money in the bank, took me awhile to kill all the m3u noise that never worked and did a relative sync thing and then dump back the database, but even if it didn't learn anything and i fail at least i configured it the way i wanted it. wish the auther a thousand lifes of happiness, he did amazing job.

Offline

Board footer

Powered by FluxBB