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

Small improvement and exception handling #5

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

DanielGlaas
Copy link

Hi amol9,

I came accross your tool and I found it very useful. While playing aroung, I decided that some small adaptions would make it even more better.
Please take a look and decide whether you want to accept my proposals.

The class Player in player.py allready contained the method launch. This
method is exposed externaly as a command line parameter by adding the wrapper
to client.py.
The play command is extended by a url validator that also allows to add a
syntactically correct URL to the playlist. Whether the URL target really
exists is not checked.
The command line options title and length are added by reusing the logic
implemented in info, but allowing the user only to ask specifically for a
single information.

In order to navigate in the track, the position and seek commands are added
both in the Player as well as in the ClientSubcommands class.
In case a command is sent to class Player and VLC is not running, the following
error occurs:
        <<'NoneType' object has no attribute 'xyz'.>>
This error is explicitly catched in player_list_error_wrapped()  to avoid
crashing of the complete program.

All methods that rely on a valid response of their called function need a
special error handling.
In case a stream is played as a raw media file with bad metadate, it might
happen that no valid content is return by the DBUS command for the title. In
this case a fallback is added to display the path to the file instead. The path
is always a valid content.
During playing aroung with vlc-ctrl running it on my raspberry pi, typing
the commands on my laptop being loged in remotely via SSH I noticed strange
behavior:
It was not possible to send vlc application to the backgroung and to use the
SSH session for next command. While playing aroung, I noticed that adding the
option '-I dummy' helps. After calling 'vlc-ctrl launch', the terminal is now
available for next commands.

While at it, I cleaned up trailing whitespaces in this file.
@amol9
Copy link
Owner

amol9 commented Jul 17, 2020 via email

@DanielGlaas
Copy link
Author

Hi Amol,
thanks for your reply. I didn't expect that we look into my PR within days as your last commit has been years ago.
However, if you may find at some time to look into it I will appreciate it!

Thanks,
Daniel

@pseudo-usama
Copy link

Hello, @DanielGlaas Can you add support for windows & Mac as Amol suggested in this issue.

@DanielGlaas
Copy link
Author

Hello, @DanielGlaas Can you add support for windows & Mac as Amol suggested in this issue.

@pseudo-usama : I don't own a Mac so I have absolutely no skills on this field and also for Windows, I'm the right one to do that.

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

Successfully merging this pull request may close these issues.

3 participants