Script - writeConfig with QVariant

2013-03-14 Thread El boulangero
Hello everyone,

I writing a scritp for Amarok at the moment, and I have a question
regarding the Amarok.Script API.

I understand perfectly the config function with string argument, ie:
+ String readConfig( String name, String defaultValue )
+ void writeConfig( String name, String content )

But I'm curious about the two other ones, with QVariant argument:
+ QVariant readConfig( String name, QVariant defaultValue )
+ void writeConfig( String name, QVariant content )

At first, I thought that with these functions, I could put my script
config in a JSON object, and save it in one call.

For example:
>
> var defconfig = {
> "time": {
> "monday": {
> "enabled": "true",
> "value": "08:00:00"
> }
> }
> };
>
> Amarok.Script.writeConfig("", defconfig);


But if I try that, I get the following error:
>
> Script error reported by: Good Morning TypeError: ambiguous call of 
> overloaded function writeConfig(); candidates were 
> writeConfig(QString,QVariant) writeConfig(QString,QString)

Is there something else I should do in order to use these functions ?
Or maybe I'm completely wrong, these functions are not suppose to be
used with JSON objects ?

Thanks for your lights on this subject !


Best Regards,

Arnaud
___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


Re: Review Request 109470: A patch which allows us to distinguish between cached lyrics and lyrics newly downloaded from the internet.

2013-03-14 Thread mayank jha

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109470/
---

(Updated March 14, 2013, 10:48 a.m.)


Review request for Amarok, Samikshan Bairagya, Jasneet Bhatti, Bartosz 
Brachaczek, Tirtha Chatterjee, and Matěj Laitl.


Description
---

It required modifications, when there is no change in the lyrics downloaded and 
lyrics retrieved from cache the title display of the lyrics browser changes to 
"Cached Lyrics" from "Lyrics" so we can tell the difference between old and 
new. 


Diffs
-


Diff: http://git.reviewboard.kde.org/r/109470/diff/


Testing
---

Its working fine!


Thanks,

mayank jha

___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


Re: Review Request 109470: A patch which allows us to distinguish between cached lyrics and lyrics newly downloaded from the internet.

2013-03-14 Thread mayank jha

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109470/
---

(Updated March 14, 2013, 10:50 a.m.)


Review request for Amarok, Samikshan Bairagya, Jasneet Bhatti, Bartosz 
Brachaczek, Tirtha Chatterjee, and Matěj Laitl.


Description
---

It required modifications, when there is no change in the lyrics downloaded and 
lyrics retrieved from cache the title display of the lyrics browser changes to 
"Cached Lyrics" from "Lyrics" so we can tell the difference between old and 
new. 


Diffs
-


Diff: http://git.reviewboard.kde.org/r/109470/diff/


Testing
---

Its working fine!


File Attachments (updated)


lyricsengine channges
  http://git.reviewboard.kde.org/media/uploaded/files/2013/03/14/lyrcach.diff
lyrics applet changes
  http://git.reviewboard.kde.org/media/uploaded/files/2013/03/14/lyrcach2.diff


Thanks,

mayank jha

___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


Re: Problem with Audio CD

2013-03-14 Thread Matěj Laitl
On 13. 3. 2013 kEsHa sHaH wrote:
> Heyy..
> I have reopened working on bug related to audio cd and am facing some crisis
> ! On inserting an Audio CD, it does show up in my collection pane, but with
> 0 tracks. Also, further checking in dolphin, audiocd:/ did not show any
> files/folders/tracks.
> 
> The CD is working fine. I did the same process on my friend's system and it
> worked well. But trying to Copy Collection from audio cd to Local
> Collection on his system did not work. The notification showed up-'Copying
> 17 tracks' but there was no progress.

This is very likely not your fault. Sometimes the CD is not readable in one 
drive, but works in another (depending on quality of the drive). I suggest you 
try with different audio CDs (ideally burnt by different drives or old-style 
pressed Audio CDs) and also try more times, sometimes I'm lucky on third try. 
Note that if the CD doesn't show up under audiocd:/ in Dolphin, Amarok is 
hopeless as it currently depends on the KIO for enumeration and copying.

P.S.: such messages are better sent directly to amarok-devel@kde.org, 
sometimes I'm off for a couple of days and someone else might be well able to 
answer you no worse than I do.

Matěj
___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


Re: [amarok] /: Add support for transcoding into the Opus format

2013-03-14 Thread Matěj Laitl
On 13. 3. 2013 Myriam Schweingruber wrote:
> Hi all,
> On Tue, Mar 5, 2013 at 4:56 PM, Matěj Laitl  wrote:
> > Git commit 18c75c41c267fe81174e27970b49d3c2e69b3002 by Matěj Laitl, on
> > behalf of Martin Brodbeck. Committed on 05/03/2013 at 14:08.
> > Pushed by laitl into branch 'master'.
> > 
> > Add support for transcoding into the Opus format
> > 
> > FEATURES:
> >  * Added transcoding support for Opus codec if ffmpeg is compiled with
> >support for the libopus library, patch by Martin Brodbeck.
> 
> Since this adds an optional dependency on taglib 1.9, this needs to be
> added to the requirements in the README file. It's annoying if people
> only find out when running cmake, they should be made aware of that
> before starting the compilation.

Quoting README file:
> * TagLib 1.7 (or newer)
>   (Metadata tagging library)
>   When compiling against 1.8 more file types are supported (MOD, IT, S3M, XM)
>   When compiling against 1.9 opus file type is supported.
>   http://developer.kde.org/~wheeler/taglib.html
>   https://github.com/taglib/taglib

Matěj
___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


Re: Review Request 108995: FIX Pre-amplifier in equalizer doesn't work

2013-03-14 Thread Harsh Gupta

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108995/
---

(Updated March 14, 2013, 11 p.m.)


Review request for Amarok.


Changes
---

Hard-coded preamp label in UI.
Renamed attribute names to match Amarok coding style.
Added a " #define NUM_EQ_PARAM 11 " in EngineController.h . Please suggest a 
better name for it.


Description
---

1. Disabled Pre-amplifier in equalizer if it is not supported by phonon.
2. Fixed top and bottom labels of first slider. Earlier band name label was at 
the top and slider value label was at the bottom for first slider.
3. Removed an extra semicolon EqualizerDialog.h .
Note : I have made an assumption that if at all preamp is present then it will 
the first element of Effect Parameter list.


This addresses bug 301311.
https://bugs.kde.org/show_bug.cgi?id=301311


Diffs (updated)
-

  src/EngineController.h 5de4beb 
  src/EngineController.cpp 58d7360 
  src/dialogs/EqualizerDialog.h fd9032b 
  src/dialogs/EqualizerDialog.cpp 7d62e10 
  src/dialogs/EqualizerDialog.ui 43b0187 

Diff: http://git.reviewboard.kde.org/r/108995/diff/


Testing
---

All unit test cases passed.
Note : I have tested it with gstreamer only. Xine phonon keep crashing on my PC.


File Attachments


Equalizer snapshot
  http://git.reviewboard.kde.org/media/uploaded/files/2013/02/17/equalizer.png


Thanks,

Harsh Gupta

___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


Re: Review Request 107473: Changes in processing playlist files

2013-03-14 Thread Tatjana Gornak

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107473/
---

(Updated March 14, 2013, 6:19 p.m.)


Review request for Amarok.


Description
---


I've started my changes with an implementation of a ASXPlaylist class,
due this work I've found that implementation of different playlist file
types has different logic, as result I end up with a rewriting
playlist's implementations.

As example of difference:
  -- Constructor M3UPlaylist::M3UPlaylist( const KUrl &url ) sets a url, but
 does not load playlist, therefore loading of playlist are
posponed till data from playlist are actualy needed (lazy loading)
 On the other hand constructor XSPFPlaylist::XSPFPlaylist( const
KUrl &url, bool autoAppend )  loads playlist.

The main idea of proposed changes is to create a unify code for
processing playlist files:
  -- lazy loading through LazyLoadPlaylist
  -- common functionality was moved to PlaylistFile.

It is worth to be noticed that this patch changes structure of
playlist's classes, bit does not changes their behavior, even if this behavior
is inconsistent in some cases.

In following patch-requests I plan to submit ASX Playlist parser and
organize playlists processing in more consistent way.


This addresses bug 291934.
https://bugs.kde.org/show_bug.cgi?id=291934


Diffs (updated)
-

  src/CMakeLists.txt c03541f 
  src/DirectoryLoader.h e53a30d 
  src/DirectoryLoader.cpp bd7fa34 
  src/browsers/playlistbrowser/PlaylistBrowserModel.h 1b7a44d 
  src/browsers/playlistbrowser/PlaylistBrowserModel.cpp 213af3b 
  src/core-impl/collections/ipodcollection/IpodPlaylistProvider.h 4dd79f3 
  src/core-impl/collections/ipodcollection/IpodPlaylistProvider.cpp abf0fae 
  src/core-impl/playlists/types/file/PlaylistFile.h 43dfdeb 
  src/core-impl/playlists/types/file/PlaylistFile.cpp 2730354 
  src/core-impl/playlists/types/file/PlaylistFileLoaderJob.h PRE-CREATION 
  src/core-impl/playlists/types/file/PlaylistFileLoaderJob.cpp PRE-CREATION 
  src/core-impl/playlists/types/file/PlaylistFileSupport.h b1a1c26 
  src/core-impl/playlists/types/file/PlaylistFileSupport.cpp 2dcc0cd 
  src/core-impl/playlists/types/file/m3u/M3UPlaylist.h 3176c45 
  src/core-impl/playlists/types/file/m3u/M3UPlaylist.cpp 2395260 
  src/core-impl/playlists/types/file/pls/PLSPlaylist.h e974539 
  src/core-impl/playlists/types/file/pls/PLSPlaylist.cpp 8fe4b51 
  src/core-impl/playlists/types/file/xspf/XSPFPlaylist.h 6cf33e9 
  src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp bbcecc3 
  src/core-impl/podcasts/sql/SqlPodcastMeta.cpp 1a025ce 
  src/core/playlists/Playlist.h 018d2af 
  src/core/playlists/Playlist.cpp 36879a1 
  src/playlist/PlaylistActions.cpp 00bf13a 
  src/playlist/PlaylistController.cpp e5bde8b 
  src/playlist/PlaylistRestorer.h PRE-CREATION 
  src/playlist/PlaylistRestorer.cpp PRE-CREATION 
  src/playlistmanager/PlaylistManager.h cbf65b0 
  src/playlistmanager/PlaylistManager.cpp 89c754b 
  src/playlistmanager/SyncedPlaylist.h fce3d14 
  src/playlistmanager/SyncedPlaylist.cpp 4f7c0b7 
  src/playlistmanager/file/PlaylistFileProvider.cpp e4e7284 
  src/playlistmanager/sql/SqlPlaylist.cpp 88e685b 
  tests/TestDirectoryLoader.h 0583a9e 
  tests/TestDirectoryLoader.cpp b98247d 
  tests/core-impl/playlists/types/file/m3u/TestM3UPlaylist.cpp b25d059 
  tests/core-impl/playlists/types/file/pls/TestPLSPlaylist.cpp 5eab2f3 
  tests/core-impl/playlists/types/file/xspf/TestXSPFPlaylist.cpp 5ea3a41 
  tests/core/playlists/CMakeLists.txt e2e0ce4 
  tests/core/playlists/TestPlaylistObserver.h PRE-CREATION 
  tests/core/playlists/TestPlaylistObserver.cpp PRE-CREATION 

Diff: http://git.reviewboard.kde.org/r/107473/diff/


Testing
---

1) All unit-tests were passed.
2) For all playlists I've also checked loading and
   saving through gui.


Thanks,

Tatjana Gornak

___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


Re: Review Request 109470: A patch which allows us to distinguish between cached lyrics and lyrics newly downloaded from the internet.

2013-03-14 Thread mayank jha

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109470/
---

(Updated March 14, 2013, 7:10 p.m.)


Review request for Amarok, Samikshan Bairagya, Jasneet Bhatti, Bartosz 
Brachaczek, Tirtha Chatterjee, and Matěj Laitl.


Description
---

It required modifications, when there is no change in the lyrics downloaded and 
lyrics retrieved from cache the title display of the lyrics browser changes to 
"Cached Lyrics" from "Lyrics" so we can tell the difference between old and 
new. 


Diffs (updated)
-

  src/context/applets/lyrics/LyricsApplet.cpp 2394964 
  src/context/engines/lyrics/LyricsEngine.h b187b73 
  src/context/engines/lyrics/LyricsEngine.cpp 2befa91 

Diff: http://git.reviewboard.kde.org/r/109470/diff/


Testing
---

Its working fine!


Thanks,

mayank jha

___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


subscribe

2013-03-14 Thread Mayank Jha

___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


subscribe

2013-03-14 Thread Mayank Jha

___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


Re: Review Request 109464: Patch which tries to fix the ordering error while tracks are copied from the hard disk to some other storage device

2013-03-14 Thread mayank jha

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109464/
---

(Updated March 14, 2013, 7:43 p.m.)


Review request for Amarok, Anmol Ahuja, Matěj Laitl, and Myriam Schweingruber.


Description
---

This patch maintains the order of artists upto the call of getKIOCopyableUrls() 
function


This addresses bug 254404.
https://bugs.kde.org/show_bug.cgi?id=254404


Diffs (updated)
-

  src/browsers/CollectionTreeView.h 3b2ca80 
  src/browsers/CollectionTreeView.cpp aac232a 
  src/context/applets/lyrics/LyricsApplet.cpp 2394964 
  src/context/engines/lyrics/LyricsEngine.h b187b73 
  src/context/engines/lyrics/LyricsEngine.cpp 2befa91 

Diff: http://git.reviewboard.kde.org/r/109464/diff/


Testing
---

seems to be working!


Thanks,

mayank jha

___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


Re: Review Request 109470: A patch which allows us to distinguish between cached lyrics and lyrics newly downloaded from the internet.

2013-03-14 Thread Jasneet Bhatti

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109470/#review29229
---


While we wait for the active developers to decide if this feature is going to 
be introduced, there are a few formatting issues to be addressed before we 
proceed.
As a rule, before you submit a patch, always make sure it adheres to the coding 
style laid out in HACKING/intro_and_style.txt
And don't let this bother you too much, almost everyone has coding style issues 
in their first patch.


src/context/applets/lyrics/LyricsApplet.cpp


The defines and includes shouldn't be clubbed together. Let the newline 
remain here. 



src/context/applets/lyrics/LyricsApplet.cpp


No need for a newline here.



src/context/applets/lyrics/LyricsApplet.cpp


Again, no need for the newlines. Keep the coding style consistent.



src/context/applets/lyrics/LyricsApplet.cpp


Leading/Trailing whitespaces to be removed.

You might not be aware of their presence in the text editor/IDE you're 
using. So make sure the indentation is done using spaces and not tabs. If 
you're using Kate, you can do this by going to Settings->Configure Kate->Editor 
Component->Editing->Indentation and setting 'Indent using' to 'Spaces'.
You could also use Mark's Vim configuration present in 
HACKING/intro_and_style.txt if you are using Vim.




src/context/applets/lyrics/LyricsApplet.cpp


Correct the formatting issues here.
Refer to the 'Formatting' section of HACKING/intro_and_style to correct the 
issues : spaces between brackets and arguments, trailing whitespaces, 
indentation, etc.



src/context/applets/lyrics/LyricsApplet.cpp


Trailing whitespace.



src/context/applets/lyrics/LyricsApplet.cpp


Unnecessary newlines.



src/context/applets/lyrics/LyricsApplet.cpp


Here too.



src/context/applets/lyrics/LyricsApplet.cpp


Indentation issue.



src/context/applets/lyrics/LyricsApplet.cpp


Superfluous newline.



src/context/engines/lyrics/LyricsEngine.h


Indentation issue.



src/context/engines/lyrics/LyricsEngine.cpp


As mentioned previously, defines and includes are not to be clubbed 
together.



src/context/engines/lyrics/LyricsEngine.cpp


Trailing whitespace.



src/context/engines/lyrics/LyricsEngine.cpp


Spaces needed between brackets and argument : newCacheLyrics( lyrics )



src/context/engines/lyrics/LyricsEngine.cpp


Superfluous newline.



src/context/engines/lyrics/LyricsEngine.cpp


Indentation issue.



src/context/engines/lyrics/LyricsEngine.cpp


Spaces needed between brackets and function arguments.



src/context/engines/lyrics/LyricsEngine.cpp


Let the newline remain here.


- Jasneet Bhatti


On March 14, 2013, 7:10 p.m., mayank jha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109470/
> ---
> 
> (Updated March 14, 2013, 7:10 p.m.)
> 
> 
> Review request for Amarok, Samikshan Bairagya, Jasneet Bhatti, Bartosz 
> Brachaczek, Tirtha Chatterjee, and Matěj Laitl.
> 
> 
> Description
> ---
> 
> It required modifications, when there is no change in the lyrics downloaded 
> and lyrics retrieved from cache the title display of the lyrics browser 
> changes to "Cached Lyrics" from "Lyrics" so we can tell the difference 
> between old and new. 
> 
> 
> Diffs
> -
> 
>   src/context/applets/lyrics/LyricsApplet.cpp 2394964 
>   src/context/engines/lyrics/LyricsEngine.h b187b73 
>   src/context/engines/lyrics/LyricsEngine.cpp 2befa91 
> 
> Diff: http://git.reviewboard.kde.org/r/109470/diff/
> 
> 
> Testing
> ---
> 
> Its working fine!
> 
> 
> Thanks,
> 
> mayank jha
> 
>

___
Amarok-devel mailing l

Re: Review Request 109470: A patch which allows us to distinguish between cached lyrics and lyrics newly downloaded from the internet.

2013-03-14 Thread Matěj Laitl
On 14. 3. 2013 Jasneet Bhatti wrote:
> http://git.reviewboard.kde.org/r/109470/#review29229
> 
> While we wait for the active developers to decide if this feature is going
> to be introduced, there are a few formatting issues to be addressed before
> we proceed. As a rule, before you submit a patch, always make sure it
> adheres to the coding style laid out in HACKING/intro_and_style.txt And
> don't let this bother you too much, almost everyone has coding style issues
> in their first patch.

Thank you very much for the preliminary review, this is much appreciated! It 
takes a lot of repetitive work from core developers (who can therefore give 
more time to actually review tricky parts of the logic). As a bonus, this 
keeps newcomers motivated, as they get rather responsive replies.

I encourage you to review more of the patches from newcomers like this. :-)

Matěj
___
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel