Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M3U Input does not handle relative paths #51

Closed
achbed opened this issue Jan 24, 2015 · 4 comments
Closed

M3U Input does not handle relative paths #51

achbed opened this issue Jan 24, 2015 · 4 comments
Assignees
Milestone

Comments

@achbed
Copy link
Contributor

achbed commented Jan 24, 2015

Currently, using an M3U file as a source does not handle relatives paths. As specified in https://en.wikipedia.org/wiki/M3U the reader of the M3U should support paths relative to the M3U file location.

@yomguy
Copy link
Owner

yomguy commented Jan 24, 2015

OK, I'll fix this.

@yomguy yomguy self-assigned this Jan 24, 2015
@yomguy yomguy added this to the 0.7 milestone Jan 24, 2015
@achbed
Copy link
Contributor Author

achbed commented Jan 24, 2015

I've got a patch pending. I just created the issue for reference :)

@yomguy
Copy link
Owner

yomguy commented Jan 24, 2015

Ah yes indeed in #50 :)

achbed added a commit to achbed/DeeFuzzer that referenced this issue Jan 24, 2015
Signed-off-by: achbed <github@achbed.org>
@achbed
Copy link
Contributor Author

achbed commented Jan 24, 2015

I just pushed another update to the currently pending merge request. This new path fixes the "relative to the M3U file" part, and undoes the "relative to station/base_dir" I had implemented earlier (same merge request).

@achbed achbed closed this as completed Jan 24, 2015
shashanksingh added a commit to shashanksingh/DeeFuzzer that referenced this issue Jul 10, 2020
* add python-dev

* bugfix

* icecast server type by default

* cleanup

* add yaml doc

* goto 0.6.6

* cleanup

* Fix tar.gz and folder name "DeeFuzzer" instead of "deefuzzer"
Fix word documented
Remove trailing whitespaces

* update deps

* update deps

* back to 0.6.5

* add travis tests

* cleanup, better exception handling, add partial WebM support, add a curl based streaming object

* Add JSON conf parsing, add any conf parameter as an attribute to the DeeFuzzer class (fix #2)

* Add deps for travis

* add deps for travis

* update deps

* add a little converter from XML to YAML

* cleanup

* No signal for pycurl streamer

* allow empty field in rss.media_url (fix yomguy#8)

* No twitter on first playlist build

* No twitter on first playlist build

* just twitter

* just twitter

* fix first playlist build

* fix

* fix no rss

* fix id

* Update README.rst

Fix examples URL.

* Remove trailing whitespaces.
Reorder each files.

* Update README.rst

Fix github link for DeeFuzzer logo :)

* Update README.rst

Fix github link for DeeFuzzer logo :)

* fix non-absolute log and m3u paths

* fix version

* Update song separation mark
 Replace "artist : title" by "artist - title"

* Remove channel url in station name

* Remove 'ogg_quality' in mp3 stream

* Delete CHANGELOG

Remove old CHANGELOG file.

* begin station_dir parameter

* Add 0.6.6
Fix "internet" to "Internet"
Remove <space> between ":", "!"
Add Uppercase

* cleanup Manifest (fix yomguy#19)

* Remove unnecessary variables

* Add option to append stream type to the mount path for icecast streams.  Default is enabled (matches current behavior)

Signed-off-by: achbed <github@achbed.org>

* Added examples for appendtype

Signed-off-by: achbed <github@achbed.org>

* tab to space (for indent issues)

Signed-off-by: achbed <github@achbed.org>

* Added ability to export json data as well as RSS feeds
Added ability to selectively enable/disable json or RSS output
Renamed <rss> tag to <feed>
RSS reads from <rss> tag if no <feed> tag is present (for backwards compatibility)

Signed-off-by: achbed <github@achbed.org>

* Missing json import
Moved handling of rss_mode to within the update_rss function
Renamed rss_* variables to feeds_*
Renamed feed_* variables to feeds_*
Renamed update_rss to update_feeds
Fixed feeds_mode to have a default of 1 (enabled)
Fixed issue where playlist feeds were not created at start time
Added ability to disable playlist feed output
Added <playlist> tag to feeds options (1=output,0=suppress,default=1)

Signed-off-by: achbed <github@achbed.org>

* Updated example config files with new/renamed options

Signed-off-by: achbed <github@achbed.org>

* Fixed documented example with renamed feeds tag

Signed-off-by: achbed <github@achbed.org>

* Added stationdefaults parameter (provides a mechanism to give default values for all stations)
New merge_defaults function in utils.py - combines two dict objects recursively

Signed-off-by: achbed <github@achbed.org>

* Core fix for inconsistent list object for station preferences
Added stationdefaults preference (apply default settings to all stations)
Added stationfolder preference (generate stations automagically from a folder structure)
Added stationconfig preference (load other preference files as stations)
Moved get_conf_dict to utils.py
Added documentation for the stationdefaults preference
Added documentation for the stationfolder and stationconfig preferences (deefuzzer_doc.xml only)

Signed-off-by: achbed <github@achbed.org>

* Typo

Signed-off-by: achbed <github@achbed.org>

* Added documentation
Revised init handling of preferences for consistency
Fixed issue where some boolean flags (ie, modes) were not being handled properly

Signed-off-by: achbed <github@achbed.org>

* Reverted a lot of changes

Signed-off-by: achbed <github@achbed.org>

* Ensure that integer parameters are treated properly
Removed double-set options

Signed-off-by: achbed <github@achbed.org>

* Fixed a few issues with setting up logging

Signed-off-by: achbed <github@achbed.org>

* Added some logging when a station fails to initialize

Signed-off-by: achbed <github@achbed.org>

* Added new station.feeds.showfilename option that includes the media file name in the feed
Added new station.feeds.showfilepath option that includes the server path to the media file in the feed

Signed-off-by: achbed <github@achbed.org>

* Refactored main icecast loop for readability
Added additional error handling in main icecast loop
Added additional error handling to icecast chunk send loop

Signed-off-by: achbed <github@achbed.org>

* Removed extraneous "pass"es
Standardized error and info logging within station class
Fixed typo on truthy values

* Added init.d and default config scripts to scripts folder (sets up deefuzzer as a system-level daemon)

Signed-off-by: achbed <github@achbed.org>

* Added new QueueLogger class (logging from a queue so we can do thread-safe logging)
Moved core and station to new common log functions (_info and _err) using new QueueLogger
Core now attempts to restart stations that stop
Core now detects new folders on the fly instead of only at start time (stationfolder option)
Station.py has a lot of changes to utilize the common blocking queue only when needed rather than at every step (may increase performance with many stations)

TODO:
Detect proper vs unexpected shutdown of stations and restart only unexpected ones
Make new folder detection for stationfolder an option

* Revised crashed station detection
Added main loop in station to allow remote commands to restart playback after stopping
Added livecreation option to enable.disable watchfolder mode
Added fix for newly created stations not starting
Cleaned up a missed queue unlock instance

Signed-off-by: achbed <github@achbed.org>

* Fix for crashing after first track if played

Signed-off-by: achbed <github@achbed.org>

* Added code to search for "COUNTRY" custom tag in MP3 files

Signed-off-by: achbed <github@achbed.org>

* Split try block for exporting the different feed types (so failure on one doesn't block the other)
Converted the Producer to put a static True value on the queue instead (prevent possible overflow)
Add jingles:frequency option
Now resets counter to prevent eventual overflow
Add saving of status file to record current position
Add reading of status file on station init to restart where it left off
Reset the counter when incremented to prevent overflows
When a new playlist is detected (ie, songs added/removed) playback attempts to keep going instead of restarting

* Slow playback read by default

* Goto 0.7
Partially fixes yomguy#20 (bad chars on the icecast side...)

* BUG: a few logging functions were called incorrectly in station.py
FEATURE: Added option (ignoreerrors) to log and continue when an error occurs during station setup

* Updated init.d scripts for cleaner stop/start

Signed-off-by: achbed <github@achbed.org>

* Typo

Signed-off-by: achbed <github@achbed.org>

* cleanup

* Move thread execution detection into create loop (as we can't restart dead threads)
Altered create loop to run all the time (instead of only at station creation)
Fixed issue where streams would not be closed if an error occurred in playlist advancement
Fixed issue where saved playlist position could result in an index overflow
Added maxretry value (determines how many times to attempt a station thread restart)
Fixed minor documentation things

Signed-off-by: achbed <github@achbed.org>

* Fixed logic flaw with retry counts (negative maxretry value would never retry instead of always retry)

Signed-off-by: achbed <github@achbed.org>

* Additional logging when a station was found stopped and will never be restarted
Better description in logging station initialization errors
Internal station name and status filenames will no longer be regenerated on restart

Signed-off-by: achbed <github@achbed.org>

* Changes based on ChoiZ's mode_playing branch

Station: media.dir now overrides media.m3u if both are specified and non-blank
Station: Noted media.m3u and media.dir options as depreciated (uses them if present for smooth upgrade path)
Station: Combine media.m3u and media.dir options into one new media.source option
Station: media.source is now checked to see if it's a file or folder at load time, and playlist or folder list mode is selected automatically
Core: Updated to reflect new source setting when using station autocreation

Signed-off-by: achbed <github@achbed.org>

* Updates for relative paths

Added base_dir parameter to station definition (issue yomguy#10)
Added default station short_name to auto-created stations
Removed previously-mandatory tags from example XML config stationfolder tag

Signed-off-by: achbed <github@achbed.org>

* Added base_dir to paths read from an m3u file

* Updated example docs for base_dir parameter

Signed-off-by: achbed <github@achbed.org>

* Fix for yomguy#51 (M3U input does not support relative paths)

Signed-off-by: achbed <github@achbed.org>

* Playlist feeds now recreated at track change time

Fix for yomguy#52

* add dep to pyyaml

* update travis setup

* README: update news and other things

* fix pins

* Move old news

* Added exclusion for PyCharm IDE files

* Whitespace and formatting fixes to better meet PEP8 Coding Style

Signed-off-by: achbed <github@achbed.org>

* Whitespace and formatting fixes to better meet PEP8 Coding Style

Signed-off-by: achbed <github@achbed.org>

* Initial pass of cleanup based on PyCharm Code Inspection

Signed-off-by: achbed <github@achbed.org>

* Tabs to Spaces

Signed-off-by: achbed <github@achbed.org>

* Additional coding style cleanup

Signed-off-by: achbed <github@achbed.org>

* Lots of style fixes
Also:
  Fixes for a few "using unset variable" cases
  Began removing calls to .has_key() (depreciated)
  Fixed reference issue on raiseErrors flag (should have been self.raiseErrors)

Signed-off-by: achbed <github@achbed.org>

* Removal of .keys() lookup where not needed (for speed)
Removed the remaining calls to has_key()

* Started refactoring to remove shadowed parameter warnings
Fix for bitrate calcuation (now divide by 1024 instead of chop string) - addresses yomguy#55

Signed-off-by: achbed <github@achbed.org>

* New MediaBase class for common media object functionality
Refactored MP3, OGG, WebM classes to use MediaBase
Station now uses common MediaBase functions to get artist, title, and song info

* Additional cleanup of MediaBase.metadata instances, calls, and methods
Fixed exception failure in URLReader class
Fixed two outstanding MediaBase reference issues in station.py

Signed-off-by: achbed <github@achbed.org>

* Fixes multiple regression issues with new MediaBase class
Additional logging on failure to track issues with media classes

Signed-off-by: achbed <github@achbed.org>

* update doc and deps

* Improper conversion type when reading maxretry parameter

Signed-off-by: achbed <github@achbed.org>

* update features and install procedure

* Update README.rst

Quick fix ;)

* Update README.rst

automaTically instead of automaGically (but it can be magical ;))

* Changed default for appendtype to 0 (from 1)

Signed-off-by: achbed <github@achbed.org>

* Removed redundant reference to stationdefaults
Changed from "station setup" to "station initialization" for better clarity

Signed-off-by: achbed <github@achbed.org>

* Fix for extra indent on line 1 of station.py

* Update station.py

Fix m3u listing files.

* Put optional doc in the FAQ

* cleanup README (pushing some part in the wiki)

* cleanup

* fix doc

* update MANIFEST

* fix features

* goto 0.7.1

* Update README.rst

Update choiz by ChoiZ, add g+ and email.

* Remove brocken link in doc

Remove brocken link: "OGG Vorbis and MP3 together"
@yomguy same error in `dev` and `release\0.7` branch.

* trim

* Fix no metadata for stream-m relaying
Fix relay fallback when source not ready

* fix ident

* update news

* goto 0.7.2

* Simplify tweets

* update tweet url separator

* Fix to detect a playlist that changed in content, but not length

Signed-off-by: achbed <github@achbed.org>

* fix m3u generator

* Remove trailing whitespaces

* Replace "Next play" by "StartTime" and add "EndTime"

* rename some variables

* Switched broken pypip.in badges to shields.io

* - Fixes for Shout
- Added MySQLdb feature

* Fixes MySQLdb feature

* - Increased minor version
- Added JSON MySQLdb example
- Added feature in README

* JSON example indent fix

* Last indent fix (I hope)

* Use mysqlclient rather than old mysql-python

* Don't create metadata dir when no needs

* less print

* Switch to GPL v3 license

* update news

* Check for self.media_source existence

* Allow multiple station in yaml conf, add example (fix yomguy#79)

* update news

* pin python-shout==0.2.5

* update license in README

* Fix config init without feed_dirs nor rss mode

* goto 0.7.3

* use python-shout==0.2.6 : allow UTF-8 chars

* fix line (test magit)

* [doc] install libmariadbclient-dev instead of libmysqlclient-dev

* [doc] install libmariadbclient-dev instead of libmysqlclient-dev

* Add Python 3 compatibility, fix various encoding options, need DEBUG

* [setup] force py3

* [setup] force py2, bump to 0.7.4

* [setup] set classifiers to py3

* [travis] use py3

* [travis] use py3.6

* [travis] add matrix

* goto 0.8.0

* cleanup prints

* [licence] update headers against GPL

* [setup] fix python_requires

* [conf] fix XML parsing using xmltodict from pypi

* [setup] pin deps

* [setup] use requirements, bump to 0.8.0a

* [setup] add cython3, add wheel, fix py3 packages

* [setup] fix version

* bump to 0.7.4

* [setup] bump to 0.8.0

* [doc] add NEWS, fix deps, enjoy py3!

* [deps] update

* [doc] fix lib name

Co-authored-by: Guillaume Pellerin <yomguy@parisson.com>
Co-authored-by: François LASSERRE <choiz@me.com>
Co-authored-by: achbed <github@achbed.org>
Co-authored-by: Guillaume Pellerin <guillaume.pellerin@ircam.fr>
Co-authored-by: Michael Overmeyer <m.overmeyer@yahoo.ca>
Co-authored-by: Dominic Kanrabat <doomy23@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants