Discussion:
[libdvdcss-devel] Fwd: [VLC] #4289: Make libdvdcss follow XDG on UNIX systems for folder path
Rémi Denis-Courmont
2010-11-03 17:55:38 UTC
Permalink
Forwarding bug report for your information.

The reporter-provided patch is:
http://trac.videolan.org/vlc/attachment/ticket/4289/libdvdcss_xdg.patch

#4289: Make libdvdcss follow XDG on UNIX systems for folder path
-------------------------+--------------------------------------------------
Reporter: Ángel | Owner: courmisch
Type: patch | Status: new
Priority: normal | Milestone: Bugs paradize
Component: Access | Version: master
Severity: normal | Keywords:
Platform: all | Difficulty: unknown
Wip: Not started |
-------------------------+--------------------------------------------------
Currently libdvdcss uses $HOME/.dvdcss as cache folder or $DVDCSS_CACHE.

Please make it follow the XDG Base Directory Specification [1].
This means placing dvdcss cache inside $XDG_CACHE_HOME folder with
$XDG_CACHE_HOME as $HOME/.cache if unset.

The enclosed patch changes the cache folder to the following:
1. $DVDCSS_CACHE
2. $XDG_CACHE_HOME/dvdcss
3. $HOME/.dvdcss (if existing)
4. $HOME/.cache/dvdcss

It's basically XDG but keeping the old location in order not to waste
whatever contents are already there (alternatively, it could be moved on
first run). That fallback location could be removed in the future.

I gave $XDG_CACHE_HOME an higher priority considering that, as opposed to
someone which is indifferent and just get everything at .cache for the
default, if the user sets $XDG_CACHE_HOME it has a good reason and should
be followed no matter if $HOME/.dvdcsss is there (eg. home is nfs mounted
and $XDG_CACHE_HOME points to a local disk).

Patch attached. Best viewed with -w to skip the added indentation.

1 - http://standards.freedesktop.org/basedir-spec/latest/index.html
--
Ticket URL: <http://trac.videolan.org/vlc/ticket/4289>
VLC <http://www.videolan.org/vlc/>
VLC media player
--
Rémi Denis-Courmont
Default assignee for VLC bugs
Reimar Döffinger
2010-11-03 18:37:23 UTC
Permalink
Post by Rémi Denis-Courmont
Forwarding bug report for your information.
http://trac.videolan.org/vlc/attachment/ticket/4289/libdvdcss_xdg.patch
#4289: Make libdvdcss follow XDG on UNIX systems for folder path
-------------------------+--------------------------------------------------
Reporter: Ángel | Owner: courmisch
Type: patch | Status: new
Priority: normal | Milestone: Bugs paradize
Component: Access | Version: master
Platform: all | Difficulty: unknown
Wip: Not started |
-------------------------+--------------------------------------------------
Currently libdvdcss uses $HOME/.dvdcss as cache folder or $DVDCSS_CACHE.
Please make it follow the XDG Base Directory Specification [1].
I still have a personal dislike against a spec that lacks a "scope" or
any other useful introduction part.
Post by Rémi Denis-Courmont
This means placing dvdcss cache inside $XDG_CACHE_HOME folder with
$XDG_CACHE_HOME as $HOME/.cache if unset.
XDG_CACHE_HOME is for "non-essential data". I have some doubts that
the DVDCSS cache belongs there.
Since the keys for some very short/simple (never investigated it, but some
titles from the Australian "Spaceballs" edition show this effect) titles
cannot be cracked, deleting might mean some DVDs will no longer be playable
if the drive region code was changed at some point.

Loading...