Skip to content

Commit

Permalink
Files playlist tab: Show the file path or stream URL on tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
paulijar committed Jun 18, 2023
1 parent 35d79d5 commit 152e7ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [Unreleased]

### Added
- Files playlist tab: Tooltip showing the file path or stream URL

### Changed
- Drop the logic migrating user settings from cookies to localStorage
Expand Down
7 changes: 6 additions & 1 deletion js/embedded/playlisttabview.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,15 @@ OCA.Music.initPlaylistTabView = function(playlistMimes) {
return file.caption || OCA.Music.Utils.titleFromFilename(file.name);
};

let tooltipForFile = function(file) {
return file.url || `${file.path}/${file.name}`;
};

for (let i = 0; i < data.files.length; ++i) {
list.append($(document.createElement('li'))
.attr('id', 'music-playlist-item-' + i)
.text(titleForFile(data.files[i])));
.text(titleForFile(data.files[i]))
.prop('title', tooltipForFile(data.files[i])));
}

// click handler
Expand Down

0 comments on commit 152e7ed

Please sign in to comment.