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

Sourcery refactored master branch #8

Merged
merged 1 commit into from
Jan 20, 2024
Merged

Sourcery refactored master branch #8

merged 1 commit into from
Jan 20, 2024

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Nov 19, 2023

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from Divarion-D November 19, 2023 13:42
Comment on lines -110 to +112
query_param = request.query_params._dict
if query_param:
if query_param := request.query_params._dict:
for key, value in query_param.items():
stream_url += "?" + key + "=" + value
stream_url += f"?{key}={value}"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function live refactored with the following changes:

Comment on lines -10 to +13
self.clients[ip + ":" + port] = {"url": chanel_watch, "time_create": int(time.time())}
self.clients[f"{ip}:{port}"] = {
"url": chanel_watch,
"time_create": int(time.time()),
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Client.add_client refactored with the following changes:

Comment on lines -15 to +22
if ip + ":" + port not in self.clients:
if f"{ip}:{port}" not in self.clients:
return False
# update time_create
self.clients[ip + ":" + port]["time_create"] = int(time.time())
return self.clients[ip + ":" + port]["url"]
self.clients[f"{ip}:{port}"]["time_create"] = int(time.time())
return self.clients[f"{ip}:{port}"]["url"]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Client.get_client refactored with the following changes:

if channel is None:
return None

return channel["direct_source"]
return None if channel is None else channel["direct_source"]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function M3U_Parser.get_channel_url refactored with the following changes:

@Divarion-D Divarion-D merged commit 49e4e76 into master Jan 20, 2024
2 checks passed
@Divarion-D Divarion-D deleted the sourcery/master branch May 23, 2024 14:55
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.

1 participant