mopidy / mopidy-local-sqlite

DEPRECATED (Mopidy SQLite local library extension)
https://mopidy.com
Apache License 2.0
30 stars 10 forks source link

Stop using Mopidy internal APIs #59

Closed tkem closed 9 years ago

tkem commented 9 years ago

See mopidy/mopidy#1173

jodal commented 9 years ago

And mopidy/mopidy#1174 for replacements for most of what you use.

tkem commented 9 years ago

AFAICS, the only thing missing us mopidy.utils.path.get_or_create_dir. IIRC, there was discussion about adding functionality for extensions to create "private" data directories, but I'm not sure about the status of this

tkem commented 9 years ago

Used in https://github.com/tkem/mopidy-local-sqlite/blob/master/mopidy_local_sqlite/__init__.py#L48

tkem commented 9 years ago

However, I guess thisd can simply be reverted to https://github.com/tkem/mopidy-local-sqlite/blob/v0.8.0/mopidy_local_sqlite/__init__.py#L54 Would still be nice to have the functionality to create private dirs under the Mopidy data_Dir.

adamcik commented 9 years ago

Ties in to https://github.com/mopidy/mopidy/issues/843 - I've been wondering if the API there should be something like asking core for a DATA/CACHE/CONFIG dir and then we create it and return the path.

tkem commented 9 years ago

I think something along these lines would be really helpful; maybe adding this to Extension as a class method and using the ext_name implicitly might make sense, too, e.g. Extension.get_data_dir(cls) -> get or create $XDG_DATA_DIR/mopidy/<cls.ext_name> and return path?

adamcik commented 9 years ago

That was pretty much what I had in mind :-)