willprice / python-omxplayer-wrapper

:tv: Control OMXPlayer, the Raspberry Pi media player, from Python
http://python-omxplayer-wrapper.readthedocs.io
GNU Lesser General Public License v3.0
253 stars 71 forks source link

Check if filename is a URL before checking if file exists #62

Closed willprice closed 7 years ago

willprice commented 8 years ago

Check if filename is a URL before checking if file exists.

It does so by parsing the filename and checking if it's a URL with a scheme (the "http" or "rstp" in "http://youtube.com/..." or in "rstp://192.168.1.15:5544/") before parsing if a file exists. So, if the path is a file, it will still do the check.

This should solve #35.

I needed it so I added it (and I tested it, I'm already using this fix).

Continuation of @tiangolo's work in #47

willprice commented 8 years ago

Thanks @tiangolo for your work 👍

codecov-io commented 8 years ago

Current coverage is 83.39% (diff: 89.47%)

Merging #62 into develop will decrease coverage by 0.51%

@@            develop        #62   diff @@
==========================================
  Files             3          3          
  Lines           261        265     +4   
  Methods           0          0          
  Messages          0          0          
  Branches         14         14          
==========================================
+ Hits            219        221     +2   
- Misses           38         39     +1   
- Partials          4          5     +1   

Powered by Codecov. Last update 22b18cc...5cdf8ad

willprice commented 8 years ago

Just going to run the smoke tests locally then I'll merge in.

tiangolo commented 8 years ago

Great! Thanks!

tiangolo commented 7 years ago

Great! Thanks! 🎉

willprice commented 7 years ago

Sorry it took me a while, I've been very busy recently.

Would you mind pulling it down and running the smoke tests? It'd be nice to have someone else to validate it, especially since I released it on PyPi too!