Bug 172688 - Podcast list disapear after closing amarok
Summary: Podcast list disapear after closing amarok
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Podcast (show other bugs)
Version: 2.0-SVN
Platform: Mandriva RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-13 00:21 UTC by Pierre Bernardeau
Modified: 2009-12-09 11:28 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Bernardeau 2008-10-13 00:21:08 UTC
Version:           2.0 SVN (using KDE 4.1.2)
OS:                Linux
Installed from:    Mandriva RPMs

If I add a podcast to the list (from the playlist menu), I can listen to it without problems. Then, if I close amarok, when I will re-open it, the podcast will no more be in the list. The podcast list is empty. It happens with one single or many podcast.
The podcast list is empty after each restart of the application.
Comment 1 John McGrath 2008-10-28 15:33:18 UTC
I have also seen this bug.

I installed Mandriva 2009.0, KDE4, Amarok 2 Beta 2.

Version: 2.0 SVN (using KDE 4.1.2) OS: Linux Installed from: Mandriva RPMs 

When I add a podcast to the Podcast List and close Amarok, the listing disappears.

Comment 2 Felix Michel 2008-10-29 23:58:43 UTC
same here. would be very nice if you can fix this problem.

thanks

felix
Comment 3 Felix Michel 2008-10-30 00:00:37 UTC
sorry i forgot system informations. archlinux kdemod 4.1.2, amarok version 2.0-svn
Comment 4 Martin Schlander 2008-11-05 14:03:02 UTC
+1

Seen with openSUSE rpms of beta2 and now also beta3. By far the most critical bug for me.
Comment 5 S. Burmeister 2008-11-05 14:14:57 UTC
I think the problem is: amarok:        [ERROR!] GREPME MySQLe query failed! Table 'amarok.podcastchannels' doesn't exist  on  "INSERT INTO podcastchannels(url,title,weblink,image,description,copyright,directory,labels,subscribedate,autoscan,fetchtype,haspurge,purgecount) VALUES ( ...

svn rev. 880403
Comment 6 Lydia Pintscher 2008-11-05 14:22:49 UTC
Confirming based on comments.
Comment 7 Bart Cerneels 2008-11-05 15:45:40 UTC
A lot of work has been put into the podcast since beta2, which most of these distro packages seem to be based on.
I'm closing this as FIXED, because I can not reproduce it in any way with revision 880470.

Try again with RC1 once it's out or use an svn version.
Comment 8 S. Burmeister 2008-11-05 18:28:36 UTC
This bug has to be reopend, because it is not fixed in Revision: 880484

If you cannot reproduce it, check your database and remove the amarok.podcastchannels, because as you could have read in the previous comment, if it does not exist, it is not created. Obviously it works if it was created at some point. Revision: 880484 does not do so.
Comment 9 S. Burmeister 2008-11-05 18:33:07 UTC
Just to make sure it does not depend on any special way of adding podcasts. What I do is: Open amarok, click on the playlist-pane, click on the podcast section, click on Add, paste a url, http://www.dradio.de/rss/podcast/sendungen/hintergrund?mode=text click ok, the podcast is added, quit amarok, start amarok.
Comment 10 Sebastian Turzański 2008-11-06 00:19:07 UTC
I confirm - the bug exists in beta3
Comment 11 Seb Ruiz 2008-11-09 01:01:44 UTC
SVN commit 881811 by seb:

Properly create database tables in MySQL. MySQL doesn't like to create indexes on varchar types with sizes > 1000. This is because mysql crap. The solution is to add a FULLTEXT index on the tables, and whilst this is quite slow, we shouldn't ever have too much data in the tables to make this a drawback.
I've also taken the liberty of using the mysql TEXT datatype rather than a maxwidth type as this gives us more flexibility (nothing as terrible as truncating data). If the mysql is as good as postgres'  TEXT implementation, then there should be 0 impact on this change.
The FULLTEXT index is a feature of MYISAM tables and will break if we change this to any other storage type later. I've added a warning in the MySqlEmbeddedCollection ctor.
BUG: 172688


 M  +1 -0      ChangeLog  
 M  +3 -1      src/collection/sqlcollection/MySqlEmbeddedCollection.cpp  
 M  +15 -13    src/podcasts/sql/SqlPodcastProvider.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=881811
Comment 12 Bart Cerneels 2008-11-10 10:16:54 UTC
SVN commit 882276 by shanachie:

Update podcast tables from version 2 to version 3.
This bug has NOT been fixed yet since the tables weren't created for those affected. I was able to create version 2 tables, so something else must have been wrong.

At least now there is an upgrade path for those that were not affected.

CCBUG: 172688


 M  +52 -6     SqlPodcastProvider.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=882276
Comment 13 Bart Cerneels 2008-11-10 10:41:40 UTC
It appears my version of MySql (5.0.51a) doesn't suffer from the same limitations as more recent ones (>5.1).

So sebr's commit probably solves the problem by removing the UNIQUE constraint from 'url' in both tables.

Closing bug again.
Comment 14 Sam Baumhaus 2008-12-11 12:51:17 UTC
Same here. Most of my podcast work fine but there is one podcast which disappears after closing amarok. This is one podcast from the german radio station SWR3 (by the way all the other podcasts from SWR3 I tested work just fine). For everyone to test it, I post the link to the RSS-feat:

http://www.swr3.de/rss/Wie_20war_20der_20Tag,_20Liebling_3F/-/id=477150/did=477162/1neezeu/index.xml

I hope this bug gets fixed soon and I hope podcast-support in general will improve in the future it is still far too buggy.
Comment 15 Sam Baumhaus 2008-12-11 12:59:38 UTC
(In reply to comment #14)
> Same here. Most of my podcast work fine but there is one podcast which
> disappears after closing amarok. This is one podcast from the german radio
> station SWR3 (by the way all the other podcasts from SWR3 I tested work just
> fine). For everyone to test it, I post the link to the RSS-feat:
> 
> http://www.swr3.de/rss/Wie_20war_20der_20Tag,_20Liebling_3F/-/id=477150/did=477162/1neezeu/index.xml
> 
> I hope this bug gets fixed soon and I hope podcast-support in general will
> improve in the future it is still far too buggy.
> 
I forgot something:
Bug is still there using Amarok 2.0, (k)Ubuntu 8.10 - packages

Demanding to reopen the bug.
Comment 16 Mark Kretschmann 2008-12-11 13:02:15 UTC
@Sam: "Requesting" is a friendlier wording for that. Done.
Comment 17 Bart Cerneels 2008-12-11 13:12:13 UTC
I suggest you first clean your database. I think there is old cruft left in your podcastepisodes table.

There is a way to clean it up without having to delete the whole collection:
* Got to Amarok>Tools>Scriptmanager, start the Amarok Script Console.
* Amarok.Collection.query("SELECT channel,url FROM podcastepisodes;");
 if it returns something (%channel_id) pointing to the affected podcast do
  Amarok.Collection.query("DELETE FROM podcastepisodes WHERE channel=%channel_id;");

Please let us know how that went.

Bart
Comment 18 Sam Baumhaus 2008-12-11 19:02:16 UTC
@Mark: Of course I didn't intended to insult anybody I won't demand anymore and the crazy thing is I actually wanted to write "request" and for some reason I decided to write demand. ;-)
But anyway...


@everyone
(In reply to comment #17)
> I suggest you first clean your database. I think there is old cruft left in
> your podcastepisodes table.
> 
> There is a way to clean it up without having to delete the whole collection:
> * Got to Amarok>Tools>Scriptmanager, start the Amarok Script Console.
> * Amarok.Collection.query("SELECT channel,url FROM podcastepisodes;");
>  if it returns something (%channel_id) pointing to the affected podcast do
>   Amarok.Collection.query("DELETE FROM podcastepisodes WHERE
> channel=%channel_id;");
> 
> Please let us know how that went.
> 
> Bart
> 

I tried your suggestion with the scriptmanager but with no luck. It found quite a few corrupted podcasts and I deleted each one of them. After restarting amarok and adding the podcast amarok deleted it again after closing.

After that I decided to delete all my amarok config files (including database) and start with a fresh amarok. That didn't solve the problem neither. And like before the new added podcast is shown in the script console after restarting amarok.
Comment 19 Bart Cerneels 2008-12-12 09:08:13 UTC
Managed to reproduce, I wonder why I couldn't before.

Pasting the relevant output here as reference:

amarok:      [ERROR!] GREPME MySQLe query failed! You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%13 )' at line 1  on  "INSERT INTO podcastchannels(url,title,weblink,image,description,copyright,directory,labels,subscribedate,autoscan,fetchtype,haspurge,purgecount) VALUES ( 'http://www.swr3.de/rss/Wie_20war_20der_20Tag,_20Liebling_3F/-/id=477150/did=477162/1neezeu/index.xml','Wie warder Tag, Liebling?','','','Das darf nur einer: Anke Engelke im Radio fragen, wie ihr Tag war! Schließlich hat SWR3-Moderator Kristian Thees früher einmal mitihr zusammen Radio gemacht und ruft sie jetzt regelmäßig aus seiner Sendung (SWR3 Club, von 19 bis 22 Uhr) an. Worüber die beiden dann plaudern, könnt ihr euch hier im SWR3-Wie-war-der-Tag-Liebling-Podcast reinziehen!','','file:///home/sah5039/.amarok-nightly/share/apps/amarok/podcasts/Wie%20war%20der%20Tag,%20LieblingF','Fri Dec 12 2008','1',1,0,10,%13 );"

Have you seen this error before in the output Sam? It looks like a separate issue then the original reporter. That bug was probably fixed, this is a new one with the same result.
Comment 20 Sam Baumhaus 2008-12-12 11:28:17 UTC
Maybe I'm doing something wrong. On the script console I get only something like that (using "Amarok.Collection.query("SELECT channel,url FROM podcastepisodes;");" ):

0,http://www.swr3.de/mpg/specialcomix/wie_war_der_tag_liebling/241975.6444m.mp3,0,http://www.swr3.de/mpg/specialcomix/wie_war_der_tag_liebling/238653.6444m.mp3,0,http://www.swr3.de/mpg/specialcomix/wie_war_der_tag_liebling/238948.6444m.mp3,0,http://www.swr3.de/mpg/specialcomix/wie_war_der_tag_liebling/240876.6444m.mp3,0,http://www.swr3.de/mpg/specialcomix/wie_war_der_tag_liebling/241138.6444m.mp3,0,http://www.swr3.de/mpg/specialcomix/wie_war_der_tag_liebling/241362.6444m.mp3,0,http://www.swr3.de/mpg/specialcomix/wie_war_der_tag_liebling/241678.6444m.mp3

I don't know how to catch all those MySQL-Information. I started amarok in console but once it was started I got back to prompt and didn't receive any more errors or anything else.
Comment 21 Sam Baumhaus 2008-12-12 22:04:01 UTC
(In reply to comment #19)
> Managed to reproduce, I wonder why I couldn't before.
> 
> Pasting the relevant output here as reference:
> 
> amarok:      [ERROR!] GREPME MySQLe query failed! You have an error in your SQL
> syntax; check the manual that corresponds to your MySQL server version for the
> right syntax to use near '%13 )' at line 1  on  "INSERT INTO
> podcastchannels(url,title,weblink,image,description,copyright,directory,labels,subscribedate,autoscan,fetchtype,haspurge,purgecount)
> VALUES (
> 'http://www.swr3.de/rss/Wie_20war_20der_20Tag,_20Liebling_3F/-/id=477150/did=477162/1neezeu/index.xml','Wie
> warder Tag, Liebling?','','','Das darf nur einer: Anke Engelke im Radio fragen,
> wie ihr Tag war! Schließlich hat SWR3-Moderator Kristian Thees früher einmal
> mitihr zusammen Radio gemacht und ruft sie jetzt regelmäßig aus seiner
> Sendung (SWR3 Club, von 19 bis 22 Uhr) an. Worüber die beiden dann plaudern,
> könnt ihr euch hier im SWR3-Wie-war-der-Tag-Liebling-Podcast
> reinziehen!','','file:///home/sah5039/.amarok-nightly/share/apps/amarok/podcasts/Wie%20war%20der%20Tag,%20LieblingF','Fri
> Dec 12 2008','1',1,0,10,%13 );"
> 
> Have you seen this error before in the output Sam? It looks like a separate
> issue then the original reporter. That bug was probably fixed, this is a new
> one with the same result.
> 


I finally found the debugging option when starting amarok and I had the same MySQL error as you when I added the podcast.
Comment 22 Bart Cerneels 2008-12-16 21:37:00 UTC
SVN commit 897794 by shanachie:

The question mark in a German podcast title caused one value to be hidden in the SQL query.

I've fixed it by running the title through Amarok::vfatPath() but the real issue is probably in KUrl or MySqlCollection::escape(). Might be fixed in a better way.

BUG:172688


 M  +27 -27    SqlPodcastMeta.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=897794