Code Monkey home page Code Monkey logo

abplayerhtml5-py's People

Contributors

cnbeining avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

abplayerhtml5-py's Issues

在 Linux 下有路径问题

Linux 的主目录是/home/$USER,而不是/User/$USER
我建议使用$HOME来代替/home/$USER,所有系统都会设置$HOME的吧?

幸好我没有用 root 启动,要不然整个硬盘都要被你弄乱了……

另外,ABP 可以像 bilidan 一样,一边缓冲一边观看吗?(而不是下载完成了才能看)

建议使用 xdg-open 等启动浏览器

我觉得打开了用户非首选的浏览器很恼火,比如 ddd、LilyTerm,会试图打开“他们认为的首选浏览器”。

现代的 Linux 系统都有 xdg-open 这个工具,可以使用用户提前选择好的“默认程序”启动对应的 URL。

根据下面附上的 fish(一个主张现代感的 shell)的源代码,依次尝试了

  • cygstart
  • xdg-open
  • mimedb -l (这货是 fish 自家的,无视)

所以我建议本程序尝试这样的顺序:

  • open (OS X)
  • cygstart (Cygwin)
  • xdg-open (Freedesktop)
  • $BROWSER

如果失败,直接提示用户输入 export BROWSER=firefox 重试,这个机率应该不太高。

附上 fish 的源代码作参考:

function open --description 'Open file in default application'
    if count $argv >/dev/null
            switch $argv[1]
                case -h --h --he --hel --help
                    __fish_print_help open
                    return 0
            end
        end

        if type -f cygstart >/dev/null
            for i in $argv
                cygstart $i
            end
        else if type -f xdg-open >/dev/null
            for i in $argv
                xdg-open $i
            end
        else
            mimedb -l -- $argv
        end

end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.