gapato / livestreamer-curses

Limited text interface/front-end to http://github.com/chrippa/livestreamer
MIT License
35 stars 2 forks source link

Adhere to the XDG Base Directory Specification #8

Closed Serranya closed 10 years ago

Serranya commented 10 years ago

Follow the XDG Base Directory Specification under linux to prevent polluting the home directory.

To do so:

Place/Search the .livestreamer-cursesrc under $XDG_CONFIG_HOME/livestreamer-curses/livestreamer-cursesrc

When $XDG_CONFIG_HOME is not set default to ~/.config/livestreamer-curses/livestreamer-cursesrc

Place/Search the .livestreamer-curses.db $XDG_DATA_HOME/livestreamer-curses/livestreamer-curses.db When $XDG_DATA_HOME is not set default to~/.local/share/livestreamer-curses/livestreamer-curses.db

See the XDG Base Directory Specification

gapato commented 10 years ago

I tried to implement that in 24cbe0b81fefe06789b1b85af1545aecdc2f2266, with no attempt to check for potential files from a previous version in ~/ because I don't want to be bothered with a slew of such checks as changes add up. What do you think ?

Serranya commented 10 years ago

Seems fine to me. I can just copy my old files to the new location right ?

gapato commented 10 years ago

Sure. I've been running it that way with no issue. If you can pull from develop branch and test that would be great, otherwise I will push a new release by the end of the week.

Serranya commented 10 years ago

Something seems to be wrong:

Traceback (most recent call last):
    File "/usr/bin/livestreamer-curses", line 9, in <module>
        load_entry_point('livestreamer-curses==1.2.0', 'console_scripts', 'livestreamer-curses')()
    File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 356, in load_entry_point
        return get_distribution(dist).load_entry_point(group, name)
    File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 2472, in load_entry_point
        return ep.load()
    File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 2186, in load
        ['__name__'])
    File "/usr/lib/python3.4/site-packages/livestreamer_curses/main.py", line 32, in <module>
        from streamlist import StreamList
ImportError: No module named 'streamlist
gapato commented 10 years ago

Indeed, botched import, sorry. It should be fixed in the develop branch (I rewrote history so you'll need to reset to 7802948 before pulling).

Serranya commented 10 years ago

working fine for me now :)

gapato commented 10 years ago

Nice, I've pushed 1.3.0 to PyPI, thanks !