Skip to content

Commit

Permalink
Add track time after the latest HTTPMS server patch
Browse files Browse the repository at this point in the history
One could now seek and see the track duration in the playlist! Yey!
  • Loading branch information
ironsmile committed Mar 23, 2021
1 parent cb37f80 commit dbd7e9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ But really, almost nothing is documented. And where there are guides and documen

* ~~Settings for setting the HTTPMS address and access tokens~~
* ~~Timeout in the search field. Searching should start 50-100ms after the user stops typing.~~
* Track time
* ~~Track time~~
* ~~Sort tracks after search~~ (sort of done)
* ~~Preserve Browser size~~
* ~~Logout Button~~
Expand Down
3 changes: 3 additions & 0 deletions httpms.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ def add_track(self, db, entry_type, item):
album_url)
db.entry_set(entry, RB.RhythmDBPropType.LAST_SEEN,
self.search_count)
if item['duration'] > 0:
db.entry_set(entry, RB.RhythmDBPropType.DURATION,
item['duration'] / 1000)

db.commit()

Expand Down

0 comments on commit dbd7e9c

Please sign in to comment.