Skip to content

Commit

Permalink
new version 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
natumbri committed Apr 10, 2021
1 parent fd89ef8 commit c4f1f70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions mopidy_youtube/apis/youtube_music.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def search_videos(cls, q):
def _channelTitle(item):
try:
channelTitle = item["artists"][0]["name"]
except:
except Exception:
channelTitle = "unknown"
return channelTitle

Expand Down Expand Up @@ -90,7 +90,7 @@ def playlist_item_to_video(cls, item, thumbnail):
def _convertMillis(milliseconds):
try:
hours, miliseconds = divmod(int(milliseconds), 3600000)
except:
except Exception:
return "00:00:00"
minutes, miliseconds = divmod(miliseconds, 60000)
seconds = int(miliseconds) / 1000
Expand Down Expand Up @@ -184,7 +184,7 @@ def list_playlists(cls, ids):
def _channelTitle(result):
try:
channelTitle = result["artists"][0]["name"]
except:
except Exception:
channelTitle = "unknown"
return channelTitle

Expand All @@ -199,7 +199,6 @@ def _channelTitle(result):
},
"contentDetails": {"itemCount": result["trackCount"]},
}

for result in results
]

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = Mopidy-YouTube
version = 3.2
version = 3.3
url = https://github.com/natumbri/mopidy-youtube
author = nik tumbri
author_email = natumbri@gmail.com
Expand Down

0 comments on commit c4f1f70

Please sign in to comment.