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

Notification for required rescans #246

Merged
merged 41 commits into from
Oct 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ace3b51
Update PageController.php
Rello Oct 10, 2017
9dfacb6
Update app.js
Rello Oct 10, 2017
2552385
Update app-min.js
Rello Oct 10, 2017
aedccb0
Update index.php
Rello Oct 11, 2017
655e05e
Update PageController.php
Rello Oct 11, 2017
f5c770a
Update ScannerController.php
Rello Oct 11, 2017
b090cbf
Update de.json
Rello Oct 11, 2017
9ed0e8c
Update Application.php
Rello Oct 12, 2017
3e236cc
Update Result.php
Rello Oct 12, 2017
4ef4318
Update PlaylistController.php
Rello Oct 12, 2017
c53830a
String splitted
Oct 13, 2017
c704ee6
String unified
Oct 13, 2017
bbdcc13
String unified
Oct 13, 2017
e8f0d1d
Strings unified
Oct 13, 2017
6954c04
Strings unified
Oct 13, 2017
70865fd
Strings unified
Oct 13, 2017
745387b
Strings unified
Oct 13, 2017
aeb149b
Strings unified
Oct 13, 2017
57500d9
Strings unified
Oct 13, 2017
5274fdb
Strings unified
Oct 13, 2017
9fd2e04
Strings unified
Oct 13, 2017
6d9778a
String unified
Oct 13, 2017
60cbdb5
String unified
Oct 13, 2017
32f3236
String unified
Oct 13, 2017
fef8d66
Strings unified
Oct 13, 2017
11953b3
Strings unified
Oct 13, 2017
1aa8987
Strings unified
Oct 13, 2017
08b09e0
Strings unified
Oct 13, 2017
2c56203
Strings unified
Oct 13, 2017
b2cf255
Strings unified
Oct 13, 2017
eeb5718
Strings unified
Oct 13, 2017
e2b29b8
2.2.0-alpha.7
Oct 13, 2017
ce880f0
Update app.js
Rello Oct 13, 2017
35bd0f5
Update CategoryController.php
Rello Oct 13, 2017
4c9680d
Update MusicController.php
Rello Oct 13, 2017
44744ed
Update SettingController.php
Rello Oct 13, 2017
15c2100
Update PlaylistController.php
Rello Oct 13, 2017
b1e04d8
Update Application.php
Rello Oct 13, 2017
28fa7e3
Update CategoryController.php
Rello Oct 13, 2017
b6a5fde
Update SettingController.php
Rello Oct 13, 2017
390ef68
Update app-min.js
Rello Oct 13, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A music player for FLAC, MP3, MP4, and more with playlist support and share play
- Stream URLs

### Supported Formats
FLAC, MP3, MP4, Ogg Vorbis, Opus, and Waveform Audio. Playing the formats supported by Audio Player depends on the browser. [Read more …](https://github.com/rello/audioplayer/wiki/audio-files-and-mime-types)
FLAC, MP3, MP4, Ogg Vorbis, Opus, and Waveform Audio. Playing the formats supported by Audio Player depends on the browser. [More information…](https://github.com/rello/audioplayer/wiki/audio-files-and-mime-types)

### Supported Browsers
Latest versions of Chrome, Firefox, and Safari. Mobile browsers may be restricted in functionality and handling.
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ See [README](https://github.com/rello/audioplayer/blob/master/README.md) file fo
- **Stream-URLs**

Siehe [README](https://github.com/rello/audioplayer/blob/master/README.md)-Datei für alle unterstützten MIME-Typen und Einschränkungen.]]></description>
<version>2.2.0-alpha.6</version>
<version>2.2.0-alpha.7</version>
<licence>AGPL</licence>
<author>Marcel Scherello</author>
<author>Thomas Marx</author>
Expand Down
29 changes: 15 additions & 14 deletions js/app-min.js

Large diffs are not rendered by default.

66 changes: 42 additions & 24 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Audios.prototype.init = function () {
var locHashTemp = searchresult.split('-');
}

myAudios.get_uservalue('category', function(someElement) {
myAudios.get_uservalue('category', function() {
// Category View
if ($this.category_selectors[0] && $this.category_selectors[0]!== 'Albums') {
window.location.href='#';
Expand Down Expand Up @@ -166,16 +166,16 @@ Audios.prototype.AlbumSongs = function(){
}

var ClonePlaylist = myWrapper.find('li').clone();
$('#activePlaylist').html('');
$('#activePlaylist').append(ClonePlaylist);
$this.ActivePlaylist.html('');
$this.ActivePlaylist.append(ClonePlaylist);
$('#activePlaylist span.actionsSong').remove();
$('#activePlaylist span.number').remove();
$('#activePlaylist span.time').remove();
$('#activePlaylist span.edit').remove();
$('#activePlaylist li.noPlaylist').remove();

var myCover=$('.album.is-active .albumcover');
if(myCover.css('background-image') == 'none'){
if(myCover.css('background-image') === 'none'){
$('.sm2-playlist-cover').text(myCover.text()).css({'background-color':myCover.css('background-color'),'color':myCover.css('color'),'background-image':'none'});
}else{
$('.sm2-playlist-cover').text('').css({'background-image':myCover.css('background-image')});
Expand Down Expand Up @@ -382,9 +382,8 @@ Audios.prototype.buildAlbumRows = function(aAlbums){
};

Audios.prototype.loadAlbums = function(){
$this = this;
$('.sm2-bar-ui').hide();
this.AlbumContainer.hide();
$this.AlbumContainer.hide();
$('#loading').show();
$.ajax({
type : 'GET',
Expand Down Expand Up @@ -448,8 +447,8 @@ Audios.prototype.loadAlbums = function(){
$('.albumSelect li i.ioc').hide();
myWrapper.addClass('isPlaylist');
var objCloneActivePlaylist= $(this).parent().parent().find('.albumSelect li').clone();
$('#activePlaylist').html('');
$('#activePlaylist').append(objCloneActivePlaylist);
$this.ActivePlaylist.html('');
$this.ActivePlaylist.append(objCloneActivePlaylist);
$('#activePlaylist span').remove();
$('#activePlaylist li.noPlaylist').remove();
if($this.AudioPlayer === null){
Expand Down Expand Up @@ -578,7 +577,6 @@ Audios.prototype.loadSongsRow = function(elem){
Audios.prototype.loadCategory = function(){
var $this = this;
var category = $this.category_selectors[0];
$('.sm2-bar-ui').show();
$('#addPlaylist').addClass('ap_hidden');
$('#myCategory').html('');
$('.toolTip').tooltip('hide');
Expand Down Expand Up @@ -630,6 +628,13 @@ Audios.prototype.loadCategory = function(){
$("#app-navigation").scrollTop($("#app-navigation").scrollTop()+$('#myCategory li.active').first().position().top - 25);
$this.loadIndividualCategory();
}
}else{
$('.sm2-bar-ui').hide();
$this.PlaylistContainer.hide();
$this.AlbumContainer.show();
$this.AlbumContainer.html('<span class="no-songs-found">'+t('audioplayer','Welcome to')+' '+t('audioplayer','Audio Player')+'</span>');
$this.AlbumContainer.append('<span class="no-songs-found-pl"><i class="ioc ioc-refresh" title="'+t('audioplayer','Scan for new audio files')+'" id="scanAudiosFirst"></i> '+t('audioplayer','Add new tracks to library')+'</span>');
$this.AlbumContainer.append('<a class="no-songs-found-pl" href="https://github.com/rello/audioplayer/wiki" target="_blank">'+t('audioplayer','Help')+'</a>');
}
}
});
Expand Down Expand Up @@ -675,7 +680,8 @@ Audios.prototype.loadIndividualCategory = function(evt) {
success : function(jsondata) {
var albumcount = '';
if(jsondata.status === 'success'){
$(jsondata.data).each(function(i,el){
$('.sm2-bar-ui').show();
$(jsondata.data).each(function(i,el){

var li = $('<li/>').attr({
'data-trackid' : el.id,
Expand Down Expand Up @@ -841,7 +847,12 @@ Audios.prototype.loadIndividualCategory = function(evt) {
}

}else{
$('#individual-playlist').html('<span class="no-songs-found-pl">'+t('audioplayer','Add new tracks to playlist by drag and drop')+'</span>');
$('.sm2-bar-ui').hide();
$this.PlaylistContainer.hide();
$this.AlbumContainer.show();
$this.AlbumContainer.html('<span class="no-songs-found">'+t('audioplayer','Welcome to')+' '+t('audioplayer','Audio Player')+'</span>');
$this.AlbumContainer.append('<span class="no-songs-found-pl"><i class="ioc ioc-refresh" title="'+t('audioplayer','Scan for new audio files')+'" id="scanAudiosFirst"></i> '+t('audioplayer','Add new tracks to library')+'</span>');
$this.AlbumContainer.append('<a class="no-songs-found-pl" href="https://github.com/rello/audioplayer/wiki" target="_blank">'+t('audioplayer','Help')+'</a>');
}

if (category !== "Title") {
Expand Down Expand Up @@ -1092,7 +1103,7 @@ Audios.prototype.editSong = function(evt){
$this.PlaylistContainer.hide();
$('#individual-playlist').html('');
$('.albumwrapper').removeClass('isPlaylist');
$('#activePlaylist').html('');
$this.ActivePlaylist.html('');
$('.sm2-playlist-target').html('');
$('.sm2-playlist-cover').css('background-color','#ffffff').html('');
$this.loadAlbums();
Expand Down Expand Up @@ -1514,7 +1525,7 @@ Audios.prototype.savePhoto = function() {
form.submit();

target.load(function() {
$('#noimage').text(t('audioplayer', 'Picture generating, please wait ...')).addClass('icon-loading');
$('#noimage').text(t('audioplayer', 'Picture generating, please wait')).addClass('icon-loading');
var response = jQuery.parseJSON(target.contents().text());
if (response !== undefined) {
$('#isphoto').val('1');
Expand Down Expand Up @@ -1747,7 +1758,7 @@ Audios.prototype.sort_playlist = function(evt) {
$('#individual-playlist').append(elems);

if ($this.PlaylistContainer.data('playlist') === $this.ActivePlaylist.data('playlist')) {
elems = $('#activePlaylist').children('li').get();
elems = $this.ActivePlaylist.children('li').get();
elems.sort(function(a,b){
a = $(a).data(column).toString();
b = $(b).data(column).toString();
Expand All @@ -1760,7 +1771,7 @@ Audios.prototype.sort_playlist = function(evt) {
}
return ((a < b) ? -1*factor : ((a > b) ? 1*factor : 0));
});
$('#activePlaylist').append(elems);
$this.ActivePlaylist.append(elems);
}

if($this.AudioPlayer){
Expand Down Expand Up @@ -1822,10 +1833,8 @@ Audios.prototype.checkNewTracks = function() {
type : 'POST',
url : OC.generateUrl('apps/audioplayer/checknewtracks'),
success : function(data) {
if(data === 'true'){
$('#notification').text(t('audioplayer','New audio files available'));
$('#notification').slideDown();
window.setTimeout(function(){$('#notification').slideUp();}, 5000);
if (data === 'true'){
OC.Notification.showTemporary(t('audioplayer','New audio files available'));
}
}
});
Expand Down Expand Up @@ -1917,15 +1926,24 @@ $(document).ready(function() {
myAudios = new Audios();
myAudios.init();
myAudios.checkNewTracks();

//if($(window).width()>768){

var notify = $('#audioplayer_notification').val();
if( notify !== ''){
OC.Notification.showHtml(
notify,
{
type: 'error',
isHTML: true
}
);
}

//if($(window).width()>768){
$('.sm2-bar-ui').width(myAudios.AlbumContainer.width());
//}else{
// $('.sm2-bar-ui.fixed').width(myAudios.AlbumContainer.width()-45);
//}




$('#edit_photo_dialog').dialog({
autoOpen : false,
modal : true,
Expand Down
2 changes: 1 addition & 1 deletion js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ $(document).ready(function() {
$('#activePlaylist').html('');
$('.sm2-playlist-target').html('');
$('.sm2-playlist-cover').css('background-color','#ffffff').html('');
$('#notification').text(t('audioplayer','Start resetting library ...'));
$('#notification').text(t('audioplayer','Start resetting library'));
$('#notification').slideDown();

$.ajax({
Expand Down
6 changes: 3 additions & 3 deletions l10n/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OC.L10N.register(
"No playlist selected!" : "Keine Wiedergabeliste ausgewählt!",
"Sort modus active" : "Sortiermodus aktiv",
"Playlist successfully deleted!" : "Wiedergabeliste erfolgreich gelöscht!",
"Start scanning ..." : "Scannen starten ...",
"Start scanning" : "Scannen starten",
"Scanning finished! New Audios found!" : "Scannen beendet! Neue Audiodateien gefunden!",
"Yes" : "Ja",
"No" : "Nein",
Expand Down Expand Up @@ -52,14 +52,14 @@ OC.L10N.register(
"Upload" : "Hochladen",
"Drop picture" : "Bild fallen lassen",
"Select picture" : "Bild auswählen",
"Picture generating, please wait ..." : "Bilderzeugung, bitte warten ...",
"Picture generating, please wait" : "Bilderzeugung, bitte warten",
"Drag picture here!" : "Bild hierher ziehen",
"Settings" : "Einstellungen",
"Select a single folder with audio files" : "Einzelnen Ordner mit Audiodateien auswählen",
"Invalid path!" : "Ungültiger Pfad!",
"saved" : "gespeichert",
"Reset library" : "Bibliothek zurücksetzen",
"Start resetting library ..." : "Bibliothek wird zurückgesetzt ...",
"Start resetting library" : "Bibliothek wird zurückgesetzt",
"Resetting finished!" : "Zurücksetzen beendet!",
"All library entries will be deleted!" : "Alle Bibliothekseinträge werden gelöscht!",
"Close" : "Schließen",
Expand Down
9 changes: 5 additions & 4 deletions l10n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Titles" : "Titel",
"Album" : "Album",
"Scan for audio files" : "Nach Audiodateien scannen",
"Start scanning ..." : "Scannen starten ...",
"Start scanning" : "Scannen starten",
"Scanning finished!" : "Scannen beendet!",
"Audios found: " : " Audiodateien gefunden: ",
"Albums found: " : " Alben gefunden: ",
Expand Down Expand Up @@ -40,7 +40,7 @@
"- choose -" : "- auswählen -",
"Errors: " : "Fehler: ",
"Edit picture" : "Bild bearbeiten",
"If rescan does not solve this problem the files are broken" : "Wenn erneutes Scannen das Problem nicht behebt,<br>sind die Dateien defekt",
"If rescan does not solve this problem the files are broken" : "Wenn erneutes scannen das Problem nicht behebt,<br>sind die Dateien defekt",
"Disc" : "Disc",
"Discs" : "Discs",
"Track" : "Stück",
Expand All @@ -58,8 +58,9 @@
"Genres" : "Genres",
"Settings" : "Einstellungen",
"Cyrillic support" : " Kyrillisch-Unterstützung",
"Read more" : "Weitere Informationen",
"More information…" : "Mehr Informationen",
"Search for audio files in" : "Suche nach Audiodateien in",
"Formats supported by the browser" : "Vom Browser unterstützte Formate",
"Formats not supported by the browser" : "Vom Browser nicht unterstützte Formate"
"Formats not supported by the browser" : "Vom Browser nicht unterstützte Formate",
"Please reset and rescan library to make use of new features." : "Bitte Bibliothek zurücksetzen und erneut scannen, um neue Funktionen nutzen zu können."
},"pluralForm":""}
6 changes: 3 additions & 3 deletions l10n/de_DE.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OC.L10N.register(
"No playlist selected!" : "Keine Wiedergabeliste ausgewählt!",
"Sort modus active" : "Sortiermodus aktiv",
"Playlist successfully deleted!" : "Wiedergabeliste erfolgreich gelöscht!",
"Start scanning ..." : "Scannen starten ...",
"Start scanning" : "Scannen starten",
"Scanning finished! New Audios found!" : "Scannen beendet! Neue Audiodateien gefunden!",
"Yes" : "Ja",
"No" : "Nein",
Expand Down Expand Up @@ -52,14 +52,14 @@ OC.L10N.register(
"Upload" : "Hochladen",
"Drop picture" : "Bild fallen lassen",
"Select picture" : "Bild auswählen",
"Picture generating, please wait ..." : "Bilderzeugung, bitte warten ...",
"Picture generating, please wait" : "Bilderzeugung, bitte warten",
"Drag picture here!" : "Bild hierher ziehen",
"Settings" : "Einstellungen",
"Select a single folder with audio files" : "Einzelnen Ordner mit Audiodateien auswählen",
"Invalid path!" : "Ungültiger Pfad!",
"saved" : "gespeichert",
"Reset library" : "Bibliothek zurücksetzen",
"Start resetting library ..." : "Bibliothek wird zurückgesetzt ...",
"Start resetting library" : "Bibliothek wird zurückgesetzt",
"Resetting finished!" : "Zurücksetzen beendet!",
"All library entries will be deleted!" : "Alle Bibliothekseinträge werden gelöscht!",
"Close" : "Schließen",
Expand Down
9 changes: 5 additions & 4 deletions l10n/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Titles" : "Titel",
"Album" : "Album",
"Scan for audio files" : "Nach Audiodateien scannen",
"Start scanning ..." : "Scannen starten ...",
"Start scanning" : "Scannen starten",
"Scanning finished!" : "Scannen beendet!",
"Audios found: " : " Audiodateien gefunden: ",
"Albums found: " : " Alben gefunden: ",
Expand Down Expand Up @@ -40,7 +40,7 @@
"- choose -" : "- auswählen -",
"Errors: " : "Fehler: ",
"Edit picture" : "Bild bearbeiten",
"If rescan does not solve this problem the files are broken" : "Wenn erneutes Scannen das Problem nicht behebt,<br>sind die Dateien defekt",
"If rescan does not solve this problem the files are broken" : "Wenn erneutes scannen das Problem nicht behebt,<br>sind die Dateien defekt",
"Disc" : "Disc",
"Discs" : "Discs",
"Track" : "Stück",
Expand All @@ -58,8 +58,9 @@
"Genres" : "Genres",
"Settings" : "Einstellungen",
"Cyrillic support" : " Kyrillisch-Unterstützung",
"Read more" : "Weitere Informationen",
"More information…" : "Mehr Informationen",
"Search for audio files in" : "Suche nach Audiodateien in",
"Formats supported by the browser" : "Vom Browser unterstützte Formate",
"Formats not supported by the browser" : "Vom Browser nicht unterstützte Formate"
"Formats not supported by the browser" : "Vom Browser nicht unterstützte Formate",
"Please reset and rescan library to make use of new features." : "Bitte Bibliothek zurücksetzen und erneut scannen, um neue Funktionen nutzen zu können."
},"pluralForm":""}
6 changes: 3 additions & 3 deletions l10n/pl.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OC.L10N.register(
"No playlist selected!" : "Nie wybrano Playlisty!",
"Sort modus active" : "Przetwarzanie włączone",
"Playlist successfully deleted!" : "Playlista została usunięta!",
"Start scanning ..." : "Rozpocznij skanowanie ...",
"Start scanning" : "Rozpocznij skanowanie",
"Scanning finished! New Audios found!" : "Skanowanie zakończone! Znalezione nowe pliki audio!",
"Yes" : "Tak",
"No" : "Nie",
Expand Down Expand Up @@ -48,14 +48,14 @@ OC.L10N.register(
"Upload" : "Wgraj",
"Drop picture" : "Upuść zdjęcie",
"Select picture" : "Wybierz zdjęcie",
"Picture generating, please wait ..." : "Generowanie zdjęcia, proszę czekać ...",
"Picture generating, please wait" : "Generowanie zdjęcia, proszę czekać",
"Drag picture here!" : "Przeciągnij tutaj zdjęcie!",
"Settings" : "Settings",
"Select a single folder with audio files" : "Select a single folder with audio files",
"Invalid path!" : "Invalid path!",
"saved" : "saved",
"Reset library" : "Reset library",
"Start resetting library ..." : "Start resetting library ...",
"Start resetting library" : "Start resetting library",
"Resetting finished!" : "Resetowanie zakończone!",
"All library entries will be deleted!" : "All library entries will be deleted!",
"Close" : "Zamknij",
Expand Down
9 changes: 5 additions & 4 deletions l10n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Titles" : "Tytuły",
"Album" : "Album",
"Scan for audio files" : "Skanowanie plików audio",
"Start scanning ..." : "Rozpocznij skanowanie ...",
"Start scanning" : "Rozpocznij skanowanie",
"Scanning finished!" : "Skanowanie zakończone!",
"Audios found: " : " Znaleziono nowe tytuły: ",
"Albums found: " : " Znaleziono nowe albumy: ",
Expand All @@ -19,7 +19,7 @@
"Volume" : "Głośność",
"previous song" : "poprzedni utwór",
"next song" : "następny utwór",
"play/ pause" : "graj/pauza",
"play/ pause" : "graj/ pauza",
"Cancel" : "Anuluj",
"Close" : "Zamknij",
"Length" : "Długość",
Expand Down Expand Up @@ -58,8 +58,9 @@
"Genres" : "Gatunki",
"Settings" : "Settings",
"Cyrillic support" : "Obsługa cyrylicy",
"Read more" : "Czytaj więcej",
"More information…" : "More information…",
"Search for audio files in" : "Wyszukiwanie plików audio w",
"Formats supported by the browser" : "Formats supported by the browser",
"Formats not supported by the browser" : "Formats not supported by the browser"
"Formats not supported by the browser" : "Formats not supported by the browser",
"Please reset and rescan library to make use of new features." : "Please reset and rescan library to make use of new features."
},"pluralForm":""}
6 changes: 3 additions & 3 deletions l10n/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OC.L10N.register(
"No playlist selected!" : "Не выбран список воспроизведения!",
"Sort modus active" : "Включено упорядочивание",
"Playlist successfully deleted!" : "Список воспроизведения удалён!",
"Start scanning ..." : "Начать поиск ...",
"Start scanning" : "Начать поиск",
"Scanning finished! New Audios found!" : "Поиск окончен! Новые аудиофайлы обнаружены!",
"Yes" : "Да",
"No" : "Нет",
Expand Down Expand Up @@ -48,14 +48,14 @@ OC.L10N.register(
"Upload" : "Загрузить",
"Drop picture" : "Drop picture",
"Select picture" : "Select picture",
"Picture generating, please wait ..." : "Picture generating, please wait ...",
"Picture generating, please wait" : "Picture generating, please wait",
"Drag picture here!" : "Drag picture here!",
"Settings" : "Settings",
"Select a single folder with audio files" : "Select a single folder with audio files",
"Invalid path!" : "Invalid path!",
"saved" : "saved",
"Reset library" : "Reset library",
"Start resetting library ..." : "Start resetting library ...",
"Start resetting library" : "Start resetting library",
"Resetting finished!" : "Сброс выполнен!",
"All library entries will be deleted!" : "All library entries will be deleted!",
"Close" : "Закрыть",
Expand Down
Loading